Search completed in 1.07 seconds.
2140 results for "once":
Your results are loading. Please wait...
Basic concepts - Web APIs
about this document this introduction discusses essential concepts and terminology in indexeddb.
... it gives you the big picture and explains key concepts.
... you'll find the following useful: for an overview of the design and structure of indexeddb, see big concepts.
...And 6 more matches
General asynchronous programming concepts - Learn web development
overview: asynchronous next in this article, we'll run through a number of important concepts relating to asynchronous programming, and how this looks in web browsers and javascript.
... you should understand these concepts before working through the other articles in the module.
... objective: to understand the basic concepts behind asynchronous programming, and how they manifest in web browsers and javascript.
...And 5 more matches
HTMLOrForeignElement.nonce - Web APIs
the nonce property of the htmlorforeignelement interface returns the cryptographic number used once that is used by content security policy to determine whether a given fetch will be allowed to proceed.
... in later implementations, elements only expose their nonce attribute to scripts (and not to side-channels like css attribute selectors).
... examples retrieving a nonce value in the past, not all browsers supported the nonce idl attribute, so a workaround is to try to use getattribute as a fallback: let nonce = script['nonce'] || script.getattribute('nonce'); however, recent browsers version hide nonce values that are accessed this way (an empty string will be returned).
...And 3 more matches
Streams API concepts - Web APIs
some of the concepts and terminology associated with streams might be new to you — this article explains all you need to know.
... pull sources require you to explicitly request data from them once connected to.
... teeing even though only a single reader can read a stream at once, it is possible to split a stream into two identical copies, which can then be read by two separate readers.
...And 2 more matches
Basic concepts of Logical Properties and Values - CSS: Cascading Style Sheets
block and inline dimensions a key concept of working with flow relative properties and values is the two dimensions of block and inline.
... as we saw above, newer css layout methods such as flexbox and grid layout use the concepts of block and inline rather than right and left/top and bottom when aligning items.
...these are shorthands made possible by the fact that we can refer to both edges of the block or inline dimension at once.
... note: the css working group are currently trying to decide what to do about the four-value shorthands for logical properties, for example the equivalents to setting four physical properties at once, like margins with the margin property.
PR_CallOnce
ensures that subsystem initialization occurs only once.
... syntax prstatus pr_callonce( prcalloncetype *once, prcalloncefn func); parameters pr_callonce has these parameters: once a pointer to an object of type prcalloncetype.
...the function will be called once, at most, for each subsystem to be initialized.
Basic Concepts of grid layout - CSS: Cascading Style Sheets
alignment control grid contains alignment features so we can control how the items align once placed into a grid area, and how the entire grid is aligned.
...conceptually it is like a table cell.
... as we saw in our earlier examples, once a grid is defined as a parent the child items will lay themselves out in one cell each of the defined grid.
Digital video concepts - Web media technologies
in this article, we explore important concepts that are useful to understand in order to fully grasp how to work with video on the web.
... as our eyes capture a scene, they essentially take two photos at once: a finely-detailed greyscale image and a somewhat fuzzy, lower-resolution map of the colors of light received across the retina at the same time.
... yuv concepts yuv works by defining a color space with three components: luma (y') the brightness of the pixel.
WebAssembly Concepts - WebAssembly
this article explains the concepts behind how webassembly works including its goals, the problems it solves, and how it runs inside the web browser's rendering engine.
... webassembly key concepts there are several key concepts needed to understand how webassembly runs in the browser.
... all of these concepts are reflected 1:1 in the webassembly javascript api.
PRCallOnceType
syntax #include <prinit.h> typedef struct prcalloncetype { printn initialized; print32 inprogress; prstatus status; } prcalloncetype; fields the structure has these fields: initialized if not zero, the initialization process has been completed.
... description the client is responsible for initializing the prcalloncetype structure to all zeros.
Fetch basic concepts - Web APIs
this article explains some of the basic concepts of the fetch api.
...if you find a fetch concept that you feel needs explaining better, let someone know on the mdn discussion forum, or mdn web docs room on matrix.
Web Animations API Concepts - Web APIs
this article will introduce you to the important concepts behind the waapi, providing you with a theoretical understanding of how it works so you can use it effectively.
... core concepts web animations consist of timeline objects, animation objects, and animation effect objects working together.
Basic concepts of flexbox - CSS: Cascading Style Sheets
before we can make sense of these properties we need to consider the concept of available space.
...this concept of available space is also important when we come to look at aligning items.
Viewport concepts - CSS: Cascading Style Sheets
this article explains the concept of the viewport — what it is, its impact in terms of css, svg, and mobile devices — and differentiates between the visual viewport and the layout viewport.
...mobile browsers render pages in a virtual window or viewport, generally at 980px, which is usually wider than the screen, and then shrink the rendered result down so it can all be seen at once.
PRCallOnceFN
syntax #include <prinit.h> typedef prstatus (pr_callback *prcalloncefn)(void); description the function is called to perform the initialization desired.
nsIDOMDesktopNotificationCenter
the nsidomdesktopnotificationcenter interface implements the dom navigator.moznotification interface.
Basic Concepts of Multicol - CSS: Cascading Style Sheets
key concepts and terminology multicol is unlike any of the other layout methods we have in css in that it fragments the content, including all descendent elements, into columns.
Digital audio concepts - Web media technologies
audio file size and network bandwidth once you know the size of a single audio frame and how many frames per second make up your audio data, you can easily calculate how much space the raw sound data itself will occupy (and therefore how much bandwidth it would consume on a network).
Index - Web APIs
WebAPIIndex
68 animation.finished api, animation, experimental, property, reference, web animations, finished, web animations api the animation.finished read-only property of the web animations api returns a promise which resolves once the animation has finished playing.
...once put into an audiobuffer, the audio can then be played by being passed into an audiobuffersourcenode.
... 488 cssunparsedvalue.foreach() api, css typed object model api, cssunparsedvalue, constructor, experimental, houdini, method, needsexample, reference, foreach() the cssunparsedvalue.foreach() method executes a provided function once for each element of the cssunparsedvalue.
...And 67 more matches
Index - Learn web development
3 accessible multimedia accessibility, article, audio, beginner, codingscripting, html, images, javascript, learn, multimedia, video, captions, subtitles, text tracks this chapter has provided a summary of accessibility concerns for multimedia content, along with some practical solutions.
... beginner, infrastructure, navigation, needsactivelearning hyperlinks, usually called links, are a foundational concept behind the web.
... beginner, infrastructure, needsactivelearning, url, resources, urls with hypertext and http, url is one of the key concepts of the web.
...And 23 more matches
Index - Archive of obsolete content
once the content has been downloaded, the extension authors proceed to use eval() to decode the string content into javascript objects.
... 456 layout system overview gecko layout is primarily concerned with providing a presentation to an html or xml document.
...once installed, it will gather startup data and display it in the about:startup page.
...And 14 more matches
DevTools API - Firefox Developer Tools
return value: a promise that is fulfilled with the toolbox instance once it has been initialized and the selected tool is loaded.
... return value: a promise that is fulfilled once the toolbox has been destroyed.
... return value: a promise that is fulfilled with the toolpanel object once the tool has finished loading.
...And 14 more matches
Rendering and the WebXR frame animation callback - Web APIs
once your webxr environment has been set up and an xrsession created to represent an ongoing xr environment session, you need to provide frames of the scene to the xr device for rendering.
... preparing the renderer once the xr session has been set up, with the webgl framebuffer connected and webgl primed with the data it needs in order to render the scene, you can set up the renderer to start running.
...once that's in hand, you request that the browser call your rendering function the next time it needs a framebuffer to render your scene.
...And 14 more matches
Index
once you have imported certificates and keys into the nss database, you can easily look them up and use them again.
...nss will usually create an in-memory (ram) presentation of certificates, once a certificate has been received from the network, read from disk, or looked up from the database, and prepare in-memory data structures that contain the certificate's properties, as well as providing a handle for the programmer to use.
... once the application is done with a handle, it should be released, allowing nss to free the associated resources.
...And 11 more matches
Index
MozillaTechXPCOMIndex
this document attempts to help them do so, first by explaining the underlying concepts, and second by describing a number of common javascript patterns that cause leaks.
...the book is presented as a tutorial about creating xpcom components, but it covers all major aspects, concepts, and terminology of the xpcom component model along the way.
... 164 iaccessiblecomponent interfaces, xpcom, xpcom interface reference this interface provides the standard mechanism for an assistive technology to retrieve information concerning the graphical representation of an object.
...And 10 more matches
sslfnc.html
nss_init isnot idempotent, so call it only once.
...nss_initreadwrite isnot idempotent, so call it only once.
... nss_nodb_init isnot idempotent, so call it only once.
...And 9 more matches
Using IndexedDB - Web APIs
if you are not familiar with indexeddb, you should first read basic concepts about indexeddb.
... with these big concepts under our belts, we can get to more concrete stuff.
...once it is fired, the onsuccess() function on request is triggered with the success event as its argument.
...And 9 more matches
CSP: script-src - HTTP
'nonce-<base64-value>' an allow-list for specific inline scripts using a cryptographic nonce (number used once).
... the server must generate a unique nonce value each time it transmits a policy.
... it is critical to provide an unguessable nonce, as bypassing a resource’s policy is otherwise trivial.
...And 8 more matches
Layout System Overview - Archive of obsolete content
layout's job: provide the presentation layout is primarily concerned with providing a presentation to an html or xml document.
...layout's support for aural presentations is undeveloped, though conceptually, it is possible and supported by the architecture.
... how layout does its job: frames and reflow so, layout is concerned with providing a presentation, in galley or paged mode.
...And 7 more matches
Cooperative asynchronous JavaScript: Timeouts and intervals - Learn web development
these functions are: settimeout() execute a specified block of code once after a specified time has elapsed.
... settimeout() as we said before, settimeout() executes a particular block of code once after a specified time has elapsed.
... setinterval() settimeout() works perfectly when you need to run code once after a set period of time.
...And 7 more matches
A first splash into JavaScript - Learn web development
you won't be expected to understand all of the code in detail immediately — we just want to introduce you to the high-level concepts for now, and give you an idea of how javascript (and other programming languages) work.
...the code syntax looks different, but the concepts are still largely the same.
...the game will end once the player guesses correctly, or once they run out of turns.
...And 7 more matches
Aprender y obtener ayuda - Learn web development
you concentrate deeply on a low-level topic and solving the specific problems that it brings.
... from the studies that neuroscientists have done on brain activity, we have found out that you can't really engage in both ways of learning — or thinking — at once.
... focused thinking is great for concentrating hard on specific subjects, getting into deep problem solving, and improving your mastery of the techniques required — strengthening the neural pathways in your brain where that information is stored.
...And 7 more matches
Signaling and video calling - Web APIs
once the two peers agree upon a mutually-compatible candidate, that candidate's sdp is used by each peer to construct and open a connection, through which media then begins to flow.
...we specify the autoplay attribute, ensuring once the video starts arriving, it immediately plays.
... once the rtcpeerconnection has been created, we request access to the user's camera and microphone by calling mediadevices.getusermedia(), which is exposed to us through the navigator.mediadevices.getusermedia property.
...And 7 more matches
Web Audio API - Web APIs
web audio concepts and usage the web audio api involves handling audio operations inside an audio context, and has been designed to allow modular routing.
...once the sound has been sufficiently processed for the intended effect, it can be linked to the input of a destination (audiocontext.destination), which sends the sound to the speakers or headphones.
... you can read about the theory of the web audio api in a lot more detail in our article basic concepts behind web audio api.
...And 7 more matches
Back to the Server: Server-Side JavaScript On The Rise - Archive of obsolete content
jaxer – server-side ajax via the firefox browser engine on the server although server-side javascript is not a new concept, jaxer implements it in a unique fashion.
...where once you would need to master not only javascript for the client-side but also some flavor of a server-side web language, jaxer puts all the rich capability of a server-side language into javascript.
... while most of the runat attribute values above are self explanatory, the server-proxy concept is best explained through example.
...And 6 more matches
Graceful asynchronous programming with Promises - Learn web development
so instead of waiting for the user, getting the chosen devices enabled, and directly returning the mediastream for the stream created from the selected sources, getusermedia() returns a promise which is resolved with the mediastream once it's available.
...it then calls getusermedia(), asking for a stream that has both video and audio tracks, then once that's been obtained, sets up a video element to show the stream coming from the camera as a "self view," then takes each of the stream's tracks and adds them to the webrtc rtcpeerconnection representing a connection to another user.
...the above functionality might look something like this: choosetoppings(function(toppings) { placeorder(toppings, function(order) { collectorder(order, function(pizza) { eatpizza(pizza); }, failurecallback); }, failurecallback); }, failurecallback); this is messy and hard to read (often referred to as "callback hell"), requires the failurecallback() to be called multiple times (once for each nested function), with other issues besides.
...And 6 more matches
Introduction to cross browser testing - Learn web development
objective: to gain an understanding of the high-level concepts involved in cross browser testing.
... once you've got an idea of the required featureset, and what technologies you will likely build these features with, you should start exploring the target audience — what browsers, devices, etc.
... once you've agreed on these details, you can go ahead and start developing the site.
...And 6 more matches
Introducing a complete toolchain - Learn web development
introducing our case study the toolchain that we are creating in this article will be used to build and deploy a mini site that lists data (taken from one of nasa's open apis) concerning potentially hazardous space objects that threaten our existence on earth!
... once you've signed up for github (click the sign up link on the homepage if you don't already have an account, and follow the instructions), you can use your github account for authentication on netlify (click sign up, then choose github from the "sign up with one of the following" list), so technically you only need to create one new account.
...there might be important decorations or music that help with your mental state — these are all important to doing your best work possible, and they should also only need to be set up once, if done properly.
...And 6 more matches
An overview of NSS Internals
once you have imported certificates and keys into the nss database, you can easily look them up and use them again.
...nss will usually create an in-memory (ram) presentation of certificates, once a certificate has been received from the network, read from disk, or looked up from the database, and prepare in-memory data structures that contain the certificate's properties, as well as providing a handle for the programmer to use.
... once the application is done with a handle, it should be released, allowing nss to free the associated resources.
...And 6 more matches
Bytecode Descriptions
both instructions would convert index to a property key for us, but the spec says to convert it only once.
...the spec requires that an objectliteral or arrayliteral creates a new object every time it's evaluated, so this instruction must not be used anywhere it might be executed more than once.
...used in derived class constructors to prohibit calling super more than once.
...And 6 more matches
JSAPI User Guide
once the functions are defined in global, any script that uses global as the global object can call them, just as any web page can call alert.
... in the environment we have created, the "hello world" script looks like this: system("echo hello world"); jsapi concepts this section aims to fill in the major gaps in the picture of the jsapi presented so far.
... once the c++ function returns false, the javascript engine starts unwinding the javascript stack, looking for a catch or finally block to execute.
...And 6 more matches
Starting WebLock
once you do this, the observer service implementing nsiobserverservice can notify your object of registered events by means of this interface, as in the figure below.
...once you have it, you can add the component to the category of components that get started automatically.
... once you have a nsiservicemanager reference, you can ask it for the service you are interested in.
...And 6 more matches
Viewpoints and viewers: Simulating cameras in WebXR - Web APIs
there are a few articles about the fundamental math, geometry, and other concepts behind webgl and webxr which may be useful to read before or while reading this one, including: explaining basic 3d theory matrix math for the web webgl model view projection geometry and reference spaces in webxr ed.
... once you've determined the matrix representing the combination of movements you wish the camera to make, you need to reverse it, because you're not moving the camera.
... composing multiple transforms if your camera needs to be performing multiple transforms simultaneously, such as zooming and panning at the same time, you can multiply the transform matrices together to compose them into a single matrix that applies both changes at once.
...And 6 more matches
Web Accessibility: Understanding Colors and Luminance - Accessibility
color, contrast, and luminance are among the most central and critical concepts to creating accessible web content with color.
...in others, "chroma" and "saturation" are two different concepts.
... for digital concerns, much of the technology has historically resided in the rgb color space.
...And 6 more matches
Introduction to XUL - Archive of obsolete content
this paper contains a short introduction to mozilla front-end architecture, concentrating on the task of building uis.
... applications, for instance, will have preconceived notions of what to do when they receive an "open file" command.
... we are at first primarily concerned with the obvious ui components: toolbars, menus and dialogs.
...And 5 more matches
Introduction to Public-Key Cryptography - Archive of obsolete content
this document introduces the basic concepts of public-key cryptography.
... the sections that follow introduce the concepts of public-key cryptography that underlie these capabilities.
...after entering this password once, the user doesn't need to enter it again for the rest of the session, even when accessing other ssl-enabled servers.
...And 5 more matches
Anatomy of a video game - Game development
this once-per-frame model is implemented in something called a main loop.
... modern javascript — as described in the next sections — thankfully makes it easy to develop an efficient, execute-once-per-frame main loop.
...because main() is called once in the second statement and every call of it places itself in the queue of things to do next frame, main() is synchronized to your framerate.
...And 5 more matches
Index - MDN Web Docs Glossary: Definitions of Web-related terms
the concept of a constructor can be applied to most object-oriented programming languages.
...it is the space between four intersecting grid lines and conceptually much like a table cell.
...for more information, read fetch basic concepts: guard.
...And 5 more matches
Cascade and inheritance - Learn web development
overview: building blocks next the aim of this lesson is to develop your understanding of some of the most fundamental concepts of css — the cascade, specificity, and inheritance — which control how css is applied to html and how conflicts are resolved.
...we encourage you to work through this section carefully, and check that you understand the concepts before moving on.
...the cascade, and the closely-related concept of specificity, are mechanisms that control which rule applies when there is such a conflict.
...And 5 more matches
Client-side storage - Learn web development
the user would only have to download the music files once — on subsequent visits they would be retrieved from the database instead.
... old school: cookies the concept of client-side storage has been around for a long time.
...once the request has succeeded, we clear the form inputs ready for entering the next note.
...And 5 more matches
Introduction to automated testing - Learn web development
once the install completes, test that node is installed by typing the following into the terminal, which returns the installed versions of node and npm: node -v npm -v if you've got node/npm already installed, you should update them to their latest versions.
... once all the questions have been asked, it will ask you if the information entered is ok.
... var build = gulp.parallel(html,css,js); exports.html = html; exports.css = css; exports.js = js; exports.build = build; /* * define default task that can be called by just running `gulp` from cli */ exports.default = build; further ideas once this is all set up, you can run the gulp command inside your project directory, and you should get an output like this: you can then try out the files output by your automated tasks by looking at them inside the build directory, and loading build/index.html in your web browser.
...And 5 more matches
Eclipse CDT
once your build is complete, mach can then generate a useful eclipse project on your behalf.
...rerun it (and then rebuild the index) once a week or so, or as necessary when you start to notice unusual code assistance issues that aren't fixed by rebuilding the index alone.
... headers are only parsed once for performance reasons, eclipse only processes header files that have include guards once, using the compiler options for the first source file it encounters that includes that header (eclipse bug 380511).
...And 5 more matches
AesCtrParams - Web APIs
a given counter block value must never be used more than once with the same key: given a message n blocks long, a different counter block must be used for every block.
... typically this is achieved by splitting the initial counter block value into two concatenated parts: a nonce (that is, a number that may only be used once).
... the nonce part of the block stays the same for every block in the message.
...And 5 more matches
Using readable streams - Web APIs
note: this article assumes that you understand the use cases of readable streams, and are aware of the high-level concepts.
... if not, we suggest that you first read the streams concepts and usage overview and dedicated streams api concepts article, then come back.
... creating your own custom readable stream the simple stream pump example we’ve been studying throughout this article includes a second part — once we’ve read the image from the fetch body in chunks, we then enqueue them into another, custom stream of our own creation.
...And 5 more matches
Establishing a connection: The WebRTC perfect negotiation pattern - Web APIs
perfect negotiation concepts perfect negotiation makes it possible to seamlessly and completely separate the negotiation process from the rest of your application's logic.
...as far as your application is concerned, it makes no difference whether you're calling out or receiving a call.
...however you make the determination, once these roles are assigned to the two peers, they can then work together to manage signaling in a way that doesn't deadlock and doesn't require a lot of extra code to manage.
...And 5 more matches
WebXR Device API - Web APIs
once both eyes' perspectives on the scene have been rendered, the resulting framebuffer is delivered to the webxr device to be presented to the user through their headset or other appropriate display device.
... webxr device api concepts and usage example webxr hardware setup while the older webvr api was designed solely to support virtual reality (vr), webxr provides support for both vr and augmented reality (ar) on the web.
...to get an xrframe, call the session's requestanimationframe() method, providing a callback which will be called with the xrframe once available.
...And 5 more matches
Populating the page: how browsers work - Web Performance
dns lookups usually only need to be done once per hostname for a page load.
... tcp handshake once the ip address is known, the browser sets up a connection to the server via a tcp three-way handshake.
... response once we have an established connection to a web server, the browser sends an initial http get request on behalf of the user, which for websites is most often an html file.
...And 5 more matches
ui/sidebar - Archive of obsolete content
once you've done that, you can show the sidebar by calling the sidebar's show() method.
... once you've finished using the sidebar you can destroy it by calling its dispose() method.
...once a sidebar has been created it can be shown and hidden in the active window using its show() and hide() methods.
...And 4 more matches
Creating Event Targets - Archive of obsolete content
create a new file in "lib" called "bookmarks.js", and add the following code: var { emit, on, once, off } = require("sdk/event/core"); var {cc, ci} = require("chrome"); var { xpcomutils }= require("resource://gre/modules/xpcomutils.jsm"); var bookmarkservice = cc["@mozilla.org/browser/nav-bookmarks-service;1"] .getservice(ci.nsinavbookmarksservice); var bookmarkobserver = { onitemadded: function(aitemid, afolder, aindex) { emit(exports, "added", bookmarkservic...
...e.getbookmarkuri(aitemid).spec); }, onitemvisited: function(aitemid, avisitid, time) { emit(exports, "visited", bookmarkservice.getbookmarkuri(aitemid).spec); }, queryinterface: xpcomutils.generateqi([ci.nsinavbookmarkobserver]) }; bookmarkservice.addobserver(bookmarkobserver, false); exports.on = on.bind(null, exports); exports.once = once.bind(null, exports); exports.removelistener = function removelistener(type, listener) { off(exports, type, listener); }; this code implements a module which can emit added and visited events.
... it duplicates the previous code, but with a few changes: import emit(), on(), once(), and off() from event/core replace listener functions with calls to emit(), passing the appropriate event type export its own event api.
...And 4 more matches
Using XPInstall to Install Plugins - Archive of obsolete content
xpi packages make use of different apis from within install.js, although the concept is the same.
...once again, this step involves calls to getfolder to locate a "well known" directory in which to install to as a secondary install location.
... on windows, the windows registry keys mentioned above follow a nomenclature using the concept of a plugin identifier as the name of the key under the mozillaplugins subkey.
...And 4 more matches
Applying color to HTML elements using CSS - HTML: Hypertext Markup Language
how to describe a color in order to represent a color in css, you have to find a way to translate the analog concept of "color" into a digital form that a computer can use.
...the concept is the same anywhere you use color.
... the advantage to averaging colors can be that often what looks like a solid color is actually a surprisingly varied number of related colors all used in concert, blending to create a desired effect.
...And 4 more matches
Iterators and generators - JavaScript
iterators and generators bring the concept of iteration directly into the core language and provide a mechanism for customizing the behavior of for...of loops.
... once created, an iterator object can be iterated explicitly by repeatedly calling next().
... iterating over an iterator is said to consume the iterator, because it is generally only possible to do once.
...And 4 more matches
lang/functional - Archive of obsolete content
arguments : mixed additional arguments to pass to fn upon execution once(fn) creates a version of the input function that can only be called one time.
... let { once } = require("sdk/lang/functional"); let setup = once(function (env) { // initializing important things console.log("successfully initialized " + env); return 1; // assume success and return 1 }); setup('dev'); // returns 1 // prints "successfully initialized dev" // future attempts to call this function just return the cached // value that was returned previously setup('production'); // returns 1 // no print message is displayed since the function isn't executed parameters fn : function the function that will be executed only once inside the once wrapper.
... returns function : the wrapped fn that can only be executed once.
...And 3 more matches
Appendix D: Loading Scripts - Archive of obsolete content
although wary authors can choose to cache instances of their modules so that modules are loaded only once globally, this method can be easily misused to re-load scripts for each new window where they would be better loaded only once globally per session.
...in addition to the possible performance concerns, passing data between these compartments is not entirely transparent.
...although wary authors can choose to cache instances of their modules so that modules are loaded only once globally, this method can be easily misused to re-load scripts for each new window where they would be better loaded only once globally per session.
...And 3 more matches
The web and web standards - Learn web development
in 1980, tim berners-lee (often referred to as timbl) wrote a notebook program called enquire, which featured the concept of links between different nodes.
...once you embrace the constant change and uncertainty of the web, you'll start to enjoy yourself.
...the following simple javascript will store a reference to our paragraph in memory and change the text inside it: let pelem = document.queryselector('p'); pelem.textcontent = 'we changed the text!'; in the house analogy, javascript is like the cooker, tv, microwave, or hairdryer — the things that give your house useful functionality tooling once you've learned the "raw" technologies that can be used to build web pages (such as html, css, and javascript), you'll soon start to come across various tools that can be used to make your work easier or more efficient.
...And 3 more matches
Introduction to events - Learn web development
in this article, we discuss some important concepts surrounding events, and look at how they work in browsers.
...the node.js event model relies on listeners to listen for events and emitters to emit events periodically — it doesn't sound that different, but the code is quite different, making use of functions like on() to register an event listener, and once() to register an event listener that unregisters after it has run once.
... other event concepts in this section, we briefly cover some advanced concepts that are relevant to events.
...And 3 more matches
Functions — reusable blocks of code - Learn web development
previous overview: building blocks next another essential concept in coding is functions, which allow you to store a piece of code that does a single task inside a defined block, and then call that code whenever you need it using a single short command — rather than having to type out the same code multiple times.
... in this article we'll explore fundamental concepts behind functions such as basic syntax, how to invoke and define them, scope, and parameters.
... objective: to understand the fundamental concepts behind javascript functions.
...And 3 more matches
Mozilla accessibility architecture
readers of this document should be familiar with interfaces, the w3c dom, xul and the concept of a layout object tree.
...in general, the accessibility apis use similar concepts, but use different method, constant and interfaces names.
...it can read in an entire document at once, look only pieces of a document related to recent events, or traverse the accessibility object model based on screen position.
...And 3 more matches
OS.File for the main thread
promise = promise.then(function onsuccess() { // once loop is complete, finalize.
... note that the operating system limits the number of files that can be opened simultaneously by one process, so do not forget to close that file once you have finished it, to ensure that you are not blocking the rest of the process.
...if specified, write the data to a temporary file called tmppath and, once the write is complete, rename the file to replace path.
...And 3 more matches
DMD
look at the "trigger" section below to see the full list of ways to get a dmd report once you have it activated.
... adb shell su # you need root access for the setprop command to take effect setprop wrap.org.mozilla.fennec_$username "/data/local/tmp/dmd_fennec" once this is set up, starting the org.mozilla.fennec_$username app will use the wrapper script.
... "once-reported stack trace records": like the "unreported stack trace records" section, but for blocks reported once.
...And 3 more matches
Index
this hook does not implement iteration: once the properties are defined, the javascript engine can enumerate them.
... 154 jsstring jsapi reference, needscontent, spidermonkey conceptually, a javascript string is just an array of char16_t characters and a length.
...it calls the dump function once for each named root in the given runtime rt.
...And 3 more matches
An Overview of XPCOM
the book is presented as a tutorial about creating xpcom components, but it covers all major aspects, concepts, and terminology of the xpcom component model along the way.
... this chapter provides a quick tour of xpcom - an introduction to the basic concepts and technologies in xpcom and component development.
... the brief sections in this chapter introduce the concepts at a very high level, so that we can discuss and use them with more familiarity in the tutorial itself, which describes the creation of a mozilla component called weblock.
...And 3 more matches
Storage
binding multiple sets of parameters starting in gecko 1.9.2 (firefox 3.6), there's a new, more convenient way to bind multiple sets of parameters at once prior to executing your statement asynchronously.
...once all the parameters are set up, a single call to mozistoragestatement.bindparameters() will ensure that the parameters are bound before execution.
... mozstoragestatementscoper scoper(mspecialstatement); // you can use mspecialstatement without concern now.
...And 3 more matches
LocalFileSystem - Web APIs
basic concepts this section includes a few key concepts for the methods.
... you can call the method more than once if you want to create two file systems: one that's temporary and one that's persistent.
... (to learn more about the storage types, see the basic concepts article.) in most cases, you need to create only one file system, but in a few cases, it might be useful to create a second one.
...And 3 more matches
Adding 2D content to a WebGL context - Web APIs
« previousnext » once you've successfully created a webgl context, you can start rendering into it.
... fragment shader the fragment shader is called once for every pixel on each shape to be drawn, after the shape's vertices have been processed by the vertex shader.
... once the shader has the source code, it's compiled using gl.compileshader().
...And 3 more matches
Using Web Workers - Web APIs
once created, a worker can send messages to the javascript code that created it by posting messages to an event handler specified by that code (and vice versa).
... this example is rather trivial, but we decided to keep it simple while introducing you to basic worker concepts.
... here we'll concentrate on the differences between dedicated and shared workers.
...And 3 more matches
HTTP conditional requests - HTTP
http has a concept of conditional requests, where the result, and even the success of a request, can be changed by comparing the affected resources with the value of a validator.
...these validators are cached with the resource (like all headers) and will be used to craft conditional requests, once the cache becomes stale.
...but once it has become stale, this is mostly controlled by the cache-control header, the client doesn't use the cached value directly but issues a conditional request.
...And 3 more matches
CSP: style-src - HTTP
'nonce-<base64-value>' an allow-list for specific inline scripts using a cryptographic nonce (number used once).
... the server must generate a unique nonce value each time it transmits a policy.
... it is critical to provide an unguessable nonce, as bypassing a resource’s policy is otherwise trivial.
...And 3 more matches
A re-introduction to JavaScript (JS tutorial) - JavaScript
the fourth edition was abandoned, due to political differences concerning language complexity.
... unlike most programming languages, the javascript language has no concept of input or output.
...the first is good for basic looping; the second for loops where you wish to ensure that the body of the loop is executed at least once: while (true) { // an infinite loop!
...And 3 more matches
panel - Archive of obsolete content
this may take one of the following values: "start": load content scripts immediately after the document element for the panel is inserted into the dom, but before the dom content itself has been loaded "ready": load content scripts once dom content has been loaded, corresponding to the domcontentloaded event "end": load content scripts once all the content (dom, js, css, images) for the panel has been loaded, at the time the window.onload event fires this property is optional and defaults to "end".
... once a panel object has been created it can be shown and hidden using its show() and hide() methods.
... once a panel is no longer needed it can be deactivated using destroy().
...And 2 more matches
event/target - Archive of obsolete content
users of the object can listen to the events using the standard on() and once() functions.
...eventtarget interface defines convenience method for adding one shot event listeners via method once.
... such listeners are called only once next time event of the specified type is emitted: target.once('ready', function onready() { // do the thing once ready!
...And 2 more matches
MCD, Mission Control Desktop, AKA AutoConfig - Archive of obsolete content
e); //smtp general lockpref("mail.smtp.defaultserver", "smtp1"); lockpref("mail.smtpserver.smtp1.auth_method", 0); lockpref("mail.smtpserver.smtp1.hostname", "smtp-int.int-evry.fr"); lockpref("mail.smtpserver.smtp1.port", 25); lockpref("mail.smtpserver.smtp1.try_ssl", 0); lockpref("mail.smtpserver.smtp1.username", ""); lockpref("mail.smtpservers", "smtp1"); lockpref("mail.startup.enabledmailcheckonce", true); lockpref("mailnews.quotingprefs.version", 1); lockpref("mailnews.ui.threadpane.version", 5); /* 3) define here (because if set after "4)" below it doesn't work!) processldapvalues which is eventually called by getldapattributes() just below, check getldapattributes() code from $mozilla_home/defaults/autoconfig/prefcalls.js to see the inside call to "user defined" processldapvalues */ f...
...p lockpref("mail.identity.id1.smtpserver", "smtp1"); defaultpref("mail.smtpserver.smtp1.auth_method", 0); lockpref("mail.smtpservers", "smtp1"); lockpref("mail.smtpservers", "smtp1"); lockpref("mail.smtp.defaultserver", "smtp1"); lockpref("mail.smtpserver.smtp1.hostname", "smtp-int.int-evry.fr"); lockpref("mail.identity.id1.organization", "int evry france"); lockpref("mail.startup.enabledmailcheckonce", true); lockpref("mail.ui.folderpane.version", 3); lockpref("mailnews.ui.threadpane.version", 2); //ldap config lockpref("mail.identity.id1.directoryserver", "ldap_2.servers.ldapint"); lockpref("ldap_2.prefs_migrated", true); lockpref("ldap_2.servers.history.filename", "history.mab"); lockpref("ldap_2.servers.history.replication.lastchangenumber", 0); lockpref("ldap_2.servers.ldapint.auth.savep...
...mail.identity.id1.smtpserver", "smtp1"); defaultpref("mail.smtpserver.smtp1.auth_method", 0); defaultpref("mail.smtpservers", "smtp1"); defaultpref("mail.smtpservers", "smtp1"); defaultpref("mail.smtp.defaultserver", "smtp1"); defaultpref("mail.smtpserver.smtp1.hostname", "smtp-int.int-evry.fr"); lockpref("mail.identity.id1.organization", "int evry france"); lockpref("mail.startup.enabledmailcheckonce", true); lockpref("mail.ui.folderpane.version", 3); lockpref("mailnews.ui.threadpane.version", 2); //ldap config lockpref("mail.identity.id1.directoryserver", "ldap_2.servers.ldapint"); lockpref("ldap_2.prefs_migrated", true); lockpref("ldap_2.servers.history.filename", "history.mab"); lockpref("ldap_2.servers.history.replication.lastchangenumber", 0); lockpref("ldap_2.servers.ldapint.auth.savep...
...And 2 more matches
Mozilla Crypto FAQ - Archive of obsolete content
you should contact those vendors or developers directly for more information concerning their plans.
...you do not need to provide such notification in any case, but you may need to take other actions to comply with laws and regulations in your own country concerning encryption technologies.
... however, in an advisory opinion issued in reference to the bernstein case, the bureau of export administration (bxa) has stated the following: "concerning the posting onto a mirror or archive site of already-posted source code, notification is required only for the initial posting." bxa and nsa have already been notified of the posting of encryption-related source code on the mozilla site, and in light of this opinion we have therefore decidednot to ask mirror sites to provide notification themselves.
...And 2 more matches
A XUL Bestiary - Archive of obsolete content
this xulnote presents some of the key concepts and terms in the xul development environment.
...i selected items for this group because they seemed to be either shrouded in mystery, misused as concepts or terms, or underestimated according to their role in xul and cross-platform development.
... the chrome url this concept of a chrome as an integrated, dynamic thing in some way divorced from the "appcore" is realized in the use of the chrome url to point to chunks of xul and their related files.
...And 2 more matches
Index - Archive of obsolete content
ArchiveMozillaXULIndex
3 a xul bestiary add-ons, extensions, needstechnicalreview, xul this xulnote presents some of the key concepts and terms in the xul development environment.
...i selected items for this group because they seemed to be either shrouded in mystery, misused as concepts or terms, or underestimated according to their role in xul and cross-platform development.
...it explains the concept of dom documents, demonstrates a few simple examples of using dom calls to perform basic manipulations on a document, and then demonstrates working with anonymous xbl content using mozilla-specific methods.
...And 2 more matches
More Event Handlers - Archive of obsolete content
example 1 : source view <vbox oncommand="alert(event.currenttarget.tagname);"> <button label="ok"/> <checkbox label="show images"/> </vbox> stop event propagation once you handle an event, regardless of where in the propagation the event is, you will likely want to stop the event from being sent to further elements, essentially stopping the capturing or bubbling phases from continuing.
...note that once propagation or the default action has been prevented, neither may be re-enabled again for that event.
...the click event will be fired once for the first click, again for the second click, and again for the third click, but the dblclick event will only be fired once for a double click.
...And 2 more matches
WebVR — Virtual Reality for the Web - Game development
the concept of virtual reality in itself isn't new, but now we have the technology to have it working as it should be, and a javascript api to make use of it in web applications.
... note: for more information, read our webvr concepts article.
... using the webvr api the webvr api is based on two concepts — sending stereoscopic images to both lenses in your headset and receiving positional data for your head from the sensor, and those two are handled by hmdvrdevice (head-mounted display virtual reality device) and positionsensorvrdevice.
...And 2 more matches
Mobile accessibility - Learn web development
once you've selected the option you want, double-click to choose that option.
... once you've finished, find the enter key and press it.
... once voiceover is enabled, ios's basic control gestures will be a bit different: a single tap will cause the item you tap on to be selected; your device will speak the item you've tapped on.
...And 2 more matches
The box model - Learn web development
in the rest of the lesson, we will concentrate on the outer display type.
...the properties used in that example are shorthands and allow us to set all four sides of the box at once.
... we can control all margins of an element at once using the margin property, or each side individually using the equivalent longhand properties: margin-top margin-right margin-bottom margin-left in the example below, try changing the margin values to see how the box is pushed around due to the margin creating or removing space (if it is a negative margin) between this element and the containing element.
...And 2 more matches
Making asynchronous programming easier with async and await - Learn web development
once that's complete, your code continues to execute starting on the next line.
...once the response is available, the parser moves to the next line, which creates a blob out of it.
...let's have a look at some examples that prove the concept.
...And 2 more matches
JavaScript building blocks - Learn web development
looping code sometimes you need a task done more than once in a row.
... functions — reusable blocks of code another essential concept in coding is functions.
...in this article we'll explore fundamental concepts behind functions such as basic syntax, how to invoke and define functions, scope, and parameters.
...And 2 more matches
Deployment and next steps - Learn web development
ction dev: !production, // we'll extract any component css out into // a separate file - better for performance css: css => { css.write('public/build/bundle.css'); } }), later on in the same file you'll also see how rollup minimizes our scripts in production mode and launches a local server in development mode: // in dev mode, call `npm run start` once // the bundle has been generated !production && serve(), // watch the `public` directory and refresh the // browser on changes when not in production !production && livereload('public'), // if we're building for production (npm run build // instead of npm run dev), minify production && terser() ], there are many plugins for rollup that allow you to customize i...
... once it has finished deploying, go to the "production" url in your browser, and you'll see the app deployed!
... once gitlab finishes building and publishing your app, it will be accessible at https://your-user.gitlab.io/mdn-svelte-todo/; in my case it's https://opensas.gitlab.io/mdn-svelte-todo/.
...And 2 more matches
Eclipse CDT Manual Setup
once you've added this folder, delete the existing output folder that was set to the root of the project.
...(see the headers are only parsed once section below to understand why this step is important for people who have their object directory outside their source tree.) getting code assistance working you're now ready to get code assistance working.
... building the index once you see the end of the build output in the console tab and the build item has disappeared from the progress tab, you can start indexing the source.
...And 2 more matches
Localization sign-off reviews
once attached, open the attachment details.
... once you have made the formal request in bugzilla and you have pushed your work into your l10n repo, refer to the dashboards to follow your review's progress.
...once filed, they appear on your dashboard for you to fix.
...And 2 more matches
Mozilla DOM Hacking Guide
static nsresult init(): called only once, it is used to initialize the remaining members of the nsdomclassinfodata structure, as mentioned above.
... once called, init() sets sisinitialized to true, to remember that the initialization has been performed.
... nsdomclassinfo::init() this method is to be called only once.
...And 2 more matches
Mozilla Development Strategies
make sure documentation gets updated if the bug you're fixing is likely to require an update to developer documentation once it's fixed, be sure to add the dev-doc-needed keyword to the bug (or ask someone to do it, if you don't have editbugs privileges on bugzilla).
... this puts the bug on the radar of our documentation team to ensure that once the bug is resolved, the documentation will be updated appropriately.
...it's easier to do it right once, when your mind is in the problem, than to do it once quickly and then have to come back and do it again the right way.
...And 2 more matches
sslintro.html
an ssl application typically includes five parts: initialization configuration communication functions used by callbacks cleanup although the details differ somewhat for client and server applications, the concepts and many of the functions are the same for both.
...nss_init is not idempotent, so call it only once.
...this function must be called once for each default value that needs to be changed.
...And 2 more matches
Redis Tips
a transaction block is a series of commands sent all at once across the wire.
... optimistic locking your transactions are atomic once they start, but of course you can't guarantee that you'll get there first.
... that means you can subscribe to a bunch of channels at once.
...And 2 more matches
Handling Mozilla Security Bugs
in particular, we understand and acknowledge the concerns of those who believe that all information about security vulnerabilities should be publicly disclosed as soon as it is known, so that users may take immediate steps to protect themselves and so that problems can get the maximum amount of developer attention and be fixed as soon as possible.
...we understand and acknowledge the concerns of those who believe that too-hasty disclosure of exploit details can provide a short-term advantage to potential attackers, who can exploit a problem before most end users become aware of its existence.
... we believe that both sets of concerns are valid, and that both are worth addressing as best we can.
...And 2 more matches
Avoiding leaks in JavaScript XPCOM components
take every information on this site with a grain of salt, although most concepts and best practices still apply.
...this document attempts to help them do so, first by explaining the underlying concepts, and second by describing a number of common javascript patterns that cause leaks.
...we currently implement this by making the wrapper a root in the javascript garbage collector once somebody sets a javascript property on a dom node.
...And 2 more matches
Creating the Component Code
once enabled, this "weblock" mode is password protected and persists until it is turned off by the password holder.
...web lock user interface shows the icon that is used to activate the web lock mode (leftmost in the status bar) once you have installed the weblock component and the extra user interface.
... once your component implements these interfaces, the rest of the registration process itself is simple.
...And 2 more matches
Introduction to XPCOM for the DOM
pushing this concept to its maximum, a class can be "purely virtual" if it declares methods without implementing any of them.
...xpcom pushes this concept to the extreme.
...if you are concerned that it could return ns_nointerface, return ns_ok, as the previous example shows.
...And 2 more matches
Address Book examples
once you have an object that implements nsiabcollection (see above), you can search for cards with particular properties within that collection using getcardfromproperty.
... editing contacts once you have obtained a card from an nsiabdirectory (see above), you can edit it in a two step process, firstly, change the properties that you to edit: card.setproperty("firstname", "jane"); card.setproperty("lastname", "doe"); secondly, call modifycard to save the card in the database.
... addressbook.modifycard(card); deleting contacts once you have obtained a card(s) from an nsiabdirectory (see above) you can delete one or more simply by calling the deletecards function: let cardstodelete = components.classes["@mozilla.org/array;1"] .createinstance(components.interfaces.nsimutablearray); cardstodelete.appendelement(card); // repeat append as necessary addressbook.deletecards(cardstodelete); how do i add and use my own properties?
...And 2 more matches
Debugger - Firefox Developer Tools
(note that each rule is only applied once in the process of resolving a givenglobal argument.
...each source appears only once in the array.query is an object whose properties restrict which sources are returned; a source must meet all the criteria given byquery to be returned.
...each instance appears only once in the array.query is an object whose properties restrict which scripts are returned; a script must meet all the criteria given byquery to be returned.
...And 2 more matches
Intersection Observer API - Web APIs
one thing the intersection observer api can't tell you: the exact number of pixels that overlap or specifically which ones they are; however, it covers the much more common use case of "if they intersect by somewhere around n%, i need to do something." intersection observer concepts and usage the intersection observer api allows you to configure a callback that is called: (1) whenever one element, called the target, intersects either the device viewport or a specified element; for the purpose of this api, this is called the root element or root (2) and whenever the observer is asked to watch a target for the very first time typically, you'll want to watch for intersec...
... targeting an element to be observed once you have created the observer, you need to give it a target element to watch: let target = document.queryselector('#listitem'); observer.observe(target); // the callback we setup for the observer will be executed now for the first time // it waits until we assign a target to our observer (even if the target is currently not visible) whenever the target meets a threshold specified for the inte...
... we call window.addeventlistener() to start listening for the load event; once the page has finished loading, we get a reference to the element with the id "box" using queryselector(), then call the createobserver() method we'll create in a moment to handle building and installing the intersection observer.
...And 2 more matches
MediaDevices.getUserMedia() - Web APIs
privacy and security as an api that may involve significant privacy concerns, getusermedia()'s specification lays out a wide array of privacy and security requirements that browsers are obligated to meet.
... user privacy as an api that may involve significant privacy concerns, getusermedia() is held by the specification to very specific requirements for user notification and permission management.
...browsers may offer a once-per-domain permission feature, but they must ask at least the first time, and the user must specifically grant ongoing permission if they choose to do so.
...And 2 more matches
WebGLRenderingContext.bufferData() - Web APIs
possible values: gl.static_draw: the contents are intended to be specified once by the application, and used many times as the source for webgl drawing and image specification commands.
... gl.stream_draw: the contents are intended to be specified once by the application, and used at most a few times as the source for webgl drawing and image specification commands.
... when using a webgl 2 context, the following values are available additionally: gl.static_read: the contents are intended to be specified once by reading data from webgl, and queried many times by the application.
...And 2 more matches
A simple RTCDataChannel sample - Web APIs
starting up when the script is run, we set up an load event listener, so that once the page is fully loaded, our startup() function is called.
... once the answer has been created, it's passed into the remoteconnection by calling rtcpeerconnection.setlocaldescription().
... note: once again, this process is not a real-world implementation; in normal usage, there's two chunks of code running on two machines, interacting and negotiating the connection.
...And 2 more matches
Using DTMF with WebRTC - Web APIs
once the track is selected, you can obtain from its rtcrtpsender the rtcdtmfsender object you'll use for sending dtmf.
...once the tones finish transmitting, the connection is closed.
... once both the caller's and the receiver's media tracks are all stopped, we pause the <audio> element and set its srcobject to null.
...And 2 more matches
Using WebRTC data channels - Web APIs
once you've established a webrtc peer connection using the rtcpeerconnection interface, you're able to send and receive media data between the two peers on the connection.
... messages smaller than 16kib can be sent without concern, as all major user agents handle them the same way.
... concerns with large messages currently, it's not practical to use rtcdatachannel for messages larger than 64kib (16kib if you want to support cross-browser exchange of data).
...And 2 more matches
Lighting a WebXR setting - Web APIs
because the webxr device api relies on other technologies—namely, webgl and frameworks based upon it—to perform all rendering, texturing, and lighting of a scene, the same general lighting concepts apply to webxr settings or scenes as to any other webgl-generated display.
... lighting issues for mixed reality content in addition to the usual issues that you need to contend with while lighting a scene, the vr or ar use case adds additional areas of concern when writing your shaders.
...you can learn all about the proposed api and a fair amount about the concept of lighting estimation in the explainer documnent that's included in the specification's github repository.
...And 2 more matches
Background audio processing using AudioWorklet - Web APIs
the input and output lists the lists of inputs and outputs can be a little confusing at first, even though they're actually very simple once you realize what's going on.
...however, once this chrome issue is fixed, you will want to change this behavior if possible as it may have a slight negative impact on performance.
...once that's done, it instantiates and returns a new audioworkletnode.
...And 2 more matches
WindowOrWorkerGlobalScope.setInterval() - Web APIs
arg1, ..., argn optional additional arguments which are passed through to the function specified by func once the timer expires.
... console.log(a); console.log(b); } example 2: alternating two colors the following example calls the flashtext() function once a second until the stop button is pressed.
...example: var intervalid = setinterval(function(arg1) {}.bind(undefined, 10), 1000); inactive tabs requires gecko 5.0(firefox 5.0 / thunderbird 5.0 / seamonkey 2.2) starting in gecko 5.0 (firefox 5.0 / thunderbird 5.0 / seamonkey 2.2), intervals are clamped to fire no more often than once per second in inactive tabs.
...And 2 more matches
ARIA Test Cases - Accessibility
- n/a n/a jaws 10 pass fail - - voiceover (leopard) n/a n/a - fail window-eyes - - - - nvda - n/a - - zoom (leopard) pass n/a pass pass zoomtext - - - - orca - - - - drag and drop tic tac toe slide show expected at behavior: (mz) once focusing or arrowing onto the draggable item, screen reader should indicate that item can be an object that can be dragged.
... once marked for drag and drop, screen reader should announce that this item has been picked up, to distinguish it from others that may be draggable, but are currently not selected for the operation.
...note that for tabs with ajax content, for performance reasons it is optional that they only load the panel only once the user presses space on the new tab.
...And 2 more matches
CSS Box Alignment - CSS: Cascading Style Sheets
this document details the general concepts found in the specification.
... key concepts and terminology the specification details some alignment terminology to make it easier to discuss these alignment properties outside of their implementation within a particular layout method.
... there are also some key concepts which are common to all layout methods.
...And 2 more matches
Controlling Ratios of Flex Items Along the Main Axis - CSS: Cascading Style Sheets
.item { flex: 2 1 auto; } if you have read the article basic concepts of flexbox, then you will have already had an introduction to the properties.
... important concepts when working on the main axis there are a few concepts worth digging into before looking at how the flex properties work to control ratios along the main axis.
... these relate to the natural size of flex items before any growing or shrinking takes place, and to the concept of free space.
...And 2 more matches
Mastering Wrapping of Flex Items - CSS: Cascading Style Sheets
flexbox was designed as a single dimensional layout, meaning that it deals with laying out items as a row or as a column — but not both at once.
...if you want to cause them to wrap once they become too wide you must add the flex-wrap property with a value of wrap, or use the shorthand flex-flow with values of row wrap or column wrap.
...once the first row gets to a point where there is not enough space to place another 160 pixel item, a new flex line is created for the items and so on until all of the items are placed.
...And 2 more matches
Relationship of flexbox to other layout methods - CSS: Cascading Style Sheets
there is a note in the flexbox spec stating that in the future, once it is completed, the definitions in box alignment level 3 will supersede those of flexbox: "note: while the alignment properties are defined in css box alignment [css-align-3], flexible box layout reproduces the definitions of the relevant ones here so as to not create a normative dependency that may slow down advancement of the spec.
...additionally, any new values defined in the box alignment module will apply to flexible box layout; in otherwords, the box alignment module, once completed, will supercede the definitions here." in a later article in this series — aligning items in a flex container — we will take a thorough look at how the box alignment properties apply to flex items.
... writing modes in the basic concepts of flexbox article, i explained that flexbox is writing mode aware.
...And 2 more matches
Box alignment in CSS Grid Layout - CSS: Cascading Style Sheets
a b b b b" "a a a a b b b b" "c c c c d d d d" "c c c c d d d d"; align-items: start; } .item1 { grid-area: a; } .item2 { grid-area: b; } .item3 { grid-area: c; } .item4 { grid-area: d; } <div class="wrapper"> <div class="item1">item 1</div> <div class="item2">item 2</div> <div class="item3">item 3</div> <div class="item4">item 4</div> </div> keep in mind that once you set align-items: start, the height of each child <div> will be determined by the contents of the <div>.
...this will mimic the correct behavior once implemented.
... once again the default is stretch, other than for items with an intrinsic aspect ratio.
...And 2 more matches
CSS grids, logical values, and writing modes - CSS: Cascading Style Sheets
block and inline once we begin dealing with logical, rather than physical properties, we stop seeing the world as left to right, and top to bottom.
...this occurs once we've flipped the grid onto the side, like this: * {box-sizing: border-box;} .wrapper { border: 2px solid #f76707; border-radius: 5px; background-color: #fff4e6; } .wrapper > div { border: 2px solid #ffa94d; border-radius: 5px; background-color: #ffd8a8; padding: 1em; color: #d9480f; } .wrapper { writing-mode: vertical-lr; display: grid; grid-template...
...once you realize that grid-area sees the world as "block and inline", you can remember that we are setting the two starts, then the two ends.
...And 2 more matches
CSS Grid Layout and Progressive Enhancement - CSS: Cascading Style Sheets
if they tend to use up-to-date versions of firefox, chrome, opera, and safari, then it would make sense to start using css grids once those browsers update.
... as a concession for older browsers, i have set a min-height on the items, and hope that my content editors won’t add too much content and make a mess of the layout!
... once again i can use feature queries to overwrite a layout that uses display: inline-block, and again i don’t need to overwrite everything.
...And 2 more matches
<color> - CSS: Cascading Style Sheets
threeddarkshadow the color of the darker (generally outer) of the two borders away from the light source for 3-d elements that appear 3-d due to two concentric layers of surrounding border.
... threedface the face background color for 3-d elements that appear 3-d due to two concentric layers of surrounding border.
... threedhighlight the color of the lighter (generally outer) of the two borders facing the light source for 3-d elements that appear 3-d due to two concentric layers of surrounding border.
...And 2 more matches
CSS: Cascading Style Sheets
WebCSS
css reference our exhaustive css reference for seasoned web developers describes every property and concept of css.
... styling text with the basics of the css language covered, the next css topic for you to concentrate on is styling text — one of the most common things you'll do with css.
...now it's time to look at how to place your boxes in the right place concerning the viewport, and one another.
...And 2 more matches
Connection management in HTTP/1.x - HTTP
these connections were short-lived: a new one created each time a request needed sending, and closed once the answer had been received.
... a related topic is the concept of http connection upgrades, wherein an http/1.1 connection is upgraded to a different protocol, such as tls/1.0, websocket, or even http/2 in cleartext.
...to ease these problems, the concept of a persistent connection has been designed, even prior to http/1.1.
...And 2 more matches
CSP: base-uri - HTTP
'nonce-<base64-value>' an allow-list for specific inline scripts using a cryptographic nonce (number used once).
... the server must generate a unique nonce value each time it transmits a policy.
... it is critical to provide an unguessable nonce, as bypassing a resource’s policy is otherwise trivial.
...And 2 more matches
CSP: default-src - HTTP
'nonce-<base64-value>' an allow-list for specific inline scripts using a cryptographic nonce (number used once).
... the server must generate a unique nonce value each time it transmits a policy.
... it is critical to provide an unguessable nonce, as bypassing a resource’s policy is otherwise trivial.
...And 2 more matches
CSP: form-action - HTTP
'nonce-<base64-value>' an allow-list for specific inline scripts using a cryptographic nonce (number used once).
... the server must generate a unique nonce value each time it transmits a policy.
... it is critical to provide an unguessable nonce, as bypassing a resource’s policy is otherwise trivial.
...And 2 more matches
CSP: img-src - HTTP
'nonce-<base64-value>' an allow-list for specific inline scripts using a cryptographic nonce (number used once).
... the server must generate a unique nonce value each time it transmits a policy.
... it is critical to provide an unguessable nonce, as bypassing a resource’s policy is otherwise trivial.
...And 2 more matches
CSP: navigate-to - HTTP
'nonce-<base64-value>' an allow-list for specific inline scripts using a cryptographic nonce (number used once).
... the server must generate a unique nonce value each time it transmits a policy.
... it is critical to provide an unguessable nonce, as bypassing a resource’s policy is otherwise trivial.
...And 2 more matches
CSP: script-src-attr - HTTP
'nonce-<base64-value>' an allow-list for specific inline scripts using a cryptographic nonce (number used once).
... the server must generate a unique nonce value each time it transmits a policy.
... it is critical to provide an unguessable nonce, as bypassing a resource’s policy is otherwise trivial.
...And 2 more matches
CSP: script-src-elem - HTTP
'nonce-<base64-value>' an allow-list for specific inline scripts using a cryptographic nonce (number used once).
... the server must generate a unique nonce value each time it transmits a policy.
... it is critical to provide an unguessable nonce, as bypassing a resource’s policy is otherwise trivial.
...And 2 more matches
Web video codec guide - Web media technologies
this guide introduces the video codecs you're most likely to encounter or consider using on the web, summaries of their capabilities and any compatibility and utility concerns, and advice to help you choose the right codec for your project's video.
...once an artifact has appeared, it may linger for a while, because of how video is displayed.
... [1] firefox support for avc is dependent upon the operating system's built-in or preinstalled codecs for avc and its container in order to avoid patent concerns.
...And 2 more matches
Performance fundamentals - Web Performance
this is a familiar concept: everyone prefers, say, games that display 60 frames per second over ones that display 10 frames per second, even if they can't explain why.
...intelligently allocating memory to user state is an important concern that we go over in more detail below.
...firefox is highly optimized to scroll arbitrary content; this is usually not a concern.
...And 2 more matches
Mobile first - Progressive web apps (PWAs)
this article offers some related ideas, looking at the concept of mobile first — the practice of designing a website so that the default layout/configuration is for mobile devices, and layouts and features for desktop browsers are then layered on top of that default.
... first things first — mobile as a default you may think that concentrating on the mobile experience first sounds pointless, as we are more used to dealing with desktop sites, and we surely need to consider the full gamut of features for the overall experience across desktop, mobile, etc., before then paring it down to a mobile experience that is simpler, more streamlined, or whatever.
...of course, your users will be concentrating on what they're doing, but they are likely to be in a car with bad lighting, or in a noisy bar with the sport on tv in the background!
...And 2 more matches
Communicating using "port" - Archive of obsolete content
once(): listen to only the first occurrence of a message.
... port.once() often you'll want to receive a message just once, then stop listening.
... the port object offers a shortcut to do this: the once() method.
... this example rewrites the "listener.js" content script in the port.removelistener() example so that it uses once(): function getfirstparagraph() { var paras = document.getelementsbytagname('p'); console.log(paras[0].textcontent); } self.port.once("get-first-para", getfirstparagraph); json-serializable values the payload for an message can be any json-serializable value.
page-mod - Archive of obsolete content
in this case the listener assigned to onattach is called once for each loaded document, and the add-on code will have a separate worker for each document.
... the option takes a single string that may take any one of the following values: "start": load content scripts immediately after the document element is inserted into the dom, but before the dom content itself has been loaded "ready": load content scripts once dom content has been loaded, corresponding to the domcontentloaded event "end": load content scripts once all the content (dom, js, css, images) has been loaded, at the time the window.onload event fires var pagemod = require("sdk/page-mod"); pagemod.pagemod({ include: "*", contentscript: 'window.alert("matched!");', contentscriptwhen: "start" }); if you specify "start...
...once created a page-mod will execute the supplied content scripts, and load any supplied stylesheets, in the context of any documents matching the pattern specified by the include property.
...once destroyed the page-mod can no longer be used.
ui/frame - Archive of obsolete content
once created, the frame needs to be added to a toolbar for it to be visible: var { frame } = require("sdk/ui/frame"); var { toolbar } = require("sdk/ui/toolbar"); var frame = new frame({ url: "./frame.html" }); var toolbar = toolbar({ name: "my-toolbar", title: "my toolbar", items: [frame] }); parameters options : object required options: name type url u...
... once(event, listener) assign a listener to the first occurrence only of an event emitted by the frame.
... var { frame } = require("sdk/ui/frame"); var frame = new frame({ url: "./frame.html" }); frame.once("message", pong) function pong(e) { if (e.data == "ping") { // message only the sender, and not any frames attached to other browser windows e.source.postmessage("pong", "*"); } } parameters event : string the name of the event to listen to.
...for example, this code is equivalent to once(): var { frame } = require("sdk/ui/frame"); var frame = new frame({ url: "./frame.html" }); frame.on("message", pong) function pong(e) { if (e.data == "ping") { e.source.postmessage("pong", "*"); } frame.removelistener("message", pong) } parameters event : string the event the listener is listening for.
Creating custom Firefox extensions with the Mozilla build system - Archive of obsolete content
focus on the fact that once you get the build working, it'll probably work effortlessly from then on.
...personally i would discourage this practice (among other things, static linking means the same code gets loaded more than once into memory, and the code won't be available from javascript or other non-c++ languages) and encourage the use of xpcom wherever possible.
... once you've written the necessary chrome files (for instance, an overlay that adds a menu item to instantiate and use one of your components), you need to package them up as part of your extension.
...the only file that really stays put is install.rdf, which still exists once and only once in the extension root directory.
How to convert an overlay extension to restartless - Archive of obsolete content
branch : services.prefs; branch.setcomplexvalue(prefname, components.interfaces.nsisupportsstring, string); } just grab the above, move your default preferences file to your chrome mapping, and then do the following line once during your startup: services.scriptloader.loadsubscript("chrome://myaddon/content/defaultprefs.js", {pref:setdefaultpref} ); that's it.
... once you've got the machinery to load and save preferences without having to jump through the various pref type hoops the actual preferences api sends you through, loading the actual preferences file is one line.
... step 5: no more internal jar files you know how i've been mentioning extractionless add-ons every once in a while thus far?
... also note that once you do get this all up and running, your users will still have to restart firefox once to install your first restartless update.
Chapter 5: Let's build a Firefox extension - Archive of obsolete content
preference description value nglayout.debug.disable_xul_cache (not present in firefox 3.5+) ordinarily, firefox will cache xul documents after they have been read in once, to speed subsequent displays.
...the files clock.xul and clock.js will be read in every time you open the clock window, so just re-opening the clock window once will suffice to check them.
...because we’ve changed the chrome manifest, we need to relaunch firefox once, as discussed in the part “operations checks on revised source files”.
...once you’ve reinstalled it, first open about:config, and confirm that the previous preference values are set.
Local Storage - Archive of obsolete content
others feel concerned about privacy and storing private information locally without deleting it.
...if you need a complex database this can be heavy in terms of time and code, but this will only happen once and this can be done in a lazy or asynchronous way.
...they allow you to automatically generate xul content using information from a datasource, and automatically update the content once the datasource changes.
...there's a section about sqlite templates in the guide, but there are some concepts in it that will require you to read at least some of the rest of it.
Adding preferences to an extension - Archive of obsolete content
as before, concepts covered in the previous articles in this series won't be rehashed here, so if you haven't already seen them: creating a status bar extension creating a dynamic status bar extension also, for reference, you may want to take a look at preferences system and the preferences api.
... once we've established that the event is in fact a preference change, we look at the data parameter, which contains the name of the preference that changed.
... once we've gotten the updated preference, we call refreshinformation() to immediately update the display with the new stock's information.
... once we have the symbol in the local variable symbol, we use that to construct the url and the string to display in the status bar panel.
Bookmark Keywords - Archive of obsolete content
once that's done, all it takes to go to the cnn home page would be to type <tt>cnn</tt> into the address bar.
...once you get a result page, bookmark that page.
... once this result page has been bookmarked, we need only adjust the boookmark's properties.
...once that's been done, making the keymark work is a simple matter of going into the bookmark manager and adding a keyword!
How to Write and Land Nanojit Patches - Archive of obsolete content
once the patch seems ready, copy it to the other two repositories and test it.
... but don't push that update, as that should only be done by a member of that public repo.] once it passes testing, file the patch to bugzilla (file a bug under the "nanojit" component in the "core" product) and get a review.
...once it passes review, land it on nanojit-central, mark the bug's whiteboard as fixed-in-nanojit, and note the revision in a comment.
...once all the patches pass review, land the nanojit patch on nanojit-central and mark the bug as fixed-in-nanojit.
The new nsString class implementation (1999) - Archive of obsolete content
nscstring same as nsstring, but should be used with caution because of localization concerns.
...i18n issues another concern (mainly of the i18n team) has to do with the use of a 1-byte (ascii) nscstring at all.
...here's it's api: class nsimemoryagent : nsisupports { void* new(nsint32 asize)=0; //used for both alloc and realloc void* delete(void* aptr)=0; }; internationalization the new nsstrimpl/nsstring implementation addresses at least two of the primary concerns of our i18n team.
...second, they are concerned that programmers be prevented from abusing the string classes in a number of ways.
Building accessible custom components in XUL - Archive of obsolete content
<code> <window id="accjax" title="accjax spreadsheet" xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" xmlns:x2="http://www.w3.org/tr/xhtml2" xmlns:wairole="http://www.w3.org/2005/01/wai-rdf/guiroletaxonomy#" > </code> once the namespaces are in place, we define the roles for each component of our spreadsheet.
...my#" xmlns:waistate="http://www.w3.org/2005/01/wai-rdf/guistatetaxonomy#" onload="install_handlers()" > <script src="accjax.js"/> </code> by adding this javascript code and these css rules, we can tab to the spreadsheet see which cell, row header, or column header has focus click on other cells or headers to change focus within the spreadsheet tab off the spreadsheet by pressing tab once tab back to the spreadsheet and automatically set focus to the previously focused cell or header inspect32 confirms that all of this really works; it's not just visual smoke and mirrors.
... <caption>editing a cell</caption> once we're satisfied with our changes, we can press enter again to accept the value.
...note that the role is once again "cell", since we explicitly set it when we recreated the label element.
PopupEvents - Archive of obsolete content
popupshown this event is fired on a menupopup, panel or tooltip once it is visible on screen.
... popuphiding this event is fired on a menupopup, panel or tooltip once it is about to be hidden.
... popuphidden this event is fired on a menupopup, panel or tooltip once it has been hidden.
...the popupshown event the popupshown event is fired once a popup is already visible.
Result Generation - Archive of obsolete content
once you have selected a starting point, you use a number of statements which indicate where to go next when navigating the graph.
...once all results have been examined, the builder moves on to the next statement in the query.
... once all statements have been analyzed, any results which still remain go on to become matches.
...so, to summarize: start out with a one possible result as the seed iterate over the results determined so far and augment them with additional data add any new possible results remove any rejected results repeat steps 2 to 4 for each query statement once done, all remaining results become matches each possible result is made up of a set of variable-value pairs.
Audio for Web games - Game development
note: in many ways the concept of buffering is an outdated one.
...once you have the various tracks that make up your piece you can bring tracks in and out as appropriate.
... once they are available to play, we need to make sure they start at the correct point that other tracks might be playing at, so they sync up.
... let's create another async function to set up the sample — we can combine the two async functions in a nice promise pattern to perform further actions when each file is loaded and buffered: async function loadfile(filepath) { const track = await getfile(filepath); return track; } let's also create a playtrack() function, which we can call once a file has been fetched.
Extra lives - Game development
add the ballleavescreen() function definition at the end of our code: function ballleavescreen() { lives--; if(lives) { livestext.settext('lives: '+lives); lifelosttext.visible = true; ball.reset(game.world.width*0.5, game.world.height-25); paddle.reset(game.world.width*0.5, game.world.height-5); game.input.ondown.addonce(function(){ lifelosttext.visible = false; ball.body.velocity.set(150, -150); }, this); } else { alert('you lost, game over!'); location.reload(); } } instead of instantly printing out the alert when you lose a life, we first subtract one life from the current number and check if it's a non-zero value.
... events you have probably noticed the add() and addonce() method calls in the above two code blocks and wondered how they differ.
... the difference is that the add() method binds the given function and causes it to be executed every time the event occurs, while addonce() is useful when you want to have the bound function executed only once and then unbound so it is not executed again.
... in our case, on every outofbounds event the ballleavescreen will be executed, but when the ball leaves the screen we only want to remove the message from the screen once.
HTML: A good basis for accessibility - Learn web development
if you try our longer version out with a screen reader (see bad-semantics.html), you'll not have a very good experience — the screen reader hasn't got anything to use as signposts, so you can't retrieve a useful table of contents, and the whole page is seen as a single giant block, so it is just read out in one go, all at once.
... expand acronyms, at least once or twice.
...in this section, we'll look at the basic accessibility concerns to be aware of when creating such controls.
... people experiencing low vision conditions, who are navigating with the aid of screen reading technology, or who have cognitive concerns may become confused when the new tab, window, or application is opened unexpectedly.
HTML: A good basis for accessibility - Learn web development
if you try our longer version out with a screen reader (see bad-semantics.html), you'll not have a very good experience — the screen reader hasn't got anything to use as signposts, so you can't retrieve a useful table of contents, and the whole page is seen as a single giant block, so it is just read out in one go, all at once.
... expand acronyms, at least once or twice.
...in this section, we'll look at the basic accessibility concerns to be aware of when creating such controls.
... people experiencing low vision conditions, who are navigating with the aid of screen reading technology, or who have cognitive concerns may become confused when the new tab, window, or application is opened unexpectedly.
Accessible multimedia - Learn web development
nds = math.floor(player.currenttime - minutes * 60); let minutevalue; let secondvalue; if (minutes<10) { minutevalue = "0" + minutes; } else { minutevalue = minutes; } if (seconds<10) { secondvalue = "0" + seconds; } else { secondvalue = seconds; } mediatime = minutevalue + ":" + secondvalue; timelabel.textcontent = mediatime; }; each time the time updates (once per second), we fire this function.
...for example, some users may not be able to hear the audio because they are in noisy environments (like a crowded bar when a sports game is being shown) or might not want to disturb others if they are in a quiet place (like a library.) this is not a new concept — television services have had closed captioning available for quite a long time: whereas many countries offer english films with subtitles written in their own native languages, and different language subtitles are often available on dvds, for example there are different types of text track with different purposes.
...you might also need to deal with games, animations, slideshows, embedded video, and content created using other available technologies such as: html5 canvas flash silverlight for such content, you need to deal with accessibility concerns on a case by case basis.
... summary this chapter has provided a summary of accessibility concerns for multimedia content, along with some practical solutions.
Organizing your CSS - Learn web development
this can make it easier to keep your css organised, and also means that if multiple people are working on the css you will have fewer situations where two people need to work on the same stylesheet at once, leading to conflicts in source control.
... oocss most of the approaches that you will encounter owe something to the concept of object oriented css (oocss), an approach made popular by the work of nicole sullivan.
... $base-color: #c6538c; .alert { border: 1px solid $base-color; } once compiled to css, you would end up with the following css in the final stylesheet.
... post-processing for optimization if you are concerned about adding size to your stylesheets by adding a lot of additional comments and whitespace for example, then a post-processing step could be to optimize the css by stripping out anything unnecessary in the production version.
Introduction to CSS layout - Learn web development
overview: css layout next this article will recap some of the css layout features we've already touched upon in previous modules — such as different display values — and introduce some of the concepts we'll be covering throughout this module.
...the fact that you can change the value of display for any element means that you can pick html elements for their semantic meaning, without being concerned about how they will look.
... once again, you can switch on grid layout with a specific value of display — display: grid.
...0); padding: 1em; } .wrapper { display: grid; grid-template-columns: 1fr 1fr 1fr; grid-template-rows: 100px 100px; grid-gap: 10px; } <div class="wrapper"> <div class="box1">one</div> <div class="box2">two</div> <div class="box3">three</div> <div class="box4">four</div> <div class="box5">five</div> <div class="box6">six</div> </div> once you have a grid, you can explicitly place your items on it, rather than relying on the auto-placement behavior seen above.
Fundamental text and font styling - Learn web development
once it reaches the end, it goes down to the next line and continues, then the next line, until all the content has been placed in the box.
...it is quite natural once you get used to it, and you can use em to size everything, not just text.
... you should note that text-decoration can accept multiple values at once, if you want to add multiple decorations simultaneously, for example text-decoration: underline overline.
...once you've become used to using the above, you should also explore the following: font styles: font-variant: switch between small caps and normal font alternatives.
Learn to style HTML using CSS - Learn web development
in that module, you will learn about: css, starting with the introduction to css module more advanced html modules javascript, and how to use it to add dynamic functionality to web pages once you understand the fundamentals of html, we recommend that you learn html and css at the same time, moving back and forth between the two topics.
... styling text with the basics of the css language covered, the next css topic for you to concentrate on is styling text — one of the most common things you'll do with css.
...but there's not much you can't do once you have a solid understanding of even the basics of css.
... one of the best things about learning css is that once you know the fundamentals, usually you have a pretty good feel for what can and can't be done, even if you don't actually know how to do it yet!
Other form controls - Learn web development
in both cases the interaction is the same — once the control is activated, the browser displays a list of values the user can select between.
...ion selected>cherry</option> <option>lemon</option> </optgroup> <optgroup label="vegetables"> <option>carrot</option> <option>eggplant</option> <option>potato</option> </optgroup> </select> note: in the case of multiple choice select boxes, you'll notice that the select box no longer displays the values as drop-down content — instead, all values are displayed at once in a list, with the optional size attribute determining the height of the widget.
... once a data list is affiliated with a form widget, its options are used to auto-complete text entered by the user; typically, this is presented to the user as a drop-down box listing possible matches for what they've typed into the input.
...you don't need to remember all of these details at once, and can return to these articles as often as you like to check up on details.
Document and website structure - Learn web development
we use color and font size to draw sighted users' attention to the most useful parts of the content, like the navigation menu and related links, but what about visually impaired people for example, who might not find concepts like "pink" and "large font" very useful?
...use <main> only once per page, and put it directly inside <body>.
...for example: <p>there once was a man named o'dell<br> who loved to write html<br> but his structure was bad, his semantics were sad<br> and his markup didn't read very well.</p> without the <br> elements, the paragraph would just be rendered in one long line (as we said earlier in the course, html ignores most whitespace); with <br> elements in the code, the markup renders like this: <hr> elements create a horizontal ...
...he read it hazily and sighed; "better get back to work then", he mused.</p> would render like this: planning a simple website once you've planned out the structure of a simple webpage, the next logical step is to try to work out what content you want to put on a whole website, what pages you need, and how they should be arranged and link to one another for the best possible user experience.
From object to iframe — other embedding technologies - Learn web development
there are some serious security concerns to consider with <iframe>s, as we'll discuss below, but this doesn't mean that you shouldn't use them in your websites — it just requires some knowledge and careful thinking.
...this makes your page usable sooner and decreases your official page load time (an important seo metric.) security concerns above we mentioned security concerns — let's go into this in a bit more detail now.
... we are not expecting you to understand all of this content perfectly the first time; we just want to make you aware of this concern, and provide a reference to come back to as you get more experienced and start considering using <iframe>s in your experiments and work.
... the case against plugins once upon a time, plugins were indispensable on the web.
Choosing the right approach - Learn web development
failure callbacks need to be called once for each level of nesting, whereas with promises you can just use a single .catch() block to handle the errors for the entire chain.
...we then run it once per second using setinterval(), creating the effect of a digital clock that updates once per second (see this live, and also see the source): function displaytime() { let date = new date(); let time = date.tolocaletimestring(); document.getelementbyid('demo').textcontent = time; } const createclock = setinterval(displaytime, 1000); pitfalls the frame rate isn't optimized for the sy...
...if you want to use async/await but are concerned about older browser support, you could consider using the babeljs library — this allows you to write your applications using the latest javascript and let babel figure out what changes if any are needed for your user’s browsers.
... further information making asynchronous programming easier with async and await async function reference await operator reference previous overview: asynchronous in this module general asynchronous programming concepts introducing asynchronous javascript cooperative asynchronous javascript: timeouts and intervals graceful asynchronous programming with promises making asynchronous programming easier with async and await choosing the right approach ...
Introducing asynchronous JavaScript - Learn web development
once the alert is dismissed, we create a <p> element.
...in essence, it's the browser's way of saying "i promise to get back to you with the answer as soon as i can," hence the name "promise." this concept can take practice to get used to; it feels a little like schrödinger's cat in action.
... only once the fetch() block has completely finished running and delivering its result through the .then() blocks will we finally see the second console.log() message (it worked :)) appear.
... previous overview: asynchronous next in this module general asynchronous programming concepts introducing asynchronous javascript cooperative asynchronous javascript: timeouts and intervals graceful asynchronous programming with promises making asynchronous programming easier with async and await choosing the right approach ...
Looping code - Learn web development
as well as being associated with popular breakfast cereals, roller coasters, and musical production, they are also a critical concept in programming.
... at this point, you probably understand the high-level concepts behind loops, but you are probably thinking "ok, great, but how does this help me write better javascript code?" as we said earlier, loops are all to do with doing the same thing over and over again, which is great for rapidly completing repetitive tasks.
...in a do...while loop, the code inside the curly braces is always run once before the check is made to see if it should be executed again (in while and for, the check comes first, so the code might never be executed).
... conclusion this article has revealed to you the basic concepts behind, and different options available when looping code in javascript.
Drawing graphics - Learn web development
the code for the loop that keeps everything moving looks like this: function loop() { ctx.fillstyle = 'rgba(0, 0, 0, 0.25)'; ctx.fillrect(0, 0, width, height); for(let i = 0; i < balls.length; i++) { balls[i].draw(); balls[i].update(); balls[i].collisiondetect(); } requestanimationframe(loop); } loop(); we run the loop() function once at the bottom of the code to start the cycle, drawing the first animation frame; the loop() function then takes charge of calling requestanimationframe(loop) to run the next frame of the animation, again and again.
...once you've drawn a graphic to a canvas, there's no way to manipulate that graphic individually like you can with dom elements.
... you can't move each ball around on the canvas, because once it's drawn, it's part of the canvas, and is not an individual accessible element or object.
... at the bottom of the javascript, add the following line to once again make the coordinate origin sit in the middle of the canvas: ctx.translate(width/2, height/2); now let's create a new htmlimageelement object, set its src to the image we want to load, and add an onload event handler that will cause the draw() function to fire when the image is loaded: let image = new image(); image.src = 'walk-right.png'; image.onload = draw; now we'll add...
Storing the information you need — Variables - Learn web development
initializing a variable once you've declared a variable, you can initialize it with a value.
... updating a variable once a variable has been initialized with a value, you can change (or update) that value by simply giving it a different value.
...try entering the following lines into your console: let mynamearray = ['chris', 'bob', 'jim']; let mynumberarray = [10, 15, 40]; once these arrays are defined, you can access each value by their location within the array.
... constants in javascript many programming languages have the concept of a constant — a value that once declared can't be changed.
Server-side web frameworks - Learn web development
don't be concerned if it doesn't all make sense now; we'll be working you through the code in our framework-specific modules.
... productivity: productivity is a measure of how quickly you can create new features once you are familiar with the framework, and includes both the effort to write and maintain code (since you can't write new features while old ones are broken).
... scalability: once your website is fantastically successful you will exhaust the benefits of caching and even reach the limits of vertical scaling (running your web application on more powerful hardware).
...it similarly encourages the use of design patterns like dry ("dont repeat yourself" — write code only once if at all possible), mvc (model-view-controller) and a number of others.
Framework main features - Learn web development
typescript is not concerned with the writing of user interfaces, but it is a domain-specific language, and has significant differences to vanilla javascript.
... </figcaption> </figure> state we talked about the concept of state in the previous chapter — a robust state-handling mechanism is key to an effective framework, and each component may have data to control the state of.
... import authorcredit from "./components/authorcredit"; once that’s done, authorcredit could be used inside the article component like this: ...
... this diagram of a react component's lifecycle offers a general overview of the concept.
Handling common accessibility problems - Learn web development
hiding content there are many instances where a visual design will require that not all content is shown at once.
... note: you should go through the tutorial at least once — it is a really useful way to learn vo.
... vo + shift + down cursor move into a group of items (such as an html table, or a form, etc.) once inside a group you can move around and select items inside that group using the above commands as normal.
... once downloaded, install it — you double click the installer, accept the license and follow the prompts.
Implementing feature detection - Learn web development
objective: to understand what the concept of feature detection is, and be able to implement suitable solutions in css and javascript.
... the concept of feature detection the idea behind feature detection is that you can run a test to determine whether a feature is supported in the current browser, and then conditionally run code to provide an acceptable experience both in browsers that do support the feature, and browsers that don't.
...we first use the media attribute to only apply the brick css to the page if the page width is 480px or less: <link href="dist/brick.css" type="text/css" rel="stylesheet" media="all and (max-width: 480px)"> we then use matchmedia() in the javascript several times, to only run brick navigation functions if we are on the small screen layout (in wider screen layouts, everything can be seen at once, so we don't need to navigate between different views).
... summary this article covered feature detection in a reasonable amount of detail, going through the main concepts and showing you how to both implement your own feature detection tests and use the modernizr library to implement tests more easily.
Handling common HTML and CSS problems - Learn web development
first things first: fixing general problems we said in the first article of this series that a good strategy to begin with is to test in a couple of modern browsers on desktop/mobile, to make sure your code is working generally, before going on to concentrate on the cross browser issues.
... once you've identified a list of potential problem technologies you will be using, it is a good idea to research what browsers they are supported in, and what related techniques are useful.
... once you've found out which prefixes you need to support, you should write them all out in your css, for example: -ms-transform: rotate(90deg); -webkit-transform: rotate(90deg); transform: rotate(90deg); this ensures that all browsers that support any of the above forms of the property can make the feature work.
...for example, you can use it with a task runner/build tool such as gulp or webpack to automatically add prefixes once development has been done.
Command line crash course - Learn web development
once you are finished looking through the man page, you need to quit out of it using your text viewer’s quit command ("q" in less; you may have to search on the web to find it if it isn’t obvious).
...this allows you to run an operation against a potentially large number of files at once, all of which match the specified pattern.
... there's pros and cons each way — and this list of pros and cons for globally installing is far from exhaustive: pros of installing globally cons of installing globally accessible anywhere in your terminal may not be compatible with your project's codebase only install once other developers in your team won't have access to these tools, for example if you are sharing the codebase over a tool like git.
... once you've installed node, open up the terminal and run the following command to install prettier: npm install --global prettier once the command has finished running, the prettier tool is now available in your terminal, at any location in your file system.
Adding a new CSS property
once you know which struct you're going to use (or that the property is a shorthand), you can add appropriate entry to nscssproplist.h.
... (note that when the longhand property css_property_parse_value_list, the shorthand property parser would be assumed to be reusing the longhand parser once per item, not for a whole list, as for properties like background-image or transform-timing-function.) if the property takes a list of keywords other than inherit/initial/etc., auto, none, or normal (which can be expressed using the variant_* flags), you should use variant_keyword and add a keyword table to the nscssprops class.
... this line describes the conceptual representation (but not syntax) of the computed value of the property.
... the data structures in gecko that store the computed value must correspond to this concept, or inheritance won't work as described by the specification.
How Mozilla's build system works
the contents below will explain the basic concepts and terminology of the build system and how to do common tasks such as compiling components and creating jar files.
... phase 2: build backend preparation and the build definition once configure has determined what the current build configuration is, we need to apply this to the source tree so we can actually build.
... one concept you will need be familiar with is variables in make.
...for example, you could have: dirs = \ public \ resources \ src \ $(null) this example demonstrates another concept called continuation lines.
Multiple Firefox profiles
it takes little time to set up a new profile, and once it is complete, all of your firefox versions will update separately and can be run simultaneously.
... once you are all done, click ok.
...once done, each one should automatically start with the specified profile.
...once you get to the point of adding a new item, you can have the profile dialog show up every time or set the launcher to launch a specific profile.
Performance
performance best practices declaring stateless functions once per process bad: // addon.js services.mm.loadframescript("framescript.js", true) // framescript.js const precomputedconstants = // ...
...omething(message) { frameglobal = message.target result = helper(frameglobal.content, message.data) frameglobal.sendasyncmessage("my-addon:response-from-child", {something: result}) } function addframe(frameglobal) { frameglobal.addmessagelistener("my-addon:request-from-parent", dosomething) } javascript modules are per-process singletons and thus all their objects are only initialized once, which makes them suitable for stateless callbacks.
... store heavyweight state once per process bad: // addon.js var main = new myaddonservice(); main.onchange(statechange); function statechange() { services.mm.broadcastasyncmessage("my-addon:update-configuration", {newconfig: main.serialize()}) } // framescript.js var maincopy; function onupdate(message) { maincopy = myaddonservice.deserialize(message.data.newconfig); } addmessagelistener("my-addon:update-configuration", onupdate) // maincopy used by other functions the main issue here is that a separate object is kept for each tab.
... better: content-document-global-created notifications can be substituted with domwindowcreated events other observers and services should be registered in a process script or jsm instead load frame scripts on demand bad: // addon.js services.mm.loadframescript("framescript.js", /*delayed:*/ true) // stuff communicating with the framescript // framescript.js function onlyonceinabluemoon() { // we only need this during a total solar eclipse while goat blood rains from the sky sendasyncmessage('my-addon:paragraph-count', {num: content.document.queryselectorall('p').length}) } addmessagelistener("my-addon:request-from-parent", onlyonceinabluemoon) better: // addon.js function ontoolbarbutton(event) { let tabmm = gbrowser.mcurrentbrowser.frameloader.messagemana...
Message manager overview
process scripts are most likely to be useful when chrome code wants to run some code only once in the content process, to access some global service: for example, to register an observer or a content policy.
...multiprocess firefox has the concept of: a "parent process" "child processes" which are processes spawned by the parent process.
...this is the recommended way to load a script that executes just once per child process, which is something you might want to do if you are interacting with some global service (for example, adding listeners to observer notifications or registering components).
...since javascript modules are singletons they will only be executed once per process even when they are loaded in multiple frame scripts.
Performance best practices for Firefox front-end engineers
this allows you to put all of your dom writes (most importantly, anything that could change the size or position of things in the dom) just before the style and layout steps of the pipeline, combining all the style and layout calculations into a single batch so it all happens once, in a single frame tick, instead of across multiple frames.
...once the styles have been calculated, we then need to calculate where things are going to be placed on the page.
... once the fragment is populated, append the fragment to the dom by calling appendchild() on the parent element for the new elements.
... consider loading scripts with the subscript loader asynchronously if you've ever used the subscript loader, you might not know that it can load scripts asynchronously, and return a promise once they're loaded.
Overview of Mozilla embedding APIs
currently, once gecko has been shutdown, it cannot be restarted in the same process space...
...conceptually, each nswebbrowser instance represents a html content area.
... conceptually, for each document being rendered, gecko creates a container called a domwindow.
...once all of the options have been set, the nsiwebbrowserprint interface is used to print the contents of the desired domwindow.
How to get a stacktrace with WinDbg
once the download is complete, you need to configure windbg to examine child processes, ignore a specific event caused by flash player, and record a log of loaded modules.
... .logopen /t c:\temp\firefox-debug.log .childdbg 1 .tlist sxn gp lm if you see firefox.exe listed in the output from .tlist more than once, then you are already running the application and need to close the running instance first before you start debugging, otherwise you won't get useful results.
... once the browser crashes, you will see an error (such as "access violation") in the windbg command window.
...once the browser has crashed or been stopped, continue with the steps below.
Localizing with Mercurial
once you've installed mercurial, we'll walk through the steps to configure it.
... configuring mercurial once you've installed mercurial, you'll need to configure it before you can use it successfully.
... once you finish making your change, run hg qrefresh to commit your changes to the patch.
...for peers of a localization, the owner can vouch (once she or he is registered).
Localizing without a specialized tool
this directory structure needs to mimic the same as the en-us source files concerning localization.
... you can always check the path by typing pwd once you are in the root working directory with both en-us source and the l10n base, copy the searchbar.dtd file by typing cp mozilla-1.9.2/browser/locales/chrome/browser/searchbar.dtd l10n-mozilla-1.9.2/x-testing/browser/chrome/browser/ open the file in your x-testing directory and translate the words inside the quotation marks.
... you can always check the path by typing pwd once you are in the root working directory with both en-us source and the l10n base, copy the searchbar.dtd file by typing cp mozilla-1.9.2/browser/locales/chrome/browser/search.properties l10n-mozilla-1.9.2/x-testing/browser/chrome/browser/ open that file and translate the strings that follow the "=".
...untrusted connection in the example above), like so (example for polish): <!entity certerror.pagetitle "niezaufane połączenie"> once you have translated all the <!entity> strings in this file, you should save your work and open the next .dtd or .properties file.
Localization technical reviews
that being the case, there are some criteria in a technical review that will only ever be considered once, as all reviews after this only evaluate the changes you're adding on top of this revision from release to release.
...once attached, open the attachment details.
...once they are fixed, push your fix to your repo, attach it to the corresponding bug using the same mercurial revision number as before, and then request another review.
... once your work is entirely approved, go out and celebrate!
About NSPR
the first generation of nspr was originally conceived just to satisfy the requirements of porting java to various host environments.
...(the "20" in "nspr20" does not mean "version 2.0" but rather "second generation".) many of the concepts have been reformed, expanded, and matured.
...the operating systems provide everything from no concept of threading at all up to and including sophisticated, scalable and efficient implementations.
...hoare in monitors: an operating system structuring concept , communications of the acm, 17(10), october 1974 and then formalized by xerox' mesa programming language ("mesa language manual", j.g.
Introduction to NSPR
this chapter introduces key nspr programming concepts and illustrates them with sample code.
... locks and monitors in general, a monitor is a conceptual entity composed of a mutex, one or more condition variables, and the monitored data.
... note: evaluation of the invariant expression is a conceptual requirement and is rarely done in practice.
...once the lock primitive is called, the thread returns only when it has acquired the lock.
Web Replay
the middleman can spawn multiple child processes at once, and coordinate their behavior so they run in parallel.
... there can be up to one recording child and two replaying children at once.
... once all thread are idle, the main thread computes the memory diff, reads the stacks from each thread and their register state (which each thread recorded by calling setjmp before idling).
...:bhackett on bugzilla with any questions or concerns.
Finishing the Component
once you have these interface and header files, you can modify the weblock class to implement the nsicontentpolicy interface.
... once you have made sure that your component builds with the new header file, you must derive the weblock class from the interface nsicontentpolicy, which you can do by simply adding a public declaration when defining the class.
...the code for getting the io service from the service manager looks like this: // get a pointer to the ioservice rv = servman->getservicebycontractid("@mozilla.org/network/io-service;1", ns_get_iid(nsiioservice), getter_addrefs(mioservice)); once you have this interface pointer, you can easily create nsiuri objects from a string, as in the following snippet: nscomptr<nsiuri> uri; nsembedcstring urlstring(node->urlstring); mioservice->newuri(urlstring, nsnull, nsnull, getter_addrefs(uri)); this code wraps a c-string with a nsembedcstring, which you'll recall is a string class that...
... once the url string is wrapped in a nsembedcstring, it can be passed to the method newuri.
Packaging WebLock
once you have the component and the other resources for weblock packaged properly (see the following section, archiving resources), the installation script for weblock is a simple one (see the weblock installation script).
... archiving resources once you have compiled all the resources that make up the weblock component and the files that make up the user interface that will be added to the browser, you can place these within a subdirectory called weblock.
...once triggered (see the weblock trigger script), the installation script: downloads the weblock component and places it in the components directory copies the weblock subdirectory in the mozilla chrome application subdirectory registers both the component and the ui the xpinstall api provides such essential methods[essential-methods] as initinstall, registerchrome, addfile, and others.
...lation</title> <script> /* * trigger function that downloads the xpi so the * install.js file inside can be read and executed */ function installweblock() { weblock_xpi = {'weblock extension': 'weblock.xpi'}; installtrigger.install(weblock_xpi); } </script> <h1>install weblock</h1> <p><a href="#" onclick="installweblock();">install weblock</a></p> </html> distributing your component once you have the component packaged properly and the necessary installation and trigger scripts, you are ready to distribute your component so others can install it in their gecko applications.
nsIScriptableInputStream
note: the close method may be called more than once, but subsequent calls are ignored.
...note: the init method may be called more than once, allowing a nsiscriptableinputstream instance to be reused.
...remember: the nsiscriptableinputstream has a contract where `init` should only be called once, and should always be closed.
...try(name); let stream = new scriptableinputstream(this.getinputstream(name)); try { // use readbytes to get binary data, read to read a (null-terminated) string let contents = stream.readbytes(entry.realsize); } finally { stream.close(); } example usage in ondataavailable remember: the nsiscriptableinputstream has a contract where `init` should only be called once, and should always be closed.
nsISocketTransport
note: this attribute cannot be changed once a stream has been opened.
... this attribute is only available once the socket is connected.
...this attribute is defined only once a connection has been established.
...this attribute is defined only once a connection has been established.
Filelink Providers
the button to set up the account will only become enabled once the checkvalidity method for the form returns true.
... once this is done, the field is accessible from within the implementation via the preferences api using the key mail.cloud_files.accounts.account_key.username where account_key is the value passed into the implementations init function.
... management interface once an account has been created, it is manageable from within the preferences dialog, in the attachment pane, in the outgoing tab.
... this function is called automatically once the dom content is done loading, and is passed a single parameter - the provider instance whose data is being displayed.
Add to iPhoto
once installed, when you right-click on an image, you'll see among the options in the contextual menu an option to "add image to iphoto".
...for example, the cfarray type describes an array, but cfarray objects can't be changed once they've been created.
... there's nothing particularly interesting about how we declare this api, but it will be noteworthy when we look at how we use cfmutablearray objects with methods that accept a cfarray as input, so i introduce this concept here.
...once we have the file, we start making use of our native apis.
Introduction to DOM Inspector - Firefox Developer Tools
using the dom inspector once you've opened the document for the page or chrome you are interested in, you'll see that it loads the dom nodes viewer in the document pane and the dom node viewer in the object pane.
... now, once you have selected a node like the "search-go-button" node, you can select any one of several viewers to display information about that node in the object pane of the dom inspector application window, all of which are available from the menupopup accessed from the upper left corner of the the object pane.
... loving the inspector the dom inspector can take some figuring out, but once you get used to it, you may find that these structured views of web pages and interfaces were exactly the aspects of your own application development that were missing.
...used in concert with mozilla tools like venkman, the javascript debugger, the dom inspector can give you a complete view of any web page or dom-based application interface.
Dominators - Firefox Developer Tools
this article provides an introduction to the concepts of reachability, shallow versus retained size, and dominators, as they apply in garbage-collected languages like javascript.
... these concepts matter in memory analysis, because often an object may itself be small, but may hold references to other much larger objects, and by doing this will prevent the garbage collector from freeing that extra memory.
...retained size is an important concept in analyzing memory usage, because it answers the question "if this object ceases to exist, what's the total amount of memory freed?".
... dominators a related concept is that of the dominator.
Applying styles and colors - Web APIs
// these all set the fillstyle to 'orange' ctx.fillstyle = 'orange'; ctx.fillstyle = '#ffa500'; ctx.fillstyle = 'rgb(255, 165, 0)'; ctx.fillstyle = 'rgba(255, 165, 0, 1)'; a fillstyle example in this example, we once again use two for loops to draw a grid of rectangles, each in a different color.
... for example: var lineargradient = ctx.createlineargradient(0, 0, 150, 150); var radialgradient = ctx.createradialgradient(75, 75, 0, 75, 75, 100); once we've created a canvasgradient object we can assign colors to it by using the addcolorstop() method.
...it's used only once.
...once we've created a pattern, we can assign it to the fillstyle or strokestyle properties.
Clipboard - Web APIs
WebAPIClipboard
all of the clipboard api methods operate asynchronously; they return a promise which is resolved once the clipboard access has been completed.
... readtext() requests text from the system clipboard; returns a promise which is resolved with a domstring containing the clipboard's text once it's available.
... writetext() writes text to the system clipboard, returning a promise which is resolved once the text is fully copied into the clipboard.
...due to both potential security concerns and technical complexities, the process of integrating this api is happening gradually in most browsers.
Traversing an HTML table with JavaScript and DOM Interfaces - Web APIs
once we have created the <table>, <tbody>, <tr>, and <td> elements, and then the text node, we then append each object to its parent in the opposite order: first, we attach each text node to its parent <td> element using cell.appendchild(celltext); next, we attach each <td> element to its parent <tr> element using row.appendchild(cell); next, we attach each <tr> element to the parent <tb...
... next, we get all the p elements that are descendants of the body: mybodyelements = mybody.getelementsbytagname("p"); finally, we get the second item from the list of p elements via myp = mybodyelements[1]; once you have gotten the dom object for an html element, you can set its properties.
... once you have the returned list, use [x] method to retrieve the desired child item.
...to retrieve the value of the attribute, use the getattribute method: mytable.getattribute("border"); hiding a column by changing style properties once you have the object in your javascript variable, you can set style properties directly.
EventTarget.addEventListener() - Web APIs
once a boolean indicating that the listener should be invoked at most once after being added.
... example of options usage html <div class="outer"> outer, once & none-once <div class="middle" target="_blank"> middle, capture & none-capture <a class="inner1" href="https://www.mozilla.org" target="_blank"> inner1, passive & preventdefault(which is not allowed) </a> <a class="inner2" href="https://developer.mozilla.org/" target="_blank"> inner2, none-passive & preventdefault(not open new page) </a> </div> </div> css .
...dth: 460px; } .inner1, .inner2 { border: 1px solid purple; color: purple; width: 400px; } javascript const outer = document.queryselector('.outer'); const middle = document.queryselector('.middle'); const inner1 = document.queryselector('.inner1'); const inner2 = document.queryselector('.inner2'); const capture = { capture : true }; const nonecapture = { capture : false }; const once = { once : true }; const noneonce = { once : false }; const passive = { passive : true }; const nonepassive = { passive : false }; outer.addeventlistener('click', oncehandler, once); outer.addeventlistener('click', noneoncehandler, noneonce); middle.addeventlistener('click', capturehandler, capture); middle.addeventlistener('click', nonecapturehandler, nonecapture); inner1.addeventlisten...
...er('click', passivehandler, passive); inner2.addeventlistener('click', nonepassivehandler, nonepassive); function oncehandler(event) { alert('outer, once'); } function noneoncehandler(event) { alert('outer, none-once, default'); } function capturehandler(event) { //event.stopimmediatepropagation(); alert('middle, capture'); } function nonecapturehandler(event) { alert('middle, none-capture, default'); } function passivehandler(event) { // unable to preventdefault inside passive event listener invocation.
Fetch API - Web APIs
WebAPIFetch API
concepts and usage fetch provides a generic definition of request and response objects (and other things involved with network requests).
... it also defines related concepts such as cors and the http origin header semantics, supplanting their separate definitions elsewhere.
... once a response is retrieved, there are a number of methods available to define what the body content is and how it should be handled (see body).
... note: find out more about using the fetch api features in using fetch, and study concepts in fetch basic concepts.
FileReader - Web APIs
filereader.readasarraybuffer() starts reading the contents of the specified blob, once finished, the result attribute contains an arraybuffer representing the file's data.
... filereader.readasbinarystring() starts reading the contents of the specified blob, once finished, the result attribute contains the raw binary data from the file as a string.
... filereader.readasdataurl() starts reading the contents of the specified blob, once finished, the result attribute contains a data: url representing the file's data.
... filereader.readastext() starts reading the contents of the specified blob, once finished, the result attribute contains the contents of the file as a text string.
Using the Gamepad API - Web APIs
once one gamepad has been interacted with, other gamepads that are connected will automatically be visible.
...we can use this in order to determine which gamepad (i.e., its id) had caused the event, since multiple gamepads might be connected at once.
...once we have a reference to it, we can query its properties for information about the current state of the gamepad.
...we have done this below using window.setinterval(); once the object is available the gamepad info is outputted, the game loop is started, and the interval is cleared using window.clearinterval().
Timing element visibility with the Intersection Observer API - Web APIs
finally, we set up an interval which triggers once a second to handle any necessary refreshing.
... handling intersection changes once per pass through the browser's event loop, each intersectionobserver checks to see if any of its target elements have passed through any of the observer's intersection ratio thresholds.
... handling periodic actions our interval handler, handlerefreshinterval(), is called about once per second courtesy of the call to setinterval() made in the startup() function described above.
... after that, the code paths converge once again.
Using the MediaStream Recording API - Web APIs
we'll concentrate on the recording and playback functionality for this article.
... the success callback: this code is run once the getusermedia call has been completed successfully.
... capturing the media stream once getusermedia has created a media stream successfully, you create a new media recorder instance with the mediarecorder() constructor and pass it the stream directly.
...first of all, mediarecorder.start() is used to start recording the stream once the record button is pressed: record.onclick = function() { mediarecorder.start(); console.log(mediarecorder.state); console.log("recorder started"); record.style.background = "red"; record.style.color = "black"; } when the mediarecorder is recording, the mediarecorder.state property will return a value of "recording".
Using the Notifications API - Web APIs
this is a common requirement when an api tries to interact with something outside a web page — at least once, the user needs to specifically grant that application permission to present notifications, thereby letting the user control which apps/sites are allowed to display notifications.
...if you want to support older versions, you might have to use the older callback version, which looks like this: notification.requestpermission(); the callback version optionally accepts a callback function that is called once the user has responded to the request to display permissions.
...most modern browsers dismiss notifications automatically after a few moments (around four seconds) but this isn't something you should generally be concerned about as it's up to the user and user agent.
... close triggered once the notification is closed.
PaymentRequest.show() - Web APIs
only one payment request can be in the process of being handled at once, across all documents.
... once one paymentrequest's show() method has been called, any other call to show() will by rejected with an aborterror until the returned promise has been concluded, either by being fulfilled with a paymentresponse indicating the results of the payment request, or by being rejected with an error.
... if your architecture doesn't necessarily have all of the data ready to go at the moment it instantiates the payment interface by calling show(), specify the detailspromise parameter, providing a promise that is fulfilled once the data is ready.
... the validateresponse() method, below, is called once show() returns, in order to look at the returned response and either submit the payment or reject the payment as failed: async function validateresponse(response) { try { if (await checkallvalues(response)) { await response.complete("success"); } else { await response.complete("fail"); } } catch(err) { await response.complete("fail"); } } here, a custom functi...
Using the Payment Request API - Web APIs
this takes two mandatory parameters and one option parameter: methoddata — an object containing information concerning the payment provider, such as what payment methods are supported, etc.
... details — an object containing information concerning the specific payment, such as the total payment amount, tax, shipping cost, etc.
...ortedtypes: ['debit', 'credit'] } }]; } function buildshoppingcartdetails() { // hardcoded for demo purposes: return { id: 'order-123', displayitems: [ { label: 'example item', amount: {currency: 'usd', value: '1.00'} } ], total: { label: 'total', amount: {currency: 'usd', value: '1.00'} } }; } starting the payment process once the paymentrequest object has been created, you call the paymentrequest.show() method on it to initiate the payment request.
...for example, redirect to // the legacy web form checkout: window.location.href = '/legacy-web-form-checkout'; }); // every click on the checkout button should use a new instance of // paymentrequest object, because paymentrequest.show() can be // called only once per instance.
RTCPeerConnection.setRemoteDescription() - Web APIs
the method takes a single parameter—the session description—and it returns a promise which is fulfilled once the description has been changed, asynchronously.
... return value a promise which is fulfilled once the value of the connection's remotedescription is successfully changed or rejected if the change cannot be applied (for example, if the specified description is incompatible with one or both of the peers on the connection).
... on the other hand, if we're in the middle of an ongoing negotiation and an offer is passed into setremotedescription(), the ice agent automatically begins an ice rollback in order to return the connection to a stable signaling state, then, once the rollback is completed, sets the remote description to the specified offer.
... pc.setremotedescription(sessiondescription, successcallback, errorcallback); parameters successcallback a javascript function which accepts no input parameters to be be called once the description has been successfully set.
Using writable streams - Web APIs
note: this article assumes that you understand the use cases of writable streams, and are aware of the high-level concepts.
... if not, we suggest that you first read the streams concepts and usage overview and dedicated streams api concepts article, then come back.
... the first object can contain up to four members, all of which are optional: start(controller) — a method that is called once, immediately after the writablestream is constructed.
... after the chunks have all been written, we then perform the ready check once more, to check that the last chunk has finished being written and all the work is done.
UIEvent.initUIEvent() - Web APIs
the uievent.inituievent() method initializes a ui event once it's been created.
...once dispatched, it doesn't do anything anymore.
...once set, the read-only property event.bubbles will give its value.
...once set, the read-only property event.cancelable will give its value.
A basic 2D WebGL animation example - Web APIs
once the shader program is built, we compute the aspect ratio of our context by dividing its width by its height.
... once the vertex array has been created, we create a new gl buffer to contain them by calling gl.createbuffer().
... once all of the shaders are compiled, the program is linked using gl.linkprogram().
... result this is a pretty simple example, since it's just drawing one simple object, but the concepts used here extend to much more complex animations.
WebGL model view projection - Web APIs
these matrices are core to moving data around on the screen, and are concepts that transcend individual frameworks and engines.
...ts multiplied by an additional projection matrix, which (as the name suggests) projects 3d points onto a 2d drawing surface: // make sure to read the transformations in reverse order gl_position = projection * model * vec4(position, 1.0); the results view on jsfiddle the viewing frustum before we move on to covering how to compute a perspective projection matrix, we need to introduce the concept of the viewing frustum (also known as the view frustum).
... once that's been done, we have the largest set of polygons which are entirely within the viewing frustum.
...urn [ f / aspectratio, 0, 0, 0, 0, f, 0, 0, 0, 0, (near + far) * rangeinv, -1, 0, 0, near * far * rangeinv * 2, 0 ]; } the four parameters into this function are: fieldofviewinradians an angle, given in radians, indicating how much of the scene is visible to the viewer at once.
Writing WebSocket client applications - Web APIs
the readystate will become open once the connection is ready to transfer data.
... if you want to open a connection and are flexible about the protocols you support, you can specify an array of protocols: var examplesocket = new websocket("wss://www.example.com/socketserver", ["protocolone", "protocoltwo"]); once the connection is established (that is, readystate is open), examplesocket.protocol will tell you which protocol the server selected.
... sending data to the server once you've opened your connection, you can begin transmitting data to the server.
...we can at least be sure that attempting to send data only takes place once a connection is established by defining an onopen event handler to do the work: examplesocket.onopen = function (event) { examplesocket.send("here's some text that the server is urgently awaiting!"); }; using json to transmit objects one handy thing you can do is use json to send reasonably complex data to the server.
Movement, orientation, and motion: A WebXR example - Web APIs
rendering the scene for immersive presentation requires multiple renders of the scene—once from the perspective of each eye.
...in either case, the label of the button is updated to indicate that a click will start a session, and then, if there is a pending request for an animation frame, we cancel it by calling cancelanimationframe once that's done, the value of xrsession is changed to null to indicate that we're done with the session.
...it's called once for each eye, with slightly different positions for each eye, in order to establish the 3d effect needed for xr gear.
...once they're compiled, the program is linked and returned to the caller.
Using the Web Audio API - Web APIs
we'll briefly look at some concepts, then study a simple boombox example that allows us to load an audio track, play and pause it, and change its volume and stereo panning.
... audio graphs everything within the web audio api is based around the concept of an audio graph, which is made up of nodes.
...our htmlmediaelement fires an ended event once it's finished playing, so we can listen for that and run code accordingly: audioelement.addeventlistener('ended', () => { playbutton.dataset.playing = 'false'; }, false); modifying sound let's delve into some basic modification nodes, to change the sound that we have.
...there's a lot more functionality to the web audio api, but once you've grasped the concept of nodes and putting your audio graph together, we can move on to looking at more complex functionality.
Web accessibility for seizures and physical reactions - Accessibility
this article introduces concepts behind making web content accessibile for those with vestibular disorders, and how to measure and prevent content leading to seizures and / or other physical reactions.
... additional concerns exist for individuals with motor-skills problems.
... a very old article, tech republic's epilepsy and crt/lcd screen flicker, had an interesting response concerning the refresh rates in hz.
...01ms !important; animation-iteration-count: 1 !important; /* hat tip nick/cssremedy (https://css-tricks.com/revisiting-prefers-reduced-motion-the-reduced-motion-media-query/#comment-1700170) */ transition-duration: 0.001ms !important; } } from w3.org's page on media queries 4: the update media feature is used to query the ability of the output device to modify the appearance of content once it has been rendered.
Layout using named grid lines - CSS: Cascading Style Sheets
once you work through some examples it should become clearer and easier to work with.
... .wrapper { display: grid; grid-template-columns: [main-start] 1fr [content-start] 1fr [content-end] 1fr [main-end]; grid-template-rows: [main-start] 100px [content-start] 100px [content-end] 100px [main-end]; } once the lines have names, we can use the name to place the item rather than the line number.
... * {box-sizing: border-box;} .wrapper { border: 2px solid #f76707; border-radius: 5px; background-color: #fff4e6; } .wrapper > div { border: 2px solid #ffa94d; border-radius: 5px; background-color: #ffd8a8; padding: 1em; color: #d9480f; } .wrapper { display: grid; grid-template-columns: repeat(12, [col-start] 1fr); } once you have created the grid you can place items onto it.
... .main-header, .main-footer { grid-column: col-start / span 12; } .side1 { grid-column: col-start / span 3; grid-row: 2; } .content { grid-column: col-start 4 / span 6; grid-row: 2; } .side2 { grid-column: col-start 10 / span 3; grid-row: 2; } once again, the grid highlighter is helpful to show us how the grid we have placed our items on works.
Relationship of grid layout to other layout methods - CSS: Cascading Style Sheets
once the browser has worked out how many times 200 pixels will fit into the container–also taking account of grid gaps–it will treat the 1fr maximum as an instruction to share out the remaining space between the items.
...once you have done this, if you give a grid item position: absolute it will take as its containing block the grid container or, if the item also has a grid position, the area of the grid it is placed into.
... once again the item no longer participates in the grid layout in terms of sizing or when other items are auto-placed.
... <div class="box box5">five</div> </div> .wrapper { display: grid; grid-template-columns: repeat(3, 1fr); grid-auto-rows: minmax(100px, auto); } .box1 { grid-column-start: 1; grid-column-end: 4; display: contents; } this can be a way to get items nested into the grid to act as if they are part of the grid, and is a way around some of the issues that would be solved by subgrids once they are implemented.
display - CSS: Cascading Style Sheets
WebCSSdisplay
please note that the css display level 3 spec defines how the contents value should affect "unusual elements" — elements that aren’t rendered purely by css box concepts such as replaced elements.
...see the accessibility concerns section below for more details.
... adapting to the new two-value syntax of display css flow layout (display: block, display: inline) block and inline layout in normal flow flow layout and overflow flow layout and writing modes formatting contexts explained in flow and out of flow display: flex basic concepts of flexbox aligning items in a flex container controlling ratios of flex items along the main axis cross-browser flexbox mixins mastering wrapping of flex items ordering flex items relationship of flexbox to other layout methods backwards compatibility of flexbox typical use cases of flexbox display: grid basic concepts of grid layout relationship to other layout methods line-ba...
...sed placement grid template areas layout using named grid lines auto-placement in grid layout box alignment in grid layout grids, logical values and writing modes css grid layout and accessibility css grid layout and progressive enhancement realizing common layouts using grids accessibility concerns display: none using a display value of none on an element will remove it from the accessibility tree.
WAI ARIA Live Regions/API Support - Developer guides
a state change event for the a11y api's busy state will be fired on the container object currently marked as busy, once it is no longer busy.
...the entire atomic region should be presented once when it is finally no longer busy.
... aria-busy on ancestor element container-atomic "true" | "false" "false" is this change inside a region that should always be presented at once.
...once the user presses the next key the speech will move on to echoing that key anyway.
Setting up adaptive streaming media sources - Developer guides
the good news is that once we have encoded our media in the appropriate format we are pretty good to go.
...seurl> </representation> <representation id="4" bandwidth="250000" width="480" height="360"> <baseurl>elephantsdream_h264bpl30_0250.264.dash</baseurl> </representation> <representation id="5" bandwidth="500000" width="480" height="360"> <baseurl>elephantsdream_h264bpl30_0500.264.dash</baseurl> </representation> </adaptationset> </period> </mpd> once you have generated your mpd file you can reference it from within the video tag.
... once encoded your file structure may look something like this: play list -> /segments/news.mp4.mpd main segment folder -> /segments/main/ 100 kbps segment folder -> /segments/main/news100 contains (1.m4s, 2.m4s, 3.m4s ...
... once you have generated your mpd file you can reference as expected it from within the <video> element: <video src="my.mpd" type="application/dash+xml"></video> it might be wise to provide a fallback: <video> <source src="my.mpd" type="application/dash+xml"> <!-- fallback --> <source src="my.mp4" type="video/mp4"> <source src="my.webm" type="video/webm"> </video> note: mpeg-dash playback ...
<input>: The Input (Form Input) element - HTML: Hypertext Markup Language
WebHTMLElementinput
once one of the radio buttons in a group has focus, using the arrow keys will navigate through all the radio buttons of the same name, even if the radio buttons are not grouped together in the source order.
...the <label> element provides explanatory information about a form field that is always appropriate (aside from any layout concerns you have).
...not only is the placeholder not accessible to screen readers, but once the user enters any text into the form control, or if the form control already has a value, there is no placeholder.
... recommendation accessibility concerns labels when including inputs, it is an accessibilty requirement to add labels along side.
Using the application cache - HTML: Hypertext Markup Language
once all the files have been successfully retrieved, they are moved into the real offline cache automatically, and a cached event is sent to the applicationcache object.
...the wildcard character * can be used once.
... the cache, network, and fallback sections can be listed in any order in a cache manifest file, and each section can appear more than once in a single manifest.
... cache manifest files can switch from section to section at will (each section header can be used more than once), and sections are allowed to be empty.
Basics of HTTP - HTTP
http is an extensible protocol that relies on concepts like resources and uniform resource identifiers (uris), simple message structure, and client-server communication flow.
... on top of these basic concepts, numerous extensions have been developed over the years that add updated functionality and semantics with new http methods or headers.
... resources and uris a brief introduction to the concept of resources, identifiers, and locations on the web.
...this article explains both concepts.
CSP: child-src - HTTP
'nonce-<base64-value>' a whitelist for specific inline scripts using a cryptographic nonce (number used once).
... the server must generate a unique nonce value each time it transmits a policy.
... it is critical to provide an unguessable nonce, as bypassing a resource’s policy is otherwise trivial.
...specifying nonce makes a modern browser ignore 'unsafe-inline' which could still be set for older browsers without nonce support.
CSP: connect-src - HTTP
'nonce-<base64-value>' an allow-list for specific inline scripts using a cryptographic nonce (number used once).
... the server must generate a unique nonce value each time it transmits a policy.
... it is critical to provide an unguessable nonce, as bypassing a resource’s policy is otherwise trivial.
...specifying nonce makes a modern browser ignore 'unsafe-inline' which could still be set for older browsers without nonce support.
CSP: font-src - HTTP
'nonce-<base64-value>' a whitelist for specific inline scripts using a cryptographic nonce (number used once).
... the server must generate a unique nonce value each time it transmits a policy.
... it is critical to provide an unguessable nonce, as bypassing a resource’s policy is otherwise trivial.
...specifying nonce makes a modern browser ignore 'unsafe-inline' which could still be set for older browsers without nonce support.
CSP: frame-src - HTTP
'nonce-<base64-value>' a whitelist for specific inline scripts using a cryptographic nonce (number used once).
... the server must generate a unique nonce value each time it transmits a policy.
... it is critical to provide an unguessable nonce, as bypassing a resource’s policy is otherwise trivial.
...specifying nonce makes a modern browser ignore 'unsafe-inline' which could still be set for older browsers without nonce support.
CSP: manifest-src - HTTP
'nonce-<base64-value>' a whitelist for specific inline scripts using a cryptographic nonce (number used once).
... the server must generate a unique nonce value each time it transmits a policy.
... it is critical to provide an unguessable nonce, as bypassing a resource’s policy is otherwise trivial.
...specifying nonce makes a modern browser ignore 'unsafe-inline' which could still be set for older browsers without nonce support.
CSP: media-src - HTTP
'nonce-<base64-value>' a whitelist for specific inline scripts using a cryptographic nonce (number used once).
... the server must generate a unique nonce value each time it transmits a policy.
... it is critical to provide an unguessable nonce, as bypassing a resource’s policy is otherwise trivial.
...specifying nonce makes a modern browser ignore 'unsafe-inline' which could still be set for older browsers without nonce support.
CSP: object-src - HTTP
'nonce-<base64-value>' a whitelist for specific inline scripts using a cryptographic nonce (number used once).
... the server must generate a unique nonce value each time it transmits a policy.
... it is critical to provide an unguessable nonce, as bypassing a resource’s policy is otherwise trivial.
...specifying nonce makes a modern browser ignore 'unsafe-inline' which could still be set for older browsers without nonce support.
CSP: prefetch-src - HTTP
'nonce-<base64-value>' an allow-list for specific inline scripts using a cryptographic nonce (number used once).
... the server must generate a unique nonce value each time it transmits a policy.
... it is critical to provide an unguessable nonce, as bypassing a resource’s policy is otherwise trivial.
...specifying nonce makes a modern browser ignore 'unsafe-inline' which could still be set for older browsers without nonce support.
CSP: style-src-attr - HTTP
'nonce-<base64-value>' an allow-list for specific inline scripts using a cryptographic nonce (number used once).
... the server must generate a unique nonce value each time it transmits a policy.
... it is critical to provide an unguessable nonce, as bypassing a resource’s policy is otherwise trivial.
...specifying nonce makes a modern browser ignore 'unsafe-inline' which could still be set for older browsers without nonce support.
CSP: style-src-elem - HTTP
'nonce-<base64-value>' an allow-list for specific inline scripts using a cryptographic nonce (number used once).
... the server must generate a unique nonce value each time it transmits a policy.
... it is critical to provide an unguessable nonce, as bypassing a resource’s policy is otherwise trivial.
...specifying nonce makes a modern browser ignore 'unsafe-inline' which could still be set for older browsers without nonce support.
CSP: worker-src - HTTP
'nonce-<base64-value>' a whitelist for specific inline scripts using a cryptographic nonce (number used once).
... the server must generate a unique nonce value each time it transmits a policy.
... it is critical to provide an unguessable nonce, as bypassing a resource’s policy is otherwise trivial.
...specifying nonce makes a modern browser ignore 'unsafe-inline' which could still be set for older browsers without nonce support.
HTTP Index - HTTP
WebHTTPIndex
it relies on a few basic concepts like the notion of resources and uris, a simple structure of messages, and a client-server structure for the communication flow.
... on top of these basic concepts, numerous extensions have appeared over the years, adding new functionality and new semantics by creating new http methods or headers.
... 44 http conditional requests conditional requests, guide, http http has a concept of conditional requests, where the result, and even the success of a request, can be changed by comparing the affected resources with the value of a validator.
...several parts can be requested with one range header at once, and the server may send back these ranges in a multipart document.
Introduction - JavaScript
« previousnext » this chapter introduces javascript and discusses some of its fundamental concepts.
... where to find javascript information the javascript documentation on mdn includes the following: learn web development provides information for beginners and introduces basic concepts of programming and the internet.
...once you have a firm grasp of the fundamentals, you can use the javascript reference to get more details on individual objects and statements.
...you do not have to be concerned with whether methods are public, private, or protected, and you do not have to implement interfaces.
JavaScript modules - JavaScript
for example: export { name, draw, reportarea, reportperimeter }; importing features into your script once you've exported some features out of your module, you need to import them into your script to be able to use them.
... once you've imported the features into your script, you can use them just like they were defined inside the same file.
... modules are only executed once, even if they have been referenced in multiple <script> tags.
...once we turned off automatically hiding file extensions, and trained it to accept .mjs, it was ok.
Map.prototype.forEach() - JavaScript
the foreach() method executes a provided function once per each key/value pair in the map object, in insertion order.
... description the foreach method executes the provided callback once for each key of the map which actually exist.
... each value is visited once, except in the case when it was deleted and re-added before foreach has finished.
... foreach executes the callback function once for each element in the map object.
Set.prototype.forEach() - JavaScript
the foreach() method executes a provided function once for each value in the set object, in insertion order.
... description the foreach() method executes the provided callback once for each value which actually exists in the set object.
... each value is visited once, except in the case when it was deleted and re-added before foreach() has finished.
... foreach() executes the callback function once for each element in the set object; it does not return a value.
Web audio codec guide - Web media technologies
for web developers, an even bigger concern is the network bandwidth needed in order to transfer audio, whether for streaming or to download it for use during gameplay.
... for information about the fundamental concepts behind how digital audio works, see the article digital audio concepts.
... for more information about these and other features of audio data, see audio data format and structure in digital audio concepts.
... the patents behind mp3 have expired, removing many or most licensing concerns around using mp3 files in your projects.
Image file type and format guide - Web media technologies
conceptually similar to the animated gif format which has been in use for decades, apng is more capable in that it supports a variety of color depths, whereas animated gif supports only 8-bit indexed color.
...internet explorer, which introduced png support in versions 4–5, did not fully support it until ie 9, and had many infamous bugs for many of the intervening years, including in the once-omnipresent internet explorer 6.
... xbm (x window system bitmap file) xbm (x bitmap) files were the first to be supported on the web, but are no longer used and should be avoided, as their format has potential security concerns.
... best choice fallback lossless webp or png; jpeg if compression artifacts aren't a concern png or jpeg; gif for screenshots with low color counts diagrams, drawings, and charts for any image that can be represented using vector graphics, svg is the best choice.
Codecs used by WebRTC - Web media technologies
customizing the codec list once you have a list of the available codecs, you can alter it and then send the revised list to rtcrtptransceiver.setcodecpreferences() to rearrange the codec list.
... that's done for each transceiver on the rtcpeerconnection; once all of the transceivers have been updated, we call the onnegotiationneeded event handler, which will create a new offer, update the local description, send the offer along to the remote peer, and so on, thereby triggering the renegotiation of the connection.
...once the list has been split up, they're concatenated back together with the entries matching the given mimetype first, followed by all of the other codecs.
... licensing terms before choosing a video codec, make sure you're aware of any licensing requirements around the codec you select; you can find information about possible licensing concerns in our main guide to video codecs used on the web.
Critical rendering path - Web Performance
once layout is determined, pixels are painted to the screen.
...once complete, the page is rendered, or 'painted' on the screen.
... layout once the render tree is built, layout becomes possible.
...once the render tree is created and layout occurs, the pixels can be painted to the screen.
Index - XSLT: Extensible Stylesheet Language Transformations
WebXSLTIndex
the javascript loads the .xsl file only on the first sort and sets the xslloaded variable to true once it has finished loading the file.
...once instantiated, an xsltprocessor has an xsltprocessor.importstylesheet() method that takes as an argument the xslt stylesheet to be used in the transformation.
... 14 an overview needshelp, needsmarkupwork, transforming_xml_with_xslt, xml, xslt the extensible stylesheet language/transform is a very powerful language, and a complete discussion of it is well beyond the scope of this article, but a brief discussion of some basic concepts will be helpful in understanding the description of netscape's capabilities that follows.
...because xslt permits no side-effects, once the value of the variable has been established, it remains the same until the variable goes out of scope 53 <xsl:when> element, reference, xslt, when the <xsl:when> element always appears within an <xsl:choose> element, acting like a case statement.
Using the WebAssembly JavaScript API - WebAssembly
note: if you are unfamiliar with the basic concepts mentioned in this article and need more explanation, read webassembly concepts first, then come back.
... in this memory model, any load or store can access any byte in the entire linear memory, which is necessary to faithfully represent c/c++ concepts like pointers.
... multiplicity now we’ve demonstrated usage of the main key webassembly building blocks, this is a good place to mention the concept of multiplicity.
...we also touched on the concept of multiplicity.
port - Archive of obsolete content
in a content script, to listen for "mymessage" sent from the main add-on code: // content-script.js self.port.on("mymessage", function handlemymessage(mymessagepayload) { // handle the message }); in the main add-on code, to listen for "mymessage" sent from a a content script: // main.js worker.port.on("mymessage", function handlemymessage(mymessagepayload) { // handle the message }); once() often you'll want to receive a message just once, then stop listening.
... the port object offers a shortcut to do this: the once() method.
... this example rewrites the content script in the port.removelistener() example so that it uses once(): // content-script.js function getfirstparagraph() { var paras = document.getelementsbytagname('p'); console.log(paras[0].textcontent); } self.port.once("get-first-para", getfirstparagraph); removelistener() you can use port.on() to listen for messages.
passwords - Archive of obsolete content
require("sdk/self").uri, oncomplete: function oncomplete(credentials) { credentials.foreach(function(credential) { console.log(credential.username); console.log(credential.password); }); } }); } parameters options : object required options: name type oncomplete function the callback function that is called once the function completes successfully.
... oncomplete function the callback function that is called once the function completes successfully.
... oncomplete function the callback function that is called once the function has completed successfully.
request - Archive of obsolete content
optionally the user may specify a collection of headers and content to send alongside the request and a callback which will be executed once the request completes.
... once a request object has been created a get request can be executed by calling its get() method, a post request by calling its post() method, and so on.
... each request object is designed to be used once.
widget - Archive of obsolete content
this may take one of the following values: "start": load content scripts immediately after the document element for the widget is inserted into the dom, but before the dom content itself has been loaded "ready": load content scripts once dom content has been loaded, corresponding to the domcontentloaded event "end": load content scripts once all the content (dom, js, css, images) for the widget has been loaded, at the time the window.onload event fires this property is optional and defaults to "end".
...this may have one of the following values: "start": load content scripts immediately after the document element for the widget is inserted into the dom, but before the dom content itself has been loaded "ready": load content scripts once dom content has been loaded, corresponding to the domcontentloaded event "end": load content scripts once all the content (dom, js, css, images) for the widget has been loaded, at the time the window.onload event fires contentscriptoptions read-only value exposed to content scripts under self.options property.
...this may have one of the following values: "start": load content scripts immediately after the document element for the widget view is inserted into the dom, but before the dom content itself has been loaded "ready": load content scripts once dom content has been loaded, corresponding to the domcontentloaded event "end": load content scripts once all the content (dom, js, css, images) for the widget view has been loaded, at the time the window.onload event fires contentscriptoptions read-only value exposed to content scripts under self.options property.
core/promise - Archive of obsolete content
this is the common case, but every once in a while, you will need to create a promise from scratch.
...note: a promise can be rejected or resolved only once.
...alue after a given time ms -- kind of promise based alternative to settimeout: function delay(ms, value) { let { promise, resolve } = defer(); settimeout(resolve, ms, value); return promise; } delay(10, 'hello world').then(console.log); // after 10ms => 'helo world' advanced usage if general defer and promised should be enough to doing almost anything you may think of with promises, but once you start using promises extensively you may discover some missing pieces and this section of documentation may help you to discover them.
event/core - Archive of obsolete content
an event listener may be registered to any event target using the on function: var { on, once, off, emit } = require('sdk/event/core'); var target = { name: 'target' }; on(target, 'message', function listener(event) { console.log('hello ' + event); }); on(target, 'data', console.log); an event of a specific type may be emitted on any event target object using the emit function.
...to avoid hassles of removing such listeners there is a convenient once function: once(target, 'load', function() { console.log('ready'); }); emit(target, 'load') // info: 'ready' emit(target, 'load') there are also convenient ways to remove registered listeners.
... once(target, type, listener) registers an event listener that is called only once: the next time an event of the specified type is emitted on the given event target.
ui/toolbar - Archive of obsolete content
once(event, listener) assign a listener to the first occurrence only of an event emitted by the toolbar.
... var { toolbar } = require("sdk/ui/toolbar"); var { frame } = require("sdk/ui/frame"); var frame = new frame({ url: "./frame.html" }); var toolbar = toolbar({ title: "my toolbar", items: [frame] }); toolbar.once("show", showing); toolbar.once("hide", hiding); function showing(e) { console.log("showing: " + e.title); } function hiding(e) { console.log("hiding: " + e.title); } parameters event : string the name of the event to listen to.
...for example, this code is equivalent to once(): var { toolbar } = require("sdk/ui/toolbar"); var { frame } = require("sdk/ui/frame"); var frame = new frame({ url: "./frame.html" }); var toolbar = toolbar({ title: "my toolbar", items: [frame] }); toolbar.on("show", showing); toolbar.on("hide", hiding); function showing(e) { console.log("showing: " + e.title); toolbar.removelistener("show", showing); } function hiding(e) { console.log("hiding: " + e.title); toolbar.removelistener("hide", hiding); } parameters event : string the event ...
Chapter 6: Firefox extensions and XUL applications - Archive of obsolete content
once you’ve finished your inspection, you can continue and let the halted program resume execution.
... use step over to avoid a function, and step into to always call it; once you are done investigating a function, use step out, and then you can step into the next function.
... the next command will import the source code: gonzui-import.exe mozilla once the import process is complete, type the following command to launch the gonzui server: gonzui-server.exe now you can access gonzui from your web browser by typing the following into your location bar : http://localhost:46984 this lets you browse all packages, click on links to traverse them, and take traversed-link locations as search starting points (figure a).
Chapter 4: Using XPCOM—Implementing advanced processes - Archive of obsolete content
manipulating files using xpcom xpcom provides a number of interfaces allowing you to perform file manipulations without concern for whether you are running on windows, mac os x, or linux.
...once the process is complete, you should close all streams.
...here again, once the process is complete, you should close all streams.
Introduction - Archive of obsolete content
we'll start with a brief introduction to some key concepts, in case you're not familiar with mozilla and firefox.
... mozilla and firefox the term mozilla can be used to refer to several concepts: the mozilla project, the mozilla foundation, the mozilla corporation and the old mozilla browser.
... on to the tutorial with the basic concepts out of the way, we can now get right into extension development.
Drag and Drop JavaScript Wrapper - Archive of obsolete content
once called, it starts a drag for the string data "cabbage".
...once you have the data, you can add it to the element is some way.
...var textobserver = { ondrop : function (event, transferdata, session) { event.target.setattribute("value",transferdata.data); } } the flavour system used allows multiple objects of various types to be dragged at once and also allows alternative forms of the data to be dragged.
Migrate apps from Internet Explorer to Mozilla - Archive of obsolete content
browsers, like internet explorer 4, that were built before the conception of w3c standards inherited many quirks.
...once turned into the editor, commands can run on the document through the execcommand command.
...if the call is asynchronous, then give the onload member a function reference, which is called once the request has completed.
Merging TraceMonkey Repo - Archive of obsolete content
inspecting the files at those two changesets can be helpful: hg cat -c changeset filename once all the conflict markers are removed, you've performed the manual resolution, which you tell to mercurial by running hg resolve -m filename.
...once you've resolved all the files, all the entries in hg resolve -l will have rs next to them.
... once you've pushed to mozilla-central, do a bugzilla search for bugs that are not marked as resolved but have fixed-in-tracemonkey in the whiteboard.
URIs and URLs - Archive of obsolete content
the resource is the conceptual mapping to an entity or set of entities, not necessarily the entity which corresponds to that mapping at any particular instance in time.
... thus, a resource can remain constant even when its content---the entities to which it currently corresponds---changes over time, provided that the conceptual mapping is not changed in the process.
...also a string should not be escaped more than once.
Anonymous Content - Archive of obsolete content
anonymous content introduces the concept of scope to nodes within a document.
...as far as the bound element is concerned, it retains focus throughout the two events.
... as far as css is concerned, anonymous content nodes are children (or descendants) of the bound element, they are ancestors of explicit content, and they are siblings of the explicit content.
Creating XPI Installer Modules - Archive of obsolete content
once you have created a package like the one described here, mozilla users can download and install it in a single step.
...the chrome:// url pointer corresponds to the directory mozilla/bin/chrome/barley/content, where the main xul file and the other resources live once they are installed.
...using a zip archiver[zip], create a new archive of the content/ subdirectory and name it barley.jar: once this step is complete, the barley package is in the same state as the jar packages of the mozilla ui.
Learn XPI Installer Scripting by Example - Archive of obsolete content
adding files and directories (full of files) to the install once you have verified that the target can accomodate the software to be installed and initialized the actual installation, you must add files and directories to the installation in order to have them installed.
... executing the installation once you have added all the files to the installation, the final step is to actually execute the installation.
... code used to execute the installation appears in theinstall.js file as follows: if (err==success) { err = performinstall(); logcomment("performinstall() returned: " + err); } else { cancelinstall(err); logcomment("cancelinstall() due to error: " + err); } } else cancelinstall(insufficient_disk_space); performinstall is the function used to execute the install once it has been initialized and loaded, and it is the last step to installing the software.
Building Menus With Templates - Archive of obsolete content
however, unlike with other elements, the content of a menu is only generated once the menu has been opened.
...this causes the menupopup to only be created once.
...again, the popup is only created once since the uri attribute is on the menuitem element.
Focus and Selection - Archive of obsolete content
once the label in the example is focused, it can respond to key presses.
...however it only fires once the textbox loses the focus, thus, only once per set of changes.
...once you have the start and end positions, you can pull out the substring from the whole text.
XUL accessibility guidelines - Archive of obsolete content
in addition, there is an active community of accessibility developers within the mozilla project that will be happy to help you with any concerns or questions you have in regards to making your xul applications fully accessible.
...the problem occurs when a developer decides to add functionality that jumps the user to the second form field once 3 digits have been entered into the first form field.
...usually captioning and transcribing go hand in hand, once you have one its easy to produce the other.
The Implementation of the Application Object Model - Archive of obsolete content
we're still cross-platform, since we'd only have to write widgets like trees and toolbars once!
...the answer itself implied a concession that some newly-architected system that connected directly into the dom apis would be preferable to rdf if only there were time to engineer it.
...give an example once i actually know what the naming scheme will be.
Creating XULRunner Apps with the Mozilla Build System - Archive of obsolete content
building with a prebuilt sdk once you've downloaded the xulrunner sdk, you'll need a .mozconfig of your own.
...in this case you can basically copy over the file as is, since once again variables are used for things like the application name and version.
...it's got a lot of stuff in it, but once again you can mostly ignore this and copy the whole directory over from mccoy.
Introduction to SSL - Archive of obsolete content
the document assumes that you are familiar with the basic concepts of public-key cryptography, as summarized in "introduction to public-key cryptography." the ssl protocol the transmission control protocol/internet protocol (tcp/ip) governs the transport and routing of data over the internet.
... these capabilities address fundamental concerns about communication over the internet and other tcp/ip networks: ssl server authentication allows a user to confirm a server's identity.
... however, since 40-bit ciphers can be broken relatively quickly, administrators whose user communities can use stronger ciphers without violating export restrictions should disable the 40-bit ciphers if they are concerned about access to data by eavesdroppers.
Browser Detection and Cross Browser Support - Archive of obsolete content
once that happens, the only place your web site will be found is on the web archive.
...for example, it is conceivable that someday there will exist branch tags similar to 2.2.0 and 2.12.36.
...if you are concerned about a specific security issue in gecko and know for example that all gecko browsers contain a fix for the issue after a certain date, you can check that the navigator.productsub value is after that date.
The Business Benefits of Web Standards - Archive of obsolete content
the style sheet only needs to load once and then it is cached.
...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.
...conversely once the content is to hand the development/publishing process should be lighteningly fast.
GLSL Shaders - Game development
vertex shaders vertex shaders manipulate coordinates in a 3d space and are called once per vertex.
... fragment shaders fragment (or texture) shaders define rgba (red, blue, green, alpha) colors for each pixel being processed — a single fragment shader is called once per pixel.
...be sure to read three.js tutorial first to grasp the concept of the scene, its objects, and materials.
3D games on the Web - Game development
advanced concepts you can do a lot more with webgl.
... there are some advanced concepts which you should dive into and learn more about — like shaders, collision detection, or the latest hot topic: virtual reality on the web.
...we have information available for you to learn from: 2d collision detection 3d collision detection webxr the concept of virtual reality is not new, but it's storming onto the web thanks to hardware advancements such as the oculus rift, and the (currently experimental) webxr api for capturing information from vr and ar hardware and making it available for use in javascript applications.
Handling different text directions - Learn web development
once you start to look at css layout, and in particular the newer layout methods, this idea of block and inline becomes very important.
...however, ultimately we expect that people will transition to the logical versions for most things, as they make a lot of sense once you start also dealing with layout methods such as flexbox and grid.
... summary the concepts explained in this lesson are becoming increasingly important in css.
Floats - Learn web development
in this article we'll just concentrate on the proper uses of floats.
...s parturient montes, nascetur ridiculus mus.</p> body { width: 90%; max-width: 900px; margin: 0 auto; font: .9em/1.2 arial, helvetica, sans-serif } .wrapper { background-color: rgb(79,185,227); padding: 10px; color: #fff; } .box { float: left; margin: 15px; width: 150px; height: 150px; border-radius: 5px; background-color: rgb(207,232,220); padding: 1em; } once again, this is because the float has been taken out of normal flow.
...once again, the box should clear.
Grids - Learn web development
prerequisites: html basics (study introduction to html), and an idea of how css works (study introduction to css and styling boxes.) objective: to understand the fundamental concepts behind grid layout systems, and how to implement a grid layout using css grid.
... gaps between tracks to create gaps between tracks we use the properties grid-column-gap for gaps between columns, grid-row-gap for gaps between rows, and grid-gap to set both at once.
...you can also use the shorthand properties: grid-column grid-row these let you specify the start and end lines at once, separated by a / — a forward slash character.
Legacy layout methods - Learn web development
prerequisites: html basics (study introduction to html), and an idea of how css works (study introduction to css and styling boxes.) objective: to understand the fundamental concepts behind the grid layout systems used prior to css grid layout being available in browsers.
...cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus.</p> </div> each one of the columns needs an outer element to contain its content and let us manipulate all of it at once.
...working through the process of creating a grid with floats shows you how this works and also introduces some more advanced concepts to build on the things you learned in the lesson on floats and clearing.
Practical positioning examples - Learn web development
our simple example will look like this once we are finished: note: you can see the finished example running live at info-box.html (source code).
... note: some web developers take things even further, only having one page of information loaded at once, and dynamically changing the information shown using a javascript feature such as xmlhttprequest.
...this will work in ie9 and above (the smooth transition will work in ie10 and above.) this effect does have some concerns — this is a bit of an abuse of form elements, as they weren't intended for this purpose.
Responsive design - Learn web development
as more diverse screen sizes became available, the concept of responsive web design (rwd) appeared, a set of practices that allows web pages to alter their layout and appearance to suit different screen widths, resolutions, etc.
... prerequisites: html basics (study introduction to html), and an idea of how css works (study css first steps and css building blocks.) objective: to understand the fundamental concepts and history of responsive design.
...essentially, the vw unit adds on top of that zoomed value: h1 { font-size: calc(1.5rem + 3vw); } this means that we only need to specify the font size for the heading once, rather than set it up for mobile and redefine it in the media queries.
Supporting older browsers - Learn web development
once you know the browsers that come to your site, you can assess any technology that you want to use against how well it is supported and how easily you can provide an alternative for visitors who do not have that technology available.
...gb(79,185,227); padding: 10px; max-width: 400px; display: grid; grid-template-columns: 1fr 1fr 1fr; } .item { float: left; border-radius: 5px; background-color: rgb(207,232,220); padding: 1em; } <div class="wrapper"> <div class="item">item one</div> <div class="item">item two</div> <div class="item">item three</div> </div> note: the clear property also has no effect once the cleared item becomes a grid item, so you could have a layout with a cleared footer, which is then turned into a grid layout.
...in grid however that 33.333% is calculated from the grid area the item is placed in, so it actually becomes a third of the size we want once the grid layout is introduced.
Common questions - Learn web development
in this article we describe various web-related concepts: webpages, websites, web servers, and search engines.
... with hypertext and http, url is a key concept when it comes to the internet.
... this article introduces the basic concepts behind web accessibility.
Basic native form controls - Learn web development
this is used to create a form control that is invisible to the user, but is still sent to the server along with the rest of the form data once submitted — for example you might want to submit a timestamp to the server stating when an order was placed.
...for most form widgets, once the form is submitted all widgets that have a name attribute are sent, even if no value has been filled out.
...once one of the radio buttons in a same-named group of buttons is checked, it is not possible for the user to uncheck all of the buttons without resetting the form.
How to build custom form controls - Learn web development
once we know how to change states, it is important to define how to change the control's value: the value changes when: the user clicks on an option when the control is in the open state.
...on the other hand, if you consider that the active state and the open state overlap a bit, the value may change but the option will definitely not be highlighted accordingly, once again because we did not define any keyboard interactions over options when the control is in its opened state (we have only defined what should happen when the control is opened, but nothing after that).
...for any interaction you do add, it is vital to spend time in the design stage; if you define a behavior poorly, or forget to define one, it will be very hard to redefine it once the users have gotten used to it.
UI pseudo-classes - Learn web development
note: a number of the pseudo-classes discussed here are concerned with styling form controls based on their validation state (is their data valid, or not?) you'll learn much more about setting and controlling validation constraints in our next article — client-side form validation — but for now we'll keep things simple with regards to form validation, so it doesn't confuse things.
... styling inputs based on whether they are required or not one of the most basic concepts with regards to client-side form validation is whether a form input is required (it has to be filled in before the form can be submitted) or optional.
... styling controls based on whether their data is valid the other really important, fundamental concept in form validation is whether a form control's data is valid or not (in the case of numerical data, we can also talk about in-range and out-of-range data).
Asynchronous JavaScript - Learn web development
if you are not familiar with the concept of asynchronous programming, you should definitely start with the general asynchronous programming concepts article in this module.
... guides general asynchronous programming concepts in this article we'll run through a number of important concepts relating to asynchronous programming, and how this looks in web browsers and javascript.
... you should understand these concepts before working through the other articles in the module.
Build your own function - Learn web development
when you save your code and reload it in the browser, you'll see the little message box appear immediately, only once.
... we are only calling it once, after all.
...in the next article we'll wrap up functions by explaining another essential related concept — return values.
Fetching data from the server - Learn web development
this seemingly small detail has had a huge impact on the performance and behavior of sites, so in this article, we'll explain the concept and look at technologies that make it possible, such as xmlhttprequest and the fetch api.
...here, however, we want to keep it simple and concentrate on the client-side part of this.
... once we've successfully received our blob, we create an object url out of it using createobjecturl().
Componentizing our React app - Learn web development
once you're confident that your component is getting its props, you can replace every occurrence of eat with your name prop.
...once again, we want to reuse most of the ui that makes up a <todo /> component, but change one thing.
...once you’re done, the todo component's <input /> element will read like this: <input id="todo-0" type="checkbox" defaultchecked={props.completed} /> and your browser should update to show only eat being checked: if you change each <todo /> component’s completed prop, your browser will check or uncheck the equivalent rendered checkboxes accordingly.
React interactivity: Events and state - Learn web development
once we have our callback prop, we can call it inside <form /> to send the right data to <app />.
... this is a lot to take in at once, so let's try it out.
... <input type="text" id="new-todo-input" classname="input input__lg" name="text" autocomplete="off" value={name} /> change "use hooks!" to an empty string once you're done; this is what we want for our initial state.
Starting our Svelte Todo list app - Learn web development
this will be the basic functionality that we'll be developing in this tutorial series, plus we'll look at some more advanced concepts along the way too.
... repl to code along with us using the repl, start at https://svelte.dev/repl/b7b831ea3a354d3789cefbc31e2ca495?version=3.23.2 todo list app features this is how our todo list app wil look like once it's ready: using this ui our user will be able to: browse their tasks.
...once we have put our styles in place, though, any element with this class will be hidden from sighted users and still available to screen reader users — this is because these words are not needed by sighted users; they are there to provide more information about what the button does for screenreader users that do not have the extra visual context to help them.
Advanced Svelte: Reactivity, lifecycle, accessibility - Learn web development
code along with us git clone the github repo (if you haven't already done it) with: git clone https://github.com/opensas/mdn-svelte-tutorial.git then to get to the current app state, run cd mdn-svelte-tutorial/05-advanced-concepts or directly download the folder's content: npx degit opensas/mdn-svelte-tutorial/05-advanced-concepts remember to run npm install && npm run dev to start your app in development mode.
...now you should be able to check and uncheck all your todos at once.
... don't forget to pass the prop into moreactions from inside todos.svelte, where the component is called: <moreactions {todos} on:checkall={e => checkalltodos(e.detail)} on:removecompleted={removecompletedtodos} /> working with the dom: focusing on the details now that we have completed all of the app's required functionality, we'll concentrate on some accessibility features that will improve the usability of our app for both keyboard-only and screenreader users.
Dynamic behavior in Svelte: working with variables and props - Learn web development
objective: learn and put into practice some basic svelte concepts, like creating components, passing data using props, render javascript expressions into our markup, modify the components state and iterating over lists.
...once you get used to it, there's no going back.
...once.
Getting started with Vue - Learn web development
to install the cli, run the following command in your terminal: npm install --global @vue/cli or if you'd prefer to use yarn: yarn global add @vue/cli once installed, to initialize a new project you can then open a terminal in the directory you want to create the project in, and run vue create <project-name>.
...once they are selected, press enter to proceed.
... in the next article we'll build our first custom component, and look at some important concepts such as passing props into it and saving its data state.
Strategies for carrying out testing - Learn web development
objective: to gain an understanding of the high-level concepts involved in cross-browser testing.
... note: you can only have one version of ie or edge installed on a machine at once, so you will probably have to use virtual machine, or other strategy to do the testing you need.
... once you've finished filling in everything, press the get tracking id button, then accept the terms of service that appear.
Chrome Worker Modules
you only need to do it once for each worker, from within the chrome worker itself: importscripts("resource://gre/modules/workers/require.js"); note: although you only need to do this once for each worker, it doesn't hurt if you do it more than once.
...d it to either global value exports, as follows: /* file mymodule.js */ let secretkey = "this is a secret"; let publickey = "this is public"; exports.key = publickey; // secretkey is not exported // publickey is exported with name "key" alternatively, if you prefer that style, you may write // variable |module| is a special global introduced by require() module.exports = { key: publickey }; once this is done, we may load the module and use the values that have been exported // assuming that mymodule.js is installed to resource://gre/modules/mymodule.js let module = require("resource://gre/modules/mymodule.js") foo(module.key); // module.key == "this is public"; // however, secretkey is not exported and cannot be used for the installation of resources, please see the documentation on...
...you should not modify exports or module.exports once your module initialization is complete.
Gecko info for Windows accessibility vendors
once you know that you have a document, go up the ancestor chain of windows until you see a mozillacontentwindowclass or a mozillauiwindowclass.
... iaccessibles persist unless the document changes, retrieving the iaccessible more than once for the same object will return the same iaccessible*.
... once the new page is ready to be displayed and traversed via its iaccessible tree, the old content window is destroyed, and a new window is created.
A bird's-eye view of the Mozilla framework
thehelp viewer files referenced in the article are located in /seamonkey/extensions/help/ this article also assumes you are familiar with the javascript and c++ programming languages, object-oriented programming (oop) terminology and design concepts, the microsoft® component object model (com), and the corba omg interface definition language (idl).
... organization this article first covers some conceptual groundwork, then walks through a user scenario to illustrate how key mozilla architectural components work together to support a simplehelp viewer ui action.
...once loaded, a module or package has full access to the xpcom objects of all the other modules in the runtime environment.
The Firefox codebase: CSS Guidelines
once the two things above have been checked, check if the other rule you are overriding contains !important, if that is case, try putting it in question, because it might have become obsolete.
... finally, once you have checked all the things above, you can permit yourself to use !important along with a comment why it is needed.
...generally, when specifying -moz-appearance: foo; you're giving hints as to how something should act, however -moz-appearance: none; is probably saying 'ignore browser preconceptions - i want a blank sheet', so that's more visual.
Contributing to the Mozilla code base
once you have found something to work on, go ahead and comment!
...ozilla.org or #developers:mozilla.org check out https://developer.mozilla.org/docs/developer_guide and its parent document, https://developer.mozilla.org/docs/mozilla our reviewer checklist is very useful, if you have a patch near completion, and seek a favorable review utilize our build tool mach, its linting, static analysis, and other code checking features step 3: get your code reviewed once you fix the bug, you can advance to having your code reviewed.
... step 4b: follow it up once you've asked for a review, a reviewer will often respond within a day or two, reviewing the patch, or saying when they will be able to review it, perhaps due to a backlog.
SVG Guidelines
once again, "it depends".
...nd use class names or svg attributes examples here are some examples for excessive number precision: 5.000000e-02 → 0.05 (as seen here) -3.728928e-10 → 0 (as seen here) translate(0.000000, -1.000000) → translate(0, -1) (as seen here) as for descriptive ids: for gradients: svg_id1 → gradient1 (as seen here) use of class names avoid using a class if that class is only used once in the file if that class only sets a fill or a stroke, it's better to set the fill/stroke directly on the actual shape, instead of introducing a class just for that shape.
... avoid using a <use> tag when that <use> tag is being referenced only once in the whole file.
Displaying Places information using views
once notified, the view is responsible for updating itself.
...don't break the separation of concerns here.
...if your custom view is used only once in your application, code similar to the above will likely be sufficient; it's enough to create a single placestreeview object, modify it, and attach it to a regular tree.
Message manager overview
process scripts are most likely to be useful when an extension wants to run some code only once in the content process, to access some global service: for example, to register an observer or a content policy.
...multiprocess firefox has the concept of: a "parent process" "child processes" which are processes spawned by the parent process.
...this is the recommended way to load a script that executes just once per child process, which is something you might want to do if you are interacting with some global service (for example, adding listeners to observer notifications or registering a content policy).
Process scripts
but if you register it in a frame script, and the frame script is loaded more than once, you'll register the content policy more than once, which probably isn't what you intend.
... similarly, some observer notifications must be registered in the content process, but if you do this in a frame script, and the frame script is loaded more than once, then you will get multiple notifications for that event.
...to send messages to the chrome side: // process-script.js if (services.appinfo.processtype == services.appinfo.process_type_content) { dump("welcome to the process script in a content process"); } else { dump("welcome to the process script in the main process"); } // message is sent using contentprocessmessagemanager sendasyncmessage("hello"); in this example, the dump() statement will run once in each content process as well as in the main process.
HTML parser threading
once a unicode decoder has been set up, dodataavailable passes the byte data to the decoder whose output is accumulated into a linked list of nshtml5owningutf16buffer objects.
...it's more efficient to obtain a mutex only every once in a while when a whole bunch of tree ops is moved to or from the staging queue.
...(again, here we get to move a bunch of tree ops by obtaining a mutex once instead of having to synchronize thread on a per-tree op basis.) if the executor isn't reading from a stage, it calls nshtml5parser::parseuntilblocked() to parse potential document.write()-generated data into tree ops.
Extending a Protocol
once it's compiled, ./mach run and you should be able to spin up the developer console and type: navigator.echo("hi!"); that will return a pending promise that never settles.
...ady_addrefed<echoparent> windowglobalparent::allocpechoparent() { puts("windowglobalparent::allocpechoparent was called"); refptr<echoparent> actor = new echoparent(); return actor.forget(); } bool windowglobalparent::deallocpechoparent( pechoparent* aactor) { refptr actor = dont_addref(static_cast(aactor)); return true; } the "puts()" there will help us see what's going on once we get things going.
... naturally, we want to remove that once we done implementing.
JavaScript-DOM Prototypes in Mozilla
once the registration is done, the nsdomclassinfo code uses the registry every time a named property is resolved on a global object (because of this, the nsscriptnamespacemanager needs to be pretty fast at looking things up in its registry; that's why it is a hash table).
...once the name of the parent interface is known (and the name is not nsisupports) the code will look up a property by that name on the global object.
...this is also done only once per class, nsdomclassinfo::postcreate() checks if the prototype of the prototype of the wrapper jsobject (i.e.
Bootstrapping a new locale
untrusted connection in the example above), like so (example for polish): <!entity certerror.pagetitle "niezaufane połączenie"> once you have translated all the <!entity> strings in this file, you should save your work and open the next .dtd or .property file.
... once you have that account, send the l10n-drivers the details to be added as a "writer".
...set the general.useragent.locale to your language code, in this case, en-x-dude, and restart firefox once more.
Index
this is only necessary once.
... 7 l10n testing with xcode firefox for ios, localization once you have your l10n testing environment set up in xcode, testing your firefox on ios localization is a breeze.
...if you don't have a lot of experience with code, you might even be concerned that you've broken something (oops!).
Localizing with Koala
on the other hand, "manage search engines..." is generated only once, on start-up, and doesn't need to change.
... once you translated the searchendcap.label entity, add the other one from this file, i.e.
...once you "hg add" every new file in the repository that you want to track in mercurial, you will need to "hg commit" these new files so as to create a new revision in the repository's history.
Release phase
once you've made sure the outgoing output is accurate, push this changeset to hg.mozilla.org by running the hg push command.
...once attached, open the attachment details.
...once again, congratulations!
Activity Monitor, Battery Status Menu and top
when you open this menu for the first time in a while it says “collecting power usage information” for a few seconds, and if you have top open during that time you'll see that, once again, systemstats is running and using a lot of cpu.
... testing shows that once an energy-intensive application is started it takes less than a minute for it to show up in the battery status menu.
... and once the application stops using high amounts of energy it takes a few minutes to disappear.
Investigating leaks using DMD heap scan mode
once it has started, go through the steps you need to reproduce your leak.
...conveniently, you can usually do both at once using the cycle collector log.
... both kinds of preprocessing are done by the dmd.py script, which can be invoked like this: $objdir/dist/bin/dmd.py --clamp-contents dmd-$pid.log.gz this can take a few minutes due to symbolification, but you only need to run it once on a log file.
Reporting a Performance Problem
there will be a button in the top right labeled 'publish' which will allow you to upload this profile and once completed will write out a link.
... once uploaded, copy permalink url to your clipboard by right clicking and add the profile url to a bug for your performance problem and/or send it to the appropriate person.
... your first reflex once you find what addon is slowing down the profile might be to disable it and search for alternatives.
McCoy
once you have a password set you can change it from the keys menu and you will have to enter it each time you run mccoy.
... once you have a key you need to add its public part to your add-on's install.rdf file.
... releasing an update once you are ready to release an updated version of your add-on you must create yourself an update.rdf file.
Process Initialization
pr_init pr_initialize pr_initialized pr_cleanup pr_disableclockinterrupts pr_blockclockinterrupts pr_unblockclockinterrupts pr_setconcurrency pr_processexit pr_abort module initialization initialization can be tricky in a threaded environment, especially initialization that must happen exactly once.
... pr_callonce ensures that such initialization code is called only once.
... prcalloncetype prcalloncefn pr_callonce ...
NSS API Guidelines
(frees are allowed.) the arena_destructor_list preprocessor definition, and the code it encloses, are an effort to make the following work together: arenas, letting you allocate stuff and then removing them all at once lazy creation of pure-memory objects from asn.1 blobs, for example use of nsspkixcertificate doesn't drag all the code in for all constituent objects, unless they're actually being used our agressive pointer-tracking facility all these are useful, but they don't combine well.
... error handling nss 3.0 introduces the concept of an error stack.
...once that data pointer is made visible to the 'outside', either by returning the pointer, or attaching the pointer to an existing visible data structure, access to the data should be protected.
PKCS11 FAQ
MozillaProjectsNSSPKCS11FAQ
once you've installed the module, the module's certificates simply appear in the list of certificates displayed in the certificate window.
... once nss starts using a token for a given operation (like s/mime or ssl), it works hard to keep using that same token (so keys don't get moved around).
... at some later point, the ca presents the certificate to you (as part of this keygen, or in an e-mail, or you go back and fetch it from a web page once the ca notifies you of the arrival of the new certificate).
Hacking Tips
once the breakpoint is on codegenerator function of the lir instruction, add a command to generate a static breakpoint in the generated code.
...() (gdb) once you hit the generated breakpoint, you can replace it by a gdb breakpoint to make it conditional, the procedure is to first replace the generated breakpoint by a nop instruction, and to set a breakpoint at the address of the nop.
...in lldb, if the allocation failure number shown is 1500, run `continue -i 1498` (subtracted 2 because we've already hit it once and don't want to skip the last).
Property cache
so the lookup must happen only once.
...it walks the scope chain and prototype chain as described above only once, at compile time, and emits code containing the pointer to the object that contains the property.
... when a prototype gains a property that could invalidate an entry of this type, rt->protohazardshape is bumped, effectively marking all such entries invalid at once.
JSAPI Cookbook
*/ if (!js_definefunction(cx, global, "justforfun", &justforfun, 0, 0)) return false; to define many jsapi functions at once, use js_definefunctions.
... /* jsapi */ js::rootedvalue x(cx); if (!y.isobject()) return throwerror(cx, global, "parameter y must be an object.", __file__, __line__); /* see the #throw example */ js::rootedobject yobj(cx, &y.toobject()); if (!js_getproperty(cx, yobj, "myprop", &x)) return false; setting a property // javascript y.myprop = x; see "getting a property", above, concerning the case where y is not an object.
... /* jsapi */ assert(y.isobject()); js::rootedobject yobj(cx, &y.toobject()); if (!js_setproperty(cx, yobj, "myprop", &x)) return false; checking for a property // javascript if ("myprop" in y) { // then do something } see "getting a property", above, concerning the case where y is not an object.
JS_Init
once this method has succeeded, it is safe to call js_newruntime and other jsapi methods.
...once it has been used, it is safe to call any jsapi method, and it remains safe to do so until js_shutdown is correctly called.
... in the past js_init once had the signature jsruntime * js_init(uint32_t maxbytes) and was used to create new jsruntime instances.
SpiderMonkey 31
once this method has been successfully called, it's okay to call js_newruntime and all the other existing spidermonkey apis as usual.
... once all jsapi operation has completed, the corresponding js_shutdown method uninitializes spidermonkey, cleaning up memory and allocations performed by js_init.
...we have chosen to concentrate on performance and correctness as primary concerns instead.
Signing Mozilla apps for Mac OS X
once you have that you can do the following to create your id: open the developer certificate utility.
...once the application has been signed, the signature of an application bundle can be validated by calling: codesign -vvvv application.app where application.app is the application bundle you wish to validate.
...once the application bundle is signed, this file will contain the hashes/checksums of all files that are included in the signature.
Animated PNG graphics
MozillaTechAPNG
conceptually, each frame is constructed in the output buffer before being composited onto the canvas.
... conceptually, at the beginning of each play the output buffer must be completely initialized to a fully transparent black rectangle, with width and height dimensions from the 'ihdr' chunk.
...conceptually, such scaling occurs while mapping the output buffer onto the canvas.
Gecko object attributes
exposed in aria: aria-relevant container-atomic is this change inside a region that should always be presented at once.
...a state change event for the a11y api's busy state will be fired on the container object currently marked as busy, once it is no longer busy.
...the entire atomic region should be presented once when it is finally no longer busy.
Embedded Dialog API
applications concerned with presenting a consistent dialog appearance have the option of implementing the complete dialog posing api.
...applications concerned with a consistent overall dialog appearance will probably choose to implement the complete api as well.
...advanced windowing api embedding applications concerned with ensuring that dialogs posed by gecko are consistent in appearance and behaviour with dialogs posed directly by the application itself face a choice.
Building the WebLock UI
the locking ui once you have the basic xul wrapper set up for your interface, the next step is to define that part of the interface that locks and unlocks the browser.
...and how do you access it once it's installed?
... once it's installed and registered, the weblock component itself is ready to go: xpcom finds it and adds it to the list of registered components, and then weblock observes the xpcom startup event and initializes itself.
Component Internals
once the manifest files are read in, xpcom checks to see if there are any components that need to be registered.
... once registration is complete and the notifications have fired, xpcom is ready to be used by the application.
... note also that xpcom services may deny you access once you have received the shutdown notification.
Mozilla internal string guide
once you are familiar with them, see the appendix describing what class to use when.
...once you are familiar with them, see the appendix describing what class to use when.
... once you are done writing, call finish().
Observer Notifications
user-interaction-active nsidomwindow null sent once every 5000ms while this chrome document sees some kind of user activity (for example, keyboard or mouse events), and at the exact moment of the state transition from idle to active.
... sent once a day while the user is idle.
...once this has been sent, no places features will work.
nsIContentPrefService2
callback handleresult is called once unless no such preference exists, in which case handleresult is not called at all.
... callback handleresult is called once for each preference.
... callback handleresult is called once unless no such preference exists, in which case handleresult is not called at all.
nsIDownload
download objects are used by the download manager (see nsidownloadmanager to manage files that are queued to download, being downloaded, and finished being downloaded.) inherits from: nsitransfer last changed in gecko 1.9.1 (firefox 3.5 / thunderbird 3.0 / seamonkey 2.0) note: once the download is completed, the download manager stops updating the nsidownload object.
...once the download is complete, this value is set to null.
... mimeinfo nsimimeinfo provides the targets relevant mime information, including its mime type, helper application, and whether or not the helper should be executed automatically once the download is complete.
nsIMIMEInputStream
not allowed to be changed once the stream has been started to be read.
...may not be called once the stream has been started to be read.
...may not be called once the stream has been started to be read.
nsINavHistoryResultViewObserver
void ondrop(in long row, in long orientation); void ontoggleopenstate(in long index); void oncycleheader(in nsitreecolumn column); void oncyclecell(in long row, in nsitreecolumn column); void onselectionchanged(); void onperformaction(in wstring action); void onperformactiononrow(in wstring action, in long row); void onperformactiononcell(in wstring action, in long row, in nsitreecolumn column); constants constant value description drop_before -1 the drag operation wishes to insert the dragged item before the indicated row.
... onperformactiononcell() this method provides a command api that can be used to invoke commands on a specified cell.
... void onperformactiononcell( in wstring action, in long row, in nsitreecolumn column ); parameters action a string identifying the action to be performed.
nsITreeView
iner(in long index); boolean iscontainerempty(in long index); boolean iscontaineropen(in long index); boolean iseditable(in long row, in nsitreecolumn col); boolean isselectable(in long row, in nsitreecolumn col); boolean isseparator(in long index); boolean issorted(); void performaction(in wstring action); void performactiononcell(in wstring action, in long row, in nsitreecolumn col); void performactiononrow(in wstring action, in long row); void selectionchanged(); void setcelltext(in long row, in nsitreecolumn col, in astring value); void setcellvalue(in long row, in nsitreecolumn col, in astring value); void settree(in nsitreeboxobject tree); void toggleopenstate(i...
... performactiononcell() a command api that can be used to invoke commands on a specific cell.
... void performactiononcell( in wstring action, in long row, in nsitreecolumn col ); parameters action the action to perform.
nsIZipWriter
1.0 66 introduced gecko 1.9 inherits from: nsisupports last changed in gecko 1.9 (firefox 3) once all the operations you wish to perform are added to the queue, a call to processqueue() will perform the operations in the order they were added to the queue.
... aqueue true to place the remove operation into the queue, or false to process it at once.
...once you pick a folder, it will create a zip file inside this folder with the same name as the folder.
Reference Manual
several reasons: it would become inconvenient take the address of an nscomptr in all other situations; the name "getter_addrefs" enforces the notion that a certain behavior is required of the getter; and once upon a time, there was another possibility (as you're about to learn).
...once upon a time, there was, but it went away for three reasons: it is against the rules of xpcom for a getter to return a non-addrefed interface pointer through a parameter (if you see it, report a bug).
...performance concerns should not deter you from using nscomptr.
Virtualenv
using virtualenv once you have virtualenv installed, you can make virtual environments: > virtualenv tmp new python executable in tmp/bin/python installing setuptools............done.
...bin/activate once the virtualenv is activated, the virtualenv's python (and other executables) will be on your path and you will have a new environment variable, virtual_env, that points to the path of the virtualenv, as well as a deactivate function for deactivating the virtualenv.
... the mozilla build system mostly uses .pth files instead of the more typically used python setup.py develop or python setup.py install to install python modules in to the virtualenv's python path due to performance concerns (although such functionality is available via the setup.py keyword in a packages.txt file).
Streams - Plugins
once all data in the stream has been written to the plug-in, the stream is destroyed.
...once the plug-in returns from this method, the browser deletes the npstream object.
...if the plug-in allocates memory for the entire stream at once, it can return a large number.
Edit Shape Paths in CSS - Firefox Developer Tools
once you have selected your element, you should see the shape icon alongside any valid value, e.g.
... understanding the lines drawn by the editor once you have selected a shape on your page, the shape path editor will draw lines to help you understand the path that is being created.
...once again, clipping will occur if you exceed the bounds of the margin box.
AbstractRange - Web APIs
staticrange a staticrange is a basic range which cannot be changed once it's been created.
...this is useful when you need to specify a range that will only be used once, since it avoids the performance and resource impact of the more complex range interface.
...once it's been loaded, the page is a tree of dom node objects, so you need to specify the beginning and ending locations of a range in terms of nodes and positions within nodes.
Animation.finished - Web APIs
the animation.finished read-only property of the web animations api returns a promise which resolves once the animation has finished playing.
...the new promise will resolve once the new animation sequence has completed.
... syntax var animationspromise = animation.finished; value a promise object which will resolve once the animation has finished running.
Background Tasks API - Web APIs
concepts and usage the main thread of a web browser is centered around its event loop.
... statusrefreshscheduled is used to track whether or not we've already scheduled an update of the status display box for the upcoming frame, so that we only do it once per frame the shim to function even if idle callbacks aren't supported.
...it's configured to call a function called runtaskqueue(), which we'll look at shortly, and with a timeout of 1 second, so that it will be run at least once per second even if there isn't any actual idle time available.
BaseAudioContext.createConvolver() - Web APIs
the example below uses a short sample of a concert hall crowd, so the reverb effect applied is really deep and echoey.
... // grab audio track via xhr for convolver node var soundsource, concerthallbuffer; ajaxrequest = new xmlhttprequest(); ajaxrequest.open('get', 'concert-crowd.ogg', true); ajaxrequest.responsetype = 'arraybuffer'; ajaxrequest.onload = function() { var audiodata = ajaxrequest.response; audioctx.decodeaudiodata(audiodata, function(buffer) { concerthallbuffer = buffer; soundsource = audioctx.createbuffersource(); soundsource.buffer = concerthallbuffer; }, function(e){"error with decoding audio data" + e.err}); } ajaxrequest.send(); ...
... convolver.buffer = concerthallbuffer; specifications specification status comment web audio apithe definition of 'createconvolver()' in that specification.
Transformations - Web APIs
saving and restoring state before we look at the transformation methods, let's look at two other methods which are indispensable once you start generating ever more complex drawings.
...however once we call the first restore() statement, the top drawing state is removed from the stack, and settings are restored.
... when the second restore() statement is called, the original state (the one we set up before the first call to save) is restored and the last rectangle is once again drawn in black.
Document.cookie - Web APIs
WebAPIDocumentcookie
when user privacy is a concern, it's important that any web app implementation invalidate cookie data after a certain timeout instead of relying on the browser to do it.
...how cookies</button> example #2: get a sample cookie named test2 document.cookie = "test1=hello"; document.cookie = "test2=world"; const cookievalue = document.cookie .split('; ') .find(row => row.startswith('test2')) .split('=')[1]; function alertcookievalue() { alert(cookievalue); } <button onclick="alertcookievalue()">show cookie value</button> example #3: do something only once in order to use the following code, please replace all occurrences of the word dosomethingonlyonce (the name of the cookie) with a custom name.
... function doonce() { if (!document.cookie.split('; ').find(row => row.startswith('dosomethingonlyonce'))) { alert("do something here!"); document.cookie = "dosomethingonlyonce=true; expires=fri, 31 dec 9999 23:59:59 gmt"; } } <button onclick="doonce()">only do something once</button> example #4: reset the previous cookie function resetonce() { document.cookie = "dosomethingonlyonce=; expires=thu, 01 jan 1970 00:00:00 gmt"; } <button onclick="resetonce()">reset only once cookie</button> example #5: check a cookie existence //es5 if (document.cookie.split(';').some(function(item) { return item.trim().indexof('reader=') == 0 })) { console.log('the cookie "reader" exists (es5)') } //es2016 if (document.cookie.split(';').some((item) => item.trim().startswith('rea...
EffectTiming.fill - Web APIs
WebAPIEffectTimingfill
for example, setting fill to "none" means the animation's effects are not applied to the element if the current time is outside the range of times during which the animation is running, while "forwards" ensures that once the animation's end time has been passed, the element will continue to be drawn in the state it was in at its last rendered frame.
... here we specify that the animation should take 2000 milliseconds (2 seconds) to complete, should only run once, and that the fill mode should be "none".
...then, when the animation finishes running, the box instantaneously leaps back to its original state and is upright once again.
Event.initEvent() - Web APIs
WebAPIEventinitEvent
once dispatched, it doesn't do anything anymore.
...once set, the read-only property event.bubbles will give its value.
...once set, the read-only property event.cancelable will give its value.
Using files from web applications - Web APIs
set up the image's load event handler to release the object url since it's no longer needed once the image has been loaded.
...once we have that list, it's trivial to go through it and create a new fileupload instance for each.
...this causes the throbber to disappear once the upload is complete.
Introduction to the File and Directory Entries API - Web APIs
about this document this introduction discusses essential concepts and terminology in the file and directory entries api.
... it gives you the big picture and orients you to key concepts.
... big concepts before you start using the file and directory entries api, you need to understand a few concepts: the file and directory entries api is a virtual representation of a file system the file and directory entries api can use different storage types browsers impose storage quota the file and directory entries api has asynchronous and synchronous versions when using the asynchronous api, alw...
Fullscreen API - Web APIs
the fullscreen api adds methods to present a specific element (and its descendants) in full-screen mode, and to exit full-screen mode once it is no longer needed.
...returns a promise which is resolved once full-screen mode has been completely shut off.
...returns a promise which is resolved once full-screen mode has been activated.
The HTML DOM API - Web APIs
html dom concepts and usage in this article, we'll focus on the parts of the html dom that involve engaging with html elements.
... nodes don't have any concept of including the content that is actually displayed in the document.
...from node, the element inherits concepts surrounding the ability for the element to be contained by another element, and to contain other elements itself.
IndexedDB API - Web APIs
this is the main landing page for mdn's indexeddb coverage — here we provide links to the full api reference and usage guides, browser support details, and some explanation of key concepts.
... key concepts and usage indexeddb is a transactional database system, like an sql-based rdbms.
... read more about the concepts behind indexeddb.
LocalFileSystemSync - Web APIs
basic concepts you can request access to a sandboxed file system by requesting localfilesystemsync object from within a web worker.
... for more concepts, see the counterpart article for the asynchronous api.
...for more details, see the article on basic concepts.
Recording a media element - Web APIs
function wait(delayinms) { return new promise(resolve => settimeout(resolve, delayinms)); } the wait() function returns a new promise which resolves once the specified number of milliseconds have elapsed.
...once that resolves, the array data is returned by startrecording() to its caller.
...as mentioned before, startrecording() returns a promise whose resolution handler is called (receiving as input an array of blob objects containing the chunks of recorded media data) once recording has completed.
Capabilities, constraints, and settings - Web APIs
the twin concepts of constraints and capabilities let the browser and web site or app exchange information about what constrainable properties the browser's implementation supports and what values it supports for each one.
... once the script knows whether the property or properties it wishes to use are supported, it can then check the capabilities of the api and its implementation by examining the object returned by the track's getcapabilities() method; this object lists each supported constraint and the values or range of values which are supported.
... once that's done, applyconstraints() is called on the audio track (if there is one) to apply the new audio constraints.
Permissions API - Web APIs
concepts and usage historically different apis handle their own permissions inconsistently — for example the notifications api allows for explicit checking of permission status and requesting permission, whereas the geolocation api doesn't (which causes problems if the user denied the initial permission request).
... the permissions api provides the tools to allow developers to implement a better user experience as far as permissions are concerned.
... once you have this object you can then perform permission-related tasks, for example querying a permission using the permissions.query() method to return a promise that resolves with the permissionstatus for a specific api.
RTCPeerConnection.setLocalDescription() - Web APIs
the method takes a single parameter—the session description—and it returns a promise which is fulfilled once the description has been changed, asynchronously.
... return value a promise which is fulfilled once the value of rtcpeerconnection.localdescription is successfully changed or rejected if the change cannot be applied (for example, if the specified description is incompatible with one or both of the peers on the connection).
... successcallback a javascript function which accepts no input parameters to be be called once the description has been successfully set.
RTCPeerConnection - Web APIs
it provides methods to connect to a remote peer, maintain and monitor the connection, and close the connection once it's no longer needed.
...instead of using this obsolete method, you should instead use addtrack() once for each track you wish to send to the remote peer.addtrack()the rtcpeerconnection method addtrack() adds a new media track to the set of tracks which will be transmitted to the other peer.close() the rtcpeerconnection.close() method closes the current peer connection.createanswer() the createanswer() method on the rtcpeerconnection interface creates an sdp answer to an offer received from a re...
...<<< make this a link once i know where that will be documented "connected" every ice transport used by the connection is either in use (state "connected" or "completed") or is closed (state "closed"); in addition, at least one transport is either "connected" or "completed".
RTCRtpParameters - Web APIs
this parameter cannot be changed once initially set.
...this parameter cannot be changed once initially set.
...this parameter cannot be changed once initially set.
Using Service Workers - Web APIs
this returns a promise for a created cache; once resolved, we then call a function that calls addall() on the created cache, which for its parameter takes an array of origin-relative urls to all the resources you want to cache.
... cloning the response is necessary because request and response streams can only be read once.
... they are each read once.
URL API - Web APIs
WebAPIURL API
the url standard also defines concepts such as domains, hosts, and ip addresses, and also attempts to describe in a standard way the legacy application/x-www-form-urlencoded mime type used to submit web forms' contents as a set of key/value pairs.
... url concepts and usage the majority of the url standard is taken up by the definition of a url and how it is structured and parsed.
...for instance, try https://url-api.glitch.me?from=mdn&excitement=high&likelihood=inconceivable.
Lighting in WebGL - Web APIs
once you drop out the concept of point sources and specular lighting, there are two pieces of information we'll need in order to implement our directional lighting: we need to associate a surface normal with each vertex.
...3(0.3, 0.3, 0.3); highp vec3 directionallightcolor = vec3(1, 1, 1); highp vec3 directionalvector = normalize(vec3(0.85, 0.8, 0.75)); highp vec4 transformednormal = unormalmatrix * vec4(avertexnormal, 1.0); highp float directional = max(dot(transformednormal.xyz, directionalvector), 0.0); vlighting = ambientlight + (directionallightcolor * directional); } `; once the position of the vertex is computed, and we pass the coordinates of the texel corresponding to the vertex to the fragment shader, we can work on computing the shading for the vertex.
... once the amount of directional lighting is computed, we can generate the lighting value by taking the ambient light and adding in the product of the directional light's color and the amount of directional lighting to provide.
WebGL best practices - Web APIs
(conceptually releasing the handle's ref-pointer to the object) only once the object is unused in the implementation is it actually freed.
... instead of: function compileonce(gl, shader) { if (shader.compiled) return; gl.compileshader(shader); shader.compiled = true; } for (const [vs, fs, prog] of programs) { compileonce(gl, vs); compileonce(gl, fs); gl.linkprogram(prog); if (!gl.getprogramparameter(prog, gl.link_status)) { console.error('link failed: ' + gl.getprograminfolog(prog)); console.error('vs info-log: ' + gl.getshaderinfolog(vs)); c...
...onsole.error('fs info-log: ' + gl.getshaderinfolog(fs)); } } consider: function compileonce(gl, shader) { if (shader.compiled) return; gl.compileshader(shader); shader.compiled = true; } for (const [vs, fs, prog] of programs) { compileonce(gl, vs); compileonce(gl, fs); } for (const [vs, fs, prog] of programs) { gl.linkprogram(prog); } for (const [vs, fs, prog] of programs) { if (!gl.getprogramparameter(prog, gl.link_status)) { console.error('link failed: ' + gl.getprograminfolog(prog)); console.error('vs info-log: ' + gl.getshaderinfolog(vs)); console.error('fs info-log: ' + gl.getshaderinfolog(fs)); } } khr_parallel_shader_compile for non-blocking compile/link status while we've described a pattern to allow browsers to compile and link in parallel, normally...
WebGL: 2D and 3D graphics for the web - Web APIs
WebAPIWebGL API
guides and tutorials below, you'll find an assortment of guides to help you learn webgl concepts and tutorials that offer step-by-step lessons and examples.
... tutorials webgl tutorial a beginner's guide to webgl core concepts.
... webgl by example a series of live samples with short explanations that showcase webgl concepts and capabilities.
Taking still photos with WebRTC - Web APIs
once the stream is linked to the <video> element, we start it playing by calling htmlmediaelement.play().
...lled when the click event is issued: startbutton.addeventlistener('click', function(ev){ takepicture(); ev.preventdefault(); }, false); this method is simple enough: it just calls our takepicture() function, defined below in the section capturing a frame from the stream, then calls event.preventdefault() on the received event to prevent the click from being handled more than once.
... once the canvas contains the captured image, we convert it to png format by calling htmlcanvaselement.todataurl() on it; finally, we call photo.setattribute() to make our captured still box display the image.
WebRTC API - Web APIs
webrtc concepts and usage webrtc serves multiple purposes; together with the media capture and streams api, they provide powerful multimedia capabilities to the web, including support for audio and video conferencing, file exchange, screen sharing, identity management, and interfacing with legacy telephone systems including support for sending dtmf (touch-tone dialing) signals.
...once a connection has been established and opened using rtcpeerconnection, media streams (mediastreams) and/or data channels (rtcdatachannels) can be added to the connection.
...once set it can't be changed.
Using bounded reference spaces - Web APIs
unction onactivatexrbutton(event) { if (!xrsession) { navgator.xr.requestsession("immersive-vr"), { requiredfeatures: ["local-floor"], optionalfeatures: ["bounded-floor"] }).then((session) => { xrsession = session; startsessionanimation(); }); } } this function, called when the user clicks on a button to start the xr experience, works as usual, exiting at once if a session is already in place, then requesting a new session using immersive-vr mode.
... once the session has been created, our startsessionanimation() function can try to establish a bounded-floor reference space, and if it fails to do so it can then fall back to requesting a local-floor reference space instead (in which we will have to handle boundaries ourselves).
... in either case, once a reference space has been created, it's handed off to a function called onrefspacecreated(), which takes over the process of setting up the space for use.
Geometry and reference spaces in WebXR - Web APIs
however, in order to provide the ability to present scenes in true 3d using xr headsets and other such equipment, webxr has additional concepts that must be understood.
... in webxr, the fundamental concept of a space—as in, a coordinate space in which a scene takes place—is represented by an instance of xrspace.
... once created, an xrreferencespace guarantees a certain level of support for motion and orientation tracking, and provides a mechanism for obtaining an xrviewerpose from which you can get a matrix which represents the position and facing direction of the space relative to the world space, if the space represents a viewer such as the user's headset, an observer's headset, or a virtual camera.
Spaces and reference spaces: Spatial tracking in WebXR - Web APIs
note: this article presumes that you are familiar with the concepts introduced in geometry and reference spaces in webxr: that is, the basics of 3d coordinate systems, as well as webxr spaces, reference spaces, and how reference spaces are used to create local coordinate systems for individual objects or movable components within a scene.
... poses once your reference space or spaces are established for the various key objects in the scene, you will have times when you need to describe another position relative to the origin of a particular reference space.
... once the xr hardware begins providing tracking information, it will continue to do so until the xr session is clsoed.
WindowOrWorkerGlobalScope.setTimeout() - Web APIs
the settimeout() method of the windoworworkerglobalscope mixin (and successor to window.settimeout()) sets a timer which executes a function or specified piece of code once the timer expires.
... timeouts throttled to ≥ 4ms in modern browsers, settimeout()/setinterval() calls are throttled to a minimum of once every 4 ms when successive calls are triggered due to callback nesting (where the nesting level is at least a certain depth), or after certain number of successive intervals.
... timeouts in inactive tabs throttled to ≥ 1000ms to reduce the load (and associated battery usage) from background tabs, timeouts are throttled to firing no more often than once per second (1,000 ms) in inactive tabs.
system - CSS: Cascading Style Sheets
once the end of the list of symbols is reached, it will loop back to the beginning and start over.
...once the system has looped through all the specified symbols, it will fall back.
...once outside of the range, the rest of the counter representations will be based on the decimal style, which is the fall back.
Testing media queries programmatically - CSS: Cascading Style Sheets
once you've created a mediaquerylist object, you can check the result of the query or receive notifications when the result changes.
... for example, to set up a query list that determines if the device is in landscape or portrait orientation: const mediaquerylist = window.matchmedia("(orientation: portrait)"); checking the result of a query once you've created your media query list, you can check the result of the query by looking at the value of its matches property: if (mediaquerylist.matches) { /* the viewport is currently in portrait orientation */ } else { /* the viewport is not currently in portrait orientation, therefore landscape */ } receiving query notifications if you need to be aware of changes to the evaluated result...
...} // run the orientation change handler once.
background - CSS: Cascading Style Sheets
the background shorthand css property sets all background style properties at once, such as color, image, origin and size, or repeat method.
...if included once, it sets both background-origin and background-clip.
... accessibility concerns browsers do not provide any special information on background images to assistive technology.
break-after - CSS: Cascading Style Sheets
to determine if a break must be done, the following rules are applied: if any of the three concerned values is a forced break value (always, left, right, page, column, or region), it has precedence.
... if any of the three concerned values is an avoid break value (avoid, avoid-page, avoid-region, or avoid-column), no such break will be applied at that point.
... once forced breaks have been applied, soft breaks may be added if needed, but not on element boundaries that resolve in a corresponding avoid value.
break-before - CSS: Cascading Style Sheets
to determine if a break must be done, the following rules are applied: if any of the three concerned values is a forced break value (always, left, right, page, column, or region), it has precedence.
... if any of the three concerned values is an avoid break value (avoid, avoid-page, avoid-region, or avoid-column), no such break will be applied at that point.
... once forced breaks have been applied, soft breaks may be added if needed, but not on element boundaries that resolve in a corresponding avoid value.
break-inside - CSS: Cascading Style Sheets
to determine if a break must be done, the following rules are applied: if any of the three concerned values is a forced break value (always, left, right, page, column, or region), it has precedence.
... if any of the three concerned values is an avoid break value (avoid, avoid-page, avoid-region, or avoid-column), no such break will be applied at that point.
... once forced breaks have been applied, soft breaks may be added if needed, but not on element boundaries that resolve in a corresponding avoid value.
<display-box> - CSS: Cascading Style Sheets
please note that the css display level 3 spec defines how the contents value should affect "unusual elements" — elements that aren’t rendered purely by css box concepts such as replaced elements.
...see the accessibility concerns section below for more details.
... accessibility concerns current implementations in most browsers will remove from the accessibility tree any element with a display value of contents.
Audio and Video Delivery - Developer guides
here's a trick that stops the download at once: var mediaelement = document.queryselector("#mymediaelementid"); mediaelement.removeattribute("src"); mediaelement.load(); by removing the media element's src attribute and invoking the load() method, you release the resources associated with the video, which stops the network download.
...the sources are tried in the order in which they appear, and once one loads successfully, the remaining sources aren't tried at all.
... streaming media tutorials live streaming web audio and video live streaming technology is often employed to relay live events such as sports, concerts and more generally tv and radio programmes that are output live.
Rich-Text Editing in Mozilla - Developer guides
once designmode has been set to "on", the document becomes a rich-text editing area and the user can type into it as if it were a textarea.
... event handling disabled a further difference for mozilla is that once a document is switched to designmode, all events on that particular document are disabled.
... once designmode is turned off however (as this now seems possible in mozilla 1.5) the events become active again.
Index - Developer guides
WebGuideIndex
dia, events this article provides: a basic guide to creating a cross-browser html5 audio player with all the associated attributes, properties, and events explained a guide to custom controls created using the media api 10 live streaming web audio and video guide, adaptive streaming live streaming technology is often employed to relay live events such as sports, concerts and more generally tv and radio programmes that are output live.
...once we're ready for wider adoption the information from wiki.mozilla.org will be moved here, updated and expanded.
... 41 the web open font format (woff) fonts, needsmobilebrowsercompatibility, woff woff (the web open font format) is a web font format developed by mozilla in concert with type supply, letterror, and other organizations.
Introduction to Web development - Developer guides
html elements reference guide — a comprehensive guide to html elements with details on how browsers support them css getting started with css — an absolute beginners guide to css covers basic concepts and fundamentals css reference guide — a complete guide to css with details on the level of gecko/firefox support for each.
... common css questions — common questions and answers for beginners intermediate css concepts — grouping, pseudo-classes and more.
... advanced learning advanced javascript — john resig's guide to advanced javascript crockford on advanced javascript — a three part video series on advanced javascript concepts javascript garden — documentation of the most quirky parts of javascript.
Writing forward-compatible websites - Developer guides
targeting hacks at old versions of browsers whose current versions no longer have the bug you're relying on for your hack is ok; once a browser has fixed bug x, you can know for certain that all releases that had bug x also had bug y and use the presence of bug x to target workarounds for bug y.
...and once the feature is standardized, the prefixed version is likely to be removed.
... once a browser has shipped a feature unprefixed, however, you can use the prefixed version to target old releases by making sure to always use the unprefixed version of the feature when available.
<abbr>: The Abbreviation element - HTML: Hypertext Markup Language
WebHTMLElementabbr
you can use <abbr> in concert with <dfn> to establish definitions for terms which are abbreviations or acronyms.
... html <p><dfn id="html"><abbr title="hypertext markup language">html</abbr> </dfn> is a markup language used to create the semantics and structure of a web page.</p> <p>a <dfn id="spec">specification</dfn> (<abbr title="specification">spec</abbr>) is a document that outlines in detail how a technology or api is intended to function and how it is accessed.</p> result accessibility concerns spelling out the acronym or abbreviation in full the first time it is used on a page is beneficial for helping people understand it, especially if the content is technical or industry jargon.
... example <p>javascript object notation (<abbr>json</abbr>) is a lightweight data-interchange format.</p> this is especially helpful for people who are unfamiliar with the terminology or concepts discussed in the content, people who are new to the language, and people with cognitive concerns.
<img>: The Image Embed element - HTML: Hypertext Markup Language
WebHTMLElementimg
security and privacy concerns although <img> elements have innocent uses, they can have undesirable consequences for user security and privacy.
... see referer header: privacy and security concerns for more information and mitigations.
... accessibility concerns authoring meaningful alternate descriptions an alt attribute's value should clearly and concisely describe the image's content.
<main> - HTML: Hypertext Markup Language
WebHTMLElementmain
<main> doesn't contribute to the document's outline; that is, unlike elements such as <body>, headings such as <h2>, and such, <main> doesn't affect the dom's concept of the structure of the page.
...</p> </article> </main> <!-- other content --> accessibility concerns landmark the <main> element behaves like a main landmark role.
...prefer using the <main> element over declaring role="main", unless there are legacy browser support concerns.
<script>: The Script element - HTML: Hypertext Markup Language
WebHTMLElementscript
nonce a cryptographic nonce (number used once) to whitelist scripts in a script-src content-security-policy.
... the server must generate a unique nonce value each time it transmits a policy.
... it is critical to provide a nonce that cannot be guessed as bypassing a resource's policy is otherwise trivial.
<style>: The Style Information element - HTML: Hypertext Markup Language
WebHTMLElementstyle
nonce a cryptographic nonce (number used once) used to whitelist inline styles in a style-src content-security-policy.
... the server must generate a unique nonce value each time it transmits a policy.
... it is critical to provide a nonce that cannot be guessed as bypassing a resource’s policy is otherwise trivial.
<table>: The Table element - HTML: Hypertext Markup Language
WebHTMLElementtable
th> <th>lemon</th> <th>orange</th> </tr> <tr> <td>green</td> <td>yellow</td> <td>orange</td> </tr> </table> <p>simple table with caption</p> <table> <caption>awesome caption</caption> <tr> <td>awesome data</td> </tr> </table> table { border-collapse: collapse; border-spacing: 0px; } table, th, td { padding: 5px; border: 1px solid black; } accessibility concerns captions by supplying a <caption> element whose value clearly and concisely describes the table's purpose, it helps the people decide if they need to read the rest of the table content or skip over it.
... this helps people navigating with the aid of assistive technology such as a screen reader, people experiencing low vision conditions, and people with cognitive concerns.
...in addition to helping people who use assistive technology understand the table's content, this may also benefit people with cognitive concerns who may have difficulty understanding the associations the table layout is describing.
accesskey - HTML: Hypertext Markup Language
alt + shift + key n/a edge n/a control + option + key control + option + shift + key google chrome alt + shift + key safari n/a opera 15+ alt + key control + alt + key opera 12 shift + esc opens a contents list which are accessible by accesskey, then, can choose an item by pressing key accessibility concerns in addition to poor browser support, there are numerous concerns with the accesskey attribute: an accesskey value can conflict with a system or browser keyboard shortcut, or assistive technology functionality.
... certain accesskey values may not be present on certain keyboards, especially when internationalization is a concern.
... accesskey values that rely on numbers may be confusing to individuals experiencing cognitive concerns, where the number doesn't have a logical association with the functionality it triggers.
About JavaScript - JavaScript
contrary to popular misconception, javascript is not "interpreted java".
...the basic syntax is intentionally similar to both java and c++ to reduce the number of new concepts required to learn the language.
...once an object has been constructed it can be used as a blueprint (or prototype) for creating similar objects.
Concurrency model and the event loop - JavaScript
runtime concepts the following sections explain a theoretical model.
... the processing of functions continues until the stack is once again empty.
... here is an example that demonstrates this concept (settimeout does not run immediately after its timer expires): const s = new date().getseconds(); settimeout(function() { // prints out "2", meaning that the callback is not called immediately after 500 milliseconds.
Expressions and operators - JavaScript
bitwise logical operators conceptually, the bitwise logical operators work as follows: the operands are converted to thirty-two-bit integers and expressed by a series of bits (zeros and ones).
... for example, if a is a 2-dimensional array with 10 elements on a side, the following code uses the comma operator to update two variables at once.
... every syntactically valid expression resolves to some value but conceptually, there are two types of expressions: with side effects (for example: those that assign value to a variable) and those that in some sense evaluate and therefore resolve to a value.
Array.prototype.reduce() - JavaScript
description the reduce() method executes the callback once for each assigned value present in the array, taking four arguments: accumulator currentvalue currentindex array the first time the callback is called, accumulator and currentvalue can be one of two values.
...'d', 'd', 'd'] let myorderedarray = myarray.reduce(function (accumulator, currentvalue) { if (accumulator.indexof(currentvalue) === -1) { accumulator.push(currentvalue) } return accumulator }, []) console.log(myorderedarray) replace .filter().map() with .reduce() using array.filter() then array.map() traverses the array twice, but you can achieve the same effect while traversing only once with array.reduce(), thereby being more efficient.
... (if you like for loops, you can filter and map while traversing once with array.foreach()).
Array.prototype.forEach() - JavaScript
the foreach() method executes a provided function once for each array element.
... description foreach() calls a provided callback function once for each element in an array in ascending order.
...(see this example, below.) foreach() executes the callback function once for each array element; unlike map() or reduce() it always returns the value undefined and is not chainable.
Promise.prototype.finally() - JavaScript
this provides a way for code to be run whether the promise was fulfilled successfully or rejected once the promise has been dealt with.
... description the finally() method can be useful if you want to do some processing or cleanup once the promise is settled, regardless of its outcome.
... the finally() method is very similar to calling .then(onfinally, onfinally) however there are a couple of differences: when creating a function inline, you can pass it once, instead of being forced to either declare it twice, or create a variable for it a finally callback will not receive any argument, since there's no reliable means of determining if the promise was fulfilled or rejected.
TypedArray.prototype.forEach() - JavaScript
the foreach() method executes a provided function once per array element.
... description the foreach() method executes the provided callback once for each element present in the typed array in ascending order.
... foreach() executes the callback function once for each typed array element; unlike every() and some() it, always returns the value undefined.
yield - JavaScript
once paused on a yield expression, the generator's code execution remains paused until the generator's next() method is called.
... each time the generator's next() method is called, the generator resumes execution, and runs until it reaches one of the following: a yield, which causes the generator to once again pause and return the generator's new value.
... function* countapplesales () { let salelist = [3, 7, 5] for (let i = 0; i < salelist.length; i++) { yield salelist[i] } } once a generator function is defined, it can be used by constructing an iterator as shown.
do...while - JavaScript
the condition is evaluated after executing the statement, resulting in the specified statement executing at least once.
... syntax do statement while (condition); statement a statement that is executed at least once and is re-executed each time the condition evaluates to true.
... examples using do...while in the following example, the do...while loop iterates at least once and reiterates until i is no longer less than 5.
Handling media support issues in web content - Web media technologies
a similar concept can be applied to still images; if an image you wish to present is very large and may take time to download (especially for slower devices or connections), you can offer a lower-resolution or alternate version that will be displayed until the full-quality version is available to be displayed.
... poster frames for video progressive images images—whether embedded using <img> or <picture>—don't support a concept similar to poster frames.
... once your image has been converted to progressive form, you can simply use it as usual.
The "codecs" parameter in common media types - Web media technologies
as noted elsewhere, this format was once commonly used on the web but no longer is, since it required a plugin to use.
...see yuv in digital video concepts for details on how the yuv color system works.
...the following table lists permitted values; see chroma subsampling in digital video concepts for additional information about this topic and others.
Media type and format guide: image, audio, and video content - Web media technologies
WebMediaFormats
guides concepts digital audio concepts an introduction to how audio is converted into digital form and stored for use by computers.
... it explains basic concepts about how audio is sampled, as well as concepts such as sample rate, audio frames, and audio compression.
... digital video concepts a guide to fundamental concepts involved with digital video as used on the web, including basics about color formats, chroma subsampling, how human perception influences video coding, and so forth.
Progressive web app structure - Progressive web apps (PWAs)
the most popular approach is the "app shell" concept, which mixes ssr and csr in exactly the way described above, and in addition follows the "offline first" methodology which we will explain in detail in upcoming articles and use in our example application.
... app shell the app shell concept is concerned with loading a minimal user interface as soon as possible and then caching it so it is available offline for subsequent visits before then loading all the contents of the app.
... different concept: streams an entirely different approach to server- or client-side rendering can be achieved with the streams api.
Introduction to progressive web apps - Progressive web apps (PWAs)
it's just a shorthand used initially by google for the concept of creating a flexible, adaptable app using only web technologies.
... it's not a brand new concept—such ideas have been revisited many times on the web platform with various approaches in the past.
... browse any kind of content the user has previously visited at least once, even under situations of poor connectivity.
Structural overview of progressive web apps - Progressive web apps (PWAs)
the most popular approach is the app shell concept, which mixes ssr and csr in exactly the way described above, and in addition follows the "offline first" methodology which we will explain in detail in upcoming articles and use in our example application.
... the app shell concept the app shell concept is concerned with loading a minimal user interface and content as soon as possible, caching it so it's available offline for subsequent visits before then loading the remainder of the app's contents.
...once it's available, however, it will be the fastest way to serve your app's content.
An Overview - XSLT: Extensible Stylesheet Language Transformations
« transforming xml with xslt the extensible stylesheet language/transform is a very powerful language, and a complete discussion of it is well beyond the scope of this article, but a brief discussion of some basic concepts will be helpful in understanding the description of netscape's capabilities that follows.
...the tree is an abstract datatype, a conceptual model which can be implemented in various ways depending on the parser and the processor.
...the only requirements concern the disposition of objects in the tree, their properties, and their relationships.
Porting the Library Detector - Archive of obsolete content
once the list is built, the switchlibraries() function constructs a xul statusbarpanel element for each library it found, populates it with the icon at the corresponding chrome:// url, and adds it to the box.
...ibrarylist) { if (!worker.tab.libraries) { worker.tab.libraries = []; } librarylist.foreach(function(library) { if (worker.tab.libraries.indexof(library) == -1) { worker.tab.libraries.push(library); } }); if (worker.tab == tabs.activetab) { updatewidgetview(worker.tab); } }); } }); the content script is executed once for every window.onload event, so it will run multiple times when a single page containing multiple iframes is loaded.
page-worker - Archive of obsolete content
this may take one of the following values: "start": load content scripts immediately after the document element for the page is inserted into the dom, but before the dom content itself has been loaded "ready": load content scripts once dom content has been loaded, corresponding to the domcontentloaded event "end": load content scripts once all the content (dom, js, css, images) for the page has been loaded, at the time the window.onload event fires this property is optional and defaults to "end".
...this may have one of the following values: "start": load content scripts immediately after the document element for the page is inserted into the dom, but before the dom content itself has been loaded "ready": load content scripts once dom content has been loaded, corresponding to the domcontentloaded event "end": load content scripts once all the content (dom, js, css, images) for the page has been loaded, at the time the window.onload event fires contentscriptoptions read-only value exposed to content scripts under self.options property.
tabs - Archive of obsolete content
tabs.open({ url: "http://www.mysite.com", inbackground: true }); // open a new tab as an app tab and do something once it's open.
...it has one of four possible values: "uninitialized": the tab's document is not yet loading "loading": the tab's document is still in the process of loading "interactive": the tab's document has loaded and is parsed, but resources such as images and stylesheets may still be loading "complete": the tab's document and all resources are fully loaded once a tab's readystate has entered "interactive", you can retrieve properties such as the document's url.
content/loader - Archive of obsolete content
usage the module exports a constructor for the loader object, which inherits on(), once(), and removelistener() functions that enable its users to listen to events.
...this may take one of the following values: "start": load content scripts immediately after the document element for the page is inserted into the dom, but before the dom content itself has been loaded "ready": load content scripts once dom content has been loaded, corresponding to the domcontentloaded event "end": load content scripts once all the content (dom, js, css, images) for the page has been loaded, at the time the window.onload event fires contentscriptoptions read-only value exposed to content scripts under self.options property.
content/symbiont - Archive of obsolete content
this may take one of the following values: "start": load content scripts immediately after the document element for the page is inserted into the dom, but before the dom content itself has been loaded "ready": load content scripts once dom content has been loaded, corresponding to the domcontentloaded event "end": load content scripts once all the content (dom, js, css, images) for the page has been loaded, at the time the window.onload event fires this property is optional and defaults to "end".
...this may have one of the following values: "start": load content scripts immediately after the document element for the page is inserted into the dom, but before the dom content itself has been loaded "ready": load content scripts once dom content has been loaded, corresponding to the domcontentloaded event "end": load content scripts once all the content (dom, js, css, images) for the page has been loaded, at the time the window.onload event fires contentscriptoptions read-only value exposed to content scripts under self.options property.
net/xhr - Archive of obsolete content
usage security concerns by default, the xmlhttprequest object grants full access to any protocol scheme, which means that it can be used to read from (but not write to) the host system's entire filesystem.
...for more information about xmlhttprequest objects, see the mdn page on using xmlhttprequest and the security concerns section in this page.
places/bookmarks - Archive of obsolete content
save(bookmarks).on("data", function (saved, input) { // a data event is called once for each item saved, as well // as implicit items, like `group` console.log(input === group || ~bookmarks.indexof(input)); // true }).on("end", function (saves, inputs) { // like the previous example, the "end" event returns an // array of all of our updated saves.
... let { bookmark, group, save } = require("sdk/places/bookmarks"); let group = group({ title: "my group" }); let bookmarks = [ bookmark({ title: "mozilla", url: "http://mozilla.com", group: group }), bookmark({ title: "w3", url: "http://w3.org", group: group }) ]; save(bookmarks).on("data", function (item) { // this function will be called three times: // once for each bookmark saved // once for the new group specified implicitly // as the parent of the two items }); the data event is also called for search requests, with each result being passed individually into its own data event.
ui/button/action - Archive of obsolete content
once() assign a listener to the first occurrence only of an event emitted by the button.
...for example, this code is equivalent to once(): button.on("click", handleclick) function handleclick(state) { console.log("button '" + state.label + "' was clicked"); button.removelistener("click", handleclick); } parameters event : string the event to listener is listening for.
ui/button/toggle - Archive of obsolete content
once() assign a listener to the first occurrence only of an event emitted by the button.
...for example, this code is equivalent to once(): button.on("click", handleclick) function handleclick(state) { console.log("button '" + state.label + "' was clicked"); button.removelistener("click", handleclick); } parameters event : string the event to listener is listening for.
jpm - Archive of obsolete content
once you've supplied a value or accepted the default for these properties, you'll be shown the complete contents of "package.json" and asked to accept it.
... once you have built an xpi file, you can distribute your add-on by submitting it to addons.mozilla.org.
Getting Started (jpm) - Archive of obsolete content
once you've done that, you'll be looking at a command prompt.
... once you've supplied a value or accepted the default for these properties, you'll be shown the complete contents of "package.json" and asked to accept it.
View Source for XUL Applications - Archive of obsolete content
linenumber (optional) the line number to focus on once the source has loaded.
... alinenumber (optional) the line number to focus on once the source has loaded.
Enhanced Extension Installation - Archive of obsolete content
since our needs and the needs of other applications may vary in the future, since we've already effectively generalized the concept of an install location, we can make this set configurable by applications and extensions.
...at the end of the process once everything has succeeded the {guid}-trash folder is removed.
Migrating raw components to add-ons - Archive of obsolete content
they will be registered the first time firefox is run once your add-on is installed.
... automatic installation once you have an add-on packaged, users can install it by visiting your site and giving the add-on permission to install.
Appendix: What you should know about open-source software licenses - Archive of obsolete content
as far as the author is concerned, this is an unrelated application of the work.
... copyleft is not required a common misconception regarding open source is that any modification made to open-source code must also be released as open source.
Chapter 3: Introduction to XUL—How to build a more intuitive UI - Archive of obsolete content
because html was originally conceived as a language for marking up documents, specifically web pages, it is inevitably lacking in functionality for marking up applications.
... xul, on the other hand, was conceived from the ground up as a markup language for user interfaces, and makes it possible to insert ui components with sophisticated features just by writing tags, without any particular scripting.
Connecting to Remote Content - Archive of obsolete content
xpath can also be used to extract information from web pages once they load, along with the page load interception techniques discussed previously.
... after installation, you can find a tamper data menu item in the menu bar: tools > tamper data or view > sidebar > tamper data once you open the tamper data view, all requests and responses will begin to appear in it.
Setting Up a Development Environment - Archive of obsolete content
this is where all the resulting build files will be created, and where you'll find the extension xpi file once you get it to build.
...once you're testing and debugging your code, you'll find that constantly building and installing an xpi can be very tedious.
The Essentials of an Extension - Archive of obsolete content
the js function will be called once the user clicks on the menu item in the hello world menu.
... once you're done, you can look at this reference solution: hello world 2.
Useful Mozilla Community Sites - Archive of obsolete content
your extension begins in a sandbox with limited access, and once you nominate it an editor will review it and see if it is appropriate for the public amo site, where everyone can see it and install it.
...you just need to upload a new version of your extension, and once it's approved it will be pushed as an update to all your users.
Performance best practices in extensions - Archive of obsolete content
this makes it easy to load chunks of your extension on the fly as needed, instead of loading everything all at once.
... avoid dom mutation event listeners dom mutation event listeners are extremely expensive and, once added to a document even briefly, significantly harm its performance.
Creating a dynamic status bar extension - Archive of obsolete content
concepts covered in the previous sample won't be reiterated here; instead, refer to the downloadable sample code or to the previous sample for further details.
...we end up reloading data from each of the windows once in 10 minutes - fixing this by creating a js component responsible for communication with the server is a good idea for one of the future articles startup: function() { this.refreshinformation(); window.setinterval(this.refreshinformation, 10*60*1000); }, this starts by calling our refreshinformation() function, which is responsible for fetching and displaying stock ticker information in the...
Creating a status bar extension - Archive of obsolete content
many of the concepts introduced here apply to any xul-based application; however, to keep from getting completely overwhelmed, we're going to focus specifically on firefox.
...this is accomplished by the following line of xml: <overlay id="status-bar-sample-1-overlay" xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"> once that's accomplished, we can describe our user interface.
Inner-browsing extending the browser navigation paradigm - Archive of obsolete content
this article discusses the concept of inner-browsing and possible approaches for its implementation.
...data loader component this component is a simple javascript function that sets the src attribute of the hidden iframe, causing it to load an url (i.e., by establishing a request on the server side): /* triggers the iframe to retrieve new data */ function retrievedata() { bridgeframe.src = dataurl; } once a web page is loaded into the iframe, the data binder will be able to get the data from the iframe's page and set the data into the main page's context.
MMgc - Archive of obsolete content
it may be multiply instantiated; you may have multiple instances of the garbage collector running at once.
...this is an unfortunate artifact of the existing code base, the avm+ is relatively clean and its reachability graph consists of basically 2 gc roots (the avmcore and urlstreams) but the avm- has a bunch (currently includes securitycallbackdata, moviecliploader, camerainstance, fappacket, microphoneinstance, csoundchannel, urlrequest, responceobject, urlstream and urlstreamsecurity).
Notes on HTML Reflow - Archive of obsolete content
the reflow tree work, which will remove several commands from the queue at once.) a path is built from the target frame to the root frame and stored in the reflow command.
...were we to process each individually, the text widget would be flowed once for each keystroke, which would be wasteful if the latency of an individual reflow exceeds the speed at which text is being typed.
Getting Started - Archive of obsolete content
once you've done this, insert the information as above, and scroll down.
...once you have put the files in the zip folder, rename it to myskin.jar triggering the install from the web to install the theme's jar file directly from the web, you need to run some javascript.
Getting Started - Archive of obsolete content
delete the bolded text: original skin,install,url,jar:resource:/chrome/classic.jar!/skin/classic/global/ modified skin,install,url,resource:/chrome/classic/skin/classic/global/ once you have made these modifications, save them and run mozilla.
...once the zip is created, rename it to myskin.jar contents of myskin.jar contents.rdf preview.png \navigator\...
Creating a Skin for Firefox/Getting Started - Archive of obsolete content
once you've done this, insert the information as above, and scroll down.
...once you have put the files in the zip folder, rename it to my_theme.jar triggering the install from the web to install the theme's jar file directly from the web, you need to run some javascript.
Dehydra Function Reference - Archive of obsolete content
decl is a variable type input_end() called once at the end of the c++ source file before the compiler quits.
...includes are guarded so a file is only included once and subsequent include calls are ignored.
Drag and Drop - Archive of obsolete content
once this function is called, a drag has started.
...an array is used because you might want to drag several objects at once, such as a set of files.
Document Loading - From Load Start to Finding a Handler - Archive of obsolete content
nsdocumentopeninfo implements nsistreamlistener and proxies the nsistreamlistener calls over to the "real" stream listener once one is chosen.
...this way, once we know what type we've managed to get we can attempt to redispatch it.
Repackaging Firefox - Archive of obsolete content
once you have all the ingredients, the customization process is quite easy: download the firefox installer.
... repackaging firefox once you have all the required pieces in place, all you need to do is launch the repackager tool and fill in the fields to set up your customized installers.
Introducing the Audio API extension - Archive of obsolete content
once the buffer is full, the event mozaudioavailable is triggered.
...audiooutput.mozsetup(2, 44100); once this is done, the samples need to be created.
Modularization techniques - Archive of obsolete content
you don't have to use them in your interfaces unless you're concerned with com compatibility.
... ns_isample_iid); int main(int argc, char *argv[]) { nsifactory *factory; getsamplefactory(&factory); nsisample *sample; nsresult res = factory->createinstance(null, kisampleiid, (void **) &sample); if (res == ns_ok) { sample->hello(); ns_release(sample); } return 0; } moving to a dynamically linked library implementing a dll once you've set a factory, moving it to a dll is a relatively trivial thing.
Mozilla Application Framework in Detail - Archive of obsolete content
customized xul applications with significant business logic can be written once, and used on the range of platforms that exist within the organization.
...with gecko, developers seeking a streamlined way to create and distribute web-based services across multiple platforms and devices can write once to w3c standards and their content and web applications will be accessible from across computing platforms and devices.
Tuning Pageload - Archive of obsolete content
the reason for this is that nscssframeconstructor is most efficient when doing a bunch of stuff at once instead of constructing rendering objects for one dom node at a time.
...once the backoff count is reached, no more rendering model construction till after the whole page is parsed.
Using cross commit - Archive of obsolete content
using the script quick overview there are a couple of common ways to use cross-commit: land something simultaneously on the trunk and mozilla_1_8_branch # modify the files (probably by applying the patch) patch -p0 < ~/caret.patch # commit on trunk and branch at once # make sure to use -m "commit message" when doing so tools/cross-commit -m "fix some sort of security bug" layout/base/nscaret.h land something on two other branches that has already landed on the trunk # update to the first branch you want to land on cvs update -rmozilla_1_8_branch layout/base/nscaret.h # modify the files (probably by applying the patch) patch -p0 < ~/caret.patch # c...
...ommit on all the branches at once # make sure to use -m "commit message" when doing so tools/cross-commit --moz18 --branch mozilla_1_8_0_branch -m "fix some sort of security bug" layout/base/nscaret.h notes note that you must use a -m option with a cvs checkin message.
Elements - Archive of obsolete content
once the binding is attached, these methods and properties can be invoked directly from the bound element.
...like methods, once the binding is attached, the property can be obtained directly from the bound element.
Mac stub installer - Archive of obsolete content
once you have the mac installer built and ready to debug you may want to debug the xpinstall engine in the context of the installer rather than in the context of the browser.
... once you add the section to the packages-mac file the release automation will automatically generate an xpi for your module with a dummy install.js.
execute - Archive of obsolete content
executing installed files note: if the file you wish to execute is one you are installing (as opposed to an installer executable that you plan to delete once it runs), then use the execute method on the file object instead.
...the install object's execute method, on the other hand, deletes the executable from its temporary location once it has finished.
Dynamically modifying XUL-based user interface - Archive of obsolete content
it explains the concept of dom documents, demonstrates a few simple examples of using dom calls to perform basic manipulations on a document, and then demonstrates working with anonymous xbl content using mozilla-specific methods.
...once you have an anonymous node, you can use regular dom methods to navigate and manipulate the rest of the nodes of that binding.
OpenClose - Archive of obsolete content
closing menus menus will close automatically once the user has made a selection from the menu.
...once the menu is open, the keyboard can be used to navigate and select items as usual.
Actions - Archive of obsolete content
one difference is that this content is only generated once, not for every result.
...for example, if the example were modified to the following: <action> <toolbar> <button uri="?relateditem" label="?relateditem"/> </toolbar> </action> here, only the button would be repeated for each result; the toolbar will only be generated once.
Building Trees - Archive of obsolete content
en> <treeitem uri="rdf:*"> <treerow> <treecell label="rdf:http://purl.org/dc/elements/1.1/title"/> <treecell label="rdf:http://purl.org/dc/elements/1.1/date"/> </treerow> </treeitem> </treechildren> </template> </tree> note: the tree columns (treecols) are declared outside the template as static content, since they only need to be declared once.
...once the row height is changed, we can see the full photos.
Filtering - Archive of obsolete content
even though the same datasource is used, it will only be loaded once and both templates will be notified when the data has loaded.
...another workaround is to just rebuild the template once the data has been loaded.
RDF Modifications - Archive of obsolete content
once we do add it to the container with another rdf assertion, the process described above is applied again and this time it may match.
...first, once the builder reaches the content statement, it checks what the container or reference variable is, in this case ?start, as specified by the uri attribute.
Rule Compilation - Archive of obsolete content
once the template builder has compiled the rules, query processing and content generation can begin.
...once done, the correct length can be returned.
Template Builder Interface - Archive of obsolete content
however, one thing to watch out for is that non-xul elements do not have their content generated lazily so all of the content will be generated at once.
...in this case, the template will be rebuilt automatically as you can set all of the datasources at once with this method of changing datasources.
XML Templates - Archive of obsolete content
the element with the uri attribute and its children will be copied once for each result.
... any elements between the action element and this element are only copied once.
Document Object Model - Archive of obsolete content
once we have an indication of whether it is checked or not, we can use the state to perform the search.
... var box = document.getelementbyid('somebox'); var flex = box.flex; var box2 = document.getelementbyid('anotherbox'); box2.flex = 2; once you have a reference to an element, you can call the properties of that element.
Input Controls - Archive of obsolete content
radio buttons can be used for a similar purpose when there are a set of them and only one can be selected at once.
...only one of the radio buttons in a radio group can be selected at once.
Templates - Archive of obsolete content
content earlier will only be generated once whereas content inside will be generated for each resource.
...if the uri attribute is placed on an element lower in the element tree, the elements outside are only created once.
Tree View Details - Archive of obsolete content
the code above uses a brute force method which simply iterates over the rows looking for one, returning true if a row exists with the same level and false once it finds a row that has a lower level.
... this.treebox.rowcountchanged(idx + 1, toinsert.length); } this.treebox.invalidaterow(idx); }, getimagesrc: function(idx, column) {}, getprogressmode : function(idx,column) {}, getcellvalue: function(idx, column) {}, cycleheader: function(col, elem) {}, selectionchanged: function() {}, cyclecell: function(idx, column) {}, performaction: function(action) {}, performactiononcell: function(action, index, column) {}, getrowproperties: function(idx, prop) {}, getcellproperties: function(idx, column, prop) {}, getcolumnproperties: function(column, element, prop) {}, }; function init() { document.getelementbyid("elementlist").view = treeview; } ]]></script> </window> next, we'll look in more detail at the tree box object.
XPCOM Interfaces - Archive of obsolete content
for example, once we have a component, we can check if it implements nsisound, and, if so, we can play sound through it.
... call the function we need once you've done the first two steps, you can repeat the last step as often as necessary.
XUL element attributes - Archive of obsolete content
once the default sizes of elements in a box are calculated, the remaining space in the box is divided among the flexible elements, according to their flex ratios.
...elements outside will appear only once.
scrollbox - Archive of obsolete content
<vbox> <label value="01 four score and seven years ago "/> <label value="02 our fathers brought forth on "/> <label value="03 this continent, a new nation, "/> <label value="04 conceived in liberty, and "/> <label value="05 dedicated to the proposition "/> <label value="06 that all men are created equal."/> </vbox> the next bunch of labels is similar, but if the container doesn't give enough room for it, scroll bars will sprout out of nowhere and allow the user to scroll around the big content in the small view space.
... <vbox flex="1" style="overflow:auto"> <label value="01 four score and seven years ago "/> <label value="02 our fathers brought forth on "/> <label value="03 this continent, a new nation, "/> <label value="04 conceived in liberty, and "/> <label value="05 dedicated to the proposition "/> <label value="06 that all men are created equal."/> </vbox> the flex="1" above may or may not be needed, or even desired.
textbox - Archive of obsolete content
from gecko 1.9 to gecko 12.0 (firefox 12.0 / thunderbird 12.0 / seamonkey 2.9), the script code would actually execute twice, once in the context of the anonymous html <input> element and once in the context of the <textbox> element itself.
...from gecko 1.9 to gecko 12.0 (firefox 12.0 / thunderbird 12.0 / seamonkey 2.9), the script code would actually execute twice, once in the context of the anonymous html <input> element and once in the context of the <textbox> element itself.
Getting started with XULRunner - Archive of obsolete content
installing the application creates an os x application bundle: /library/frameworks/xul.framework/xulrunner-bin --install-app /<path>/<to>/myapp.zip once installed, you can run the application: /library/frameworks/xul.framework/xulrunner-bin "/applications/finkle/testapp.app/contents/resources/application.ini" you may run it without installing (but with the menu bar and dock icon missing) in os x by typing: /library/frameworks/xul.framework/xulrunner-bin "/<full path>/testapp/application.ini" note: the full path is required or a "error: co...
...once you've got an application that's ready for the world you'll love our article titled deploying xulrunner.
Archived Mozilla and build documentation - Archive of obsolete content
browsers, like internet explorer 4, that were built before the conception of w3c standards inherited many quirks.
...prism is based on a concept called site-specific browsers (ssb).
2006-12-01 - Archive of obsolete content
windows dde shell integration removal a call for responses or concerns regarding the removal of the dde shell integration.
... ff2 not responding to click on link concerns regarding ff 2.0 not responding to button or link clicks until the button or link is clicked a second time.
2006-10-27 - Archive of obsolete content
these were the following choices stated: search the filesystem for unneeded files delete or archive them, add a hard disk, move all or part of the concerned filesystem there move that tinderbox to a different machine with more empty disk space on october 23rd: nick responded to gavin and tony's posting.
... nick stated that the build engineers knew that there was a problem with the tinderbox and that they would be solving the problem by adding a hard disk, and moving all or part of the concerned filesystem there.
XEmbed Extension for Mozilla Plugins - Archive of obsolete content
once you've verified that the browser has the compatibility you require, you can modify your npp_getvalue call like so: nperror npp_getvalue(void *future, nppvariable variable, void *value) { nperror err = nperr_no_error; switch (variable) { case nppvpluginneedsxembed: *((prbool *)value) = pr_true; break; default: err = nperr_generic_error; } return err...
...; } once you have set those variables, it should be relatively easy to set up a plugin.
Table Reflow Internals - Archive of obsolete content
ed height during 3rd pass doesn't change height during 3rd pass initiator is the table containing the observer starts the 3rd pass reflow and sets a bit in the reflow state gives its block a computed height during 3rd pass could also be inside a cell which is an observer special height reflow optimizations only frames needing 3rd pass actually get it frames gettting a 3rd pass only get it once intro to paginated reflow when a reflowee's available height is constrained, it may not fit and need to either split/continue on the next page, or start on the next page.
...if it is incomplete, it will become the first-in-flow it will be the only frame among its continuations to ever balance or calc the cell map, and it only does this once table paginated reflow the table does a pass 2 reflow constraining both avail heights and widths.
Scratchpad - Archive of obsolete content
executing once you've written your code, select the code you want to run.
...once you've done this, the environment menu has a browser option; once that's selected, your scope is the entire browser rather than just the page content, as you will see from examining some globals: window /* [object chromewindow] */ gbrowser /* [object xulelement] */ the scratchpad execution context is set to browser when a snippet file has // -sp-context: browser on the first line.
Using SSH to connect to CVS - Archive of obsolete content
once you have entered a passphrase, ssh-keygen will create two files, ~/.ssh/id_dsa and ~/.ssh/id_dsa.pub do not sendid_dsa.
...only proceed with these steps once you are certain you can access cvs.mozilla.org from the open internet.
Reference - Archive of obsolete content
once that is done, the various code samples should be updated to reflect current practices and code if they cannot be written in a "version-neutral" manner.
...if downloading the stuff is your priority you are free to field ideas/concept to the devmo mailing list for discussion, and then actually code it (or find someone to do so).
Correctly Using Titles With External Stylesheets - Archive of obsolete content
authors will be most familiar with persistent stylesheets, of which any number may be applied to a document at once.
...once the user selects one of the alternate stylesheets, the preferred stylesheet will no longer be used, although the user can always re-select the preferred stylesheet.
Using the Right Markup to Invoke Plugins - Archive of obsolete content
here is an example of this usage, once again for the macromedia flash plugin: <object type="application/x-shockwave-flash" data="javascript-to-flash.swf" width="366" height="142" id="myflash"> <param name="movie" value="javascript-to-flash.swf" /> <param name="quality" value="high" /> <param name="swliveconnect" value="true" /> <p>you need flash -- get the latest version from <a href= "http://www.macromedia.com/do...
...once again, ie typically invokes the plugin by way of an object element used in conjunction with a classid attribute that points to an activex unique identifier.
XQuery - Archive of obsolete content
xquseme is a working proof-of-concept (so far tested on windows and linux with java installed; mac does not work) extension which allows one to perform xqueries on external urls, the currently loaded webpage (even if originally from poorly formed html), and/or xml (including well-formed xhtml) documents stored locally.
... however, use of the approach of the java firefox extension might be used to turn the above extension concept into an xpcom component (giving it access to all open windows), and for berkeley db xml, possibly implementing it in c++ instead, which is that database's original language of development.
Archive of obsolete content
case sensitivity in class and id names creating a dynamic status bar extension concepts covered in the previous sample won't be reiterated here; instead, refer to the downloadable sample code or to the previous sample for further details.
... creating a status bar extension many of the concepts introduced here apply to any xul-based application; however, to keep from getting completely overwhelmed, we're going to focus specifically on firefox.
Game distribution - Game development
benefits of html5 over native building games with html5 gives you extra advantages, such as: multiplatform bliss the technology itself is multiplatform, so you can write the code once and target multiple devices.
...the good thing is that you don't need a few separate teams working on the same game for different platforms — you can build it once and use tools like phonegap or cocoonio to package the game for native stores.
Desktop gamepad controls - Game development
first, we need an event listener to listen for the connection of the new device: window.addeventlistener("gamepadconnected", gamepadhandler); it's executed once, so we can create some variables we will need later on for storing the controller info and the pressed buttons: var controller = {}; var buttonspressed = []; function gamepadhandler(e) { controller = e.gamepad; output.innerhtml = "gamepad: " + controller.id; } the second line in the gamepadhandler function shows up on the screen when the device is connected: we can also show the id o...
...here's the code we've prepared in the create() function that is executed once when the new state is created: create() { // ...
Implementing game control mechanisms - Game development
the first one is needed for preloading required assets, create() is executed once the state had started, and update() is executed on every frame.
...} it will be created once at the start of the game, and will execute this.clickenclave() action assigned to it when clicked, but you can also use the mouse's pointer value in the update() function to make an action: update: function() { // ...
Plug-in Development Overview - Gecko Plugin API Reference
« previousnext » writing plug-ins once you decide what you want your plug-in to do, creating it is a simple process.
... building plug-ins once you have added the special code and additional files to make your plug-in scriptable as described in the previous section, the build process is quite straightforward.
Asynchronous - MDN Web Docs Glossary: Definitions of Web-related terms
for humans, e-mail is an asynchronous communication method; the sender sends an email and the recipient will read and reply to the message when it's convenient to do so, rather than doing so at once.
... software design asynchronous software design expands upon the concept by building code that allows a program to ask that a task be performed alongside the original task (or tasks), without stopping to wait for the task to complete.
Grid Cell - MDN Web Docs Glossary: Definitions of Web-related terms
it is the space between four intersecting grid lines and conceptually much like a table cell.
...d9480f; } .wrapper { display: grid; grid-template-columns: repeat(3,1fr); grid-auto-rows: 100px; } <div class="wrapper"> <div>one</div> <div>two</div> <div>three</div> <div>four</div> <div>five</div> </div> learn more property reference grid-template-columns grid-template-rows grid-auto-rows grid-auto-columns further reading css grid layout guide: basic concepts of grid layout definition of grid cells in the css grid layout specification ...
HTML - MDN Web Docs Glossary: Definitions of Web-related terms
brief history in 1990, as part of his vision of the web, tim berners-lee defined the concept of hypertext, which berners-lee formalized the following year through a markup mainly based on sgml.
... concept and syntax an html document is a plaintext document structured with elements.
Hoisting - MDN Web Docs Glossary: Definitions of Web-related terms
however, the concept can be a little confusing at first.
... conceptually, for example, a strict definition of hoisting suggests that variable and function declarations are physically moved to the top of your code, but this is not in fact what happens.
CSS and JavaScript accessibility best practices - Learn web development
hiding things there are many instances where a visual design will require that not all content is shown at once.
... other javascript accessibility concerns there are other things to be aware of when implementing javascript and thinking about accessibility.
What is accessibility? - Learn web development
people with mobility impairments these people have disabilities concerning movement, which might involve purely physical issues (such as loss of limb or paralysis), or neurological/genetic disorders that lead to weakness or loss of control in limbs.
...there is no need to learn all of the wcag — be aware of the major areas of concern, and use a variety of techniques and tools to highlight any areas that don't conform to the wcag criteria (see below for more).
Backgrounds and borders - Learn web development
if you discover a complex background property in a stylesheet, it might seem a little hard to understand as so many values can be passed in at once.
...this shorthand lets you set all of the different properties at once.
Pseudo-classes and pseudo-elements - Learn web development
once you know how to use them, you can look at the list to see if there is something which works for the task you are trying to achieve.
... once again the relevant mdn page for each selector is helpful in explaining browser support.
Sizing items in CSS - Learn web development
for example, if you want a full-page hero section to show before the rest of your content, making that part of your page 100vh high will push the rest of the content below the viewport, meaning that it will only appear once the document is scrolled.
...when you move onto css layout, sizing will become very important in mastering the different layout methods, so it is worth understanding the concepts here before moving on.
CSS building blocks - Learn web development
cascade and inheritance the aim of this lesson is to develop your understanding of some of the most fundamental concepts of css — the cascade, specificity, and inheritance — which control how css is applied to html and how conflicts are resolved.
... overflowing content in this lesson we will look at another important concept in css — overflow.
CSS layout - Learn web development
introduction to css layout this article will recap some of the css layout features we've already touched upon in previous modules — such as different display values — and introduce some of the concepts we'll be covering throughout this module.
... responsive design as more diverse screen sizes have appeared on web-enabled devices, the concept of responsive web design (rwd) has appeared: a set of practices that allows web pages to alter their layout and appearance to suit different screen widths, resolutions, etc.
How do I start to design my website? - Learn web development
once you have such a list, you need to prioritize.
...once you have that clear vision, you need to decide how and when to do it.
How do you upload your files to a web server? - Learn web development
here and there: local and remote view once connected, your screen should look something like this (we've connected to an example of our own to give you an idea): let's examine what you're seeing: on the center left pane, you see your local files.
... once you've found the correct remote directory to put your files in, to upload your files to the server you need to drag-and-drop them from the left pane to the right pane.
What is a URL? - Learn web development
prerequisites: you need to first know how the internet works, what a web server is and the concepts behind links on the web.
... summary with hypertext and http, url is one of the key concepts of the web.
Client-side form validation - Learn web development
this article leads you through basic concepts and examples of client-side form validation.
... once you have checked that the form is filled out correctly, the form can be submitted.
Sending form data - Learn web development
previous overview: forms once the form data has been validated on the client-side, it is okay to submit the form.
...we also look at some of the security concerns associated with sending form data.
Sending forms through JavaScript - Learn web development
if( file.dom.files[0] ) { reader.readasbinarystring( file.dom.files[0] ); } // if not, read the file once the user selects it.
... // text data is simpler // start a new part in our body's request data += "--" + boundary + "\r\n"; // say it's form data, and name it data += 'content-disposition: form-data; name="' + text.name + '"\r\n'; // there's a blank line between the metadata and the data data += '\r\n'; // append the text data to our body's request data += text.value + "\r\n"; // once we are done, "close" the body's request data += "--" + boundary + "--"; // define what happens on successful data submission xhr.addeventlistener( 'load', function( event ) { alert( 'yeah!
Test your skills: Basic controls - Learn web development
turn the first <fieldset>'s contents into a set of radio buttons — you should only be able to select one pony character at once.
... allow the user to pick multiple files at once.
Your first form - Learn web development
uxmatters is also a very thoughtful resource with good advice from basic best practices to complex concerns such as multi-page forms.
...with this text"> on the other hand, if you want to define a default value for a <textarea>, you put it between the opening and closing tags of the <textarea> element, like this: <textarea> by default this element is filled with this text </textarea> the <button> element the markup for our form is almost complete; we just need to add a button to allow the user to send, or "submit", their data once they have filled out the form.
Advanced text formatting - Learn web development
as confucius' quotes site says:</p> <p>it does not matter how slowly you go as long as you do not stop.</p> <p>i also love the concept of positive thinking, and the need to eliminate negative self talk (as mentioned in affirmations for positive thinking.)</p> </textarea> <div class="playable-buttons"> <input id="reset" type="button" value="reset"> <input id="solution" type="button" value="show solution"> </div> html { font-family: sans-serif; } h2 { font-size: 16px; } .a11y-label { margin: 0; text-align: right;...
...as <a href="http://www.brainyquote.com/quotes/authors/c/confucius.html"><cite>confucius\' quotes site</cite></a> says:</p>\n\n<blockquote cite="http://www.brainyquote.com/quotes/authors/c/confucius.html">\n <p>it does not matter how slowly you go as long as you do not stop.</p>\n</blockquote>\n\n<p>i also love the concept of positive thinking, and <q cite="http://www.affirmationsforpositivethinking.com">the need to eliminate negative self talk</q> (as mentioned in <a href="http://www.affirmationsforpositivethinking.com"><cite>affirmations for positive thinking</cite></a>.)</p>'; const solutionentry = htmlsolution; textarea.addeventlistener('input', updatecode); window.addeventlistener('load', updatecode); // s...
Video and audio content - Learn web development
a webm file containing a movie which has a main video track and one alternate angle track, plus audio for both english and spanish, in addition to audio for an english commentary track can be conceptualized as shown in the diagram below.
... displaying video text tracks now we'll discuss a slightly more advanced concept that is really useful to know about.
HTML table basics - Learn web development
LearnHTMLTablesBasics
screenreaders are then able to read out a whole row or column of data at once, which is pretty useful.
...instead of doing this, we can specify the information once, on a <col> element.
Video and Audio APIs - Learn web development
in windbackward() we do the following — bear in mind that when the interval is active, this function is being run once every 200 milliseconds.
...so in effect, we are rewinding the video by 3 seconds, once every 200 milliseconds.
Arrays - Learn web development
in this line we currently have i <= 0, which is a conditional test that causes the for loop to only run once, because it is saying "stop when i is no longer less than or equal to 0", and i starts at 0.
...in an animated scene for example, you might have an array of objects representing the background graphics currently displayed, and you might only want 50 displayed at once, for performance or clutter reasons.
Basic math in JavaScript — numbers and operators - Learn web development
we don't cover these in detail in this article because we wanted to keep it as a simple introduction and only cover the real basic essentials for now; however, once you've read through this module a couple of times it is worth going to the object reference pages and learning more about what's available.
...there is no need to worry about how this works — just concentrate on the math for now.
Object prototypes - Learn web development
note: it is worth reading our more in-depth guide to "using prototypes in javascript", once you've made sense of this section and wish to know more.
... this section is intentionally simplified to make these concepts a little easier to understand when you first meet them.
Test your skills: Object basics - Learn web development
once you've done this, you should then write a string to the variable bandinfo, which will contain a small biography detailing their name, nationality, years active, and style, and the title and release date of their first album.
... the code is not very dry (each bit of code should only be defined once) — you've got the same method defined twice, for example.
CSS performance optimization - Learn web development
previous overview: performance next painting an unstyled page, and then repainting it once styles are parsed would be bad user experience.
...the browser can paint the page once it has downloaded the css and built the css object model.
Multimedia: Images - Learn web development
progressive jpegs, in contrast to normal jpegs, render progressively (hence the name), meaning the user sees a low-resolution version that gains clarity as the image downloads, rather than the image loading at full resolution top-to-bottom or even only rendering once completely downloaded.
... jpeg2000 — once to be successor to jpeg but only supported in safari.
What is web performance? - Learn web development
it is important to minimize the loading and response times, and add additional features to conceal latency by making the experience as available and interactive as possible, as soon as possible, while asynchronously loading in the longer tail parts of the experience.
...this is the process that the browser uses to construct the web document once the files have been downloaded from the server.
Web performance - Learn web development
it would also be helpful to go a bit deeper into these topics, with modules such as: introduction to html css first steps javascript first steps once you've worked through this module, you'll probably be excited to go deeper into web performance — you can find a lot of further teachings in our main mdn web performance section, including overviews of performance apis, testing and analysis tools, and performance bottleneck gotchas.
...once optimized, how can you ensure bloat doesn't come back?
Introduction to the server side - Learn web development
in each case, the code is significantly different: they have different purposes and concerns.
... code running in the browser is known as client-side code and is primarily concerned with improving the appearance and behavior of a rendered web page.
Website security - Learn web development
summary this article has explained the concept of web security and some of the more common threats against which your website should attempt to protect.
...we hope you've enjoyed learning these fundamental concepts, and you're now ready to select a web framework and start programming.
Ember resources and troubleshooting - Learn web development
general troubleshooting, gotchas, and misconceptions this is nowhere near an extensive list, but it is a list of things that came up around the time of writing (latest update, may 2020).
...both of these try to solve the problems of mut by introducing more obvious / "less magic" concepts, avoiding build-time transforms and implicit glimmer vm behavior.
Introduction to client-side frameworks - Learn web development
it follows a similar pattern to the one we used to build a list item element: function builddeletebuttonel(id) { const button = document.createelement('button'); const textcontent = document.createtextnode('delete'); button.setattribute('type', 'button'); button.appendchild(textcontent); return button; } this button doesn't do anything yet, but it will later once we decide to implement our delete feature.
... note: if you want to find out more details about web tooling concepts, have a read of our client-side tooling overview.
Getting started with React - Learn web development
these components can be composed together to create a full ui, and react abstracts away much of the rendering work, leaving you to concentrate on the ui design.
...once you're comfortable with it, however, it will allow you to build user interfaces more quickly and intuitively, and allow others to better understand your codebase at a glance.
Beginning our React todo list - Learn web development
previous overview: client-side javascript frameworks next let's say that we’ve been tasked with creating a proof-of-concept in react – an app that allows users to add, edit, and delete tasks they want to work on, and also mark tasks as complete without deleting them.
...once we have put our styles in place, though, any element with this class will be hidden from sighted users and still available to screen reader users — this is because these words are not needed by sighted users; they are there to provide more information about what the button does for screenreader users that do not have the extra visual context to help them.
TypeScript support in Svelte - Learn web development
once you have typescript configured, you can start using it from a svelte component by just adding a <script lang='ts'> at the beginning of the script section.
... // create the underlying writable store return { subscribe, set: (value: t) => { localstorage.setitem(key, tostring(value)) // save also to local storage as a string return set(value) }, update } } and thanks to generic type inference, typescript already knows that our $todos store should contain an array of todotype: once again, if we wanted to be explicit about it, we could do so in the stores.ts file like this: const initialtodos: todotype[] = [ { id: 1, name: 'visit mdn web docs', completed: true }, { id: 2, name: 'complete the svelte tutorial', completed: false }, ] export const todos = localstore<todotype[]>('mdn-svelte-todo', initialtodos) that will do for our brief tour of typescript generics.
Componentizing our Svelte app - Learn web development
in this article we will concentrate on creating the filterbutton and todo components; we'll get to the others in future articles.
... 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/05-advanced-concepts or directly download the folder's content: npx degit opensas/mdn-svelte-tutorial/05-advanced-concepts remember to run npm install && npm run dev to start your app in development mode.
Getting started with Svelte - Learn web development
it arguably has fewer concepts and tools to learn than some of the other framework options.
... we encourage you to go through the svelte tutorial for a really quick introduction to the basic concepts, before returning to this tutorial series to learn how to build something slightly more in-depth.
Working with Svelte stores - Learn web development
we'll just leave them as they are, and instead concentrate on persisting our todos.
...make some changes to your app, like pressing the uncheck all button, and check the web storage content once more.
Creating our first Vue component - Learn web development
along the way, we'll learn about a few important concepts such as calling components inside other components, passing data to them via props, and saving data state.
... making components dynamic with props our todoitem component is still not very useful because we can only really include this once on a page (ids need to be unique), and we have no way to set the label text.
Adding a new todo form: Vue events, methods, and models - Learn web development
.once: listens for the event until it's been triggered once, and then no more.
...in the next article, we'll concentrate on fixing this, looking at the different ways vue provides to style components.
Understanding client-side JavaScript frameworks - Learn web development
beginning our react todo list let's say that we’ve been tasked with creating a proof-of-concept in react – an app that allows users to add, edit, and delete tasks they want to work on, and also mark tasks as complete without deleting them.
...along the way, we'll learn about a few important concepts such as calling components inside other components, passing data to them via props and saving data state.
Handling common JavaScript problems - Learn web development
fixing general javascript problems as we said in the previous article on html/css, you should make sure your code is working generally, before going on to concentrate on the cross-browser issues.
...let's fix this problem by running the code once the load event has been fired — remove the console.log() line, and update this code block: let superheroes = request.response; populateheader(superheroes); showheroes(superheroes); to the following: request.onload = function() { let superheroes = request.response; populateheader(superheroes); showheroes(superheroes); } to summarize, anytime something is not working and a value does no...
Setting up your own test automation environment - Learn web development
testing in multiple browsers at once there is also nothing to stop you running the test on multiple browsers simultaneously.
..., method:"put", form:{"status":"passed","reason":"google results showed correct title"}}); } else { console.log('test failed'); request({uri: "https://your-user-name:your-access-key@www.browserstack.com/automate/sessions/" + sessionid + ".json", method:"put", form:{"status":"failed","reason":"google results showed wrong title"}}); } }); }); these are fairly intuitive — once the test completes, we send an api call to browserstack to update the test with a passed or failed status, and a reason for the result.
Client-side tooling overview - Learn web development
this stage of the development process is one that you want the least amount of active interaction with so that once it is configured, it runs mostly automatically, only popping up to say hello if something has gone wrong.
...once all the kinks in the process are flattened out, your tool chain should be something you can forget about and it should just work.
Learn web development
server-side website programming even if you are concentrating on client-side web development, it is still useful to know how servers and server-side code features work.
...we'd like to hear from you about anything you think is wrong or missing on the site, requests for new learning topics, requests for help with items you don't understand, or any other questions or concerns.
Software accessibility: Where are we today?
refreshable braille displays of various sizes a braille embosser audio- and braille- based user interfaces are concepts that software designers are historically untrained for.
... the basic concept is easy - dealing with information when you're blind is like seeing everything through a mail slot - sequentially and methodically.
Index
686 theme concepts theme, add-on themes developed using the webextensions api in firefox enable you to change the look of the browser by adding images to the header area of the firefox browser; this is the area behind the menu bar, toolbars, address bar, search bar, and tab strip.
...once you have defined the colors and image for your theme, the generator will submit your new theme to amo.
Frequently Asked Questions for Lightweight themes
once a theme is installed, it is saved in the add-ons manager, where you can enable or disable them as you wish.
... once a theme is installed, it is saved in the add-ons manager, where you can enable or disable them as you wish.
Browser chrome tests
call finish() once the test is complete.
...if you are adding the first tests in a directory, make sure to also include any head.js you added to support-files, and additionally, ensure that your browser.ini is referenced by a moz.build file somewhere, such as: browser_chrome_manifests += [ 'test/functional/mochitest/browser.ini' ] support-files once added to support-file section of browser.ini support files may be referenced as https://example.com/browser/[path_to_file] or chrome://mochitests/content/browser/[path_to_file].
Creating a spell check dictionary add-on
if you set em:minversion to a lower value, gecko 10-17 will not be able to update your dictionary add-on once the restartless dictionary is installed (bug 782118), and gecko 10-16 may warn the user that your dictionary is not compatible, when users try to update to a newer version of firefox/thunderbird (bug 782115).
... once you have added these files to your zip file and renamed the file to have the .xpi extension, you can install your add-on in firefox and test it.
Debugging Frame Reflow
element size only once and it reports now: block 02d7bcf8 d=1410,300 the block shows the same address as the previous one.
... cell tablecell bccell bctablecell col tablecol colg tablecolgroup tbl table tblo tableouter rowg tablerowgroup row tablerow textctl textinput text text vp viewport once the problem is reduced to a single frame level, placing a breakpoint at displayreflowenterprint in nsframe.cpp is a very efficient way to step through the reflow tree.
HTTP logging
once you've reproduced the problem, exit firefox and look for the generated log files in your temporary directory.
... once you've reproduced the problem, exit firefox and look for the generated log files in your temporary directory.
Inner and outer windows
this article will try to explain the concepts of inner and outer windows.
...then add to that the concept of frames, whereby a document in a window can itself contain other documents, which in turn can contain more documents.
mach
registering mach command providers once you've written a python module providing a mach command, you'll need to register it with mach.
... submitting a mach command for approval once you've authored a mach command, submit the patch for approval.
Frame script loading and lifetime
e script var mm = gbrowser.selectedbrowser.messagemanager; mm.loadframescript('data:,dump("foo\\n")', true); loadframescript() takes two mandatory parameters: a url that points to the frame script you want to load a boolean flag, allowdelayedload note: if the message manager is a global frame message manager or a window message manager, loadframescript() may load the script multiple times, once in each applicable frame.
...so once you load them, they will stay loaded until the tab is closed, even if you reload the document or navigate.
Embedding the editor
we need a concept of an "editing session" - a single top-level document which is editable, and which may embody more than one editor.
...in composer, we can pose these dialogs from js (once some nsifile problems have been solved).
Gecko SDK
once the sdk enters beta, it is suitable for building extensions; your component should work with release builds of the sdk without any modifications.
... once that's done, you should perform the following command: ln -s /opt/local/lib/libintl.8.dylib /opt/local/lib/libintl.3.dylib this should fix the problem.
Getting Started with Chat
general rules and etiquette once you have your client set up (see software below) and are connected, there are some basic rules you should follow to ensure the most enjoyable and productive experience: as with all mozilla forums and events, agreeing to our community participation guidelines is a requirement for participation.
... /msg nickserv identify password once registered, you need to type this every time you want to sign into channels using your registered nickname /msg nickserv help this displays a list of commands which can be used with nickserv /msg nickserv help register this displays helpful information about nickname registration /msg nickserv help identify this displays helpful information about identifying yo...
Internationalized Domain Names (IDN) Support in Mozilla Browsers
don't forget to set the value of these preferences to "default" once you are finished with testing!
...of particular concern for japanese users is the one in which full-width japanese roman characters are not normalized to ascii roman characters.
AddonManager
the callbacks will be called just once but that may be before or after the method returns.
... note: calling this method more than once for the same add-on will replace the last change that was recorded with the new one; an add-on can only appear once across all change types.
CustomizableUI.jsm
callers should ensure that no matter what happens they call endbatchupdate once for each call to beginbatchupdate, even if there are exceptions in the code in the batch update.
...however, once the user reopens a window, the widget will move back to its 'proper' area automagically.
PopupNotifications.jsm
to use this, you first need to import the code module into your javascript scope: components.utils.import("resource://gre/modules/popupnotifications.jsm"); once you've imported the module, you can then use the popupnotifications object it exports; this object provides methods for creating and displaying popup notification panels.
...any combination of the following properties may be provided: persistence an integer value indicating the number of page loads for which the notification will persist; once this many page loads have occurred, the notification may dismiss automatically.
Using JavaScript code modules
javascript code modules are a concept introduced in gecko 1.9 and can be used for sharing code between different privileged scopes.
...once this method has been called, references to the module will continue to work but any subsequent import of the module will reload it and give a new reference.
WebRequest.jsm
onheadersreceived triggered once response headers have been received.
... onresponsestarted triggered once the browser has started to receive the response body.
XPCOMUtils.jsm
definelazygetter takes three arguments: the object to define the property on the name of the property defined the getter function itself, which returns the value and which will be called just once, the first time code tries to access the property.
...this function is called exactly once.
L10n testing with xcode
setting up your l10n testing environment once you have your l10n testing environment set up in xcode, testing your firefox on ios localization is a breeze.
... launching & testing your firefox on ios localization the ios simulator is fairly easy to use once you launch your app.
Localization content best practices
'do you want to save the text?' suffixes in basque: where english tends to use expressions such as 'to the' or 'from the', basque adds an ending to a word to express the same concept.
...these are generally not complete sentences, but instead, phrases that convey the idea of a concept or action.
Localizing with Mozilla Translator
the first thing to do, once you have your mercurial local repository up and working, is create a new product...
... if you have opted for the first solution, you will find yourself with some new products completely untranslated (once you update each of them).
QA phase
if you don't have a lot of experience with code, you might even be concerned that you've broken something (oops!).
... enter the following command to perform the configuration: $ ./mach configure once your command-line finishes spitting out the config command's output, navigate to the newly created directory: $ cd ../firefox-build/browser/locales now you're ready to build!
Creating localizable web applications
bad: require_once('lib/user.php'); $user = new personauser(); snippet 2.
... good: require_once('templates/footer.php'); if it's not possible to remove the app logic code, you should consider using gettext.
Mozilla Style System
for css style sheets, they correspond to css's concept of rules.
...the style context has a getter for each struct, and nsiframe, which represents the concept of a css box (or rendering object), also has getters that forward to the frame's style context.
Gecko Profiler FAQ
it is quite reasonable to actually run the browser for 40 minutes and once the said leaks have happened capture the profiles and study what went wrong.
... [jesup] ok, that's the equivalent to itimer_real, kinda, except that per the previous question it doesn't interrupt every thread at once and snapshot the thread you started the itimer on, it interrupts each thread one at a time, which likely means distortion of the measurement if the number of threads monitored is significant (especially at high sample rates).
Power profiling overview
basic physics concepts in physics, power is the rate of doing work.
... although power is an instantaneous concept, in practice measurements of it are determined in a non-instantaneous fashion, i.e.
Phishing: a short definition
web authentication supports millions of readily avilable fido u2f usb security keys, and will support the more advanced fido 2.0 keys, once made available.
...after verifying username and password, the user is prompted to open the otp app and enter the corresponding 6-digit code, representing a hashed version of the secret key and a nonce - potentially time-based.
Nonblocking IO In NSPR
once associated with an i/o completion port, we can't disassociate the socket from the i/o completion port.
...once the io mode of a socket is committed, it cannot be changed.
HTTP delegation
once nss is finished providing all details, it will request to initiate the actual network communication (sec_httprequest_trysendandreceivefcn).
...once the http response has been obtained from the http server, the function will provide the results in its "out parameters".
HTTP delegation
once nss is finished providing all details, it will request to initiate the actual network communication (sec_httprequest_trysendandreceivefcn).
...once the http response has been obtained from the http server, the function will provide the results in its "out parameters".
JSS FAQ
MozillaProjectsNSSJSSJSS FAQ
once jss initialized, i can't get anymore instances with certificatefactory.getinstance(x.509)?
... once jss initialized, i can't get anymore instances with certificatefactory.getinstance("x.509")?
NSS sources building testing
once the build is done, you can find the build output below directory dist/?, where ?
... once the test suite has completed, a summary will be printed that shows the number of failures.
NSS PKCS11 Functions
once the the module has been successfully loaded, other nss calls will use it in the normal course of searching.
...once the database is closed, the slot will remain as an empty slot until it's used again with secmod_openuserdb().
NSS tools : signtool
once you have signed a file, it is difficult to claim later that you didn't sign it.
...even if signtool creates more than one archive file, you need to supply the key database password only once.
Necko Architecture
once you have a url interface in hand (nsiurl), you have a completely parsed representation of the original url string, and you can query for the various parts of the url.
...once you have a channel you can read or write data from or to your uri.
Necko Interfaces Overview
channel is used to download the resource once) download initiated via nsichannel::asyncopen method can be canceled via nsirequest::cancel method at anytime after invocation of asyncopen method nsiprotocolhandler a service that manages a protocol, identified by it's uri scheme (eg.
...ion of async download, possibly w/ error nsiloadgroup : nsirequest attribute of a nsirequest channel impl adds itself to its load group during invocation of asyncopen channel impl removes itself from its load group when download completes load groups in gecko own all channels used to load a particular page (until the channels complete) all channels owned by a load group can be canceled at once via the load group's nsirequest::cancel method nsitransport represents a physical connection, such as a file descriptor or a socket used directly by protocol handler implementations (as well as by mailnews and chatzilla) synchronous i/o methods: openinputstream, openoutputstream asynchronous i/o methods: asyncread, asyncwrite nsitransport::asyncread takes a nsistreamlistener parameter ...
Necko walkthrough
once the socket is readable (more async behavior), nshttpconnection::oninputstreamready is called on the socket thread.
...once this object goes out of scope, mcallback->oninputstreamready is called.
Shumway
users who disable flash because of security or performance concerns can still see content through shumway because it cannot be forced to behave worse than javascript (and webgl, etc.) allows.
...once your flash content is loaded, you can see how shumway manages it in detail.
Garbage collection
compartments are a fundamental cross-cutting concept in spidermonkey (see also compartments), though anything related to memory is now more concerned with zones, especially gc.
...(this means if an object has all references to it dropped during this incremental gc, it will be collected on the next incremental gc.) this is called snapshot-at-the-beginning because it is conceptually equivalent to taking a snapshot of live objects at the beginning of the incremental gc and marking all those objects.
JS_InitClass
once js_initclass creates the new class's constructor, it stores the constructor as a property in this object.
...once the constructor or prototype is created, js_initclass defines a property on obj.
SpiderMonkey 1.8.5
compartments spidermonkey 1.8.5 introduces the concept of compartments.
...we have chosen to concentrate on performance and correctness as primary concerns instead.
SpiderMonkey 1.8.7
compartments spidermonkey 1.8.5 introduces the concept of compartments.
...we have chosen to concentrate on performance and correctness as primary concerns instead.
Shell global objects
options is an optional object that may have these properties: isrunonce use the isrunonce compiler option (default: false) noscriptrval use the no-script-rval compiler option (default: false) filename filename for error messages and debug info linenumber starting line number for error messages and debug info columnnumber starting column number for error messages and debug info global global in which to execute the code newcontext if true, cr...
... bailafter(number) start a counter to bail once after passing the given amount of possible bailout positions in ionmonkey.
Security and the jar protocol
this article discusses security concerns with the jar: protocol, which only firefox has ever implemented for web content.
...this means that no matter what the file's real contents are, as far as firefox is concerned, it was a zip archive.
History Service Design
once the database connection has been set-up the schema version of the database is checked.
... once places receives a place: uri or a query object an internal query builder checks for the requested options and make up a real sql query that is executed with storage apis.
Setting up the Gecko SDK
you may want to check for newer versions at gecko versions prior to 1.7: http://ftp.mozilla.org/pub/mozi...illa/releases/ gecko versions after 1.8: http://ftp.mozilla.org/pub/mozi...nner/releases/ once you download the sdk, you can expand it into any convenient location.
... building a microsoft visual cpp project once you set up the gecko sdk, you can create a microsoft visual c++ project to handle component development with the sdk.
Receiving startup notifications
once that process is completed, extensions can then be loaded by simply reading their manifests, loading their components, and continuing with application startup, all without having to restart the browser.
...what happens next once you've registered with the category manager, at mozilla startup time (or when the embedding application's ns_initembedding() function is called), the appstartupnotifier component is instantiated, and its observe() method is called; this in turn enumerates all components in the app-startup category and sends them the appropriate notifications.
NS_ShutdownXPCOM
remarks you must call this method once you are finished using xpcom.
...once this function has been called, the nsicomponentmanager and nsiservicemanager will refuse to return object instances.
IAccessibleText
once the handler has returned, the validity of the data depends on how the server manages the life cycle of its objects.
...once the handler has returned, the validity of the data depends on how the server manages the life cycle of its objects.
imgIContainer
frame_current 1 frame_max_value 1 knormalanimmode 0 animation mode constants 0 = normal 1 = do not animate 2 = loop once.
... kdontanimmode 1 klooponceanimmode 2 kdisposeclearall -1 "disposal" method indicates how the image should be handled before the subsequent image is displayed.
imgIRequest
if the image does not exist yet, locks it once it becomes available.
...calling requestdecode on the imgirequest simply forwards along the request if the container already exists, or calls it once it gets onstartcontainer if the container does not yet exist.
mozIAsyncFavicons
acallback once we have found the favicon's url, we invoke this callback.
...set to nsifaviconservice.favicon_load_non_private otherwise acallback optional once we're done setting and/or fetching the favicon, we invoke this callback.
mozIStoragePendingStatement
fails only if you attempt to cancel the operation more than once.
... note: for read statements, such as select, once you cancel the statement, you will receive no further notifications about results.
mozIStorageStatementCallback
this function may be called more than once with a different storageierror each time for any given asynchronous statement, and handlecompletion will be called once the statement is complete.
...once there are no more results, handlecompletion will be called.
nsIAnnotationService
we may want some other similar functions to get annotations with given flags (once we have flags defined).
...we may want some other similar functions to get annotations with given flags (once we have flags defined).
nsIAppShell
runinstablestate() allows running of a "synchronous section", in the form of an nsirunnable once the event loop has reached a "stable state".
...in practice this runs arunnable once the currently executing event finishes.
nsIAppShellService
(and at application startup, on platforms that do not normally quit when the last window has closed, call enter once, but not exit) void enterlastwindowclosingsurvivalarea(); parameters none.
...this need be called only once per application session.
nsIChannel
inherits from: nsirequest last changed in gecko 19.0 (firefox 19.0 / thunderbird 19.0 / seamonkey 2.16) once a channel is created (via nsiioservice.newchannel()), parameters for that request may be set by using the channel attributes, or by calling queryinterface() to retrieve a subclass of nsichannel for protocol-specific parameters.
...once onstartrequest is called, all following method calls on alistener will get the request that was passed to onstartrequest.
nsIClipboard
supportsselectionclipboard() this method allows clients to determine if the implementation supports the concept of a separate clipboard for selection.
... supportsfindclipboard() this method allows clients to determine if the implementation supports the concept of a separate clipboard for find search strings.
nsIContentPrefCallback2
this will be called exactly once for each method invocation, and afterward no other callback methods will be called.
... handleresult() for the retrieval methods, this is called once for each retrieved preference.
nsIDOMNavigatorDesktopNotification
attributes attribute type description moznotification nsidomdesktopnotificationcenter read only.
... see also nsidomdesktopnotificationcenter ...
nsIDocShell
once you have this object you can set the needed properties on it and then pass it to loadstream.
...once you have this object you can set the needed properties on it and then pass it to loaduri.
nsIIdleService
gecko 1.9.2 note starting in gecko 1.9.2, there is a once a day notification sent out if the user remains idle for an extended period: 'idle-daily'.
... note: removing an observer will remove it once, for the idle time you specify.
nsIInputStream
note: the close method may be called more than once, but subsequent calls are ignored.
...a callback function that may be called once for each buffer segment contained in the stream.
nsIMemoryMultiReporter
xpcom/base/nsimemoryreporter.idlscriptable reports multiple memory measurements using a callback function that gets called once for each measurement.
...this will call the specified callback's nsimemorymultireportercallback.callback() method once for each report.
nsINavHistoryObserver
onendupdatebatch() called once a batch of updates is completed.
... once this has been called, you can perform processing, user interface updates, and so forth.
nsIObserver
ce(components.interfaces.nsiobserverservice); observerservice.addobserver(this, "mytopicid", false); }, unregister: function() { var observerservice = components.classes["@mozilla.org/observer-service;1"] .getservice(components.interfaces.nsiobserverservice); observerservice.removeobserver(this, "mytopicid"); } } instantiation - this should be fired once you're ready to start observing (for example a window's load event).
... observer = new myobserver(); destruction - this should be fired once you're done observing (for example a window's unload event).
nsIOutputStream
note: this method may be called more than once, but subsequent calls are ignored.
... note: a non-blocking output stream may implement nsiasyncoutputstream to provide consumers with a way to wait for the stream to accept more data once its write() method is unable to accept any data without blocking.
nsIProcessScriptLoader
the scripts run only once per process.
... getdelayedprocessscripts() returns all delayed scripts that will be loaded once a child process becomes available.
nsIRequest
validate_once_per_session 1 << 13 disables validation of expired content, provided it has already been validated (at least once) since the start of this session.
...requests do not necessarily start out pending; in some cases, requests have to be explicitly initiated (for example nsichannel implementations are only pending once asyncopen returns successfully).
nsIStructuredCloneContainer
it is an error to initialize an nsistructuredclonecontainer more than once.
... once you've initialized the container, you can get a copy of the object it stores by calling deserializetovariant().
nsIThreadPool
once there are more than this many idle worker threads, the idle threads start getting destroyed.
... threadlimit unsigned long the maximum number of threads allowed at once in the pool; you may change this value by altering this attribute.
nsITimer
constants constant value description type_one_shot 0 type of a timer that fires once only.
... if the callback takes a long time, then the next callback will be scheduled immediately afterward, but only once, unlike type_repeating_precise.
nsIURI
this is related to the web origin concept of rfc6454.
... note: some implementations may have no concept of a relative uri.
nsIWebProgressListener
for any given request, onstatechange() is called once with the state_start flag, zero or more times with the state_transferring flag or once with the state_redirecting flag, and then finally once with the state_stop flag.
...this is not when a load is requested, but rather once it is verified that the load is going to occur in the given window.
nsIXULTemplateQueryProcessor
the template builder will call this method once for each query within the template, before any results can be generated using generateresults(), but after initializeforbuilding() has been called.
...this method must be called once before any of the other query processor methods except for translateref().
Performance
this value controls the number of pages of the file that can be kept in memory at once.
... durability: once a commit has gone through, the data is guaranteed to be committed.
Getting Started Guide
each interface is (at least conceptually) separately `reference counted'.
...here is a snippet of code that demonstrates this misconception.
Using nsIDirectoryService
you can directly add a new nsifile with any property string using the nsiproperties interface: components.classes["@mozilla.org/file/directory_service;1"] .getservice(components.interfaces.nsiproperties) .set("myfilename", file); now, if your cost is too high to set all of these properties at once, you can register to be a callback that can provide an nsifile.
...once the service finds a location, if the provider says that the location is persistent, the service will cache that location so it is very quick on subsequent calls.
Index
the activity manager works in conjunction with the interactive status bar to give the user notifications concerning what thunderbird is doing and how thunderbird has handled user requests.
...however, in many cases you only need to learn a few concepts to write an extension.
Mail composition back end
ns_imethod onstatus(const char *amsgid, - the message id for the message being sent const prunichar *amsg) = 0; - a message concerning the status of the send operation onstopsending the onstopsending interface is called when the sending operation has completed.
... ns_imethod onstopsending(const char *amsgid, - the message id for the message being sent nsresult astatus, - the resulting status for the send operation const prunichar *amsg, - a message concerning the status of the send operation nsifilespec *returnfilespec) = 0; - an nsifilespec which will specify the file that was created (this is used if the dont_deliver_p argument is set to pr_true) nsimsgcopyservicelistener the nsimsgcopyservicelistener interface will notify the implementor or the progress and completion of the copy operation that follows successful send operations.
Mailnews and Mail code review requirements
once unit tests are committed, the in-testsuite+ flag should be set on the bug.
... the patch must have been run at least once on the try server.
customDBHeaders Preference
javascript code once again, other tutorials have demonstrated the general javascript code used to populated columns with data from a message header, so i'm just including my file for reference.
...longforrow: function(hdr) {return 0;} } function addcustomcolumnhandler() { gdbview.addcolumnhandler("colsuperfluous",columnhandler); dump("column handler being added: " + columnhandler + "\n"); } var createdbobserver = { // components.interfaces.nsiobserver observe: function(amsgfolder, atopic, adata) { dump("here here!"); addcustomcolumnhandler(); } } function doonceloaded(){ var observerservice = components.classes["@mozilla.org/observer-service;1"].getservice(components.interfaces.nsiobserverservice); observerservice.addobserver(createdbobserver, "msgcreatedbview", false); window.document.getelementbyid('foldertree').addeventlistener("select",addcustomcolumnhandler,false); } window.addeventlistener("load",doonceloaded,false); dump(" ~ ~ ~ ~ end supe...
Thunderbird extensions
gloda provides concepts such as conversations, messages, identities, contacts.
... all these concepts are related : a conversation contains messages which are linked to identities (from field, to field) which are themselves part of a contact: indeed, a contact has multiple identities.
Using the Multiple Accounts API
if identities are shared between accounts, you will only see that identity once in the list.
...eventually there will be the concept of a session default server, and a permenant default server.
Using Objective-C from js-ctypes
typedef struct objc_selector *sel; in this example, we need to send alloc, its selector can be retrieved with the following code: sel alloc = sel_registername("alloc"); sending a message once target class and selector are ready, you can send a message.
... */ // apple docs :: working with blocks - https://developer.apple.com/library/ios/documentation/cocoa/conceptual/programmingwithobjectivec/workingwithblocks/workingwithblocks.html var _nsconcreteglobalblock = ctypes.open(ctypes.libraryname('objc')).declare('_nsconcreteglobalblock', ctypes.voidptr_t); // //github.com/realityripple/uxp/blob/master/js/src/ctypes/library.cpp?offset=0#271 /** * the "block descriptor" is a static singleton struct.
Using js-ctypes
this is as simple as including the following line of code in the desired javascript scope: components.utils.import("resource://gre/modules/ctypes.jsm") loading a native library once you've imported the code module, you can call the ctypes.open() method to load each native library you wish to use.
... once you've declared the types and functions, you can write your code to make use of them.
Blocking By Domain - Plugins
effects of plugin blocking once a site is included in plugin blocking, it is not possible for that site or any subframes within that site to use plugins.
... any concerns or questions about the plugin block lists should be directed to plugin-blocking-by-domain@mozilla.com.
Plug-in Development Overview - Plugins
« previousnext » writing plug-ins once you decide what you want your plug-in to do, creating it is a simple process.
... building plug-ins once you have added the special code and additional files to make your plug-in scriptable as described in the previous section, the build process is quite straightforward.
Accessibility Inspector - Firefox Developer Tools
once activated, the accessibility engine remains running until you close the developer tools toolbox.
... print accessibility tree to json you can print the contents of the accessibility tree to json by right-clicking on an entry in the accessibility tab and selecting print to json: when you do, you will get a new tab with the selected accessibility tree loaded into the json viewer: once opened, you can save or copy the data as necessary.
Debugging service workers - Firefox Developer Tools
this is very useful because, once registered, the service worker will not necessarily update to the new version immediately, which can make debugging a pain.
...if you want to see a list of information concerning all the service workers registered on your browser, you can visit about:debugging#/runtime/this-firefox.
Debugger.Source - Firefox Developer Tools
if a given piece of source code is presented to the javascript implementation more than once, with the same origin metadata, the javascript implementation may generate a fresh debugger.source instance to represent each presentation, or it may use a single debugger.source instance to represent them all.
...relating a worker to its creator, and other multi-threaded debugging concerns, are out of scope for debugger.
Dominators view - Firefox Developer Tools
otherwise, you might want to review the article on dominators concepts.
...see the relevant section of the dominators concepts article.
Memory - Firefox Developer Tools
once you've taken a snapshot, there are three main views the memory tool provides: the tree map view shows memory usage as a treemap.
... concepts dominators example pages examples used in the memory tool documentation.
Migrating from Firebug - Firefox Developer Tools
those panels allow you to enable and disable single or all breakpoints and to remove single breakpoints or all of them at once.
... step through code once the script execution is stopped, you can step through the code using the continue (f8), step over (f10), step into (f11) and step out (shift+f11) options.
Edit CSS filters - Firefox Developer Tools
once you have selected the effect you want to add, click the plus sign (+) to the right of the dropdown list.
... once you have added an effect, enter the settings you want and then press enter to update the effect.
Examine and edit CSS - Firefox Developer Tools
once you've typed in a filter, you can press esc to remove it again.
...once you've typed in a filter, you can press esc to remove it again.
Console messages - Firefox Developer Tools
number of occurrences if a line that generates a warning or error is executed more than once, it is only logged once and this counter appears to indicate how many times it was encountered.
...in this way the browser can save up a collection of invalidating changes and recalculate their effect at once.
AudioBufferSourceNode.start() - Web APIs
if when is less than (audiocontext.currenttime, or if it's 0, the sound begins to play at once.
...you can only call this function once during the lifetime of an audiobuffersourcenode.
Basic usage of canvas - Web APIs
once you have the element node, you can access the drawing context using its getcontext() method.
...telementbyid('tutorial'); if (canvas.getcontext) { var ctx = canvas.getcontext('2d'); } } </script> <style type="text/css"> canvas { border: 1px solid black; } </style> </head> <body onload="draw();"> <canvas id="tutorial" width="150" height="150"></canvas> </body> </html> the script includes a function called draw(), which is executed once the page finishes loading; this is done by listening for the load event on the document.
Drawing shapes with canvas - Web APIs
once the path has been created, you can stroke or fill the path to render it.
...once created, future drawing commands are directed into the path and used to build the path up.
Using images - Web APIs
so you need to be sure to use the load event so you don't try this before the image has loaded: var img = new image(); // create new img element img.addeventlistener('load', function() { // execute drawimage statements here }, false); img.src = 'myimage.png'; // set source path if you're only using one external image this can be a good approach, but once you need to track more than one we need to resort to something more clever.
... drawing images once we have a reference to our source image object we can use the drawimage() method to render it to the canvas.
Channel Messaging API - Web APIs
channel messaging concepts and usage a message channel is created using the messagechannel() constructor.
... once created, the two ports of the channel can be accessed through the messagechannel.port1 and messagechannel.port2 properties (which both return messageport objects.) the app that created the channel uses port1, and the app at the other end of the port uses port2 — you send a message to port2, and transfer the port over to the other browsing context using window.postmessage along with two arguments (the message to send, and the object to transfer ownership of, in this case the port itself.) when these transferable objects are transferred, they are 'neutered' on the previous context — the one they previously belonged to.
ClipboardEvent() - Web APIs
options optional options are as follows: clipboarddata: a datatransfer containing the data concerned by the clipboard event.
... data : a domstring containing the data concerned by the clipboard event.
CloseEvent.initCloseEvent() - Web APIs
the closeevent.initcloseevent() method initializes the value of a close event once it's been created (normally using the document.createevent() method).
...once dispatched, it doesn't do anything anymore.
ConstrainBoolean - Web APIs
you can specify an exact value which must be matched, an ideal value that should be matched if at all possible, and a fallback value to attempt to match once all more specific constraints have been applied.
... you can also specify the value of the property as simply true or false, in which case the user agent will use that value if possible once all efforts have been made to match the exact and ideal values for other properties.
ConvolverNode.buffer - Web APIs
// grab audio track via xhr for convolver node var soundsource, concerthallbuffer; ajaxrequest = new xmlhttprequest(); ajaxrequest.open('get', 'concert-crowd.ogg', true); ajaxrequest.responsetype = 'arraybuffer'; ajaxrequest.onload = function() { var audiodata = ajaxrequest.response; audioctx.decodeaudiodata(audiodata, function(buffer) { concerthallbuffer = buffer; soundsource = audioctx.createbuffersource(); soundsource.buffer = concerthall...
... convolver.buffer = concerthallbuffer; specifications specification status comment web audio apithe definition of 'buffer' in that specification.
ConvolverNode.normalize - Web APIs
// grab audio track via xhr for convolver node var soundsource, concerthallbuffer; ajaxrequest = new xmlhttprequest(); ajaxrequest.open('get', 'concert-crowd.ogg', true); ajaxrequest.responsetype = 'arraybuffer'; ajaxrequest.onload = function() { var audiodata = ajaxrequest.response; audioctx.decodeaudiodata(audiodata, function(buffer) { concerthallbuffer = buffer; soundsource = audioctx.createbuffersource(); soundsource.buffer = concerthall...
... convolver.normalize = false; // must be set before the buffer, to take effect convolver.buffer = concerthallbuffer; specifications specification status comment web audio apithe definition of 'normalize' in that specification.
Document.querySelector() - Web APIs
usage notes if the specified selector matches an id that is incorrectly used more than once in the document, the first element with that id is returned.
...as the backslash is also an escape character in javascript, if you are entering a literal string, you must escape it twice (once for the javascript string, and another time for queryselector()): <div id="foo\bar"></div> <div id="foo:bar"></div> <script> console.log('#foo\bar'); // "#fooar" (\b is the backspace control character) document.queryselector('#foo\bar'); // does not match anything console.log('#foo\\bar'); // "#foo\bar" console.log('#foo\\\\bar'); // "#foo\\bar"...
EffectTiming.iterations - Web APIs
the default value is 1, indicating that it should only play once, but you can set it to any floating-point value (including positive infinity defaults to 1, and can also take a value of infinity to make it loop infinitely.
...defaults to 1, meaning the animation sequence plays through once then stops automatically.
Element.getAttribute() - Web APIs
retrieving nonce values for security reasons, csp nonces from non-script sources, such as css selectors, and .getattribute("nonce") calls are hidden.
... let nonce = script.getattribute('nonce'); // returns empty string instead of retrieving the nonce from the content attribute, use the nonce property: let nonce = script.nonce; specifications specification status comment domthe definition of 'getattribute()' in that specification.
FileSystemDirectoryEntry.removeRecursively() - Web APIs
syntax filesystemdirectoryentry.removerecursively(successcallback[, errorcallback]); parameters successcallback a function to call once the directory removal process has completed.
... other security concerns as raised by the user agent or the operating system.
FileSystemEntrySync - Web APIs
basic concepts the filesystementrysync interface includes methods that you would expect for manipulating files and directories, but it also include a really handy method for getting a url of the entry: tourl().
...for more information, see the article on basic concepts.
FileSystemSync - Web APIs
basic concepts the filesystemsync object is your gateway to the entire api and you will use it a lot.
... so once you have a reference, cache the object in a global variable or class property.
FileHandle API - Web APIs
this is not a problem because to access the file, a lockedfile object is required and operations on such object are performed in isolation, meaning that once a lockedfile is active, all operations of this lockedfile are guaranteed to happen sequentially on the underlying file without being interleaved with operations from other lockedfile.
...once this method has been successfully called, you can be sure your change on the file will be safe.
GlobalEventHandlers.onanimationend - Web APIs
ton that runs the animation: document.getelementbyid("play").addeventlistener("click", function(event) { document.getelementbyid("box").classname = "slideanimation"; event.target.style.display = "none"; }, false); this sets the class of the box we want to animate to the class that contains the animation description, then hides the play button because this example will only run the animation once.
... for information about why, and how to support running an animation more than once, see run an animation again in css animations tips and tricks.
GlobalEventHandlers.onanimationstart - Web APIs
ton that runs the animation: document.getelementbyid("play").addeventlistener("click", function(event) { document.getelementbyid("box").classname = "slideanimation"; event.target.style.display = "none"; }, false); this sets the class of the box we want to animate to the class that contains the animation description, then hides the play button because this example will only run the animation once.
... for information about why, and how to support running an animation more than once, see run an animation again in css animations tips and tricks.
HTMLImageElement.alt - Web APIs
they're not crucial to the concept shown in the html above, but you may expand the view below if you wish to read the css used.
... for a diagram, the text could be an explanation of the concept presented by the diagram.
HTMLImageElement.decode() - Web APIs
return value a promise which is resolved once the image data is ready to be used.
... usage notes one potential use case for decode(): when loading very large images (for example, in an online photo album), you can present a low resolution thumbnail image initially and then replace that image with the full-resolution image by instantiating a new htmlimageelement, setting its source to the full-resolution image's url, then using decode() to get a promise which is resolved once the full-resolution image is ready for use.
Drag Operations - Web APIs
(naturally, though, you would likely know that the right type of data was available, as it was previously checked during a dragover event.) in the example here, once the data has been retrieved, we insert the string as the textual content of the target.
...wing example returns the data associated with the best-supported format: function dodrop(event) { const supportedtypes = ["application/x-moz-file", "text/uri-list", "text/plain"]; const types = event.datatransfer.types.filter(type => supportedtypes.includes(type)); if (types.length) { const data = event.datatransfer.getdata(types[0]); } event.preventdefault(); } finishing a drag once the drag is complete, a dragend event is fired at the source of the drag (the same element that received the dragstart event).
Checking when a deadline is due - Web APIs
of course, it is no use to just run the above deadline checking function once!
...to do this, we are simply using setinterval() to run checkdeadlines() once per second: setinterval(checkdeadlines, 1000); ...
MediaDevices.ondevicechange - Web APIs
example in this example, we create a function called updatedevicelist(), which is called once when mediadevices.getusermedia() successfully obtains a stream, and then is called any time the device list changes.
... once the string is assembled, containing the device's name in bold and the direction in parentheses, it's appended to the appropriate list by calling appendchild() on either audiolist or videolist, as appropriate based on the device type.
MediaStream Recording API - Web APIs
basic concepts the mediastream recording api is comprised of a single major interface, mediarecorder, which does all the work of taking the data from a mediastream and delivering it to you for processing.
... once the source media is playing and you've reached the point where you're ready to record video, call mediarecorder.start() to begin recording.
Using the Media Capabilities API - Web APIs
they will be a useful feature of the api once available, but there is a high probability of the display capabilities functionality changing a great deal before browser implementations arrive.
...once the promises state is fulfilled, you can access the mediacapabilitiesinfo interface's supported, smooth, and powerefficient properties.
Media Capture and Streams API (Media Stream) - Web APIs
concepts and usage the api is based on the manipulation of a mediastream object representing a flux of audio- or video-related data.
... capabilities, constraints, and settingsthe twin concepts of constraints and capabilities let the browser and web site or app exchange information about what constrainable properties the browser's implementation supports and what values it supports for each one.
MerchantValidationEvent.validationURL - Web APIs
once this has been loaded, it should be passed into complete(), either directly or using a promise.
... see merchant validation in payment processing concepts for more information on the merchant validation process.
MerchantValidationEvent - Web APIs
to learn more about merchant validation, see merchant validation in payment processing concepts.
...once this data is retrieved, the data (or a promise resolving to the validation data) should be passed into complete() to validate that the payment request is coming from an authorized merchant.
Microdata DOM API - Web APIs
code example this sample shows how the getitems() method can be used to obtain a list of all the top-level microdata items of a particular type given in the document: var cats = document.getitems("http://example.com/feline"); once an element representing an item has been obtained, its properties can be extracted using the properties idl attribute.
...the propertynodelist object can be used to obtain all the values at once usingits getvalues method, which returns an array of all the values.
MouseEvent.initMouseEvent() - Web APIs
the mouseevent.initmouseevent() method initializes the value of a mouse event once it's been created (normally using the document.createevent() method).
...once dispatched, it doesn't do anything anymore.
navigator.hardwareConcurrency - Web APIs
the number of logical processor cores can be used to measure the number of threads which can effectively be run at once without them having to context switch.
... the browser may, however, choose to report a lower number of logical cores in order to represent more accurately the number of workers that can run at once, so don't treat this as an absolute measurement of the number of cores in the user's system.
NavigatorConcurrentHardware - Web APIs
the number of logical processor cores is a way to measure the number of threads which can effectively be run at once without them having to share cpus.
...the browser may, however, choose to reduce the number in order to represent more accurately the number of workers that can run at once properties navigatorconcurrenthardware.hardwareconcurrency read only returns the number of logical processors which may be available to the user agent.
Notifications API - Web APIs
concepts and usage on supported platforms, showing a system notification generally involves two things.
...once a choice has been made, the setting will generally persist for the current session.
Page Visibility API - Web APIs
once a timer's code has finished running, the duration of time it took to execute is subtracted from its window's timeout budget.
...a document may start in the prerender state, but will never switch to this state from any other state, since a document can only prerender once.
PaymentRequest: merchantvalidation event - Web APIs
see merchant validation in payment processing concepts for details on how the merchant validation process works.
...vent.complete(async () => { const merchantserverurl = window.location.origin + '/validate?url=' + encodeuricomponent(event.validationurl); // get validation data, and complete validation; return await fetch(merchantserverurl).then(response => response.text()); }); }; const response = await request.show(); for more information, see merchant validation in payment processing concepts.
PaymentResponse.retry() - Web APIs
error can be provided all by itself to provide only a generic error message, or in concert with the other properties to serve as an overview while other properties' values gude the user to errors in specific fields in the payment form.
... see the example below for a thorough example, but the basic concept, in outline form, is: create a new paymentrequest (new paymentrequest()) display the payment request (paymentrequest.show() if show() resolves, the returned paymentresponse describes the requested payment and the options chosen by the user.
Payment Request API - Web APIs
payment request concepts and usage many problems related to online shopping-cart abandonment can be traced to checkout forms, which can be difficult and time consuming to fill out and often require multiple steps to complete.
... advantages of using the payment request api with "basic-card" (card-based payments): fast purchase experience: users enter their details once into the browser and are then ready to pay for goods and services on the web.
Pointer Lock API - Web APIs
basic concepts pointer lock is related to mouse capture.
...the concept of the mouse cursor does not exist and the cursor cannot move off the window or be clamped by a screen edge.
RTCPeerConnection.close() - Web APIs
all rtcrtpsender objects are considered to be stopped once this returns (they may still be in the process of stopping, but for all intents and purposes, they're stopped).
... once this method returns, the signaling state as returned by rtcpeerconnection.signalingstate is closed.
RTCPeerConnection.createOffer() - Web APIs
().then(function(offer) { return mypeerconnection.setlocaldescription(offer); }) .then(function() { sendtoserver({ name: myusername, target: targetusername, type: "video-offer", sdp: mypeerconnection.localdescription }); }) .catch(function(reason) { // an error occurred, so handle the failure to connect }); in this code, the offer is created, and once successful, the local end of the rtcpeerconnection is configured to match by passing the offer (which is represented using an object conforming to rtcsessiondescriptioninit) into setlocaldescription().
... once that's done, the offer is sent to the remote system over the signaling channel; in this case, by using a custom function called sendtoserver().
RTCPeerConnection: icecandidateerror event - Web APIs
the 701 error is fired only once per server url from the list of available stun or turn servers provided when creating the rtcpeerconnection.
... pc.addeventlistener("icecandidateerror", (event) => { if (event.errorcode === 701) { reportconnectfail(event.url, event.errortext); } }); note that if multiple stun and/or turn servers are provided when creating the connection, this error may happen more than once, if more than one of those servers fails.
RTCPeerConnection: peeridentity event - Web APIs
the peeridentity event is sent to the connection concerned when peer identity has been set and verified on it.
...once resolved, its value is the new identity.
RTCPeerConnection.restartIce() - Web APIs
after restartice() returns, the offer returned by the next call to createoffer() is automatically configured to trigger ice restart on both the local peer (once the local peer has been set) and on the remote peer, once the offer is sent across your signaling mechanism and the remote peer has set its description as well.
... usage notes after calling restartice(), the next offer created using createoffer() will initiate ice restart once sent to the remote peer over your signaling mechanism.
RTCRemoteOutboundRtpStreamStats.localId - Web APIs
let startreport; async function networkteststart(pc) { if (pc) { startreport = await pc.getstats(); } } given an rtcpeerconnection, pc, this calls its getstats() method to obtain a statistics report object, which it stores in startreport for use once the end-of-test data has been collected by networkteststop().
... once the ending remote-outbound-rtp record is found, we use its id property to get its id.
RTCRtcpParameters - Web APIs
this property cannot be changed once initialized.
...this property cannot be changed once initialized.
RTCRtpReceiver.getStats() - Web APIs
the rtcrtpreceiver method getstats() asynchronously requests an rtcstatsreport object which provides statistics about incoming traffic on the owning rtcpeerconnection, returning a promise whose fulfillment handler will be called once the results are available.
... syntax var promise = rtcrtpreceiver.getstats(); return value a javascript promise which is fulfilled once the statistics are available.
SVGImageElement.decode - Web APIs
the decode() method of the svgimageelement interface initiates asynchronous decoding of an image, returning a promise that resolves once the image data is ready for use.
... return value a promise which resolves once the image data is ready to be used, such as by appending it to the dom, replacing an existing image, and so forth.
SVGSVGElement - Web APIs
to suspend redraw actions as a collection of svg dom changes occur, precede the changes to the svg dom with a method call similar to: const suspendhandleid = suspendredraw(maxwaitmilliseconds) and follow the changes with a method call similar to: unsuspendredraw(suspendhandleid) note that multiple suspendredraw() calls can be used at once, and that each such method call is treated independently of the other suspendredraw() method calls.
...if setcurrenttime() is called before the document timeline has begun (for example, by script running in a <script> element before the document's svgload event is dispatched), then the value of seconds in the last invocation of the method gives the time that the document will seek to once the document timeline has begun.
Selection API - Web APIs
concepts and usage to retrieve the current text range the user has selected, you can use the window.getselection() or document.getselection() method, storing the return value — a selection object — in a variable for futher use.
... once your selection is in a variable, you perform a variety of operations on it, for example copying the selection to a text string using selection.tostring(), adding a range (as represented by a standard range object) to the selection (or removing one) with selection.addrange()/selection.removerange(), or changing the selection to be the entire contents of a dom node using selection.selectallchildren().
Service Worker API - Web APIs
service worker concepts and usage a service worker is an event-driven worker registered against an origin and a path.
... note: because oninstall/onactivate could take a while to complete, the service worker spec provides a waituntil method, once this is called oninstall or onactivate, it passes a promise.
SourceBuffer - Web APIs
returns a promise which is fulfilled once the buffer has been appended.
...returns a promise which is fulfilled once all matching segments have been removed.
Storage Access API - Web APIs
concepts and usage most browsers implement a number of storage access policies that restrict access to cookies and site data for embedded, cross-origin resources.
...specifics regarding the lifetime of a storage grant and the circumstances under which the browser may decide to inform the user are currently being worked through and will be announced once ready.
Streams API - Web APIs
concepts and usage streaming involves breaking a resource that you want to receive over a network down into small chunks, then processing it bit by bit.
... note: you can find a lot more details about the theory and practice of streams in our articles — streams api concepts, using readable streams, and using writable streams.
SubtleCrypto.unwrapKey() - Web APIs
once we have the unwrapping key we pass it into unwrapkey() with the wrapped key and other parameters.
... once we have the unwrapping key we pass it into unwrapkey() with the wrapped key and other parameters.
WakeLockSentinel - Web APIs
methods release() releases the wakelocksentinel, returning a promise that is resolved once the sentinel has been successfully released.
...once acquired we listen for the onrelease event which can be used to give appropriate ui feedback.
WebGLRenderingContext.getUniformLocation() - Web APIs
once you have the uniform's location, you can access the uniform itself using one of the other uniform access methods, passing in the uniform location as one of the inputs: getuniform() returns the value of the uniform at the given location.
... after setting the current shading program to shaderprogram, this code fetches the three uniforms "uscalingfactor", "uglobalcolor", and "urotationvector", calling getuniformlocation() once for each uniform.
Simple color animation - Web APIs
the timer and the timer handler function establish the animation loop, a set of drawing commands that are executed at a regular period (typically, every frame; in this case, once per second).
... clearinterval(timer); } // call stopanimation() once to setup the initial event // handlers for canvas and button.
WebGL by example - Web APIs
next » webgl by example is a series of live samples with short explanations that showcase webgl concepts and capabilities.
...we believe that it leads to a more effective learning experience and ultimately a deeper understanding of the underlying concepts.
Getting started with WebGL - Web APIs
it's assumed that you already have an understanding of the mathematics involved in 3d graphics, and this article doesn't pretend to try to teach you 3d graphics concepts itself.
... once we have the canvas, we try to get a webglrenderingcontext for it by calling getcontext() and passing it the string "webgl".
Using textures in WebGL - Web APIs
the function we assign to image.onload will be called once the image has finished downloading.
... once we've set up the texture mapping array, we pass the array into the buffer, so that webgl has that data ready for its use.
WebRTC connectivity - Web APIs
once the proposed description has been agreed upon, the value of currentlocaldescription or currentremotedescription is changed to the pending description, and the pending description is set to null again, indicating that there isn't a pending description.
... once the ice session is complete, the configuration that's currently in effect is the final one, unless an ice reset occurs.
Writing WebSocket servers - Web APIs
once the server sends these headers, the handshake is complete and you can start swapping data!
...once the payload length and masking key is decoded, you can read that number of bytes from the socket.
Fundamentals of WebXR - Web APIs
basic concepts before getting into too much detail, let's consider some basic concepts that you need to know before you learn how to develop xr code.
... the drawing shown here demonstrates the concept of fov.
WebXR permissions and security - Web APIs
once that check is passed, the request to enter immersive-vr mode is allowed if all of the following are true: the requestsession() call was issued by code executing within the handler for a user event, or the from the startup code for a user-launched web application.
... user intent user intent is the concept of whether or not an action being performed by code is being performed because of something the user intends to do or not.
Web Animations API - Web APIs
concepts and usage the web animations api provides a common language for browsers and developers to describe animations on dom elements.
... to get more information on the concepts behind the api and how to use it, read using the web animations api.
Controlling multiple parameters with ConstantSourceNode - Web APIs
once all the gain nodes are created, we create the constantsourcenode, constantnode.
... once all three oscillators have been created, they're started by calling each one's constantsourcenode.start() method in turn, and playing is set to true to track that the tones are playing.
Example and tutorial: Simple synth keyboard - Web APIs
once the keyboard has been constructed, we scroll the note "b" in octave 5 into view; this has the effect of ensuring that middle-c is visible along with its surrounding keys.
... creating a key the createkey() function is called once for each key that we want to present in the virtual keyboard.
Visualizations with Web Audio API - Web APIs
basic concepts to extract data from your audio source, you need an analysernode, which is created using the audiocontext.createanalyser() method, for example: var audioctx = new (window.audiocontext || window.webkitaudiocontext)(); var analyser = audioctx.createanalyser(); this node is then connected to your audio source at some point between your source and your destination, for example: source = audioctx.createmediastreams...
...ser.fftsize = 2048; var bufferlength = analyser.frequencybincount; var dataarray = new uint8array(bufferlength); next, we clear the canvas of what had been drawn on it before to get ready for the new visualization display: canvasctx.clearrect(0, 0, width, height); we now define the draw() function: function draw() { in here, we use requestanimationframe() to keep looping the drawing function once it has been started: var drawvisual = requestanimationframe(draw); next, we grab the time domain data and copy it into our array analyser.getbytetimedomaindata(dataarray); next, fill the canvas with a solid colour to start canvasctx.fillstyle = 'rgb(200, 200, 200)'; canvasctx.fillrect(0, 0, width, height); set a line width and stroke colour for the wave we will draw, then begin drawing a pa...
Web Authentication API - Web APIs
web authentication concepts and usage the web authentication 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 is a new concept in authentication: when authenticating using passwords, the password is stored in a user's brain and no other device is needed; when authenticating using web authentication, the password is replaced with a key pair that is stored in an authenticator.
Web Locks API - Web APIs
web locks concepts and usage a lock is an abstract concept representing some potentially shared resource, identified by a name chosen by the web app.
... the request() method itself returns a promise which resolves once the lock has been released; within an async function, a script can await the call to make the asynchronous code flow linear.
Using the Web Speech API - Web APIs
try ' + colorhtml + '.'; document.body.onclick = function() { recognition.start(); console.log('ready to receive a color command.'); } receiving and handling results once the speech recognition is started, there are many event handlers that can be used to retrieve results, and other pieces of surrounding information (see the speechrecognition event handlers list.) the most common one you'll probably use is speechrecognition.onresult, which is fired once a successful result is received: recognition.onresult = function(event) { var color = event.results[0][0].tra...
... we also use a speechrecognition.onspeechend handler to stop the speech recognition service from running (using speechrecognition.stop()) once a single word has been recognised and it has finished being spoken: recognition.onspeechend = function() { recognition.stop(); } handling errors and unrecognised speech the last two handlers are there to handle cases where speech was recognised that wasn't in the defined grammar, or an error occured.
Window.pageYOffset - Web APIs
there is slightly better support for pageyoffset than for scrolly in older browsers, but if you're not concerned about browsers more than a handful of years old, you can use either one.
...once that's done, the vertical scroll position is checked by looking at the value of pageyoffset in the frame's contentwindow.
WindowOrWorkerGlobalScope.clearTimeout() - Web APIs
example run the script below in the context of a web page and click on the page once.
...if you click the page multiple times in one second, the alert only appears once.
Worklet.addModule() - Web APIs
WebAPIWorkletaddModule
return value a promise that resolves once the module from the given url has been added.
... examples audioworklet example const audioctx = new audiocontext(); const audioworklet = audioctx.audioworklet; await audioworklet.addmodule('modules/bypassfilter.js', { credentials: 'omit', }); paintworklet example css.paintworklet.addmodule('https://mdn.github.io/houdini-examples/csspaint/intro/worklets/hilite.js'); once a paintworklet is included, the css paint() function can be used to include the image created by the worklet: @supports (background-image: paint(id)) { h1 { background-image: paint(hollowhighlights, filled, 3px); } } specifications specification status comment worklets level 1the definition of 'addmodule()' in that specification.
XRInputSource - Web APIs
once the action is completed and the user has released the trigger or the grip, a squeeze event is sent.
...finally, once that is done—or if the user aborts the action—a selectend event is sent to the session object.
XRInputSourceArray.forEach() - Web APIs
the xrinputsourcearray method foreach() executes the specified callback once for each input source in the array, starting at index 0 and progressing until the end of the list.
... syntax xrinputsourcearray.foreach(callback, thisarg); parameters callback a function to execute once for each entry in the array xrinputsourcearray.
ARIA: alert role - Accessibility
<button type="button" onclick="triggeralert">trigger alert</button> <p class="alert">the alert will trigger when the button is pressed.</p> function triggeralert() { var alertel = document.queryselector('.alert'); alertel.addattribute("role", "alert"); } accessibility concerns the alert role should read out content that has changed, or bring the user's attention to it immediately, so it should not be used for static content or used regularly.
...lots of alerts at once or unnecessary alerts willl create a bad user experience.
ARIA: application role - Accessibility
background for historic reasons, especially on windows, screen readers and some other assistive technologies (at) have traditionally grabbed the whole web content from the browser at once after it had finished loading.
... examples some prominent web applications that use the application role properly are: google docs, sheets and slides ckeditor and tinymce wysiwyg web editors, like the one used on the mozilla developer network some parts of gmail accessibility concerns improperly using the application role can unintentionally take away access from information on a web page, so be very mindful of using it.
Cognitive accessibility - Accessibility
others may prefer to explore the site in a sequential manner, moving from page to page in order to best understand the site's layout, content, and concepts.
... input assistance guideline 3.3 helps to ensure accurate data entry, stating "help users avoid and correct mistakes." while we all make mistakes, some people are more likely to make mistakes, less likely to notice a mistake, or have a harder time correcting a mistake once they make one.
Implementing a Microsoft Active Accessibility (MSAA) Server - Accessibility
solution: try not to calculate the same things more than once or create the same objects more than once.
...once the accessibility service is created, however, gecko loads code to create an object on demand for every ui or document object that should support iaccessible.
::placeholder - CSS: Cascading Style Sheets
syntax ::placeholder accessibility concerns color contrast contrast ratio placeholder text typically has a lighter color treatment to indicate that it is a suggestion for what kind of input will be valid, and is not actual input of any kind.
...both of these circumstances can interfere with successful form completion, especially for people with cognitive concerns.
::selection - CSS: Cascading Style Sheets
.</p> css ::-moz-selection { color: gold; background-color: red; } p::-moz-selection { color: white; background-color: blue; } /* make selected text gold on a red background */ ::selection { color: gold; background-color: red; } /* make selected text in a paragraph white on a blue background */ p::selection { color: white; background-color: blue; } result accessibility concerns don't override selected text styles for purely aesthetic reasons — users can customize them to suit their needs.
... for people experiencing cognitive concerns or who are less technologically literate, unexpected changes to selection styles may hurt their understanding of the functionality.
:focus-visible - CSS: Cascading Style Sheets
accessibility concerns low vision make sure the visual focus indicator can be seen by people with low vision.
...for users with cognitive concerns, or who are less technologically literate, this lack of consistent behavior for interactive elements may be confusing.
Alternative style sheets - CSS: Cascading Style Sheets
working draft the css om specification defines the concepts of the style sheet set name, its disabled flag, and the preferred css style sheet set name.
... recommendation earlier, the html specification itself defined the concept of preferred and alternate stylesheets.
Detecting CSS animation support - CSS: Cascading Style Sheets
once this code is finished running, the value of animation will be false if css animation support isn't available, or it will be true.
...this variable, once constructed, contains the complete description of all the keyframes needed by our animation sequence.
Block and inline layout in normal flow - CSS: Cascading Style Sheets
they can be either block or inline, but not both at once.
... this concept of the outer and inner display type is important as this tells us that a container using a layout method such as flexbox (display: flex) and grid layout (display: grid) is still participating in block and inline layout, due to the outer display type of those methods being block.
Line-based placement with CSS Grid - CSS: Cascading Style Sheets
in the article covering the basic concepts of grid layout, we started to look at how to position items on a grid using line numbers.
...we will explore how grids work with writing modes in a later article however we have the concept of four flow-relative directions: block-start block-end inline-start inline-end we are working in english, a left-to-right language.
Realizing common layouts using CSS Grid Layout - CSS: Cascading Style Sheets
.wrapper { display: grid; grid-template-columns: repeat(12, [col-start] 1fr); grid-gap: 20px; } we are once again going to make this a responsive layout, this time however using named lines.
....main-nav { grid-column: col-start / span 2; grid-row: 2 / 4; } .content { grid-column: col-start 3 / span 8; grid-row: 2 / 4; } .side { grid-column: col-start 11 / span 2; grid-row: 2; } .ad { grid-column: col-start 11 / span 2; grid-row: 3; } .main-footer { grid-column: col-start / span 12; } nav ul { flex-direction: column; } } once again the grid inspector is useful to help us see how our layout has taken shape.
The stacking context - CSS: Cascading Style Sheets
the stacking context is a three-dimensional conceptualization of html elements along an imaginary z-axis relative to the user, who is assumed to be facing the viewport or the webpage.
...once stacking and rendering within div #3 is completed, the whole div #3 element is passed for stacking in the root element with respect to its sibling's div.
Recipe: Media objects - CSS: Cascading Style Sheets
i define my grid once we have a max-width of 500 pixels, so on smaller devices the media object stacks.
... download this example once floated elements become grid items the float no longer applies so you don’t need to do anything special to clear the float.
Pagination - CSS: Cascading Style Sheets
alternative methods once the column-gap property has implementation in browsers this could be used instead of margins to space out the items.
... .pagination { list-style: none; margin: 0; padding: 0; display: flex; column-gap: 2px; } accessibility concerns we want to ensure that a person using a screenreader understands what this navigation does, and where they will go when clicking a link.
CSS reference - CSS: Cascading Style Sheets
WebCSSReference
you can also browse key css concepts and a list of selectors organized by type.
... concepts syntax and semantics css syntax at-rules cascade comments descriptor inheritance shorthand properties specificity value definition syntax css unit and value types values actual value computed value initial value resolved value specified value used value layout block formatting context box model containing block layout mode margin collapsing replaced elements s...
CSS Tutorials - CSS: Cascading Style Sheets
WebCSSTutorials
it explains the fundamental concepts of the language and guides you in writing basic stylesheets.
...they are easy to use for anybody with a fair knowledge of basic concepts.
Using CSS custom properties (variables) - CSS: Cascading Style Sheets
validity and values the classical css concept of validity, tied to each property, is not very useful in regard to custom properties.
...properties and custom variables can lead to invalid css statements, leading to the new concept of valid at computed time.
Value definition syntax - CSS: Cascading Style Sheets
data types basic data types some kind of data are used throughout css, and are defined once for all values in the specification.
... bold smaller bold, as bold and smaller may only appear once.
font-family - CSS: Cascading Style Sheets
it is often convenient to use the shorthand property font to set font-size and other font related properties all at once.
... math this is for the particular stylistic concerns of representing mathematics: superscript and subscript, brackets that cross several lines, nesting expressions, and double struck glyphs with distinct meanings.
font-weight - CSS: Cascading Style Sheets
javascript let weightlabel = document.queryselector('label[for="weight"]'); let weightinput = document.queryselector('#weight'); let sampletext = document.queryselector('.sample'); function update() { weightlabel.textcontent = `font-weight: ${weightinput.value};`; sampletext.style.fontweight = weightinput.value; } weightinput.addeventlistener('input', update); update(); accessibility concerns people experiencing low vision conditions may have difficulty reading text set with a font-weight value of 100 (thin/hairline) or 200 (extra light), especially if the font has a low contrast color ratio.
... bolder | lighterwhere <font-weight-absolute> = normal | bold | <number <a href="/docs/css/value_definition_syntax#brackets" title="brackets: enclose several entities, combinators, and multipliers to transform them as a single component">[1,1000]> examples setting font weights html <p> alice was beginning to get very tired of sitting by her sister on the bank, and of having nothing to do: once or twice she had peeped into the book her sister was reading, but it had no pictures or conversations in it, "and what is the use of a book," thought alice "without pictures or conversations?" </p> <div>i'm heavy<br/> <span>i'm lighter</span> </div> css /* set paragraph text to be bold.
Inheritance - CSS: Cascading Style Sheets
you can control inheritance for all properties at once using the all shorthand property, which applies its value to all properties.
... see also css values for controlling inheritance: inherit, initial, unset, and revert introducing the css cascade cascade and inheritance css key concepts: css syntax, at-rule, comments, specificity and inheritance, the box, layout modes and visual formatting models, and margin collapsing, or the initial, computed, resolved, specified, used, and actual values.
line-height - CSS: Cascading Style Sheets
accessibility concerns use a minimum value of 1.5 for line-height for main paragraph content.
... this will help people experiencing low vision conditions, as well as people with cognitive concerns such as dyslexia.
list-style - CSS: Cascading Style Sheets
the list-style css shorthand property allows you set all the list style properties at once.
... accessibility concerns safari has an issue whereby unordered lists with a list-style value of none applied to them will not be recognized as a list in the accessibility tree.
position - CSS: Cascading Style Sheets
WebCSSposition
accessibility concerns ensure that elements positioned with an absolute or fixed value do not obscure other content when the page is zoomed to increase text size.
...depending on the content needing to be repainted, the browser performance, and the device's processing speed, the browser may not be able to manage repaints at 60 fps, causing accessibility concerns for people with sensitivities and jank for everyone.
scroll-margin - CSS: Cascading Style Sheets
the scroll-margin shorthand property sets all of the scroll margins of an element at once, assigning values much like the margin property does for margins of an element.
... note: here we are setting scroll-margin on all sides at once, but only the start edge is really relevant.
symbols() - CSS: Cascading Style Sheets
WebCSSsymbols
unlike @counter-style, symbols() is anonymous (i.e., it can only be used once).
... fixed: the system cycles through the given values once, then falls back to arabic numerals.
touch-action - CSS: Cascading Style Sheets
once scrolling has started, the direction may still be reversed.
... accessibility concerns a declaration of touch-action: none; may inhibit operating a browser's zooming capabilities.
transition-timing-function - CSS: Cascading Style Sheets
step-start equal to steps(1, jump-start) step-end equal to steps(1, jump-end) accessibility concerns some animations can be helpful such as to guide users to understand what actions are expected, to show relationships within the user interface, and to inform users as to what actions have occurred.
...however, some animations can be problematic for people with cognitive concerns such as attention deficit hyperactivity disorder (adhd) and certain kinds of motion can be a trigger for vestibular disorders, epilepsy, and migraine and scotopic sensitivity.
Cross-browser audio basics - Developer guides
waiting the waiting event is triggered when playback has stopped due to lack of media data, although it is expected to resume once data becomes available.
... myaudio.addeventlistener("ended", function() { //do something once audio track has finished playing }); volumechange the volumechange event signifies that the volume has changed; that includes being muted.
Creating a cross-browser video player - Developer guides
once again the html is quite straightforward, using an unordered list with list-style-type:none set to enclose the controls, each of which is a list item with float:left.
...} once it has been confirmed that the browser does indeed support html5 video, it's time to set up the custom controls.
Constraint validation - Developer guides
for a basic introduction to these concepts, with examples, see the form validation tutorial.
... note: this is not a comprehensive postal code validation library, but rather a demonstration of the key concepts.
Separate sites for mobile and desktop - Developer guides
in a nutshell, this technique uses server-side logic to solve all three goals of mobile web development at once — if the user’s browser looks like it’s on a phone, you serve them mobile content, formatted for their phone and optimized for speed.
... conceptually simple, this is the easiest option to add to an existing site, especially if you are using a cms or web application that supports templates.
<a>: The Anchor element - HTML: Hypertext Markup Language
WebHTMLElementa
see referer header: privacy and security concerns for information.
... people experiencing low vision conditions, navigating with the aid of screen reading technology, or with cognitive concerns may be confused when a new tab, window, or application opens unexpectedly.
<input type="color"> - HTML: Hypertext Markup Language
WebHTMLElementinputcolor
here we establish some variables, setting up a variable that contains the color we'll set the color well to when we first load up, and then setting up a load handler to do the main startup work once the page is fully loaded.
... var colorwell; var defaultcolor = "#0000ff"; window.addeventlistener("load", startup, false); initialization once the page is loaded, our load event handler, startup(), is called: function startup() { colorwell = document.queryselector("#colorwell"); colorwell.value = defaultcolor; colorwell.addeventlistener("input", updatefirst, false); colorwell.addeventlistener("change", updateall, false); colorwell.select(); } this gets a reference to the color <input> element in a variable called colorwell, then sets the color input's value to the value in defaultcolor.
<input type="file"> - HTML: Hypertext Markup Language
WebHTMLElementinputfile
once chosen, the files can be uploaded to a server using form submission, or manipulated using javascript code and the file api.
... including the multiple attribute, as shown above, specifies that multiple files can be chosen at once.
<input type="radio"> - HTML: Hypertext Markup Language
WebHTMLElementinputradio
once a radio group is established, selecting any radio button in that group automatically deselects any currently-selected radio button in the same group.
...this is because only one radio button in a group can ever be selected at once, and the user agent automatically deselects others each time a new one is marked as checked.
<link>: The External Resource Link element - HTML: Hypertext Markup Language
WebHTMLElementlink
ico is more ubiquitous, so you should use this format if cross-browser support is a concern (especially for old ie versions).
...tching for an error event: <script> var mystylesheet = document.queryselector('#my-stylesheet'); mystylesheet.onload = function() { // do something interesting; the sheet has been loaded } mystylesheet.onerror = function() { console.log("an error occurred loading the stylesheet!"); } </script> <link rel="stylesheet" href="mystylesheet.css" id="my-stylesheet"> note: the load event fires once the stylesheet and all of its imported content has been loaded and parsed, and immediately before the styles start being applied to the content.
Standard metadata names - HTML: Hypertext Markup Language
WebHTMLElementmetaname
specifying the same color scheme more than once has the same effect as specifying it only once.
... accessibility concerns with viewport scaling disabling zooming capabilities by setting user-scalable to a value of no prevents people experiencing low vision conditions from being able to read and understand page content.
<tr>: The Table Row element - HTML: Hypertext Markup Language
WebHTMLElementtr
once again, we haven't touched the css.
...this is a way to quickly apply a background color to all of the cells in the heading area at once.
Link types - HTML: Hypertext Markup Language
<link> <a>, <area>, <form> prerender suggests that the browser fetch the linked resource in advance, and that it also render the prefetched content offscreen so it can be quickly presented to the user once needed.
... while once part of the html specification, this has been removed from the spec and is only implemented by versions of firefox prior to firefox 63.
Evolution of HTTP - HTTP
http/0.9 is extremely simple: requests consist of a single line and start with the only possible method get followed by the path to the resource (not the url as both the protocol, server, and port are unnecessary once connected to the server).
...ml <html> a page with an image <img src="/myimage.gif"> </html> followed by a second connection and request to fetch the image (followed by a response to that request): get /myimage.gif http/1.0 user-agent: ncsa_mosaic/2.0 (windows 3.1) 200 ok date: tue, 15 nov 1994 08:12:32 gmt server: cern/3.0 libwww/2.17 content-type: text/gif (image content) these novelties have not been introduced as concerted effort, but as a try-and-see approach over the 1991-1995 period: a server and a browser added one feature and it saw if it got traction.
Content negotiation - HTTP
once a user has overridden the server-chosen language, a site should no longer use language detection and should stick with the explicitly-chosen language.
...the more precise headers are sent, the more entropy is sent, allowing for more http fingerprinting and corresponding privacy concern.
HTTP headers - HTTP
WebHTTPHeaders
if viewport-width occurs in a message more than once, the last value overrides all previous occurrences.
...if width occurs in a message more than once, the last value overrides all previous occurrences conditionals last-modified the last modification date of the resource, used to compare several versions of the same resource.
Protocol upgrade mechanism - HTTP
you can use this more than once in the header, as well; the result is the same as if you used a comma-delineated list of subprotocol identifiers in a single header.
...it will appear no more than once in the response headers.
JavaScript data types and data structures - JavaScript
but even in that case there might be misconceptions.
...this means that once a string is created, it is not possible to modify it.
Equality comparisons and sameness - JavaScript
note that the distinction between these all have to do with their handling of primitives; none of them compares whether the parameters are conceptually similar in structure.
...the second is that floating point includes the concept of a not-a-number value, nan, to represent the solution to certain ill-defined mathematical problems: negative infinity added to positive infinity, for example.
Control flow and error handling - JavaScript
(by convention, the default clause is written as the last clause, but it does not need to be so.) break statements the optional break statement associated with each case clause ensures that the program breaks out of switch once the matched statement is executed, and then continues execution at the statement following switch.
...once the catch block finishes executing, the identifier no longer exists.
Details of the object model - JavaScript
prototype-based languages class-based object-oriented languages, such as java and c++, are founded on the concept of two distinct entities: classes and instances.
...once these properties are set, javascript returns the new object and the assignment statement sets the variable mark to that object.
Keyed collections - JavaScript
a value in a set may only occur once; it is unique in the set's collection.
...an object in the weakset may only occur once.
Loops and iteration - JavaScript
a do...while statement looks as follows: do statement while (condition); statement is always executed once before the condition is checked.
... example in the following example, the do loop iterates at least once and reiterates until i is no longer less than 5.
Inheritance and the prototype chain - JavaScript
however, this unique information would only be generated once, potentially leading to problems.
...however, as microsoft has discontinued extended support for systems running these old browsers, this should not be a concern for most applications.
Memory Management - JavaScript
this section will explain the concepts that are necessary for understanding the main garbage collection algorithms and their respective limitations.
... references the main concept that garbage collection algorithms rely on is the concept of reference.
Warning: -file- is being assigned a //# sourceMappingURL, but already has one - JavaScript
the javascript warning "-file- is being assigned a //# sourcemappingurl, but already has one." occurs when a source map has been specified more than once for a given javascript source.
... a source map has been specified more than once for a given javascript source.
Functions - JavaScript
when functions are used only once, a common pattern is an iife (immediately invoked function expression).
...onsole.log(p); }; var cons = new function('\tconsole.log(p);'); decl(); expr(); cons(); } myfunc(); /* * logs:- * 9 - for 'decl' by function declaration (current scope) * 9 - for 'expr' by function expression (current scope) * 5 - for 'cons' by function constructor (global scope) */ functions defined by function expressions and function declarations are parsed only once, while those defined by the function constructor are not.
Array.prototype.reduceRight() - JavaScript
description reduceright executes the callback function once for each element present in the array, excluding holes in the array, receiving four arguments: the initial value (or value from the previous callback call), the value of the current element, the current index, and the array over which iteration is occurring.
...(f4, x); const f2 = x => mult3(f3, x); add5(f2, input); } ​​​​​​difference between reduce and reduceright var a = ['1', '2', '3', '4', '5']; var left = a.reduce(function(prev, cur) { return prev + cur; }); var right = a.reduceright(function(prev, cur) { return prev + cur; }); console.log(left); // "12345" console.log(right); // "54321" defining composible function the concept of compose function is simple it combines n functions.
Atomics.notify() - JavaScript
however, once the writing thread has stored a new value, it will be notified by the writing thread and return the new value (123).
... atomics.wait(int32, 0, 0); console.log(int32[0]); // 123 a writing thread stores a new value and notifies the waiting thread once it has written: console.log(int32[0]); // 0; atomics.store(int32, 0, 123); atomics.notify(int32, 0, 1); specifications specification ecmascript (ecma-262)the definition of 'atomics.notify' in that specification.
Atomics.wait() - JavaScript
however, once the writing thread has stored a new value, it will be notified by the writing thread and return the new value (123).
... atomics.wait(int32, 0, 0); console.log(int32[0]); // 123 a writing thread stores a new value and notifies the waiting thread once it has written: console.log(int32[0]); // 0; atomics.store(int32, 0, 123); atomics.notify(int32, 0, 1); specifications specification ecmascript (ecma-262)the definition of 'atomics.wait' in that specification.
Atomics - JavaScript
however, once the writing thread has stored a new value, it will be notified by the writing thread and return the new value (123).
... atomics.wait(int32, 0, 0); console.log(int32[0]); // 123 a writing thread stores a new value and notifies the waiting thread once it has written: console.log(int32[0]); // 0; atomics.store(int32, 0, 123); atomics.notify(int32, 0, 1); specifications specification ecmascript (ecma-262)the definition of 'atomics' in that specification.
Function.prototype.apply() - JavaScript
with apply, you can write a method once, and then inherit it in another object, without having to rewrite the method for the new object.
...and, because push accepts a variable number of arguments, you can also push multiple elements at once.
Set - JavaScript
a value in the set may only occur once; it is unique in the set's collection.
... set.prototype.foreach(callbackfn[, thisarg]) calls callbackfn once for each value present in the set object, in insertion order.
Authoring MathML - MathML
once you are done, you can save your document as a xhtml page.
...once you are done, you can directly save your xhtml page and open it in mozilla.
Mapping the width and height attributes of media container elements to their aspect-ratio - Web media technologies
once such an image loads, if the internal aspect ratio is still applied it will result in the <img> not displaying the image correctly.
... therefore, once the image is loaded, we start using the intrinsic aspect ratio of the loaded image rather than the aspect ratio from the attributes, so it displays at the correct aspect ratio.
Navigation and resource timings - Web Performance
once the user agent stops parsing the document, the user agent sets the document readiness to interactive.
...many of the measurements are similar: there is a dns look up, tcp handshake and the secure connection start is done once per domain.
Optimizing startup performance - Web Performance
don't do one chunk of data after another; do them all at once when possible!
... porting issues once the initial loading is done and the app's main code starts to run, it's possible your app may necessarily be single-threaded,especially if it's a port.
Add to Home screen - Progressive web apps (PWAs)
link the html to the manifest to finish setting up your manifest, you need to reference it from the html of your application's home page: <link rel="manifest" href="manifest.webmanifest"> browsers that support a2hs will know where to look for your manifest once this is in place.
... the click handler contains the following steps: hide the button again with display: none — it is no longer needed once the app is installed.
Progressive loading - Progressive web apps (PWAs)
the problem is that it still loads all the images at once, even though the user will only see the first two or three upon page load.
...and in this article, we've looked into the concept of progressive loading, including an interesting example that makes use of the intersection observer api.
The building blocks of responsive design - Progressive web apps (PWAs)
a solution that works across general web apps, you could use the screen orientation api, and/or provide a message asking the user to rotate their screen if they are using the wrong orientation (for example, if window.innerwidth is larger than window.innerheight, assume the game is landscape mode and show a "please rotate" message.) viewport one last problem to mention for our example app is concerned with mobile browsers and media queries.
...although they are not supported very well on older browsers such as internet explorer 6-8, this is not too much of a concern when you are creating an interface aimed at modern devices, and they also tend to gracefully degrade.
Progressive web apps (PWAs)
most of the features related to a pwa such as geolocation and even service workers are available only once the app has been loaded using https.
...be sure to check out our further documentation if you want to learn more about the concepts behind the service worker api and how to use it in more detail.
<clipPath> - SVG: Scalable Vector Graphics
WebSVGElementclipPath
conceptually, parts of the drawing that lie outside of the region bounded by the clipping path are not drawn.
...*/ @keyframes openyourheart {from {r: 0} to {r: 60px}} #myclip circle { animation: openyourheart 15s infinite; } a clipping path is conceptually equivalent to a custom viewport for the referencing element.
Namespaces crash course - SVG: Scalable Vector Graphics
it is important to understand the concept of namespaces and how they are used if you plan to author svg content.
...note that the namespace declaration only needs to be provided once on a root element.
Using shadow DOM - Web Components
high-level view this article assumes you are already familiar with the concept of the dom (document object model) — a tree-like structure of connected nodes that represents the different elements and strings of text appearing in a markup document (usually an html document in the case of web documents).
...; } img { width: 1.2rem; } .icon:hover + .info, .icon:focus + .info { opacity: 1; }`; attaching the shadow dom to the shadow root the final step is to attach all the created elements to the shadow root: // attach the created elements to the shadow dom shadow.appendchild(style); shadow.appendchild(wrapper); wrapper.appendchild(icon); wrapper.appendchild(info); using our custom element once the class is defined, using the element is as simple as defining it, and putting it on the page, as explained in using custom elements: // define the new element customelements.define('popup-info', popupinfo); <popup-info img="img/alt.png" data-text="your card validation code (cvc) is an extra security feature — it is the last 3 or 4 ...
Introduction to using XPath in JavaScript - XPath
once we have iterated over all of the individual matched nodes, iteratenext() will return null.
...to access the returned nodes, we use the iteratenext() method of the returned object: var thisheading = headings.iteratenext(); var alerttext = 'level 2 headings in this document are:\n' while (thisheading) { alerttext += thisheading.textcontent + '\n'; thisheading = headings.iteratenext(); } once we iterate to a node, we have access to all the standard dom interfaces on that node.
PI Parameters - XSLT: Extensible Stylesheet Language Transformations
overview xslt supports the concept of passing parameters to a stylesheet when executing it.
...all pis in the prolog must be honored, both ones occurring before and onces occurring after any xml-stylesheet pis.
Advanced Example - XSLT: Extensible Stylesheet Language Transformations
the javascript loads the .xsl file only on the first sort and sets the xslloaded variable to true once it has finished loading the file.
... once the transformation is complete, the result is appended to the document, as shown in this example.
JavaScript/XSLT Bindings - XSLT: Extensible Stylesheet Language Transformations
once instantiated, an xsltprocessor has an xsltprocessor.importstylesheet() method that takes as an argument the xslt stylesheet to be used in the transformation.
... // importnode is used to clone the nodes we want to process via xslt - true makes it do a deep clone var mynode = document.getelementbyid("example"); var clonednode = xmlref.importnode(mynode, true); // add the cloned dom into the xml document xmlref.appendchild(clonednode); once the stylesheet has been imported, xsltprocessor has to perform two methods for the actual transformation, namely xsltprocessor.transformtodocument() and xsltprocessor.transformtofragment().
XSLT: Extensible Stylesheet Language Transformations
WebXSLT
xslt & xpath tutorial the topxml xslt tutorial introduces you to the basics of xslt concepts, syntax, and programming.
... this extensive introduction to xslt and xpath assumes no prior knowledge of the technologies and guides the reader through background, context, structure, concepts and introductory terminology.
Index - WebAssembly
we also touched on the concept of multiplicity.
... 12 webassembly concepts c, c++, emscripten, javascript, webassembly, concepts, rust, text format, web platform this article has given you an explanation of what webassembly is, why it is so useful, how it fits into the web, and how you can make use of it.
Compiling from Rust to WebAssembly - WebAssembly
producing rust functions that javascript can call the final part is this one: #[wasm_bindgen] pub fn greet(name: &str) { alert(&format!("hello, {}!", name)); } once again, we see the #[wasm_bindgen] attribute.
...once it's loaded, it calls the greet function from that module, passing "webassembly" as a string.
WebAssembly
guides webassembly concepts get started by reading the high-level concepts behind webassembly — what it is, why it is so useful, how it fits into the web platform (and beyond), and how to use it.
... using the webassembly javascript api once you've loaded a .wasm module, you'll want to use it.
Communicating With Other Scripts - Archive of obsolete content
content scripts that have been loaded into the same document by different methods, or the same method called more than once, can pass messages directly to each other using the dom postmessage() api or a customevent.
self - Archive of obsolete content
once() exactly like on(), but stop listening after the first message is received.
Content Processes - Archive of obsolete content
the method once is a helper function which adds a listener for an event, and automatically removes it the first time it is called.
context-menu - Archive of obsolete content
rather, create your item only once and supply a context that matches the target url.
hotkeys - Archive of obsolete content
once destroyed a hotkey can no longer be used.
simple-prefs - Archive of obsolete content
they are also triggered once during add-on initialization.
ui - Archive of obsolete content
once you've created a frame you need to add it to a toolbar.
core/heritage - Archive of obsolete content
ruff!' }; // subclassing a `dog` function pet(name, breed) { // once again we do our little dance if (!(this instanceof pet)) return new pet(name, breed); dog.call(this, name); this.breed = breed; } // to subclass, you need to make another special dance with special // 'prototype' properties.
dev/panel - Archive of obsolete content
optional once you've defined the panel's constructor you have to export it so it can be called by the framework.
preferences/event-target - Archive of obsolete content
example var { prefstarget } = require("sdk/preferences/event-target"); // listen to the same branch which reqire("sdk/simple-prefs") does var target = prefstarget({ branchname: "extensions." + require("sdk/self").preferencesbranch + "." }); target.once("test", function(prefname) { console.log(prefname) // logs "test" console.log(target.prefs[name]) // logs true }); target.once("", function() { console.log(prefname) // logs "test" console.log(target.prefs[name]) // logs true }) // changing a pref which our target listens to require("sdk/simple-prefs").prefs.test = true; ...
remote/parent - Archive of obsolete content
; }); // main.js const { processes, remoterequire } = require("sdk/remote/parent"); // load "remote.js" into every current and future process remoterequire("./remote.js", module); // for every current and future process processes.forevery(process => { // ask for the process id process.port.emit("fetchid"); // first argument is always the process, then the message payload process.port.once("id", (process, id) => { console.log("child process is remote:" + process.isremote); console.log("child process id:" + id); }); }); content frame manipulation this demonstrates telling every current frame to link to a specific anchor element: // remote.js const { frames } = require("sdk/remote/child"); // listeners receive the frame the event was for as the first argument frames.por...
system/events - Archive of obsolete content
once(type, listener, strong) listen only once to a particular event type parameters type : string the event type name to watch.
system/unload - Archive of obsolete content
globals functions ensure(object, name) calling ensure() on an object does two things: it replaces a destructor method with a wrapper method that will never call the destructor more than once.
test/utils - Archive of obsolete content
returns promise : waituntil returns a promise that becomes resolved once the predicate returns a truthy value.
cfx - Archive of obsolete content
once you have built an xpi file you can distribute your add-on by submitting it to addons.mozilla.org.
cfx to jpm - Archive of obsolete content
once it's installed, you can just use it.
Add a Context Menu Item - Archive of obsolete content
you don't need to add it: once you have constructed the item, it is automatically added in the correct context.
Chrome Authority - Archive of obsolete content
if the scanner fails to see a require entry, the manifest will not include that entry, and (once the implementation is complete) the runtime code will get an exception.
Creating Reusable Modules - Archive of obsolete content
once you've done this, you can package the modules and distribute them independently of your add-on, making them available to other add-on developers and effectively extending the sdk itself.
Getting started (cfx) - Archive of obsolete content
once you've done that, you'll be looking at a command prompt.
Listening for Load and Unload - Archive of obsolete content
exports.onunload = function (reason) {}; reason reason is one of the following strings describing the reason your add-on was unloaded: uninstall disable shutdown upgrade downgrade if your add-on is disabled, then uninstalled, your onunload listener will only be called once, with the disable reason.
Localization - Archive of obsolete content
once you've installed it, open the add-on manager, and you'll see a new button labeled "update l10n" next to each add-on you've installed: click the button and you'll be prompted for a new .properties file for that add-on.
Canvas code snippets - Archive of obsolete content
once the remote page has loaded, the remotepageloaded method fires.
Customizing the download progress bar - Archive of obsolete content
once again, a height of 12 pixels or so and a few pixels wide seems about right, though you might have to experiment with this a bit.
Dialogs and Prompts - Archive of obsolete content
xt/content/mydialog.js"/> <grid> <columns><column/><column/></columns> <rows> <row align="center"><label value="name:"/><textbox id="name"/></row> <row align="center"><label value="description:"/><textbox id="description"/></row> <row align="center"><spacer/><checkbox id="enabled" label="check to enable"/></row> </rows> </grid> </dialog> mydialog.js: // called once when the dialog displays function onload() { // use the arguments passed to us by the caller document.getelementbyid("name").value = window.arguments[0].inn.name; document.getelementbyid("description").value = window.arguments[0].inn.description; document.getelementbyid("enabled").checked = window.arguments[0].inn.enabled; } // called once if and only if the user clicks ok function onok(...
Finding window handles - Archive of obsolete content
once you have a docshell, queryinterface it into nsibasewindow, call getmainwidget on result, and then call getnativedata(ns_native_window).
JavaScript Debugger Service - Archive of obsolete content
destroyed: function(script) { // your function here } }; jsd.errorhook = { onerror: function(message, filename, lineno, colno, flags, errnum, exc) { // your function here } }; // triggered when jsd.errorhook[onerror] returns false jsd.debughook = { onexecute: function(frame, type, rv) { // your function here } }; jsd.enumeratescripts({ // the enumeratescript method will be called once for every script jsd knows about enumeratescript: function(script) { // your function here } }); a simple stack trace here, we will show how to implement a simple javascript stack trace using the jsd.
Modules - Archive of obsolete content
the use of eval() will probably not be of concern because it is only being used on the exported_symbols array which should not depend on user input.
Preferences - Archive of obsolete content
however, there is a concept of complex types, which makes it easier for developers to save and load nsilocalfile and nsisupportsstring objects in preferences (as strings — note that from the preferences system's point of view, complex values have a nsiprefbranch.pref_string type.) there are two nsiprefbranch methods implementing the concept — setcomplexvalue() and getcomplexvalue().
JavaScript Daemons Management - Archive of obsolete content
init optional the function which will be synchronously invoked once during the creation of the daemon and then assigned to the onstop property.
JavaScript timers - Archive of obsolete content
but there are some javascript native functions (timers) which allow us to delay the execution of arbitrary instructions: settimeout() setinterval() setimmediate() requestanimationframe() the settimeout() function is commonly used if you wish to have your function called once after the specified delay.
Toolbar - Archive of obsolete content
notes insert your button by default only once, at first run, or when an extension update adds a new button.
xml:base support in old browsers - Archive of obsolete content
t.match(/\/$/)) { // if no trailing slash, add one, since it is being attached to a relative path att += '/'; } xmlbase = att + xmlbase; // if previous path was not absolute, resolve against the full uri here' break; } else if (att.indexof('/') === 0) { // if absolute (/), need to prepare for next time to strip out after slash xmlbase = att + xmlbase; abs = true; // once the protocol is found on the next round, make sure any extra path is ignored } else { // if relative, just add it xmlbase = att + xmlbase; } } thisitem = thisitem.parentnode; } //return (xmlbase === '') ?
Deploying a Plugin as an Extension - Archive of obsolete content
the downside to this method is that once the plugin is installed, it might be difficult for users to upgrade, uninstall, or disable the plugin.
Downloading JSON and JavaScript in extensions - Archive of obsolete content
once the content has been downloaded, the extension authors proceed to use eval() to decode the string content into javascript objects.
Extension Versioning, Update and Compatibility - Archive of obsolete content
the technical details of the signing mechanism are beyond the scope of this document however the basics are as follows: step 1 - done once, before you publish your add-on the target: adding updatekey in install.rdf the add-on author creates a public/private rsa cryptographic key pair.
Inline options - Archive of obsolete content
so like for the type="file", once a user browses and picks a file, when it updates the label it will trigger the oninputchanged attribute.
Interaction between privileged and non-privileged pages - Archive of obsolete content
you can optionally clean up the created element, or create it once when the web page loads then re-use it each time.
Listening to events in Firefox extensions - Archive of obsolete content
once the page is loaded, the onload handler fires.
Appendix B: Install and Uninstall Scripts - Archive of obsolete content
window.addeventlistener( "load", function() { xulschoolchrome.browseroverlay.init(); }, false); then all we need is some persistent flag that ensures that the first run code is only run once.
Appendix F: Monitoring DOM changes - Archive of obsolete content
as it is currently possible to attach only a single binding to a given dom node at once, it is important when using this method to detach your binding from a node once your constructor has run.
Custom XUL Elements with XBL - Archive of obsolete content
this somewhat cryptic explanation describes a very simple concept: with xbl you can create your own custom elements.
Handling Preferences - Archive of obsolete content
in most cases, your preferences window will have a few options that can be displayed all at once.
JavaScript Object Management - Archive of obsolete content
once you have this working right, try the following: open the message a few times, so that the number increments.
Mozilla Documentation Roadmap - Archive of obsolete content
if you find it lacking or missing some piece of information, please consider adding it once you've found it.
Observer Notifications - Archive of obsolete content
also, be careful not to add the same observer to a notification topic more than once, otherwise the same code in the observer will be run several times when a notification is sent.
The Box Model - Archive of obsolete content
once you grasp this simple idea, you'll be able to use the dom inspector and css to mold xul elements and layouts with great precision and flexibility.
XUL School Tutorial - Archive of obsolete content
it is recommended that you read through all of it at least once.
Signing an XPI - Archive of obsolete content
don't forget to delete the certificate from mozilla firefox once you've finished testing firefox 1.5: from the tools menu choose options->advanced->security->view certificates->authorities firefox 1.0: from the tools menu choose options->advanced->certificates->manage certificates->authorities press the import button.
Supporting search suggestions in search plugins - Archive of obsolete content
once the list has been retrieved, it's displayed in a popup box that appears under the search bar, which lets the user select a suggested search term.
Using the Stylesheet Service - Archive of obsolete content
if you don't check, you will wind up adding your sheet once per window load.
An Interview With Douglas Bowman of Wired News - Archive of obsolete content
wired news is also dramatically more accessible, without much concentrated effort at making it so.
Creating reusable content with CSS and XBL - Archive of obsolete content
another structural limitation concerns content.
Case Sensitivity in class and id Names - Archive of obsolete content
as far as netscape 6 is concerned, warning and warning are two different identifiers, because html 4.01 defines class and id names to be case-sensitive.
JXON - Archive of obsolete content
we chose to ignore nodes which have a prefix (for example: <ding:dong>binnen</ding:dong>), due to their special case (they are often used in order to represents an xml schema, which is meta-information concerning how to organize the information of the document, reserved for the xml parser).
Defining Cross-Browser Tooltips - Archive of obsolete content
unlike the title element, which provides information about an entire document and may only appear once, the title attribute may annotate any number of elements.
Source code directories overview - Archive of obsolete content
earthlink and concentric networks).
Using content preferences - Archive of obsolete content
firefox 3 introduces the concept of content preferences.
Making a Mozilla installation modifiable - Archive of obsolete content
instead, you only have to extract them once and can then make as many modifications as you like.
Making it into a dynamic overlay and packaging it up for distribution - Archive of obsolete content
aller directory: initinstall( "mozilla tinderstatus extension", "/mozdev/tinderstatus", "0.1"); var installdir = getfolder("chrome","tinderstatus"); setpackagefolder(installdir); adddirectory("tinderstatus"); registerchrome( content | delayed_chrome, getfolder(installdir, "content")); var result = performinstall(); if ( result != success ) cancelinstall(result); once all the files are in place, use your zip utility from within the tinderstatus-installer directory to create a zip archive called tinderstatus.xpi with install.js and the entire contents of the tinderstatus/ directory.
Creating a Microsummary - Archive of obsolete content
but for the purposes of generating a microsummary for the spread firefox page, we only need to use a single <template> element that matches the root node of the document and is processed once: <?xml version="1.0" encoding="utf-8"?> <generator xmlns="http://www.mozilla.org/microsummaries/0.1" name="firefox download count"> <template> <transform xmlns="http://www.w3.org/1999/xsl/transform" version="1.0"> <output method="text"/> <template match="/"> </template> </transform> </template> </generator> including the download count to include the d...
Developing New Mozilla Features - Archive of obsolete content
once you’re familiar with an area, do the completely unexpected and write a piece of documentation.
Editor Embedding Guide - Archive of obsolete content
-saari writing once you have created an nsicommandparams you call the "set" methods.
Embedding Mozilla in a Java Application using JavaXPCOM - Archive of obsolete content
once the java application is done using mozilla, it needs to terminate the embedding process: try { mozilla.termembedding(); } catch (xpcomexception e) { // this exception is thrown if termembedding failed } working with xpcom objects now that mozilla is embedded, the java application can work with xpcom objects.
Block and Line Layout Cheat Sheet - Archive of obsolete content
it may be set as a side-effect of calling nsblockframe::shouldapplytopmargin(); once set, shouldapplytopmargin() uses it as a fast-path way to return whether the top margin should apply.
Using microformats - Archive of obsolete content
to use the api, you need to first load the object: components.utils.import("resource://gre/modules/microformats.js"); once you've loaded the microformats api, you can manage microformats using the methods listed here; for information about parsing microformats, see parsing microformats in javascript.
Firefox Sync - Archive of obsolete content
specifications there are numerous specifications concerning sync.
Helper Apps (and a bit of Save As) - Archive of obsolete content
helper app dialog this is our implementation of nsihelperapplauncherdialog it calls back to the nsexternalapphandler to let it know what the user picked saving to disk if a user decides to "save to disk", we just move/copy the temporary file over to the chosen location once the download completes.
Menu - Archive of obsolete content
ArchiveMozillaJetpackUIMenu
features can use these methods to modify all the menus in a set at once.
Measuring add-on startup performance - Archive of obsolete content
once installed, it will gather startup data and display it in the about:startup page.
Microsummary XML grammar reference - Archive of obsolete content
notes: regardless of the absolute or conditional update interval specified by this element, firefox will never update microsummaries more frequently than once per minute; because firefox checks for expired microsummaries every 15 seconds, it is possible for a microsummary update to begin up to 15 seconds later than its interval indicates; firefox respects the browser cache when updating microsummaries, so it will not reload a page to update its microsummary if the cache contains a fresh copy of the page.
Microsummary topics - Archive of obsolete content
thus if your cache headers tell firefox not to refresh a page on your site more than once per hour, and the user reloads the page within that time period, the user will see the cached version of your page, which may not be what you want.
Monitoring downloads - Archive of obsolete content
handling download state changes once the code above is run, our ondownloadstatechange() method is called whenever a download's state changes.
Nanojit - Archive of obsolete content
once the instructions are in the lirbuffer, the application calls nanojit::compile() to produce machine code, which is stored in a nanojit::fragment.
Plugin Architecture - Archive of obsolete content
note that while nsobjectloadingcontent also deals with images and documents, this document concentrates on plugins.
Build - Archive of obsolete content
the contents of the file should look something like this : mk_add_options moz_co_project=xulrunner mk_add_options moz_objdir=@topsrcdir@/mozilla-obj ac_add_options --enable-application=xulrunner ac_add_options --disable-debug ac_add_options --enable-optimize ac_add_options --disable-tests ac_add_options --disable-javaxpcom build xulrunner : make -f client.mk build once the build is done, there will be a directory called mozilla-obj.
BundleLibrary - Archive of obsolete content
not the cleanest, but it got all my plugins at once) istylr: istylr.webapp online web design tool (full win installer bundled with prism is available here - thanks to lars eric for his nsis script) meebo: meebo.webapp miro guide: miroguide.webapp motor0: motor0.webapp useful webapp on maintenance and fuel consumptions managment pandora: pandora@prism.app.webapp internet radio that only plays music you like.
Configuration - Archive of obsolete content
once the webapp is installed, it can be launched using -webapp [webapp-id] and prism will skip the installation and run the webapp directly.
Prism - Archive of obsolete content
prism is based on a concept called site-specific browsers (ssb).
Priority Content - Archive of obsolete content
already completed migrations are listed here, and the full list will be transferred on this page once all articles are migrated.
Hacking wiki - Archive of obsolete content
once you're done with the configuration script, copy the <tt>config/localsettings.php</tt> file it created to the parent directory and navigate to the location you installed mediawiki to.
PyDOM - Archive of obsolete content
once you set the script type for a node, it is the default for that node and all children.
Remote XUL - Archive of obsolete content
note: support for remote xul has long been a potential security concern; support for it was disabled in gecko 2.0.
Frequently Asked Questions - Archive of obsolete content
other than reviewing patches and fixing the occassional bug, alex is currently taking a break from active svg development to concentrate on 'real work' and cool stuff like xtf and jssh.
Same origin policy for XBL - Archive of obsolete content
checks performed once the originating principal is determined, checks are done to make sure the load should be allowed.
Space Manager High Level Design - Archive of obsolete content
the space manager works in concert with several other classes to do its job.
Table Cellmap - Archive of obsolete content
this can produce enormous costs once the cellmap contains large holes that are not caused by zero spans, this is at least a o2(n) algorithm.
Table Layout Regression Tests - Archive of obsolete content
adding new regression tests once you have checked in the code: please add your testcase for the bug to the regression tests.
Tamarin mercurial commit hook - Archive of obsolete content
installing the commit hook the easiest way to implement the hook is to sync to the tip of tamarin-redux then add the following to your tamarin-redux/.hg/hgrc file (or to ~/.hgrc to implement for all local repos): [hooks] pretxncommit.commit = python:/path/to/tamarin-redux/utils/hooks/tamarin-commit-hook.py:master_hook once added, all commits will run the commit hook.
Treehydra Manual - Archive of obsolete content
conceptually, this is an object used in the analysis that represents a set of concrete states.
Venkman Internals - Archive of obsolete content
scriptmanager sometimes the same url is loaded more than once in the browser.
Using Breakpoints in Venkman - Archive of obsolete content
once you've created a script that will be executed when the associated breakpoint is hit, you can select a number of different options from the future breakpoint properties dialog that determine how venkman will deal with the output of the associated script.
XBL 1.0 Reference - Archive of obsolete content
one element can be bound to several bindings at once.
Unix stub installer - Archive of obsolete content
you can step into the xpinstall engine through the xpistub once the xpistub dll is loaded.
Install.addDirectory - Archive of obsolete content
install.adddirectory the install object's adddirectory method queues an entire directory for installation once performinstall is called.
Windows Install - Archive of obsolete content
winreg.setrootkey(winreg.hkey_current_user) ;// current_user subkey = "software\\microsoft\\windows\\currentversion\\runonce" ; winreg.createkey(subkey,""); valname = "ren8dot3"; value = fprogram + "ren8dot3.exe " + ftemp + "ren8dot3.ini"; err = winreg.setvaluestring(subkey, valname, value); } } function prepareren8dot3(listlongfilepaths) { var ftemp = getfolder("temporary"); var fprogram = getfolder("program"); var fren8dot3ini = getwinprofile(ftemp, "ren8dot3.ini"); var binic...
getWinProfile - Archive of obsolete content
once you have this object, you can call its methods to retrieve strings from the file or to add strings to the file.
getWinRegistry - Archive of obsolete content
once you have this object, you can call its methods to retrieve or change the registry's content.
setPackageFolder - Archive of obsolete content
you should only call this method once, and you should always call it immediately after you call initinstall.
button.type - Archive of obsolete content
only one button in the group can be on a once.
flex - Archive of obsolete content
ArchiveMozillaXULAttributeflex
once the default sizes of elements in a box are calculated, the remaining space in the box is divided among the flexible elements, according to their flex ratios.
fullscreenbutton - Archive of obsolete content
the window receives a "fullscreen" event once the change has been made.
menuitem.type - Archive of obsolete content
only one menuitem in the same radio group can be checked at once.
pending - Archive of obsolete content
once the tab is restored, this attribute is removed.
seltype - Archive of obsolete content
(default in listbox and richlistbox.) multiple multiple rows may be selected at once.
textbox.onblur - Archive of obsolete content
from gecko 1.9 to gecko 12.0 (firefox 12.0 / thunderbird 12.0 / seamonkey 2.9), the script code would actually execute twice, once in the context of the anonymous html <input> element and once in the context of the <textbox> element itself.
textbox.onfocus - Archive of obsolete content
from gecko 1.9 to gecko 12.0 (firefox 12.0 / thunderbird 12.0 / seamonkey 2.9), the script code would actually execute twice, once in the context of the anonymous html <input> element and once in the context of the <textbox> element itself.
uri - Archive of obsolete content
ArchiveMozillaXULAttributeuri
elements outside will appear only once.
visuallyselected - Archive of obsolete content
the visuallyselected attribute is set asynchronously, once the browser has switched to the selected tab.
XUL Events - Archive of obsolete content
once an element has the focus, keyboard events are sent to it.
Accessing Files - Archive of obsolete content
once one of these starting directories is determined, a file reference may be created relative to this.
Reading from Files - Archive of obsolete content
once the stream has been opened, you can read from the file using various reading methods.
Writing to Files - Archive of obsolete content
once opened, you can write to the file using various writing methods.
Namespaces - Archive of obsolete content
it holds and allows disambiguation of items having the same name." if you are familiar with c++ namespaces, java packages, perl packages, or python module importing, you are already familiar with the namespace concept.
MenuItems - Archive of obsolete content
this is an advantage when attaching several menuitems or buttons to the same command, as the disabled state can be adjusted once for the command, and this will propagate to all elements attached to it.
MenuModification - Archive of obsolete content
another possibility is to ensure that the menu is only added once.
Menus - Archive of obsolete content
this is useful when you wish to have several elements performing the same action, for example a menuitem on a menubar, a context menu, and a toolbar button, because you can place the code to execute only once on the command and hook each element up to the command.
MoveResize - Archive of obsolete content
moving a popup once a popup is open, it can be moved using the popup's moveto method.
Special per-platform menu considerations - Archive of obsolete content
notes for firefox extension developers on the mac, some elements, once moved to the application menu, are no longer accessible from xul overlays or from javascript injected into browser.xul.
Introduction - Archive of obsolete content
once some data starts arriving, the template builder scans its information to see if some results can be created.
Multiple Queries - Archive of obsolete content
so the builder only performs this step once and filters the data for each query.
Namespaces - Archive of obsolete content
="female"/> <person name="julius caesar" gender="male"/> <person name="ferdinand magellan" gender="male"/> <person name="laura secord" gender="female"/> </people> <listbox datasources="people.xml" ref="*" querytype="xml"> <template xmlns:ns="www.example.com/people"> <query expr="ns:person"/> <action> <listitem uri="?" label="?ns:name"/> </action> </template> </listbox> once added to the template element the namespaces can then be referenced inside temple rule elements too, this works both in rdf and xml templates.
RDF Query Syntax - Archive of obsolete content
once the variables are filled in, the builder can query the rdf graph.
SQLite Templates - Archive of obsolete content
here, this is used two times, once to display the name and the second to display the email.
Static Content - Archive of obsolete content
this element doesn't have a uri attribute, so the builder knows that this element should only be created once.
Template Logging - Archive of obsolete content
for example: if (root.builder.datasource instanceof xmldocument) alert("xml datasource loaded ok"); be careful, as the datasource will only be set once the document has finished loading and has been parsed, so don't check this property too early.
The Joy of XUL - Archive of obsolete content
since xul provides an abstraction of user interface components, it delivers on the promise of write-once, run-anywhere.
Creating toolbar buttons (Customize Toolbar Window) - Archive of obsolete content
the advantage to adding the toolbar button to the palette rather than creating an element and then appendchild to the toolbar (document.getelementbyid('nav-bar')) or appendchild to the addon bar (document.getelementbyid('addon-bar')) is that once in the toolbar palette, users can configure it through the customize menu.
Tree Widget Changes - Archive of obsolete content
to get a column in javascript: tree.columns.getcolumnfor(treecolelement); tree.columns.getnamedcolumn(treecolid); tree.columns.getcolumnat(index); you can also just use array syntax to get a column: tree.columns["lastname"]; tree.columns[5]; once you have a column, you can get various properties of it: column.index - the index of the column in displayed order column.id - the id attribute of the column column.element - the treecol element column.x - the x position in the tree of the left edge of the column column.width - the width of the column in c++ code, you can also get the atom attribute of nsitreecolumn which returns an nsia...
Accesskey display rules - Archive of obsolete content
because macos x doesn't have the conception of accesskey function on its native widgets/applications.
Adding Event Handlers - Archive of obsolete content
once the event has finished propagating, any default action will occur, which is the built in behaviour of the element.
Adding HTML Elements - Archive of obsolete content
(there are some reasons, and the main one concerns the control of the layout described later).
Advanced Rules - Archive of obsolete content
the first is the content element, which should always exist once and only once.
Broadcasters and Observers - Archive of obsolete content
we saw something like this in a previous section where the disabled attribute was adjusted once and propagated to other elements.
Creating a Wizard - Archive of obsolete content
handling page changes you will generally want to do something once the finish button is pressed.
Creating an Installer - Archive of obsolete content
once the script is complete, the new package has been installed.
Cross Package Overlays - Archive of obsolete content
once you have created an overlay, you can add it to the contents.rdf file.
Custom Tree Views - Archive of obsolete content
settree( tree ) this method is called once to set the tree element on the view.
Introduction - Archive of obsolete content
once you are familiar with xul, you can use the xul reference to find out about other features supported by specific elements.
Keyboard Shortcuts - Archive of obsolete content
once the file menu is open, the close menu item can be selected by pressing c.
Localization - Archive of obsolete content
once you have created a dtd file for your xul, you will need to add a line to the xul file which indicates that you want to use the dtd file.
More Menu Features - Archive of obsolete content
a radio check is used when you want a group of menu items where only one item can be checked at once.
More Tree Features - Archive of obsolete content
thus, once the user has decided on a column layout they like, it will automatically be saved for next time.
Open and Save Dialogs - Archive of obsolete content
once the user selects a file or folder, it can be read from or written to.
Progress Meters - Archive of obsolete content
the progress meter will fill up and, once full, the operation should be finished.
Scrolling Menus - Archive of obsolete content
creating a large menu you might wonder what happens if you create a menu with a lot of commands on it, such that all the items won't fit on the screen at once.
Skinning XUL Files by Hand - Archive of obsolete content
once you get the hang of things, though, you will find creating xul files and skins as easy as creating basic web pages in html.
Styling a Tree - Archive of obsolete content
however, css has a concept to access parts of elements considering them to be pseudo-elements.
Tabboxes - Archive of obsolete content
the difference is that the tabs render slightly differently and only one tab panel's contents are visible at once, much like a deck.
Updating Commands - Archive of obsolete content
if you have several commands to update, call the goupdatecommand method once for each command.
Using Spacers - Archive of obsolete content
once the default sizes of the children of a box are determined, the flexibility values are used to divide up the remaining empty space in the box.
Using Remote XUL - Archive of obsolete content
introduction note: support for remote xul has long been a potential security concern; support for it was disabled in gecko 2.0.
Using the Editor from XUL - Archive of obsolete content
the path of a key press so what happens to a key press once it's got to the nstexteditorkeylistener?
XUL Template Primer - Bindings - Archive of obsolete content
(see the nsirdfdatasource interface for more details.) in our example, the <rule> will be instantiated three times: once each for alison, jack, and lumpy.
XUL accessibility tool - Archive of obsolete content
once the tool window has loaded, select either a local file, web url, or currently open window from the file menu to generate a xul report for that document.
button - Archive of obsolete content
only one button in the group can be on a once.
editor - Archive of obsolete content
to made the editor editable by setting the designmode property of the loaded html document: <script language="javascript"> function initeditor(){ // this function is called to set up the editor var editor = document.getelementbyid("myeditor"); editor.contentdocument.designmode = 'on'; } </script> <editor id="myeditor" editortype="html" src="about:blank" flex="1" type="content-primary"/> once editable, the document can have special formatting and other html pieces added to it using the document.execcommand method: var editor = document.getelementbyid("myeditor"); // toggle bold for the current selection editor.contentdocument.execcommand("bold", false, null); see the midas overview for more command strings.
listbox - Archive of obsolete content
(default in listbox and richlistbox.) multiple multiple rows may be selected at once.
menuitem - Archive of obsolete content
only one menuitem in the same radio group can be checked at once.
richlistbox - Archive of obsolete content
(default in listbox and richlistbox.) multiple multiple rows may be selected at once.
stack - Archive of obsolete content
ArchiveMozillaXULstack
all elements are displayed at once.
tab - Archive of obsolete content
ArchiveMozillaXULtab
once the tab is restored, this attribute is removed.
toolbaritem - Archive of obsolete content
it is also used to group buttons together so they can be added and removed all at once like firefox's unified-back-forward-button.
tree - Archive of obsolete content
ArchiveMozillaXULtree
(default in listbox and richlistbox.) multiple multiple rows may be selected at once.
treeitem - Archive of obsolete content
elements outside will appear only once.
window - Archive of obsolete content
the window receives a "fullscreen" event once the change has been made.
Components - Archive of obsolete content
adding components to xulrunner is simple once you understand how xulrunner registers and saves the components.
Creating a Windows Inno Setup installer for XULRunner applications - Archive of obsolete content
explorer}; filename: {uninstallexe} name: {userdesktop}\my app; filename: {app}\myapp.exe; tasks: desktopicon name: {userappdata}\microsoft\internet explorer\quick launch\my app; filename: {app}\myapp.exe; tasks: quicklaunchicon [run] filename: {app}\myapp.exe; description: {cm:launchprogram,my app}; onlybelowversion: 0,6; flags: nowait postinstall skipifsilent step 4: building an installer once your script is ready, start the inno setup compiler, load the script file, and compile it.
XULRunner FAQ - Archive of obsolete content
this page is intended to answer frequently asked questions and correct common misconceptions about xulrunner.
XULRunner Hall of Fame - Archive of obsolete content
source yoono desktop win/mac application to get all your friend updates, update your status and share stuff easily across facebook, myspace, twitter, and more - all at once!
XULRunner - Archive of obsolete content
xul tutorial once you have a working xulrunner application, use the xul tutorial to expand it into a fantastic xul application.
calICalendarView - Archive of obsolete content
note: this will likely change to selecteditems and return an array of caliitembases in order to support selecting multiple items at once.
nsIContentPolicy - Archive of obsolete content
shouldprocess() will be called once all the information passed to it has been determined about the resource, typically after part of the resource has been loaded.
Gecko Compatibility Handbook - Archive of obsolete content
once you filled the dialog box (it should look like the screenshot below), click ok and close theoptions dialog.
Mozilla release FAQ - Archive of obsolete content
much of the old code cannot be released due to legal concerns, and at the time of mozilla's initial release, that code was removed from the tree.
2006-11-10 - Archive of obsolete content
the article goes into the history of accessibility in firefox, details ibm's involvement and addresses some ajax accessibility concerns.
2006-10-06 - Archive of obsolete content
cédric corazza recommends that the proposed documention should be made available on the l10n cvs once it reaches a decent stage so that localizers can get a head-start on the localization before the final version is made available.
2006-10-27 - Archive of obsolete content
discussions effect of eudora/thunderbird re-write joes is voicing a concern about the recent announcement regarding the eudora/thunderbird rewrite: "is thunderbird destined to become a hybrid of the existing code and eudora?".
2006-10-06 - Archive of obsolete content
once completed you will need to build cairo gfx in order to build svg.
2006-11-24 - Archive of obsolete content
he stated that the goal here is that once the tests are set up we can do a gecko 1.8 baseline so that we know what our performance goals for gecko 1.9 are.
2006-10-20 - Archive of obsolete content
nickolay ponomarev, benjamin smedberg, axel hecht clarify some misconceptions about front-end and back-end programming with xulrunner, including the difficulty of writing the backends in c++ (since that would require a recompilation on every platform frank wanted to support).
2006-10-20 - Archive of obsolete content
there are a few concerns with the software updates, and a decision is required on this before a "go" for rc3 release can be given.
2006-11-10 - Archive of obsolete content
the idea of using a single sheet and the per-site selectors that dbaron implemented would allow for a quick proof of concept.
2006-11-24 - Archive of obsolete content
treating calendars as tags discussions concerning about the layout of calendar list in lightning/sunbird.
External resources for plugin creation - Archive of obsolete content
nixysa was originally conceived for the needs of o3d, but is flexible enough to support a wide range of use cases.
NPN_ForceRedraw - Archive of obsolete content
description once a region of a windowless plugin has been invalidated with npn_invalidaterect() or npn_invalidateregion(), a plug-in can call npn_forceredraw() to force a paint message.
NPN_GetURLNotify - Archive of obsolete content
this is the only way to notify the plug-in once it is deleted.
NPN_PluginThreadAsyncCall - Archive of obsolete content
userdata pointer to the data to pass to the function func once called.
NPN_PostURLNotify - Archive of obsolete content
this is the only way to notify the plug-in once it is deleted.
NPN_ReloadPlugins - Archive of obsolete content
if true, all pages are reloaded once the plugins are reloaded; otherwise, they aren't.
NPN_UTF8FromIdentifier - Archive of obsolete content
description once the caller is done with the returned string, the caller is responsible for deallocating the memory used by the string by calling npn_memfree().
NPN_Version - Archive of obsolete content
once the plug-in obtains a version number, it can inquire on a version constant to find out if the feature it represents exists in this version.
NPP_NewStream - Archive of obsolete content
note: in any mode other than np_seek, the application should call npp_destroystream once all data in the stream has been written to the plug-in.
NPP_WriteReady - Archive of obsolete content
if the plug-in is allocating memory for the entire stream at once (an as_file stream), it can return a very large number.
NP_Initialize - Archive of obsolete content
description the browser calls this function only once: when a plug-in is loaded, before the first instance is created.
NP_Shutdown - Archive of obsolete content
syntax #include <npapi.h> void np_shutdown(void); windows #include <npapi.h> void winapi np_shutdown(void); description the browser calls this function once after the last instance of your plug-in is destroyed, before unloading the plug-in library itself.
Shipping a plugin as a Toolkit bundle - Archive of obsolete content
the downside to this method is that once the plugin is installed, it might be difficult for users to upgrade, uninstall, or disable the plugin.
Confidentiality, Integrity, and Availability - Archive of obsolete content
once the secret has been revealed, there's no way to un-reveal it.
Digital Signatures - Archive of obsolete content
once you have signed some data, it is difficult to deny doing so later, assuming that the private key has not been compromised or out of the owner's control.
TCP/IP Security - Archive of obsolete content
because they can provide protection for many applications at once without modifying them, network layer security controls have been used frequently for securing communications, particularly over shared networks such as the internet.
Vulnerabilities - Archive of obsolete content
setting this to 1 would be the most secure setting against password guessing attacks, but it would also cause legitimate users to be locked out after mistyping a password once, and it would also permit attackers to perform denial-of-service attacks against users more easily by generating a single failed login attempt for each user account.
Security - Archive of obsolete content
this document introduces the basic concepts of public-key cryptography.
Sunbird Theme Tutorial - Archive of obsolete content
you might prefer to do some design work in an image editor first, so that you have a clear design concept to implement.
Common Firefox theme issues and solutions - Archive of obsolete content
once the offending rule is found, it should be deleted and manual styling used.
Using IO Timeout And Interrupt On NT - Archive of obsolete content
once there is a timeout or interrupt error, the file descriptor is no longer usable.
Developing cross-browser and cross-platform pages - Archive of obsolete content
once "detected", the web author then uses different functions (aka code branching) or points the user to different pages (aka site branching) or web content.
Using workers in extensions - Archive of obsolete content
this provides a way for the main thread to specifically request that the worker update the stock information at once.
-ms-text-autospace - Archive of obsolete content
an ideograph is a character in an asian writing system that represents a concept or an idea, but not a particular word or pronunciation.
Displaying notifications (deprecated) - Archive of obsolete content
hese events fire: notification.onclick = function() { var e = document.createelement("p"); e.innerhtml = "<strong>the notification was clicked.</strong>"; document.body.appendchild(e); }; notification.onclose = function() { var e = document.createelement("p"); e.innerhtml = "<strong>the notification was closed.</strong>"; document.body.appendchild(e); }; displaying the notification once the notification is configured the way you want it to be, call its show() method to display the notification: notification.show(); on android, for example, the resulting notification panel looks like this: when the user taps on the "hey, check this out!" notification here, the resulting changes to the document look like this: if you're using firefox mobile, you can see this example live ...
Processing XML with E4X - Archive of obsolete content
while one can interpolate attribute names as well as attribute values: var a = 'att'; var b = <b {a}='value'/>; alert(b); // gives: <b att="value"/> ...one cannot interpolate a whole expression at once (e.g., <b {a}>.) after executing the above example, the variable languages references an xml object corresponding to the <languages> node in the xml document.
Generator comprehensions - Archive of obsolete content
e second value from it, doubled when a generator comprehension is used as the argument to a function, the parentheses used for the function call means that the outer parentheses can be omitted: var result = dosomething(for (i in it) i * 2); the significant difference between the two examples being that by using the generator comprehension, you would only have to loop over the 'obj' structure once, total, as opposed to once when comprehending the array, and again when iterating through it.
ActiveXObject - Archive of obsolete content
once an object is created, you refer to it in code using the object variable you defined.
GetObject - Archive of obsolete content
once an object is activated, you reference it in code using the object variable you defined.
Old Proxy API - Archive of obsolete content
this is analogous to the concept of traps in operating systems.
Styling the Amazing Netscape Fish Cam Page - Archive of obsolete content
here's what one of those bits looks like once all the css has been applied.
forEach - Archive of obsolete content
feel free to alter the text as english is not my mother tongue and i'm more concerned with the code quality that the english grammar ;-s dotnetcarpenter 30 june 2012 <hr> the compatibility section goes to extraordinary lengths in providing a foreach implementation.
Writing JavaScript for XHTML - Archive of obsolete content
just write an ordinary (x)html file and save it once as test.html and once as test.xhtml.
Fixing Incorrectly Sized List Item Markers - Archive of obsolete content
authors who are not concerned with making sure the rule applies across all namespaces can use a slightly more simplified rule: *:-moz-list-bullet, *:-moz-list-number {font-size: 1em;} recommendations if it is important to make list item markers match the font size of the content, use one of the suggested rules.
RDF in Fifty Words or Less - Archive of obsolete content
or you might want to relate a bookmark to another bookmark, or keep it in multiple "folders" at once.
RDF in Mozilla FAQ - Archive of obsolete content
(these are bizarrely arranged because the eventual intent is to introduce templates using the extended form -- which in many ways is conceptually simpler, even if more verbose -- and then treat the "simple" form as a shorthand for the extended form.) what can i build with a xul template?
Windows Media in Netscape - Archive of obsolete content
this section covers relevant issues concerning the invocation of methods and properties from within web pages that are embedding the windows media control.
Common causes of memory leaks in extensions - Extensions
consider the following example code that could be part of your browser.xul overlay: gbrowser.addeventlistener("domcontentloaded", function(evt) { var contentdoc = evt.originaltarget; var i = 0; // refresh the title once each second setinterval(function() { contentdoc.title = ++i; }, 1000); }, false); one would normally expect that the interval (or timer) would be destroyed as soon as the document unloads, in the same way that event listeners are automatically destroyed.
Index - Game development
the concern is mostly with switching to another option.
Game monetization - Game development
once you've sold an exclusive license you can forget about promoting that particular game as you won't earn more, so go into such a deal only if you're sure it's profitable enough.
Game promotion - Game development
game portals using game portals is mostly concerned with monetization, but if you're not planning to sell licenses to allow people to purchase your game and are intending to implement adverts or in-app purchases instead, promoting your game across free portals can be effective.
Bounding volume collision detection with THREE.js - Game development
once instantiated, they have methods available to do intersection tests against other volumes.
Building up a basic demo with A-Frame - Game development
it is easy to start with, but also provides a powerful api for advanced concepts, as well as dealing with cross browser differences and suchlike.
Building up a basic demo with Babylon.js - Game development
if you have already worked through our building up a basic demo series with three.js, playcanvas or a-frame (or you are familiar with other 3d libraries) you'll notice that babylon.js works on similar concepts: camera, light and objects.
Building up a basic demo with PlayCanvas editor - Game development
as you can see, the file contains some boilerplate code already: pc.script.create('boxanimation', function (app) { // creates a new boxanimation instance var boxanimation = function (entity) { this.entity = entity; }; boxanimation.prototype = { // called once after all resources are loaded and before the first update initialize: function () { }, // called every frame, dt is time in seconds since last update update: function (dt) { } }; return boxanimation; }); the most interesting part is the update() function, which is where we can put any code that we want repeated on every frame.
Building up a basic demo with the PlayCanvas engine - Game development
if you have already worked through our building up a basic demo with three.js article (or you are familiar with other 3d libraries) you'll notice that playcanvas works on similar concepts: camera, light and objects.
Building up a basic demo with Three.js - Game development
applying a constant value, we would make it grow, or shrink just once.
Mobile touch controls - Game development
phaser starts two pointers by default, so two fingers can perform an action at once.
Implementing controls using the Gamepad API - Game development
you have to shoot down the food, but once again you also have to find the type of food the fridge wants to eat at each point, or else you'll lose energy.
Crisp pixel art look with image-rendering - Game development
the concept retro pixel art aesthetics are getting popular, especially in indie games or game jam entries.
Efficient animation for web games - Game development
} var drawpending = false; function requestredraw() { if (!drawpending) { drawpending = true; requestanimationframe(redraw); } } following this pattern — or something similar — means that no matter how many times you call requestredraw, your drawing function will only be called once per frame.
Square tilemaps implementation: Scrolling maps - Game development
var startcol = math.floor(this.camera.x / map.tsize); var endcol = startcol + (this.camera.width / map.tsize); var startrow = math.floor(this.camera.y / map.tsize); var endrow = startrow + (this.camera.height / map.tsize); once we have the first tile, we need to calculate how much its rendering (and therefore the rendering of the other tiles) is offset by.
Collision detection - Game development
this won't give a perfect result every time, and there are much more sophisticated ways to do collision detection, but this will work fine for teaching you the basic concepts.
Track the score and win - Game development
the document.location.reload() function reloads the page and starts the game again once the alert button is clicked.
Animations and tweens - Game development
go to your ballhitbrick() function, find your brick.kill(); line, and replace it with the following: var killtween = game.add.tween(brick.scale); killtween.to({x:0,y:0}, 200, phaser.easing.linear.none); killtween.oncomplete.addonce(function(){ brick.kill(); }, this); killtween.start(); let's walk through this so you can see what's happening here: when defining a new tween you have to specify which property will be tweened — in our case, instead of hiding the bricks instantly when hit by the ball, we will make their width and height scale to zero, so they will nicely disappear.
Initialize the framework - Game development
preload takes care of preloading the assets create is executed once when everything is loaded and ready update is executed on every frame.
Win the game - Game development
if there are no more bricks left alive, then we show a winning message, restarting the game once the alert is dismissed.
2D breakout game using Phaser - Game development
frameworks speed up development time and help take care of the boring parts, allowing you to concentrate on the fun stuff.
2D maze game with device orientation - Game development
all the initialization is in the create() function (launched once at the beginning of the game).
Gecko FAQ - Gecko Redirect 1
they have been demanding that all vendors fully support the open standards listed above so that they can have a rich, powerful formatting system and object model at their disposal, and "write once, view anywhere." gecko's robust support for these standards makes gecko the platform of choice for web content and web application developers worldwide.
Algorithm - MDN Web Docs Glossary: Definitions of Web-related terms
computer scientists compare the efficiency of algorithms through the concept of "algorithmic complexity" or "big o" notation.
Boolean - MDN Web Docs Glossary: Definitions of Web-related terms
below is some javascript pseudocode (it's not truly executable code) demonstrating this concept.
Call stack - MDN Web Docs Glossary: Definitions of Web-related terms
once the function has executed all of its code, it is automatically removed from the call stack.
Constructor - MDN Web Docs Glossary: Definitions of Web-related terms
the concept of a constructor can be applied to most object-oriented programming languages.
Cross Axis - MDN Web Docs Glossary: Definitions of Web-related terms
learn more property reference align-content align-items align-self flex-wrap flex-direction flex further reading css flexbox guide: basic concepts of flexbox css flexbox guide: aligning items in a flex container css flexbox guide: mastering wrapping of flex items ...
Distributed Denial of Service - MDN Web Docs Glossary: Definitions of Web-related terms
ddos concerns computer networks and cpu resource management.
Dominator - MDN Web Docs Glossary: Definitions of Web-related terms
this concept is important for garbage collection because it means that b is only reachable through a.
Flex - MDN Web Docs Glossary: Definitions of Web-related terms
learn more property reference align-content align-items align-self flex flex-basis flex-direction flex-flow flex-grow flex-shrink flex-wrap justify-content order further reading css flexible box layout module level 1 specification css flexbox guide: basic concepts of flexbox css flexbox guide: relationship of flexbox to other layout methods css flexbox guide: aligning items in a flex container css flexbox guide: ordering flex items css flexbox guide: controlling ratios of flex items along the main axis css flexbox guide: mastering wrapping of flex items css flexbox guide: typical use cases of flexbox ...
Flex Container - MDN Web Docs Glossary: Definitions of Web-related terms
learn more property reference align-content align-items flex flex-direction flex-flow flex-wrap justify-content further reading css flexbox guide: basic concepts of flexbox css flexbox guide: aligning items in a flex container css flexbox guide: mastering wrapping of flex items ...
Flex Item - MDN Web Docs Glossary: Definitions of Web-related terms
learn more property reference align-self flex-basis flex-grow flex-shrink order further reading css flexbox guide: basic concepts of flexbox css flexbox guide: ordering flex items css flexbox guide: controlling ratios of flex items along the main axis ...
Flexbox - MDN Web Docs Glossary: Definitions of Web-related terms
learn more property reference align-content align-items align-self flex flex-basis flex-direction flex-flow flex-grow flex-shrink flex-wrap justify-content order further reading css flexible box layout module level 1 specification css flexbox guide: basic concepts of flexbox css flexbox guide: relationship of flexbox to other layout methods css flexbox guide: aligning items in a flex container css flexbox guide: ordering flex items css flexbox guide: controlling ratios of flex items along the main axis css flexbox guide: mastering wrapping of flex items css flexbox guide: typical use cases of flexbox ...
Gaia - MDN Web Docs Glossary: Definitions of Web-related terms
once firefox os starts, anything drawn to screen is a product of the gaia layer (e.g., the lock screen, home screen, standard apps).
Grid Areas - MDN Web Docs Glossary: Definitions of Web-related terms
grid-template-areas: "a a b" "a a b"; } .item1 { grid-area: a; } .item2 { grid-area: b; } <div class="wrapper"> <div class="item1">item</div> <div class="item2">item</div> </div> learn more property reference grid-template-columns grid-template-rows grid-auto-rows grid-auto-columns grid-template-areas grid-area further reading css grid layout guide: basic concepts of grid layout css grid layout guide: grid template areas definition of grid areas in the css grid layout specification ...
Grid Axis - MDN Web Docs Glossary: Definitions of Web-related terms
learn more further reading css grid layout guide: basic concepts of grid layout css grid layout guide: box alignment in grid layout css grid layout guide: grids, logical values and writing modes ...
Grid Column - MDN Web Docs Glossary: Definitions of Web-related terms
learn more property reference grid-template-columns grid-auto-columns grid grid-template further reading css grid layout guide: basic concepts of grid layout ...
Grid container - MDN Web Docs Glossary: Definitions of Web-related terms
learn more property reference grid-template-columns grid-template-rows grid-auto-columns grid-auto-rows grid grid-template further reading css grid layout guide: basic concepts of grid layout ...
Grid Lines - MDN Web Docs Glossary: Definitions of Web-related terms
w1-start] 100px [row2-start] 100px [rows-end]; } .item { grid-column-start: col1-start; grid-column-end: col3-start; grid-row-start: row1-start; grid-row-end: rows-end; } learn more property reference grid-template-columns grid-template-rows grid-column-start grid-column-end grid-column grid-row-start grid-row-end grid-row further reading css grid layout guide: basic concepts of grid layout css grid layout guide: line-based placement with css grid css grid layout guide: layout using named grid lines css grid layout guide: css grids, logical values and writing modes definition of grid lines in the css grid layout specification ...
Grid Row - MDN Web Docs Glossary: Definitions of Web-related terms
learn more property reference grid-template-rows grid-auto-rows grid grid-template further reading css grid layout guide: basic concepts of grid layout ...
Grid Tracks - MDN Web Docs Glossary: Definitions of Web-related terms
once the 200 pixels has been subtracted from the space available in the grid container, the remaining space is divided by 4.
Guard - MDN Web Docs Glossary: Definitions of Web-related terms
for more information, read fetch basic concepts: guard.
Gutters - MDN Web Docs Glossary: Definitions of Web-related terms
learn more property reference grid-column-gap grid-row-gap grid-gap further reading css grid layout guide: basic concepts of grid layout definition of gutters in the css grid layout specification ...
HTTP/2 - MDN Web Docs Glossary: Definitions of Web-related terms
all the core concepts found in http 1.1, such as http methods, status codes, uris, and header fields, remain in place.
Hotlink - MDN Web Docs Glossary: Definitions of Web-related terms
the practice is often frowned upon as it can cause unwanted bandwidth usage on the website hosting the linked-to object, and copyright concerns — it is considered stealing when it is done without permission.
Idempotent - MDN Web Docs Glossary: Definitions of Web-related terms
an http method is idempotent if an identical request can be made once or several times in a row with the same effect while leaving the server in the same state.
Java - MDN Web Docs Glossary: Definitions of Web-related terms
programs are compiled only once ahead of time into a proprietary byte code and package format that runs inside the java virtual machine (jvm).
JavaScript - MDN Web Docs Glossary: Definitions of Web-related terms
origins and history conceived as a server-side language by brendan eich (then employed by the netscape corporation), javascript soon came to netscape navigator 2.0 in september 1995.
MVC - MDN Web Docs Glossary: Definitions of Web-related terms
this "separation of concerns" provides for a better division of labor and improved maintenance.
Main Axis - MDN Web Docs Glossary: Definitions of Web-related terms
learn more property reference flex-basis flex-direction flex-grow flex-shrink justify-content flex further reading css flexbox guide: basic concepts of flexbox css flexbox guide: aligning items in a flex container css flexbox guide: controlling ratios of flex items along the main axis ...
Mutable - MDN Web Docs Glossary: Definitions of Web-related terms
immutables are the objects whose state cannot be changed once the object is created.
Object reference - MDN Web Docs Glossary: Definitions of Web-related terms
the concept of object references becomes clear when assigning the same object to more than one property.
Packet - MDN Web Docs Glossary: Definitions of Web-related terms
it is a field that is decreases by one each time a packet goes through, once it reaches 0 it has failed and the packet is discarded.
Polymorphism - MDN Web Docs Glossary: Definitions of Web-related terms
in the case of oop, by making the class responsible for its code as well as its own data, polymorphism can be achieved in that each class has its own function that (once called) behaves properly for any object.
Responsive web design - MDN Web Docs Glossary: Definitions of Web-related terms
responsive web design (rwd) is a web development concept focusing on making sites look and behave optimally on all personal computing devices, from desktop to mobile.
Site - MDN Web Docs Glossary: Definitions of Web-related terms
the concept of a site is used in samesite cookies, as well as a web application's cross-origin resource policy.
TLD - MDN Web Docs Glossary: Definitions of Web-related terms
sponsored top-level domains (stld) these domains are proposed and sponsored by private organizations that decide whether an applicant is eligible to use the tld, based on community theme concepts.
World Wide Web - MDN Web Docs Glossary: Definitions of Web-related terms
linking, or connecting resources through hyperlinks, is a defining concept of the web, aiding its identity as a collection of connected documents.
Loop - MDN Web Docs Glossary: Definitions of Web-related terms
examples for loop syntax: for (statement 1; statement 2; statement 3){ execute code block } statement 1 is executed once before the code block is run.
lossy compression - MDN Web Docs Glossary: Definitions of Web-related terms
the process of such compression is irreversible; once lossy compression of the content has been performed, the content cannot be restored to its original state.
Assessment: Accessibility troubleshooting - Learn web development
once you add paragraph elements, you'll notice the styling looking better.
WAI-ARIA basics - Learn web development
once that is done, we start up a setinterval() loop that loads a new random quote into the quote box every 10 seconds: let intervalid = window.setinterval(showquote, 10000); this works ok, but it is not good for accessibility — the content update is not detected by screenreaders, so their users would not know what is going on.
Images, media, and form elements - Learn web development
they are not as important as they once were, as browsers are typically more consistent than in the past.
Overflowing content - Learn web development
summary this lesson introduced the concept of overflow.
Type, class, and ID selectors - Learn web development
an id however can be used only once per document, and elements can only have a single id value applied to them.
Positioning - Learn web development
this is very similar to static positioning, except that once the positioned element has taken its place in the normal layout flow, you can then modify its final position, including making it overlap other elements on the page.
Getting started with CSS - Learn web development
to turn all paragraphs green you would use: p { color: green; } you can target multiple selectors at once, by separating the selectors with a comma.
What is CSS? - Learn web development
browser support once css has been specified then it is only useful for us in developing web pages if one or more browsers have implemented it.
CSS first steps - Learn web development
we have already met many of the concepts discussed here; you can return to this one to recap if you find any later concepts confusing.
CSS FAQ - Learn web development
LearnCSSHowtoCSS FAQ
</div> to avoid this kind of error, try to define rules only once for a certain selector, and group all rules belonging to that selector.
Styling links - Learn web development
link states the first thing to understand is the concept of link states — different states that links can exist in, which can be styled using different pseudo-classes: link (unvisited): the default state that a link resides in, when it isn't in any other state.
Web fonts - Learn web development
for this example, we just want you to concern yourself with a single font file for each choice.
Styling text - Learn web development
with the basics of the css language covered, the next css topic for you to concentrate on is styling text — one of the most common things you'll do with css.
What text editors are available? - Learn web development
these functionalities are often helpful: search-and-replace, in one or multiple documents, based on regular expressions or other patterns as needed quickly jump to a given line view two parts of a large document separately view html as it will look in the browser select text in multiple places at once view your project's files and directories format your code automatically with code beautifier check spelling auto-indent code based on indentation settings do i want to add extra features to my text editor?
How do you make sure your website works properly? - Learn web development
a distant web server often behaves quite differently from a local one, so it's a good idea to test your website once it's online.
What do common web layouts contain? - Learn web development
the opera example looks more complex than the mica example, but it's actually easier to implement (all right, "easy" is a relative concept).
How does the Internet work? - Learn web development
once we add a router to the system, our network of 10 computers only requires 10 cables: a single plug for each computer and a router with 10 plugs.
What is the difference between webpage, website, web server, and search engine? - Learn web development
in this article, we describe various web-related concepts: web pages, websites, web servers, and search engines.
How do I use GitHub Pages? - Learn web development
once you've signed up, log in to github.com with your username and password.
What are hyperlinks? - Learn web development
summary hyperlinks, usually called links, are a foundational concept behind the web.
What is a Domain Name? - Learn web development
once it's paid for, it's too late!
What is a web server? - Learn web development
once you have web hosting service, you must upload your files to your web server.
What is accessibility? - Learn web development
this article introduces the basic concepts behind web accessibility.
What software do I need to build a website? - Learn web development
once you settle on which provider to use, the provider will email you the access information, usually in the form of an sftp url, username, password, and other information needed to connect to their server.
HTML forms in legacy browsers - Learn web development
here is an example: modernizr.load({ // this tests if your browser supports the html5 form validation api test : modernizr.formvalidation, // if the browser does not support it, the following polyfill is loaded nope : form-validation-api-polyfill.js, // in any case, your core app file that depends on that api is loaded both : app.js, // once both files are loaded, this function is called in order to initialize the app.
Test your skills: Advanced styling - Learn web development
once you've removed the native styling, you'll need to add back one of the features it was providing, to keep same look and feel we originally had.
Web forms — Working with user data - Learn web development
we also look at some of the security concerns associated with sending form data.
CSS basics - Learn web development
note: don't be too concerned if you don't completely understand display: block; or the differences between a block element and an inline element.
Publishing your website - Learn web development
previous overview: getting started with the web next once you finish writing the code and organizing the files that make up your website, you need to put it all online so people can find it.
Getting started with the Web - Learn web development
publishing your website once you have finished writing the code and organizing the files that make up your website, you need to put it all online so people can find it.
Define terms with HTML - Learn web development
bold itself is a concept foreign to html, but there are tags for indicating emphasis.
Use JavaScript within a webpage - Learn web development
<script> window.addeventlistener('load', function () { console.log('this function is executed once the page is fully loaded'); }); </script> that's convenient when you just need a small bit of javascript, but if you keep javascript in separate files you'll find it easier to focus on your work write self-sufficient html write structured javascript applications use scripting accessibly accessibility is a major issue in any software development.
Getting started with HTML - Learn web development
the subsequent articles of this module go further on some of the topics introduced here, as well as presenting other concepts of the language.
HTML text fundamentals - Learn web development
the concept of italics isn't very helpful to people using screen readers, or to people using a writing system other than the latin alphabet.
Marking up a letter - Learn web development
the letter is a response from a research fellow to a prospective phd student concerning their application to the university.
Structuring a page of content - Learn web development
the title and logo appear side by side once styling is applied, and the navigation appears below those two items.
What’s in the head? Metadata in HTML - Learn web development
the <h1> element appears on the page when loaded in the browser — generally this should be used once per page, to mark up the title of your page content (the story title, or news headline, or whatever is appropriate to your usage.) the <title> element is metadata that represents the title of the overall html document (not the document's content.) active learning: inspecting a simple example to start off this active learning, we'd like you to go to our github repo and download a copy of our...
Introduction to HTML - Learn web development
this module will introduce the first two of these and introduce fundamental concepts and syntax you need to know to understand html.
Responsive images - Learn web development
previous overview: multimedia and embedding next in this article, we'll learn about the concept of responsive images — images that work well on devices with widely differing screen sizes, resolutions, and other such features — and look at what tools html provides to help implement them.
Multimedia and Embedding - Learn web development
responsive images in this article, we'll learn about the concept of responsive images — images that work well on devices with widely differing screen sizes, resolutions, and other such features — and look at what tools html provides to help implement them.
HTML table advanced features and accessibility - Learn web development
> <th scope="col">cost (€)</th> </tr> </thead> and each row could have a header defined like this (if we added row headers as well as column headers): <tr> <th scope="row">haircut</th> <td>hairdresser</td> <td>12/09</td> <td>great idea</td> <td>30</td> </tr> screenreaders will recognize markup structured like this, and allow their users to read out the entire column or row at once, for example.
Structuring the web with HTML - Learn web development
introduction to html this module sets the stage, getting you used to important concepts and syntax, looking at applying html to text, how to create hyperlinks, and how to use html to structure a webpage.
Function return values - Learn web development
previous overview: building blocks next there's one last essential concept about functions for us to discuss — return values.
Test your skills: Functions - Learn web development
functions 1 for the first task, you have to create a simple function — choosename() — that prints a random name from the provided array (names) to the provided paragraph (para), and then run it once.
Making decisions in your code — conditionals - Learn web development
the following example executes the code inside only if both or statements return true, meaning that the overall and statement will return true: if ((x === 5 || y > 3 || z <= 10) && (loggedin || username === 'steve')) { // run the code } a common mistake when using the logical or operator in conditional statements is to try to state the variable whose value you are checking once, and then give a list of values it could be to return true, separated by || (or) operators.
Introduction to web APIs - Learn web development
in addition, some webapis request permission to be enabled from the user once calls to them are made in your code.
Manipulating documents - Learn web development
if you now try resizing your window to make it bigger, you'll see that the div stays the same size — we are only setting it once.
Third-party APIs - Learn web development
note: you might want to just get all our code examples at once, in which case you can then just search the repo for the example files you need in each section.
Client-side web APIs - Learn web development
in this article, we'll explain the concept, and look at technologies that make it possible, such as xmlhttprequest and the fetch api.
Silly story generator - Learn web development
if we made changes directly to storytext, we'd only be able to generate a new story once.
What is JavaScript? - Learn web development
in the external example, we use a more modern javascript feature to solve the problem, the defer attribute, which tells the browser to continue downloading the html content once the <script> tag element has been reached.
Adding features to our bouncing balls demo - Learn web development
you only need to do these two things once, not on every iteration of the loop.
Inheritance in JavaScript - Learn web development
a further exercise in our oop theory section, we also included a student class as a concept, which inherits all the features of person, and also has a different greeting() method from person that is much more informal than the teacher's greeting.
Object-oriented JavaScript for beginners - Learn web development
this is really useful — teachers and students share many common features such as name, gender, and age, so it is convenient to only have to define those features once.
Object building practice - Learn web development
last but not least, add the following line to the bottom of your code — we need to call the function once to get the animation started.
Test your skills: JSON - Learn web development
json 1 the one and only task in this article concerns accessing json data and using it in your page.
Perceived performance - Learn web development
it is also important to ensure the site feels fast once the user begins interacting with it.
Web performance resources - Learn web development
to load css asynchronously one can simpy set the media type to print and then change to all once loaded.
JavaScript performance - Learn web development
we'll introduce concepts for handling that as well.
Learning area release notes - Learn web development
once you have a general understanding of frameworks, move on to tutorial series covering popular frameworks like react, ember, and vue.
Server-side website programming - Learn web development
basic knowledge of programming concepts (or of a particular programming language) is useful, but not essential.
Routing in Ember - Learn web development
first of all, return once more to our todo-data.js file.
Accessibility in React - Learn web development
try doing this as an exercise once you've got to the end.
React interactivity: Editing, filtering, conditional rendering - Learn web development
editing from the ui much of what we're about to do will mirror the work we did in form.js: as the user types in our new input field, we need to track the text they enter; once they submit the form, we need to use a callback prop to update our state with the new name of the task.
Deploying our app - Learn web development
using netlify for deployment deploying from github to netlify is surprisingly simple once you know the steps, particularly with "static websites" such as this project.
Package management basics - Learn web development
installing parcel run the following command to install parcel locally: npm install parcel-bundler once that's done all the things, we're now ready for some "modern client-side development" (which really means using build tools to make the developer experience a little easier).
Tools and testing - Learn web development
once you've started to become comfortable programming with core web technologies (like html, css, and javascript), and you start to get more experience, read more resources, and learn more tips and tricks, you'll start to come across all kind of tools, from javascript frameworks, to testing and automation tools, and more besides.
ChromeWorkers and the Chrome worker loader
once you've saved your new page, come back to this one and force-refresh this page.
Accessibility API cross-reference
cursor n/a n/a n/a a definition of a term or concept.
Accessibility/LiveRegionDevGuide
however, many of the concepts were also used during the development of firevox, an at using iaccessible2.
Embedding API for Accessibility
f("browser.accept.background_images", acceptbackgroundimages); no blinking text setboolpref("browser.blink_allowed", acceptblinktext); no animations setcharpref("image.animation_mode", animationmode); animationmode: "normal", "none", "once" moz 0.8 applets setboolpref("browser.accept.applets", acceptapplets); no scripts setboolpref("browser.accept.scripts", acceptscripts); no popup windows // turn window.open off for parti...
Multiprocess on Windows
prerequisite reading since so much of this design resolves around microsoft com and its concept of the apartment, readers of this document should have a solid understanding of what apartments are.
Accessibility and Mozilla
however, many of the concepts were also used during the development of firevox, an at using iaccessible2.accessible toolkit checklistplease contact the mozilla accessibility community with questions or feedback.csun firefox materialsfirefox 1.5 is a fast, free, standards compliant web browser which is rapidly gaining recognition for its fresh, streamlined approach to browsing the web.
Themes
browser themes browser theme concepts get an introduction to creating themes for the latest versions of firefox using the amo theme generator use the theme generator to create and submit a new theme to amo lightweight themes lightweight themes have been deprecated and are no longer accepted by amo.
Chrome registration
to indicate that a package is platform-specific, add the "platform" modifier to the "content" line after the path, for example: content global-platform jar:toolkit.jar!/toolkit/content/global-platform/ platform once that is specified in your manifest you then ensure that under the directory global-platform are subdirectories win (windows/os2), mac (os9/osx), or unix (everything else).
Creating reftest-based unit tests
testing invalidation testing that a document displays correctly once it has loaded is only one part of testing rendering.
Creating Sandboxed HTTP Connections
to create an nsiuri from an string, we use the newuri method of nsiioservice: // the io service var ioservice = components.classes["@mozilla.org/network/io-service;1"] .getservice(components.interfaces.nsiioservice); // create an nsiuri var uri = ioservice.newuri(myurlstring, null, null); once the nsiuri has been created, a nsichannel can be generated from it using nsiioservice's newchannelfromuri method: // get a channel for that nsiuri var channel = ioservice.newchannelfromuri(uri); to initiate the connection, the asyncopen method is called.
Capturing a minidump
once it completes, which can take a fair while, you will have a very large file at c:\temp\firefoxcrash.dmp that can be used to help debug your problem.
Debugging on Mac OS X
once done, you should be able to open any file quickly by hitting cmd-shift-o and typing in the name of a file.) in the product menu, select scheme > new scheme and name your scheme (for example, "debug").
Working with Mozilla source code
creating a patch once you've made a change to the mozilla code, the next step (after making sure it works) is to create a patch and submit it for review.
Error codes returned by Mozilla APIs
f30100) ns_error_factory_no_signature_support (0xc1f30101) ns_error_proxy_invalid_in_parameter (0x80010010) ns_error_proxy_invalid_out_parameter (0x80010011) ns_error_cannot_convert_data (0x80460001) ns_error_object_is_immutable (0x80460002) ns_error_loss_of_significant_data (0x80460003) ns_error_illegal_during_shutdown (0x8046001e) many operations cannot be performed once the application is being shutdown.
Limitations of chrome scripts
if you need to ensure that the policy is only registered once, use a process script to register the policy.
Storage access policy: Block cookies from trackers
once they do, many social content providers will prompt them to log in.
Using the Browser API
MozillaGeckoChromeAPIBrowser APIUsing
.findall() method is used to do a search for the string entered into the search input element (searchbar) within the text of the current page (the second parameter can be changed to 'case-insensitive' if you want a case-insensitive search.) we then enable the previous and next buttons, set searchactive to true, and blur() the search bar to make the keyboard disappear and stop taking up our screen once the search is submitted.
HTMLIFrameElement.addNextPaintListener()
note: the handler will receive the event once and then be thrown away.
mozbrowsericonchange
it will be fired once for each icon available.
Browser API
browser api concepts and usage the browser api consists of two major parts: custom <iframe> attributes: by adding a mozbrowser attribute to the <iframe> element we can make it appear like a top-level browser window to the embedded content.
MozBeforePaint
once you've called this, the mozbeforepaint event will be fired one time, when it's time for animations to be updated for the window's next animation frame.
Script security
security checks to determine the security relation between two compartments, gecko uses two concepts: security principals and the act of subsuming.
Gecko's "Almost Standards" Mode
recommendations for authors who are attempting to migrate to validated markup using either html 4.01 or xhtml 1.0, and who are still using image-in-table design concepts, make sure to use a doctype that will trigger "almost standards" mode.
How Mozilla determines MIME Types
content-type "hints" mozilla has a concept of "content-type hints".
How to add a build-time test
xample to run the testcookie program) in the test program: if the test fails, exit with a non-zero status and/or print the string "fail" to stdout if the test passes, exit with a zero status and don't print the string "fail" (bonus points for printing "pass" :) ) write the test so that you expect it to pass on all platforms, since if the test fails, the tree will go orange (once we've set this up - see bug 352240 for status).
How to get a process dump with Windows Task Manager
once the browser hangs, continue with the steps below.
How to investigate Disconnect failures
file a bug once you found what caused the failure, file a new bug; if you could make it reproducible, narrow down the test case as much as you can so we can see what causes the failure.
IME handling guide
clause selected clause by the user or ime and also converted by ime selection_ime_selectedconvertedtext eimeselectedclause eselectedclause note that typically, "selected clause of raw text typed by the user" isn't used because when composition string is already separated to multiple clauses, that means that the composition string has already been converted by ime at least once.
IPDL Best Practices
the main concern you have now is that you absolutely, certainly, positively call send__delete__ in all possible circumstances or your protocol can and will leak.
IPDL Tutorial
*/ bool recvready() = 0; }; class ppluginchild { protected: bool recvinit(const nscstring& pluginpath) = 0; bool recvshutdown() = 0; public: bool sendready() { // generated code to send a ready() message } }; these parent and child abstract classes take care of all the "protocol layer" concerns: serializing data, sending and receiving messages, and checking protocol safety.
IPDL Type Serialization
4; ++i) writeparam(amsg, aparam.k[i]); } static bool read(const message* amsg, void** aiter, paramtype* aresult) { if (!readparam(amsg, aiter, &(aresult->i)) || !readparam(amsg, aiter, &(aresult->j))) return false; for (int i = 0; i < 4; ++i) if (!readparam(amsg, aiter, &(aresult->k[i]))) return false; return true; } }; } // namespace ipc once you have a serializer for a type, you can serialize a collection of it (ex: an nstarray<examplestruct>) by simply declaring "using nstarray<examplestruct>;' in your ipdl file, then using it in a ipc method.
AddonInstall
once you have an instance the install() method is used to start automatic download and installation.
DownloadLastDir.jsm
to use this, you first need to import the code module into your javascript scope: components.utils.import("resource://gre/modules/downloadlastdir.jsm"); if you are using addon sdk, you can import the code module as: let { cu } = require("chrome"); let downloadlastdir = cu.import("resource://gre/modules/downloadlastdir.jsm").downloadlastdir; once you've imported the module, you can then use the downloadlastdir object it exports.
Download
you can use the downloadtarget.size property to get the actual size of the completely-downloaded file once the download has succeeded.
DownloadSummary
methods bindtolist() this method may be called once to bind this object to a downloadlist.
Geometry.jsm
to use these routines, you first need to import the code module into your javascript scope: components.utils.import("resource://gre/modules/geometry.jsm"); once you've imported the module, you can then use the point and rect classes.
ISO8601DateUtils.jsm
to use this, you first need to import the code module into your javascript scope: components.utils.import("resource://gre/modules/iso8601dateutils.jsm"); once you've imported the module, you can then use the iso8601dateutils object it exports.
NetUtil.jsm
to use these utilities, you first need to import the code module into your javascript scope: components.utils.import("resource://gre/modules/netutil.jsm"); once you've imported the module, you can then use its methods.
Examples
note that this may, in some cases, cause an error to be reported more than once.
Promise
once you have a reference to a promise, you can call its then() method to execute an action when the value becomes available, or when an error occurs.
SourceMap.jsm
the walking function is called once for each snippet of js and is passed that snippet and its original associated source's line/column location.
Sqlite.jsm
execute() is recommended for statements that will be executed seldomly or once.
Task.jsm
it is a generator function because it contains the // "yield" operator at least once.
openLocationLastURL.jsm
to use this, you first need to import the code module into your javascript scope: components.utils.import("resource:///modules/openlocationlasturl.jsm"); once you've imported the module, you can then use the openlocationlasturl object it exports.
Application Translation with Mercurial
this is only necessary once.
L10n Checks
once python is installed, the easiest way to install l10n checks (on mac or linux) is to just run: $ sudo easy_install -u l10n-checks or, if you're on windows: $ easy_install -u l10n-checks installation (development versions) l10n checks needs to be installed, and it requires that you have python and mercurial installed on your machine.
Mozilla Content Localized in Your Language
used to express certain concepts in your language?
Localizing XLIFF files for iOS
once you've completed translation, it's important to make sure the xml in your xliff file is valid (e.g., no broken tag sets).
Initial setup
mozilla ldap you will need a mozilla ldap account once you're ready to have your localization registered on the main mozilla repositories.
SVN for Localizers
once you're satisfied with changes, commit them to the appropriate mozilla svn repository by entering the following command: svn commit -m "minor modifications for firefox [version #] beta page for [your locale]" the svn commit command will commit your changes directly to the mozilla svn repositories.
What every Mozilla translator should know
once you have made some changes in mercurial, as soon as the next build is done you can check the tinderbox and see if something was wrong.
Using the viewport meta tag to control layout on mobile browsers
mobiles) render pages in a virtual window or viewport, which is usually wider than the screen, and then shrink the rendered result down so it can all be seen at once.
Mozilla Web Developer FAQ
however, doing whatever browser x does in every conceivable case isn’t simple at all, even though it might appear to be simple when presented as a passing remark.
Mozilla Style System Documentation
(the "non-element" style contexts are defined never to match any rules.) these interfaces nsistylesheet and nsistylerule correspond to the css concepts of style sheets and style rules, except they are more general, and are used by other code that needs to add style information to the document.
GC and CC logs
to find the cc logs once the try run has finished, click on the particular job, then click on "job details" in the bottom pane in treeherder, and you should see download links.
JS::PerfMeasurement
we also can't guarantee that all platforms will support all event types, once we have more than one back end for this interface.
Leak-hunting strategies and tips
once you've done this, and it doesn't leak much, then try the action under trace-malloc or lsan or valgrind to find the leaks of smaller graphs of objects.
Memory reporting
in graph-like structures (where an object might be pointed to by more than one other object) it gets more difficult, and might even require some way to mark objects that have been counted (and then a way to unmark them once the measurement is complete).
Profiling with Xperf
once the sdk installs, execute either wpt_x86.msi or wpt_x64.msi in the redist/windows performance toolkit folder of the sdk's install location (typically program files/microsoft sdks/windows/v7.1/redist/windows performance toolkit) to actually install the windows performance toolkit tools.
Profiling with the Firefox Profiler
once a range is selected, a magnifying glass appears which zooms into that range.
Refcount tracing and balancing
post-processing step 2: filtering the log once you've picked an object that leaked, you can use tools/rb/filter-log.pl to filter the log file to drop the call stack for other objects; this process reduces the size of the log file and also improves the performance.
TimerFirings logging
nspr_log_modules=timerfirings:4 output once enabled, timerfirings will print one line of logging output per timer fired.
about:memory
once firefox's memory usage has gotten high) open a new tab and type "about:memory" into the address bar and hit "enter".
perf
the -r 1 means <command> is executed once; higher values can be used to get variations.
powermetrics
run with the --show-all to see all of these at once, but note that you'll need a very wide window to see all the data.
tools/power/rapl
once sampling is finished — either because the user interrupted it, or because the requested number of samples has been taken — the following summary data is shown: 10 samples taken over a period of 10.000 seconds distribution of 'total' values: mean = 8.85 w std dev = 3.50 w 0th percentile = 5.17 w (min) 5th percentile = 5.17 w 25th percentile = 5.17 w 50th perce...
A brief guide to Mozilla preferences
sticky preferences are generally used for preferences that have a different default value in different channels with the intent being that once the user sets the preference in one channel, the preference will remain with that value when using a different channel with different defaults.
Patches and pushes
once attached and labeled as a patch, open the attachment details.
Leak And Bloat Tests
"mail.server.server2.name", "tinderbox@invalid.com"); user_pref("mail.server.server2.type", "pop3"); user_pref("mail.server.server2.username", "tinderbox"); user_pref("mail.smtp.defaultserver", "smtp1"); user_pref("mail.smtpserver.smtp1.hostname", "tinderbox"); user_pref("mail.smtpserver.smtp1.username", "tinderbox"); user_pref("mail.smtpservers", "smtp1"); user_pref("mail.startup.enabledmailcheckonce", true); user_pref("mailnews.start_page_override.mstone", "1.9pre"); user_pref("mail.shell.checkdefaultclient", false); // ensure os x and outlook/oe books are disabled user_pref("ldap_2.servers.osx.position", 0); user_pref("ldap_2.servers.oe.position", 0); preferences in generated profile, but not set: user_pref("mail.root.none", "/home/moztest/.thunderbird/t7i1txfw.minimum/mail"); user_pref("m...
Midas editor module security preferences
for example: user_pref("capability.policy.allowclipboard.sites", "https://www-archive.mozilla.org https://developer.mozilla.org") again, keep in mind the security risks involved here and be sure to remove permission to access the clipboard once you no longer need it enabled.
Midas
once midas is invoked, a few more methods of the document object become available.
Creating a Cookie Log
once you have reproduced the bug, shut down firefox.
NSPR Contributor Guide
some guidelines concerning naming conventions can be found in nspr naming conventions in the nspr reference.
Optimizing Applications For NSPR
the mode (blocking or nonblocking) of a socket cannot be changed at will once the socket has been used.
Interval Timing
conceptually, they are based on free-running counters that increment at a fixed rate without possibility of outside influence (as might be observed if one was using a time-of-day clock that gets reset due to some administrative action).
Locks
in general, a monitor is a conceptual entity composed of a mutex, one or more condition variables, and the monitored data.
Monitors
monitor type monitor functions with a mutex of type prlock, a single thread may enter the monitor only once before it exits, and the mutex can have multiple associated condition variables.
PR GetCanonNameFromAddrInfo
this pointer is invalidated once the praddrinfo structure is destroyed by a call to pr_freeaddrinfo.
PR_GetUniqueIdentity
call pr_getuniqueidentity only once for any particular layer name.
PR_Interrupt
the interrupt request remains in the thread's state until it is delivered exactly once or explicitly canceled.
PR_NewThreadPrivateIndex
there is no way to deallocate a private data index once it is allocated.
Threads
once the target thread has been notified of the request, the request stays with the thread until the notification either has been delivered exactly once or is cleared.
NSS CERTVerify Log
this allows multiple errors to be reported all at * once.
Introduction to Network Security Services
what you should already know before using nss, you should be familiar with the following topics: concepts and techniques of public-key cryptography the secure sockets layer (ssl) protocol the pkcs #11 standard for cryptographic token interfaces cross-platform development issues and techniques where to find more information for information about pki and ssl that you should understand before using nss, see the following: introduction to public-key cryptography introduction to ssl for lin...
JSS Provider Notes
once a jca object has been created it will continue to use the same token, even if the application later changes the per-thread default token.
Mozilla-JSS JCA Provider notes
once a jca object has been created it will continue to use the same token, even if the application later changes the per-thread default token.
JSS
MozillaProjectsNSSJSS
explains the basic concepts of public-key cryptography that underlie nss and jss.
NSS 3.12.5 release_notes
memory for the strings are owned by the caller, who is free to free them once nss_contextinit returns.
NSS 3.14 release notes
such changes may present interoperability concerns when enabling tls 1.1.
NSS 3.27.1 release notes
nss 3.27.1 once again requires nss_enable_tls_1_3 to be deliberately set to enable tls 1.3 (draft).
NSS 3.46 release notes
new in nss 3.46 this release contains no significant new functionality, but concentrates on providing improved performance, stability, and security.
NSS Sample Code Sample1
// however, this example uses the same databases // to store keys for server in the "cluster" so // it is done once.
NSS Sample Code sample2
am (err %d)\n", pr_geterror()); goto out; } /* sample data we'll encrypt and decrypt */ strcpy(data, "encrypt me!"); fprintf(stderr, "clear data: %s\n", data); /* ========================= start section ============================= */ /* if using the the same key and iv over and over, stuff before this */ /* section and after this section needs to be done only once */ /* encrypt data into buf1.
NSS Sample Code sample6
once keys are generated, it can be opened without read-write * subsequently (nss_init).
nss tech note1
this will allow you to free both the input data and the decoded data at once when freeing the arena.
nss tech note8
for clients these pointers point to sec->cache = cachesid; sec->uncache = lockanduncachesid; which are functions defined in sslnonce.c, the client session cache source file.
Notes on TLS - SSL 3.0 Intolerant Servers
if you have questions concerning netscape browsers and problem servers, please contact us using the feedback address at the top of this page.
PKCS11 Implement
this note will be removed once the document is updated for the current version of nss.
Python binding for NSS
thus a socket object behaves like a file object and must be closed once for each makefile() call before it's actually closed.
NSS tools : certutil
once the request is approved, then the certificate is generated.
NSS tools : vfychain
options -a the following certfile is base64 encoded -b yymmddhhmmz validate date (default: now) -d directory database directory -f enable cert fetching from aia url -o oid set policy oid for cert validation(format oid.1.2.3) -p use pkix library to validate certificate by calling: * cert_verifycertificate if specified once, * cert_pkixverifycert if specified twice and more.
gtstd.html
a pkcs #11 module always has one or more slots, which may be implemented as physical hardware slots in some form of physical reader (for example, for smart cards) or as conceptual slots in software.
NSS Tools ssltap
once this connection arrives, the tool makes another connection to the specified host name and port on the server side.
certutil
once the request is approved, then the certificate is generated.
NSS tools : vfychain
the following certfile is base64 encoded -b yymmddhhmmz validate date (default: now) -d directory database directory -f enable cert fetching from aia url -o oid set policy oid for cert validation(format oid.1.2.3) -p use pkix library to validate certificate by calling: * cert_verifycertificate if specified once, * cert_pkixverifycert if specified twice and more.
Network Security Services
introduction to public-key cryptography explains the basic concepts of public-key cryptography that underlie nss.
The Necko HTTP module
it answers some of the common questions concerning what is cached and for how long.
Multithreading in Necko
once at the limit of its buffers, it yields the thread to another pending file transport object.
Installing Pork
note: once you do this, you can only use this version of gcc in -m32 mode.
Rhino Examples
sharing the global scope allows both information to be shared across threads, and amortizes the cost of context.initstandardobjects by only performing that expensive operation once.
Rhino overview
once the security domain has been determined, an embedding can perform whatever checks are appropriate to determine whether access should be allowed.
The JavaScript Runtime
conceptually, all accessors are converted to strings in order to perform the lookup of the property in the object.
Rhino scopes and contexts
to associate the current thread with a context, simply call the enter method of context: context cx = context.enter(); once you are done with execution, simply exit the context: context.exit(); these calls will work properly even if there is already a context associated with the current thread.
SpiderMonkey Build Documentation
this will save the values you specify in the generated makefile, so once you've set it, you don't need to do so again until you re-run configure.
SpiderMonkey compartments
a compartment is a new concept with spidermonkey 1.8.5.
Future directions
during that experimentation, we must take care to apply parallelism with conceptual clarity and discipline.
GC Rooting Guide
thus, it makes more sense to only root the gc thing once and reuse it through an indirect reference.
Getting SpiderMonkey source code
once you've logged in, cd into the root of your cvs tree and enter the following command: cvs -d :pserver:anonymous@cvs-mirror.mozilla.org:/cvsroot co -l mozilla/js/src mozilla/js/src/config mozilla/js/src/editline mozilla/js/src/fdlibm this checks out all the files needed in order to build the javascript shell.
Invariants
once the enclosing stack frame is removed from the stack, and thus from the display, the upvar lookup will no longer work correctly and can crash or read off the end of a different stack frame.) ...
SpiderMonkey Internals: Thread Safety
*/ js_endrequest(cx); js_clearcontextthread(cx); it isn't a bottleneck; multiple threads are allowed to be in requests on the same jsruntime at once.
Tracing JIT
if this guard fails once, the trace will exit.
Introduction to the JavaScript shell
this is a powerful debugging mechanism when used in concert with line2pc().
JIT Optimization Strategies
inlining a call site conceptually copies the body of the callee function and pastes it in place of the call site and avoids pushing a new execution frame.
JS::CallArgs
once this method has been called, callee() and calleev() can no longer be used.
JSAutoCompartment
this article covers features introduced in spidermonkey 24 raii helper to enter a different compartment on the given context and automatically leave it once the jsautocompartment instance gets out of scope.
JSEnumerateOp
this hook does not implement iteration: once the properties are defined, the javascript engine can enumerate them.
JSFastNative
on success, the callback must call js_set_rval (at least once) and return js_true.
JSNative
on success, the callback must set js::callargs::rval() or call js_set_rval (at least once) and return true.
JSObjectOps.getProperty
each of these callbacks is responsible for everything involved with an individual property access operation, including: any locking necessary for thread safety; security checks; finding the property, including walking the prototype chain if needed; calling the lower-level jsclass hooks; calling getters or setters; and actually getting, setting, or deleting the property once it is found.
JSRuntime
once created, a context can be used any number of times for different scripts or jsapi queries.
JSSecurityCallbacks.contentSecurityPolicyAllows
jssecuritycallbacks.contentsecuritypolicyallows is invoked once per global object upon the first attempt to evaluate js code from a string (either through eval or the function constructor).
JSString
conceptually, a javascript string is just an array of char16_t characters and a length.
JS_AliasElement
once you create an alias, you can reassign it to other elements as needed.
JS_AliasProperty
once you create an alias, you can reassign it to other properties as needed.
JS_CompileScript
if the jsoption_compile_n_go option is set in cx, the resulting script must be executed in this scope, and at most once.
JS_DoubleIsInt32
we should definitely fix this (bug 744965), but as apparently it "works" in practice, it's not a pressing concern now.
JS_DumpNamedRoots
it calls the dump function once for each named root in the given runtime rt.
JS_EnterLocalRootScope
js_leavelocalrootscope(cx); return ok; } note: js_leavelocalrootscope or js_leavelocalrootscopewithresult must be called once for every prior successful call to js_enterlocalrootscope.
JS_GetFunctionFlags
once a function is created, its flags cannot be modified.
JS_GetFunctionObject
but in the jsapi there are two separate concepts: a jsobject is what is exposed to scripts and has properties and can be stored in variables; and the corresponding jsfunction contains the code of a function.
JS_GetGlobalObject
the concept of a global object belonging to a context will likely be phased out in future versions of spidermonkey.
JS_NewGlobalObject
but otherwise, callers must take care to fire the hook exactly once before compiling any script in the global's scope (we have assertions in place to enforce this).
JS_NewScriptObject
once you have created a script, you should immediately ensure that its script object is reachable (perhaps by using js_addroot or js_enterlocalrootscope).
JS_PreventExtensions
obsolete since jsapi 39 description all javascript objects recognize the concept of extensibility: whether new properties may be added to the object.
JS_SealObject
as of spidermonkey 1.8.5, js_sealobject has been removed from the jsapi, because ecmascript 5 includes a "seal" concept (namely, that of object.seal) which is quite different from that of js_sealobject.
JS_SetGCCallback
sometimes these four callbacks happen once each, in the order listed.
JS_SetOptions
mxr id search for jsoption_private_is_nsisupports jsoption_compile_n_go caller of js_compilescript et al promises to execute the compiled script once only, in the same scope object used for compilation.
JS_SetParent
in fact, once an object is exposed to a script, the object's parent must not change.
JS_malloc
once the region of memory is freed, the application must not use it again.
JSAPI reference
to execute more than one js script at once, use multiple jsruntimes.
Profiling SpiderMonkey
here are some instrumented tests to work from: media:profiling-ammo.zip 3.) once you have some changes you'd like to try, you can just rebuild the js/src directory, since it produces its own shared library, even in libxul and static builds.
SpiderMonkey 1.8.8
we have chosen to concentrate on performance and correctness as primary concerns instead.
SpiderMonkey 17
we have chosen to concentrate on performance and correctness as primary concerns instead.
SpiderMonkey 24
we have chosen to concentrate on performance and correctness as primary concerns instead.
SpiderMonkey 38
we have chosen to concentrate on performance and correctness as primary concerns instead.
SpiderMonkey 45
we have instead chosen to concentrate on overall performance and accuracy as our primary concerns.
Thread Sanitizer
once you have adjusted everything, execute this script in the js/src/ subdirectory and pass a directory name as the first parameter.
WebReplayRoadmap
the bug only needs to be reproduced in a recording tab once, and then console logs can be added which apply throughout the entire recording.
Zest implementation
the first version is aimed at creating scripts for reproducing basic security vulnerabilities includes a java reference implementation, which conforms to jsr 223 has been included in a proof-of-concept owasp zap add-on the next version is underdevelopment - more details soon.
compare-locales
ctions generate: $ compare-locales ./comm-central/mail/locales/l10n.toml ./l10n/ zh-tw if you don't want to use a copy of mozilla-central in comm-central, you can run them separately: $ compare-locales -dmozilla=$pwd/mozilla-central comm-central/mail/locales/l10n.toml ./l10n/ zh-tw if you're working on multiple projects in parallel, you can also pass all the toml files to compare-locales at once.
Mozilla Projects
once midas is invoked, a few more methods of the document object become available.
Exploitable crashes
next steps once you've determined that a crash is potentially exploitable, take the following steps.
Browser security
secure development guidelinesthe following content will likely see significant revision, though can be used as a reference for security best practices to follow when developing code for mozilla.security and the jar protocolthis article discusses security concerns with the jar: protocol, which only firefox has ever implemented for web content.
Setting up an update server
you can use this command with firefox's browser console to determine the update directory: const {fileutils} = chromeutils.import("resource://gre/modules/fileutils.jsm"); fileutils.getdir("updrootd", [], false).path once you have determined the update directory, close firefox, browse to the directory and remove the subdirectory called updates.
Task graph
once its prerequisite tasks complete, a dependent task begins.
Frecency algorithm
points for each sampled visit = (bonus / 100.0) * weight final frecency score for visited uri = ceiling(total visit count * sum of points for sampled visits / number of sampled visits) example this is an example of a frecency calculation for a uri that is bookmarked and has been visited twice recently (once yesterday, and once last week by clicking a link), and two other times more than 90 days ago: 0 default score +140 100 * (140/100.0) - first bucket weight and bookmarked bonus +84 70 * (120/100.0) - second bucket weight and followed-link bonus +14 10 * (140/100.0) - fifth bucket weight and bookmarked bonus +14 10 * (140/100.0) - fifth b...
Places Expiration
on maintenance when places maintenance runs (about once a week, on daily idle), an orphans expiration step is executed, this ensures database cleanup.
Accessing the Windows Registry Using XPCOM
child(): var wrk = components.classes["@mozilla.org/windows-registry-key;1"] .createinstance(components.interfaces.nsiwindowsregkey); wrk.open(wrk.root_key_local_machine, "software\\microsoft", wrk.access_read); var subkey = wrk.openchild("windows\\currentversion", wrk.access_read); var id = subkey.readstringvalue("productid"); subkey.close(); wrk.close(); once you've opened a registry key, you can begin to make use of it.
Bundling multiple binary components
it's pretty simple to do and the concept can be used to load third-party shared libraries (dll, so, dylib) used in xpcom components.
Fun With XBL and XPConnect
once the regular xul textfield widget is bound to this interface, it calls the auto complete function of the object using regular javascript.
XPCOM array guide
MozillaTechXPCOMGuideArrays
this lets you delete multiple objects from the array at once by specifying the index to the first item to delete as well as the number of items to delete.
XPCOM changes in Gecko 2.0
once that's done, the extensions can then be loaded by simply reading their manifests, loading their components, and continuing the startup process, all without having to restart the browser.
Preface
important terms and new concepts are also italicized the first time they appear in the text.
Using XPCOM Components
once you use the interface to get to the component, you can ask the component what other interfaces it supports.
XPCOM hashtable guide
nsuint32hashkey/nsuint64hashkey pointers nsptrhashkey<t> owned interface pointers nsisupportshashkey reference-counted concrete classes nsrefptrhashkey there are a number of more esoteric hashkey classes in nshashkeys.h, and you can always roll your own if none of these fit your needs (make sure you're not duplicating an existing hashkey class though!) once you've determined what hashtable and hashkey classes you need, you can put it all together.
XPCOM guide
MozillaTechXPCOMGuide
this document attempts to help them do so, first by explaining the underlying concepts, and second by describing a number of common javascript patterns that cause leaks.creating xpcom componentsthis guide is about gecko, and about creating xpcom components for gecko-based applications.how to build an xpcom component in javascriptif you are looking for add-on sdk solution for xpcom javascript components then check out platform/xpcom module first.inheriting from implementation cla...
Components.utils.import
components.utils.import evaluates the code of each module only once, in its own scope.
Components.utils.importGlobalProperties
once readystate is complete then the objects can be used.
Components.utils
this lets you specify a callback so you can be notified once the garbage collection cycle has been performed.
Components.utils.schedulePreciseGC
using scheduleprecisegc() when you call components.utils.scheduleprecisegc(), you specify a callback that is executed in once the scheduled garbage collection has been completed: components.utils.scheduleprecisegc( function() { // this code is executed when the garbage collection has completed } ); since the garbage collection doesn't occur until some time in the future (unlike, for example, components.utils.forcegc(), which causes garbage collection immediately but isn't able to collect all javascript-related ...
Components.utils.unload
once this method has been called, references to the module will continue to work but any subsequent import of the module will reload it and give a new reference.
Components object
utils.scheduleprecisegc requests that garbage collection occur sometime in the future when no javascript code is running; accepts a callback function to receive notification once collection is complete.
XPCShell Reference
for instance, assume that you have a file called test.js with the following contents: for (prop in arguments) { print(prop + "=" + arguments[prop]); } entering the following at the command line should produce the following output: $ xpcshell test.js this is a test 0=this 1=is 2=a 3=test xpcshell extensions once you execute xpcshell without a script you'll be at the js> command line.
IAccessibleComponent
1.0 66 introduced gecko 1.9 inherits from: iunknown last changed in gecko 1.9 (firefox 3) this interface provides the standard mechanism for an assistive technology to retrieve information concerning the graphical representation of an object.
IAccessibleTable
once the handler has returned, the validity of the data depends on how the server manages the life cycle of its objects.
IAccessibleTable2
once the handler has returned, the validity of the data depends on how the server manages the life cycle of its objects.
imgIDecoderObserver
onstartcontainer() this load notification is called once enough data has been loaded from the network that we were able to parse the width and height from the image.
jsdIStackFrame
once a jsdistackframe has been invalidated all method and property accesses will throw a ns_error_not_available exception.
mozIAsyncHistory
acallback an object implementing the mozivisitedstatuscallback.isvisited() method; this method will be called with the results once the request has been completed.
mozIJSSubScriptLoader
note: in versions of gecko prior to gecko 1.9, you could use data: urls as well, but this introduced security concerns, and is no longer permitted.
mozIStorageConnection
that object's mozistoragecompletioncallback.complete() routine will be called once the connection is closed.
mozIStorageVacuumParticipant
once you receive this notification, you should avoid using the database until onendvacuum() is called.
mozIVisitInfoCallback
if more than one operation is done for a given visit, this method is only called once (for all changes at once).
nsIAppStartup
this need be called only once per application session.
nsIAsyncInputStream
once the stream is closed, the stream's status cannot be changed.
nsIAsyncOutputStream
once the stream is closed, the stream's status cannot be changed.
nsIAuthModule
wrap() once a security context has been established through calls to getnexttoken() it may be used to protect data exchanged between client and server.
nsIBrowserSearchService
void init( [optional] in nsibrowsersearchinitobserver observer ); parameters observer if specified, a callback called once initialization is complete, or immediately, if the service has already been initialized.
nsICache
once the cache entry has been "validated", other descriptors with read access may be opened to the cache entry.
nsICacheEntryDescriptor
once doomed a cache entry cannot be undoomed.
nsIClipboardDragDropHooks
each hook can only be called once per user action/api.
nsICommandLine
removearguments() removes a range of arguments from the command line; this is typically done once those arguments have been handled.
nsIContentFrameMessageManager
examples once you obtain the conten frame messge manager, you can send messages to listeners who registered with services.mm.addmessagelistener get content message manager from browser this could would run in a nsidomwindow scope.
nsIContentViewManager
once you have the view manager, you can call getcontentviewsin() to get a list of the content views for a given portion of the browser display, then use those nsicontentview objects to manipulate the content views.
nsIDOMEvent
once preventdefault has been called it will remain in effect throughout the remainder of the event's propagation.
nsIDOMFile
this allows the file reference to be saved when the form is submitted while the user is using a web application offline, so that the data can be retrieved and uploaded once the internet connection is restored.
nsIDOMNSHTMLDocument
designmode domstring set to "on" or "off" to enable or disable editing for the entire document at once.
nsIDOMParser
parsing a string once you've created a domparser object, you can use its parsefromstring method to parse xml or html as described in the web platform documentation.
nsIDOMStorage
a key may only exist once within a storage object, and only one value may be associated with a particular key.
nsIDOMWindowUtils
setresolution together with setdisplayport() can be used to implement a non-reflowing scale-zoom in concert with another entity that can draw with a scale.
nsIDialogParamBlock
this method can only be called once.
nsIDownloadManager
note: prior to gecko 12.0, this was a synchronous operation; that is, once this method returned, you knew that the download was in the download manager's list.
nsIFilePicker
g title, in short mode); void open(in nsifilepickershowncallback afilepickershowncallback); short show(); obsolete since gecko 57.0 attributes attribute type description addtorecentdocs boolean if true, the file is added to the operating system's "recent documents" list (if the operating system has one; nothing happens if there is no such concept on the user's platform).
nsIFrameScriptLoader
getdelayedframescripts() returns all delayed scripts that will be loaded once a (remote) frame becomes available.
nsIHTTPHeaderListener
void newresponseheader( in string headername, in string headervalue ); parameters headername headervalue statusline() called once for the http response status line.
nsIHapticFeedback
1.0 66 introduced gecko 2.0 inherits from: nsisupports last changed in gecko 2.0 (firefox 4 / thunderbird 3.3 / seamonkey 2.1) implemented by: @mozilla.org/widget/hapticfeedback;1 as a service: var hapticfeedback = components.classes["@mozilla.org/widget/hapticfeedback;1"] .getservice(components.interfaces.nsihapticfeedback); once you have the service, you can initiate haptic feedback (that is, cause the device to vibrate, if it's supported) by calling performsimpleaction(): hapticfeedback.performsimpleaction(components.interfaces.nsihapticfeedback.longpress); method overview void performsimpleaction(in long islongpress); constants press length constants constant value description ...
nsIINIParserWriter
once the writer object is created, you can use the setstring() method to set the value of a property within a given section; the section is created if it hasn't been yet.
nsIJSID
a jsid can only be initialized once.
nsIMemoryReporter
once that has been done, the reporter will be found by any client accessing the enumerator returned by nsimemoryreportermanager.enumeratereporters().
nsIMessageWakeupService
currently, services must expose a wrappedjsobject in order to support this; however, once bug 593407 is fixed, the service to be woken up must implement nsiframemessagelistener.
nsIMsgAccount
exceptions thrown ns_error_already_opened if it is called more then once removeidentity() removes an identity from this account.
nsIMsgFolder
charsetoverride boolean biffstate unsigned long locked boolean readonly flags unsigned long direct access to the set/get all the flags at once.
nsINavHistoryResultViewer
removed in gecko 2.0 and replaced with the nsinavhistoryresultobserver interface, which is similar but allows multiple clients to observe the result at once.
nsINetworkLinkService
android support was backed out due to perceived security concerns, see bug 691054.
nsIPlacesView
controllers should not be concerned with these details; controller code should not be required to decode the meaning of a selection depending on what kind of view produced the selection.
Component; nsIPrefBranch
unlocking a previously locked preference allows the preference service to once again return the user set value of the preference.
nsIPrintingPrompt
defaults for platform service: showprintdialog - displays a native dialog showpagesetup() - displays a xul dialog showprogress() - displays a xul dialog summary for windows embedders: stated once again: there is no "fallback" native platform support in gfx for the displaying of the native print dialog.
nsIProcess
once initialized, you can start the process executing by calling run().
nsIProgressEventSink
notifications will cease once the channel calls its listener's onstoprequest method or once the channel is canceled (via nsirequest.cancel()).
nsIProtocolHandler
if the protocol has no concept of relative uris, this parameter is ignored.
nsIScrollable
this is a generic interface without concern for the type of content that may be inside.
nsIServerSocket
the listener will be notified once for each client connection that is accepted.
nsISupports proxies
once you have a proxy object, you may use it as if it is the "real" object.
nsITransferable
kfilepromisedirectorymime application/x-moz-file-promise-dir a synthetic flavor which is added to the transferable once the destination directory for a file drag is known.
nsITreeBoxObject
inform the tree about this change by calling rowcountchanged(rowindex+1, -1); beginupdatebatch() notify the tree that the view is about to perform a batch update, that is, add, remove or invalidate several rows at once.
nsIWebBrowserFindInFrames
once the search is done, this will be set to be the last frame searched, whether or not a result was found.
nsIWebSocketListener
this is the final notification the listener will receive; once it's been received, the websocket connection is complete.
nsIWinAppHelper
returns true only if all the following conditions are all true at once: the operating system is at least windows vista user account control is enabled the user is an administrator the application is not already running with elevated permissions otherwise it returns false.
nsIWindowCreator
the newly created window should be made a child/dependent window of the parent, if any (and if the concept applies to the underlying os).
nsIWindowMediator
indow.gbrowser.tabcontainer.addeventlistener('tabselect', function () { domwindow.alert('tab was selected') }, false); } }, false); }, onclosewindow: function (awindow) {}, onwindowtitlechange: function (awindow, atitle) {} }; //to register services.wm.addlistener(windowlistener); //services.wm.removelistener(windowlistener); //once you want to remove this listener execute removelistener, currently its commented out so you can copy paste this code in scratchpad and see it work native code only!calculatezposition a window wants to be moved in z-order.
nsIWindowWatcher
getwindowenumerator() get an nsisimpleenumerator for currently open windows in the order they were opened, guaranteeing that each will be visited exactly once.
nsIXMLHttpRequestEventTarget
onloadstart nsidomeventlistener a javascript function object that gets invoked exactly once when the operation begins.
nsIXPConnect
performs an operation over all of |object|'s xows such as clearing their scopes or updating their concept of the current principal.
nsIXULWindow
that is, ensures that it is visible and runs a local event loop, exiting only once the window has been closed.
XPCOM Interface Reference
sentnsicookiemanagernsicookiemanager2nsicookiepermissionnsicookiepromptservicensicookieservicensicookiestoragensicrashreporternsicryptohmacnsicryptohashnsicurrentcharsetlistenernsicyclecollectorlistenernsidbchangelistenernsidbfolderinfonsidnslistenernsidnsrecordnsidnsrequestnsidnsservicensidomcanvasrenderingcontext2dnsidomchromewindownsidomclientrectnsidomdesktopnotificationnsidomdesktopnotificationcenternsidomelementnsidomeventnsidomeventgroupnsidomeventlistenernsidomeventtargetnsidomfilensidomfileerrornsidomfileexceptionnsidomfilelistnsidomfilereadernsidomfontfacensidomfontfacelistnsidomgeogeolocationnsidomgeopositionnsidomgeopositionaddressnsidomgeopositioncallbacknsidomgeopositioncoordsnsidomgeopositionerrornsidomgeopositionerrorcallbacknsidomgeopositionoptionsnsidomglobalpropertyinitializ...
Setting HTTP request headers
and once the observer is registered for a topic, it will get notified about the topic by having its observe method called.
Using the clipboard
when you've added all the flavors you want, you can put it all on the clipboard at once.
XPCOM ABI
(this is an internals detail and should be of no concern to an extension developer.) extension installation when the application (e.g.
Xptcall Porting Guide
, const nsxptmethodinfo* info, nsxptcminivariant* params) = 0; }; code that wishes to make use of this stubs functionality (such as xpconnect) implement a class which inherits from nsxptcstubbase and implements the getinterfaceinfo and callmethod to let the platform specific code know how to get interface information and how to dispatch methods once their parameters have been pulled out of the platform specific calling frame.
Xray vision
most of the time this is not a problem: the main concern xrays solve is with untrusted web content manipulating objects, and web content is usually working with dom objects.
Testing Mozilla code
this type of coverage is only concerned with hit counts for lines and branches.the valgrind test jobthe valgrind test job builds the browser and runs it under valgrind, which can detect various common memory-related errors.
Address book sync client design
this method is * called only once, at the beginning of a sync transaction * */ void onstartoperation(in print32 atransactionid, in pruint32 amsgsize); /** * notify the observer that progress as occurred for the ab sync operation */ void onprogress(in print32 atransactionid, in pruint32 aprogress, in pruint32 aprogressmax); /** * notify the observer with a status message for sync o...
Creating a gloda message query
keep in mind that gloda is not infallible and it's conceivable that your collection may end up with no messages in it.
nsIMsgCloudFileProvider
managementurl acstring readonly: a chrome url for an xhtml page displayed within the filelink preferences dialog, used for displaying and setting provider-specific settings once the account has already been set up.
The libmime module
any methods or class variables which this class does not wish to override will be automatically inherited from the parent class (by virtue of its class-initialization function having been run first.) each class object will only be initialized once.
Thunderbird Binaries
at conception, a branch contains everything that the trunk contains, but from that point onwards, only certain fixes or changes will be accepted.
Creating a Custom Column
window.addeventlistener("load", doonceloaded, false); function doonceloaded() { var observerservice = components.classes["@mozilla.org/observer-service;1"].getservice(components.interfaces.nsiobserverservice); observerservice.addobserver(createdbobserver, "msgcreatedbview", false); } var createdbobserver = { // components.interfaces.nsiobserver observe: function(amsgfolder, atopic, adata) { addcustomcolumnhandler(); ...
Access Window
register a timer window.setinterval( function() { alert('foobar'); }, 60000); //execute the function once very minute if you periodically need to perform a certain action then you can use the setinterval function, it will then call this function every x milliseconds, in this case every 60000ms or one minute.
Using popup notifications
for example, this popup notification is displayed when a web site requests geolocation information: this lets the user decide whether or not to share their location when it's convenient to do so, instead of being compelled to do it at once.
Using the Mozilla source server
once the symbol path is set you must now enable source server.
Zombie compartments
avoiding zombie compartments in add-ons once you know that an add-on causes a zombie compartment, the only way to identify the cause is to read the add-on's code.
Using COM from js-ctypes
the windows api mostly concerns itself with the interaction between the operating system and an application.
Using C struct and pointers
once we have a ctypes char pointer that points to a buffer of known size, we modiify the contents of the memory block as follows: ptr.contents = string("hello world from javascript!!!"); string() adds the '\0' character.
Declaring and Calling Functions
once declared, functions can be called using standard function syntax.
Working with data
once the math is done, the two values are joined back together.
Library
you need to call this once you're done using the library.
js-ctypes reference
once you have finished working with a library, call library.close().
PKCS #11 Netscape Trust Objects - Network Security Services
conceptually a trust object contains the following: certificate reference purpose + level of trust (multiple) purpose + level of trust a trust object ultimately denotes a level of trust in a certificate.
Drawing and Event Handling - Plugins
a plug-in can call npn_forceredraw() to force a paint message synchronously, once an area has been invalidated with npn_invalidaterect() or npn_invalidateregion().
Initialization and Destruction - Plugins
it is called once after the last instance of the plug-in is destroyed, before releasing the plug-in library itself.
DOM Property Viewer - Firefox Developer Tools
opening the dom property viewer once enabled, you can open the dom property viewer by selecting "dom" from the web developer submenu in the firefox menu panel (or tools menu if you display the menu bar or are on macos), or by pressing its ctrl + shift + w keyboard shortcut.
Break on DOM mutation - Firefox Developer Tools
once you set the breakpoint, go to the debugger.
Set a breakpoint - Firefox Developer Tools
when you first choose to set a conditional breakpoint, a text entry line will appear into which you add the condition you want it to break on: once you've entered your condition and pressed enter/return, the line number will be highlighted in orange: breakpoints list once you've set some breakpoints, the breakpoints list in the right-hand column shows the filename and line number for each one: unsetting a breakpoint once a breakpoint has been set, you can unset it again in various ways: click on the line number highlight.
Debugger.Memory - Firefox Developer Tools
� “nsjscontext_destroy” “set_new_document” “set_doc_shell” “dom_utils” “dom_ipc” “dom_worker” “inter_slice_gc” “refresh_frame” “full_gc_timer” “shutdown_cc” “user_inactive” nonincrementalreason if spidermonkey’s collector determined it could not incrementally collect garbage, and had to do a full gc all at once, this is a short string describing the reason it determined the full gc was necessary.
Debugger.Object - Firefox Developer Tools
once a promise is settled, it will generally notify its dependent promises and forget about them, so this is most useful on pending promises.
Debugger.Script - Firefox Developer Tools
a[i] = i*i; calling getalloffsets() on that code might yield an array like this: [[0], [5, 20], , [10]] this array indicates that: the first line’s code starts at offset 0 in the script; the for statement head has two entry points at offsets 5 and 20 (for the initialization, which is performed only once, and the loop test, which is performed at the start of each iteration); the third line has no code; and the fourth line begins at offset 10.
Tutorial: Set a breakpoint - Firefox Developer Tools
once they’re checked, you can close the developer tools.
Debugger-API - Firefox Developer Tools
gecko-specific features while the debugger core api deals only with concepts common to any javascript implementation, it also includes some gecko-specific features: [global tracking][global] supports debugging all the code running in a gecko instance at once—the ‘chrome debugging’ model.
Deprecated tools - Firefox Developer Tools
once we have decided to remove the panel, we will provide a warning message, and finally, we will remove the panel from the codebase.
Performance Analysis - Firefox Developer Tools
(alternatively, if you have only just opened the network monitor, so it's not yet populated with the list of requests, you'll get a stopwatch icon in the main window.) the network monitor then loads the site twice: once with an empty browser cache, and once with a primed browser cache.
Network monitor recording - Firefox Developer Tools
you can see it here in context: once pressed, the button changes to a play icon, and you can toggle network traffic recording back on by pressing it again.
Network request list - Firefox Developer Tools
now when you refresh the page, the item will once enabled.
Network Monitor - Firefox Developer Tools
once the tool is monitoring network requests, the display looks like this: when it is actively monitoring activity, the network monitor records network requests any time the toolbox is open, even if the network monitor itself is not selected.
Edit fonts - Firefox Developer Tools
once entered, all of the sample text will be set to the same custom value.
CSS Flexbox Inspector: Examine Flexbox layouts - Firefox Developer Tools
once you select an element whose display is defined as flex, the panel will include a number of options for viewing details about the flex container and flex items within it.
Examine and edit HTML - Firefox Developer Tools
once you click outside the box, the changes are applied to the page.
Work with animations - Firefox Developer Tools
let's now look at animation-inspector-compositing-silly.html — this is the same example, except that now once the red rectangle is clicked we animate both the left and transform (with a translation) properties at the same time as opacity.
Debugging Firefox Desktop - Firefox Developer Tools
you only need to do this once: the setting values persist across restarts.
Rulers - Firefox Developer Tools
once enabled, the "toggle rulers for the page" button appears at the top right of the toolbox, in the same place as the settings/options button.
Style Editor - Firefox Developer Tools
once you're satisfied with your changes, you can save a copy locally by clicking the save button on the sheet's entry in the style sheet pane.
Web Console Helpers - Firefox Developer Tools
once you select the object in the output area, you can use the arrow keys to navigate the object.
Rich output - Firefox Developer Tools
export output to the clipboard once you have output in the console window, you can save it to the clipboard by right-clicking on the output and selecting export visible messages to clipboard: this will copy all of the output to the clipboard.
The JavaScript input interpreter - Firefox Developer Tools
once you have initiated the reverse search, you can use shift + f9 on windows or linux ( ctrl+s on mac) to search forward in the list of matches.
about:debugging - Firefox Developer Tools
once you have loaded a temporary extension, you can see information about it and perform operations on it.
Ambient Light Events - Web APIs
once captured, the event object gives access to the light intensity expressed in lux through the devicelightevent.value property.
Animation.updatePlaybackRate() - Web APIs
it will be updated once the animation's ready promise is resolved.
Animation - Web APIs
WebAPIAnimation
accessibility concerns blinking and flashing animation can be problematic for people with cognitive concerns such as attention deficit hyperactivity disorder (adhd).
Attr.namespaceURI - Web APIs
WebAPIAttrnamespaceURI
note too that the namespace prefix, once it is associated with a particular node, cannot be changed.
AudioBuffer - Web APIs
once put into an audiobuffer, the audio can then be played by being passed into an audiobuffersourcenode.
AudioBufferSourceNode - Web APIs
an audiobuffersourcenode can only be played once; after each call to start(), you have to create a new node if you want to play the same sound again.
AudioContext.createMediaStreamTrackSource() - Web APIs
once that access is attained, an audio context is established and a mediastreamtrackaudiosourcenode is created using createmediastreamtracksource(), taking its audio from the first audio track in the stream returned by getusermedia().
AudioContext.resume() - Web APIs
in each case, the text label of the button is updated as appropriate once the promise resolves.
AudioContext.suspend() - Web APIs
in each case, the text label of the button is updated as appropriate once the promise resolves.
AudioNode.connect() - Web APIs
WebAPIAudioNodeconnect
while you can only connect a given output to a given input once (repeated attempts are ignored), you can connect an output to multiple inputs by calling connect() repeatedly.
AudioNode.disconnect() - Web APIs
if this value is an audioparam, then the connection to that audioparam is terminated, and the node's contributions to that computed parameter become 0 going forward once the change takes effect.
AudioParam.setTargetAtTime() - Web APIs
you don't have to worry about reaching the target value; once you are close enough, any further changes will be imperceptible to a human listener.
AudioParam - Web APIs
these are examples of k-rate audioparam's, as the values are set for the entire audio block at once.
AudioScheduledSourceNode.stop() - Web APIs
example this example demonstrates starting an oscillator node, scheduled to begin playing at once and to stop playing in one second.
AudioScheduledSourceNode - Web APIs
if no time is specified, the node stops playing at once.
AudioTrack.enabled - Web APIs
once those have been found, the values of the two tracks' enabled properties are exchanged, which results in swapping which of the two tracks is currently active.
AudioWorkletGlobalScope.registerProcessor - Web APIs
note: a key-value pair { name: constructor } is saved internally in the audioworkletglobalscope once the processor is registered.
AudioWorkletNode.onprocessorerror - Web APIs
once an exception is thrown, the processor (and thus the node) will output silence throughout its lifetime.
AudioWorkletNode - Web APIs
once fired, the processor and consequently the node will output silence throughout its lifetime.
AudioWorkletProcessor.process - Web APIs
the method is called synchronously from the audio rendering thread, once for each block of audio (also known as a rendering quantum) being directed through the processor's corresponding audioworkletnode.
BaseAudioContext.createBuffer() - Web APIs
syntax var buffer = baseaudiocontext.createbuffer(numofchannels, length, samplerate); parameters note: for an in-depth explanation of how audio buffers work, and what these parameters mean, read audio buffers: frames, samples and channels from our basic concepts guide.
BasicCardRequest - Web APIs
} once the payment flow has been triggered using paymentrequest.show() and the promise resolves successfully, the paymentresponse object available inside the fulfilled promise (instrumentresponse above) will have a paymentresponse.details property that will contain response details.
BasicCardResponse.billingAddress - Web APIs
}); once the payment flow has been triggered using paymentrequest.show() and the promise resolves successfully, the paymentresponse object available inside the fulfilled promise (instrumentresponse above) will have a paymentresponse.details property that will contain response details.
BasicCardResponse.cardNumber - Web APIs
}); once the payment flow has been triggered using paymentrequest.show() and the promise resolves successfully, the paymentresponse object available inside the fulfilled promise (instrumentresponse above) will have a paymentresponse.details property that will contain response details.
BasicCardResponse.cardSecurityCode - Web APIs
}); once the payment flow has been triggered using paymentrequest.show() and the promise resolves successfully, the paymentresponse object available inside the fulfilled promise (instrumentresponse above) will have a paymentresponse.details property that will contain response details.
BasicCardResponse.cardholderName - Web APIs
}); once the payment flow has been triggered using paymentrequest.show() and the promise resolves successfully, the paymentresponse object available inside the fulfilled promise (instrumentresponse above) will have a paymentresponse.details property that will contain response details.
BasicCardResponse.expiryMonth - Web APIs
}); once the payment flow has been triggered using paymentrequest.show() and the promise resolves successfully, the paymentresponse object available inside the fulfilled promise (instrumentresponse above) will have a paymentresponse.details property that will contain response details.
BasicCardResponse.expiryYear - Web APIs
}); once the payment flow has been triggered using paymentrequest.show() and the promise resolves successfully, the paymentresponse object available inside the fulfilled promise (instrumentresponse above) will have a paymentresponse.details property that will contain response details.
BasicCardResponse - Web APIs
} once the payment flow has been triggered using paymentrequest.show() and the promise resolves successfully, the paymentresponse object available inside the fulfilled promise (instrumentresponse above) will have a paymentresponse.details property that will contain response details.
BeforeInstallPromptEvent.prompt() - Web APIs
example var istoosoon = true; window.addeventlistener("beforeinstallprompt", function(e) { if (istoosoon) { e.preventdefault(); // prevents prompt display // prompt later instead: settimeout(function() { istoosoon = false; e.prompt(); // throws if called more than once or default not prevented }, 10000); } // the event was re-dispatched in response to our request // ...
Bluetooth.requestDevice() - Web APIs
securityerror this operation is not permitted in this context due to security concerns.
Body.arrayBuffer() - Web APIs
WebAPIBodyarrayBuffer
once getdata() has finished running, we start the audio source playing with start(0), then disable the play button so it can't be clicked again when it is already playing (this would cause an error.) function getdata() { source = audioctx.createbuffersource(); var myrequest = new request('viper.ogg'); fetch(myrequest).then(function(response) { return response.arraybuffer(); }).then(func...
Body.bodyUsed - Web APIs
WebAPIBodybodyUsed
notice that we log response.bodyused to the console once before the response.blob() call and once after.
CSSUnparsedValue.forEach() - Web APIs
the cssunparsedvalue.foreach() method executes a provided function once for each element of the cssunparsedvalue.
CSSUnparsedValue - Web APIs
cssunparsedvalue.foreach() executes a provided function once for each element of the cssunparsedvalue object.
Managing screen orientation - Web APIs
er: 1px solid black; -moz-box-sizing: border-box; box-sizing: border-box; } p { font : 1em sans-serif; margin : 0; padding: .5em; } ul { list-style: none; font : 1em monospace; margin : 0; padding: .5em; -moz-box-sizing: border-box; box-sizing: border-box; background: black; } li { display: inline-block; margin : 0; padding: 0.5em; background: white; } once we have some common styles we can start defining a special case for the orientation /* for portrait, we want the tool bar on top */ @media screen and (orientation: portrait) { #toolbar { width: 100%; } } /* for landscape, we want the tool bar stick on the left */ @media screen and (orientation: landscape) { #toolbar { position: fixed; width: 2.65em; height: 100%; } ...
Using the CSS Painting API - Web APIs
css.paintworklet.addmodule('https://mdn.github.io/houdini-examples/csspaint/intro/01partone/header-highlight.js'); reference the paint worklet in css once we have a registered paint worklet, we can use it in css.
CSS Painting API - Web APIs
concepts and usage essentially, the css painting api contains functionality allowing developers to create custom values for paint(), a css <image> function.
Using the CSS properties and values API - Web APIs
the first is that, once a property is registered, there's no way to update it, and trying to re-register it with javascript will throw an error indicating it's already been defined.
CSS Typed Object Model API - Web APIs
cssunparsedvalue.foreach() method executing a provided function once for each element of the cssunparsedvalue.
Cache - Web APIs
WebAPICache
// note that for opaque filtered responses (https://fetch.spec.whatwg.org/#concept-filtered-response-opaque) // we can't access to the response headers, so this check will always fail and the font won't be cached.
CacheStorage.match() - Web APIs
self.addeventlistener('fetch', function(event) { event.respondwith(caches.match(event.request).then(function(response) { // caches.match() always resolves // but in case of success response will have value if (response !== undefined) { return response; } else { return fetch(event.request).then(function (response) { // response may be used only once // we need to save clone to put one copy in cache // and serve second one let responseclone = response.clone(); caches.open('v1').then(function (cache) { cache.put(event.request, responseclone); }); return response; }).catch(function () { return caches.match('/sw-test/gallery/mylittlevader.jpg'); }); } })); }); ...
CacheStorage - Web APIs
}) ); }); self.addeventlistener('fetch', function(event) { event.respondwith(caches.match(event.request).then(function(response) { // caches.match() always resolves // but in case of success response will have value if (response !== undefined) { return response; } else { return fetch(event.request).then(function (response) { // response may be used only once // we need to save clone to put one copy in cache // and serve second one let responseclone = response.clone(); caches.open('v1').then(function (cache) { cache.put(event.request, responseclone); }); return response; }).catch(function () { return caches.match('/sw-test/gallery/mylittlevader.jpg'); }); } })); }); ...
CanvasRenderingContext2D.createPattern() - Web APIs
once created, the pattern is assigned to the canvas context's fill style and applied to a rectangle.
CanvasRenderingContext2D.fillText() - Web APIs
maxwidth optional the maximum number of pixels wide the text may be once rendered.
CanvasRenderingContext2D.stroke() - Web APIs
html <canvas id="canvas"></canvas> javascript this code strokes the first path three times, the second path two times, and the third path only once.
CanvasRenderingContext2D.strokeText() - Web APIs
maxwidth optional the maximum width the text may be once rendered.
Basic animations - Web APIs
probably the biggest limitation is, that once a shape gets drawn, it stays that way.
Pixel manipulation with canvas - Web APIs
once you have generated a data uri from you canvas, you are able to use it as the source of any <image> or put it into a hyper link with a download attribute to save it to disc, for example.
Clipboard.writeText() - Web APIs
return value a promise which is resolved once the clipboard's contents have been updated.
Console.timeEnd() - Web APIs
WebAPIConsoletimeEnd
once stopped, the elapsed time is automatically displayed in the web console along with an indicator that the time has ended.
Console API - Web APIs
concepts and usage the console api started as a largely proprietary api, with different browsers implementing it, albeit it in inconsistent ways.
ConstrainDOMString - Web APIs
you can also specify a single string (or an array of strings) which the user agent will do its best to match once all more stringent constraints have been applied.
ConstrainDouble - Web APIs
additionally, you can specify the property's value as a simple floating-point value, in which case the user agent does its best to match the value once all other more stringent constraints are met.
ConstrainULong - Web APIs
in addition, you can specify the value as a simple long integer value, in which case the user agent does its best to match the value once all other more stringent constraints are met.
Constraint validation API - Web APIs
concepts and usage certain html form controls, such as <input>, <select> and <textarea>, can restrict the format of allowable values, using attributes like required and pattern to set basic constraints.
Content Index API - Web APIs
concepts and usage as it stands, offline web content is not easily discoverable by users.
Credential Management API - Web APIs
credential management concepts and usage this api lets websites interact with a user agent’s password system so that websites can deal in a uniform way with site credentials and user agents can provide better assistance with the management of their credentials.
CustomEvent.initCustomEvent() - Web APIs
once dispatched, it doesn't do anything anymore.
DOMParser - Web APIs
WebAPIDOMParser
the possible values are the following: mimetype doc.constructor text/html document text/xml xmldocument application/xml xmldocument application/xhtml+xml xmldocument image/svg+xml xmldocument examples parsing xml once you have created a parser object, you can parse xml from a string using the parsefromstring() method: let parser = new domparser() let doc = parser.parsefromstring(stringcontainingxmlsource, "application/xml") error handling note that if the parsing process fails, the domparser does not throw an exception, but instead returns an error document: <parsererror xmlns="http://www.mozilla.org/newl...
Binary strings - Web APIs
WebAPIDOMStringBinary
a binary string is a concept similar to the ascii subset, but instead of limiting the range to 127, it allows code points until 255.
DOMTokenList.forEach() - Web APIs
the foreach() method of the domtokenlist interface calls the callback given in parameter once for each value pair in the list, in insertion order.
DOMTokenList.remove() - Web APIs
first, the html: <span class="a b c"></span> now the javascript: let span = document.queryselector("span"); let classes = span.classlist; classes.remove("c"); span.textcontent = classes; the output looks like this: to remove multiple classes at once, you can supply multiple tokens.
DOMTokenList - Web APIs
domtokenlist.foreach(callback [, thisarg]) executes a provided callback function once per domtokenlist element.
DataTransferItem.webkitGetAsEntry() - Web APIs
once the current item is in the list, the item's isdirectory property is checked.
DedicatedWorkerGlobalScope.postMessage() - Web APIs
note: postmessage() can only send a single object at once.
DirectoryEntrySync - Web APIs
basic concepts if you want to create subdirectories, you have to create each child directory in sequence.
DirectoryReaderSync - Web APIs
basic concepts before you call the only method in this interface, readentries(), create the directoryentrysync object.
Document: animationstart event - Web APIs
if there is an animation-delay, this event will fire once the delay period has expired.
Document.createRange() - Web APIs
example let range = document.createrange(); range.setstart(startnode, startoffset); range.setend(endnode, endoffset); notes once a range is created, you need to set its boundary points before you can make use of most of its methods.
Document.exitFullscreen() - Web APIs
return value a promise which is resolved once the user agent has finished exiting full-screen mode.
Document.mozSetImageElement() - Web APIs
once the canvas is drawn, document.mozsetimageelement() is called to set the background for any css using the id "canvasbg" as its background element id to be our new canvas.
Document.querySelectorAll() - Web APIs
ttribute named data-src: var matches = document.queryselectorall("iframe[data-src]"); here, an attribute selector is used to return a list of the list items contained within a list whose id is userlist which have a data-active attribute whose value is 1: var container = document.queryselector("#userlist"); var matches = container.queryselectorall("li[data-active='1']"); accessing the matches once the nodelist of matching elements is returned, you can examine it just like any array.
Document.releaseCapture() - Web APIs
syntax document.releasecapture(); once mouse capture is released, mouse events will no longer all be directed to the element on which capture is enabled.
Document.requestStorageAccess() - Web APIs
if the user clicks “don’t allow”, the storage access request is rejected and the requesting origin can re-request once it receives another user interaction.
Document.write() - Web APIs
WebAPIDocumentwrite
note: in edge only, calling document.write() more than once in an <iframe> causes the error "script70: permission denied".
DocumentFragment - Web APIs
because all of the nodes are inserted into the document at once, only one reflow and render is triggered instead of potentially one for each node inserted if they were inserted separately.
Events and the DOM - Web APIs
concerns of content/structure and behavior are not well-separated, making a bug harder to find.
Introduction to the DOM - Web APIs
and finally, since an html element is also, as far as the dom is concerned, a node in the tree of nodes that make up the object model for an html or xml page, the table object also implements the more basic node interface, from which element derives.
Using the W3C DOM Level 1 Core - Web APIs
now that you are familiar with the basic concepts of the dom, you may want to learn about the dom level 1 fundamental methods.
Document Object Model (DOM) - Web APIs
once an event is triggered, the event handlers get executed.
DynamicsCompressorNode() - Web APIs
that can occur when multiple sounds are played and multiplexed together at once.
DynamicsCompressorNode - Web APIs
the dynamicscompressornode interface provides a compression effect, which lowers the volume of the loudest parts of the signal in order to help prevent clipping and distortion that can occur when multiple sounds are played and multiplexed together at once.
Element.classList - Web APIs
WebAPIElementclassList
see https://bugzilla.mozilla.org/show_bug.cgi?id=814014 polyfill the legacy onpropertychange event can be used to create a living classlist mockup thanks to a element.prototype.classname property that fires the specified event once it is changed.
Element: mouseover event - Web APIs
html <ul id="test"> <li>item 1</li> <li>item 2</li> <li>item 3</li> </ul> javascript let test = document.getelementbyid("test"); // this handler will be executed only once when the cursor // moves over the unordered list test.addeventlistener("mouseenter", function( event ) { // highlight the mouseenter target event.target.style.color = "purple"; // reset the color after a short delay settimeout(function() { event.target.style.color = ""; }, 500); }, false); // this handler will be executed every time the cursor // is moved over a different list ite...
Element.namespaceURI - Web APIs
also note that the namespace prefix, once it is associated with a particular element, cannot be changed.
Element.querySelectorAll() - Web APIs
named "data-src": var matches = document.queryselectorall("iframe[data-src]"); here, an attribute selector is used to return a list of the list items contained within a list whose id is "userlist" which have a "data-active" attribute whose value is "1": var container = document.queryselector("#userlist"); var matches = container.queryselectorall("li[data-active='1']"); accessing the matches once the nodelist of matching elements is returned, you can examine it just like any array.
ErrorEvent - Web APIs
errorevent.error read only is a javascript object that is concerned by the event.
Event.preventDefault() - Web APIs
the event continues to propagate as usual, unless one of its event listeners calls stoppropagation() or stopimmediatepropagation(), either of which terminates propagation at once.
EventSource - Web APIs
once the connection is opened, incoming messages from the server are delivered to your code in the form of events.
EventTarget.removeEventListener() - Web APIs
while addeventlistener() will let you add the same listener more than once for the same type if the options are different, the only option removeeventlistener() checks is the capture/usecapture flag.
Using Fetch - Web APIs
fetch also provides a single logical place to define other http-related concepts such as cors and extensions to http.
FileEntrySync - Web APIs
basic concepts to write content to file, create a filewriter object by calling createwriter().
FileException - Web APIs
basic concepts synchronous apis do not have error callbacks, which makes it difficult to catch errors.
FileReader.readAsBinaryString() - Web APIs
note that this method was once removed from the file api specification, but re-introduced for backward compatibility.
FileSystem - Web APIs
basic concepts there are two ways to get access to a filesystem object: you can directly ask for one representing a sandboxed file system created just for your web app directly by calling window.requestfilesystem().
FileSystemDirectoryEntry.createReader() - Web APIs
once control is returned to readdirectory(), the array is returned to the caller.
FileSystemDirectoryEntry.getDirectory() - Web APIs
successcallback optional a method to be called once the filesystemdirectoryentry has been created.
FileSystemDirectoryEntry.getFile() - Web APIs
successcallback optional a method to be called once the filesystemfileentry has been created.
FileSystemDirectoryEntry - Web APIs
basic concepts you can create a new directory by calling getdirectory().
FileSystemDirectoryReader.readEntries() - Web APIs
once the current item is in the list, the item's isdirectory property is checked.
FileSystemEntry.fullPath - Web APIs
function gotfilesystem(fs) { let path = ""; fs.root.getfile("data.json", { create: true, exclusive: true }, function(entry) { path = fullpath; }, handleerror(error)); return path; } obviously, this is somewhat contrived, since we know that the file's full path is "/data.json", having just looked it up ourselves, but the concept holds up for scenarios in which you don't know it.
FileSystemEntry.remove() - Web APIs
syntax filesystementry.remove(successcallback[, errorcallback]); parameters successcallback a function which is called once the file has been successfully removed.
FileSystemEntry - Web APIs
basic concepts you don't create filesystementry objects directly.
FileSystemFileEntry.file() - Web APIs
example this example establishes a method, readfile(), reads a text file and calls a specified callback function with the received text (in a string object) once the read is completed.
FileSystemFileEntry - Web APIs
basic concepts to write content to file, create a filewriter object by calling createwriter().
FontFaceSet - Web APIs
fontfaceset.ready read only promise which resolves once font loading and layout operations have completed.
GeolocationCoordinates.longitude - Web APIs
examples in this simple example, we fetch the user's location and display the resulting coordinates once they're returned.
GeolocationPosition.coords - Web APIs
it contains the location, that is longitude and latitude on the earth, the altitude, and the speed of the object concerned, regrouped inside the returned value.
GeolocationPosition - Web APIs
the geolocationposition interface represents the position of the concerned device at a given time.
Geolocation API - Web APIs
concepts and usage you will often want to retrieve a user's location information in your web app, for example to plot their location on a map, or display personalized information relevant to their location.
HTMLAnchorElement.referrerPolicy - Web APIs
this case is unsafe as it can leak path information that has been concealed to third-party by using tls.
HTMLAreaElement.referrerPolicy - Web APIs
this case is unsafe as it can leak path information that has been concealed to third-party by using tls.
HTMLCanvasElement.toBlob() - Web APIs
exceptions securityerror the canvas's bitmap is not origin clean; at least some of its contents come from secure examples getting a file representing the canvas once you have drawn content into a canvas, you can convert it into a file of any supported image format.
HTMLCanvasElement: webglcontextrestored event - Web APIs
once the context is restored, webgl resources such as textures and buffers that were created before the context was lost are no longer valid.
HTMLElement: animationstart event - Web APIs
if there is an animation-delay, this event will fire once the delay period has expired.
HTMLElement.hidden - Web APIs
the follow-up panel once the user clicks the "ok" button in the welcome panel, the javascript code swaps the two panels by changing their respective values for hidden.
HTMLElement - Web APIs
htmlorforeignelement.nonce returns the cryptographic number used once that is used by content security policy to determine whether a given fetch will be allowed to proceed.
HTMLFormElement.requestSubmit() - Web APIs
once the form has been submitted, the submit event is sent back to the form object.
HTMLFormElement - Web APIs
the form will receive an event once the user has finished with the interface, the event will either be autocomplete when the fields have been filled or autocompleteerror when there was a problem.
HTMLImageElement.loading - Web APIs
by establishing the intrinsic aspect ratio in this manner, you prevent elements from shifting around while the document loads, which can be disconcerting or offputting at best and can cause users to click the wrong thing at worst, depending on the exact timing of the deferred loads and reflows.
HTMLImageElement.referrerPolicy - Web APIs
this case is unsafe as it can leak path information that has been concealed to third-party by using tls.
HTMLImageElement.x - Web APIs
the third cell is taken from that row (once again, specifying 2 as the zero-based offset).
HTMLImageElement.y - Web APIs
the third cell is taken from that row (once again, specifying 2 as the zero-based offset).
HTMLImageElement - Web APIs
this was once used by browsers under constrained network conditions or on slow devices.
HTMLMediaElement.audioTracks - Web APIs
once you have a reference to the list, you can monitor it for changes to detect when new audio tracks are added or existing ones removed.
HTMLMediaElement.currentTime - Web APIs
if the media is not yet playing, the value of currenttime indicates the time position within the media at which playback will begin once the play() method is called.
HTMLMediaElement.load() - Web APIs
once media has been selected and loading is ready to begin, the loadstart event is delivered.
HTMLMediaElement: pause event - Web APIs
the event is sent once the pause() method returns and after the media element's paused property has been changed to true.
HTMLMediaElement.seekToNextFrame() - Web APIs
syntax var seekcompletepromise = htmlmediaelement.seektonextframe(); htmlmediaelement.seektonextframe(); return value a promise which is fulfilled once the seek operation has completed.
HTMLMedia​Element​.textTracks - Web APIs
once you have a reference to the list, you can monitor it for changes to detect when new text tracks are added or existing ones removed.
HTMLMediaElement.videoTracks - Web APIs
once you have a reference to the list, you can monitor it for changes to detect when new video tracks are added or existing ones removed.
HTMLOrForeignElement - Web APIs
propertiesdataset read only the dataset read-only property of the htmlorforeignelement interface provides read/write access to all the custom data attributes (data-*) set on the element.nonce the nonce property of the htmlorforeignelement interface returns the cryptographic number used once that is used by content security policy to determine whether a given fetch will be allowed to proceed.tabindexthe tabindex property of the htmlorforeignelement interface represents the tab order of the current element.methodsblur()the htmlelement.blur() method removes keyboard focus from the curre...
HTMLOutputElement - Web APIs
user agents may report more than one constraint violation if this element suffers from multiple problems at once.
HTMLSelectElement.add() - Web APIs
examples creating elements from scratch var sel = document.createelement("select"); var opt1 = document.createelement("option"); var opt2 = document.createelement("option"); opt1.value = "1"; opt1.text = "option: value 1"; opt2.value = "2"; opt2.text = "option: value 2"; sel.add(opt1, null); sel.add(opt2, null); /* produces the following, conceptually: <select> <option value="1">option: value 1</option> <option value="2">option: value 2</option> </select> */ the before parameter is optional.
In depth: Microtasks and the JavaScript runtime environment - Web APIs
when multiple programs and multiple code objects within those programs start to try to work at once, alongside a browser which also needs processor time—let alone time to render and draw the site and its own ui, handle user events, and so forth—everything becomes clogged up far too easily nowadays.
Headers - Web APIs
WebAPIHeaders
headers.foreach() executes a provided function once for each array element.
Working with the History API - Web APIs
if the user clicks back once again, the url will change to http://mozilla.org/foo.html, and the document will get a popstate event, this time with a null state object.
History API - Web APIs
concepts and usage moving backward and forward through the user's history is done using the back(), forward(), and go() methods.
IDBCursor.continuePrimaryKey() - Web APIs
calling this method more than once before new cursor data has been loaded - for example, calling continueprimarykey() twice from the same onsuccess handler - results in an invalidstateerror being thrown on the second call because the cursor’s got value flag has been unset.
IDBCursor.delete() - Web APIs
WebAPIIDBCursordelete
once the record is deleted, the cursor's value is set to null.
IDBDatabase.close() - Web APIs
WebAPIIDBDatabaseclose
no new transactions can be created for this connection once this method is called.
IDBDatabase.transaction() - Web APIs
since such catastrophic events are rare most consumers should not need to concern themselves further.
IDBIndex.getAll() - Web APIs
WebAPIIDBIndexgetAll
to use a feature like getall(), the browser has to create all the objects at once.
IDBObjectStore.get() - Web APIs
once this data object is retrieved, you could then update it using normal javascript, then put it back into the database using a idbobjectstore.put operation.
IDBObjectStoreSync - Web APIs
snapshot_read 2 any read operations must access a snapshot view of the data, which cannot change once it is created.
IDBRequest - Web APIs
the request object does not initially contain any information about the result of the operation, but once information becomes available, an event is fired on the request, and the information becomes available through the properties of the idbrequest instance.
IDBTransaction - Web APIs
since such catastrophic events are rare, most consumers should not need to concern themselves further.
IIRFilterNode - Web APIs
once the node has been created, you can't change its coefficients.
IdleDeadline.didTimeout - Web APIs
idle callbacks support the concept of a timeout in order to ensure that whatever task they're meant to perform actually happens, even if the user agent never has enough idle time available.
Browser storage limits and eviction criteria - Web APIs
once the global limit for temporary storage is reached (more on the limit later), we try to find all currently unused origins (i.e., ones with no tabs/apps open that are keeping open datastores).
InputDeviceCapabilities API - Web APIs
input device capabilities concepts and usage because dom events abstract device input, they provide no way to learn what device or type of device fired an event.
IntersectionObserver - Web APIs
the configuration cannot be changed once the intersectionobserver is created, so a given observer object is only useful for watching for specific changes in degree of visibility; however, you can watch multiple target elements with the same observer.
KeyboardEvent.key - Web APIs
WebAPIKeyboardEventkey
a keyup event is fired once the key is released.
KeyboardLayoutMap.forEach() - Web APIs
the foreach() method of the keyboardlayoutmap interface executes a provided function once for each element of the map.
KeyboardLayoutMap - Web APIs
methods keyboardlayoutmap.foreach() read only executes a provided function once for each element of keyboardlayoutmap.
Keyboard API - Web APIs
keyboard api concepts and usage keyboard mapping on physical keyboards, the code attribute contains the physical location of the key that was pressed, and the key attribute contains the string generated by pressing the key at that physical location on the keyboard.
LockManager.request() - Web APIs
once the callback is invoked, no other running code on this orign can hold `my_resource` until the callback returns.
Long Tasks API - Web APIs
concepts some key terms or ideas that are utilized by the long tasks api.
MSCandidateWindowHide - Web APIs
web applications need only register for this event once per element (the handler will remain valid for the lifetime of the element).
MSCandidateWindowShow - Web APIs
web applications need only register for this event once per element (the handler will remain valid for the lifetime of the element).
MSCandidateWindowUpdate - Web APIs
tan ime candidate window may be identified as needing to change size for any of the following reasons: as a result of displaying new / changed alternatives or predictions web applications need only register for this event once per element (the handler will remain valid for the lifetime of the element).
MediaDeviceInfo.groupId - Web APIs
once the promise resolves, we walk the list using foreach().
MediaDevices.getDisplayMedia() - Web APIs
usage notes privacy and security because getdisplaymedia() could be used in nefarious ways, it can be a source of significant privacy and security concerns.
MediaKeyStatusMap.forEach() - Web APIs
the foreach property of the mediakeystatusmap interface calls callback once for each key-value pair in the status map, in insertion order.
MediaKeyStatusMap - Web APIs
mediakeystatusmap.foreach(callback[, argument]) read only calls callback once for each key-value pair in the status map, in insertion order.
MediaPositionState.position - Web APIs
example in this example, a player for a non-standard media file format, written in javascript, uses setinterval() to establish a callback which fires once per second to refresh the position information by calling setpositionstate().
MediaSession.setPositionState() - Web APIs
example in this example, a player for a non-standard media file format, written in javascript, uses setinterval() to establish a callback which fires once per second to refresh the position information by calling setpositionstate().
MediaSessionActionDetails.fastSeek - Web APIs
once fastseek is false or not present, the repeating series of seekto actions is complete and you can finalize the state of your web app or content.
active - Web APIs
once every track has ended, the stream's active property becomes false.
MediaStream.ended - Web APIs
WebAPIMediaStreamended
this value once the ended event has been fired.
MediaStreamConstraints.audio - Web APIs
ntlistener("click", function() { navigator.mediadevices.getusermedia({ audio: true }).then(stream => audioelement.srcobject = stream) .catch(err => log(err.name + ": " + err.message)); }, false); here we see an event handler for a click event which uses getusermedia() to obtain an audio-only stream with no specific constraints, then attaches the resulting stream to an <audio> element once the stream is returned.
MediaStreamConstraints.video - Web APIs
ntlistener("click", function() { navigator.mediadevices.getusermedia({ video: true }).then(stream => videoelement.srcobject = stream) .catch(err => log(err.name + ": " + err.message)); }, false); here we see an event handler for a click event which uses getusermedia() to obtain a video-only stream with no specific constraints, then attaches the resulting stream to a <video> element once the stream is returned.
MediaStreamEvent() - Web APIs
mediastreameventinit is a mediastreameventinit dictionary, having the following fields: "stream" of type mediastream representing the stream being concerned by the event.
MediaStreamTrack.getCapabilities() - Web APIs
once you know what the browser's capabilities are, your script can use applyconstraints() to ask for the track to be configured to match ideal or acceptable settings.
MediaStreamTrack: mute event - Web APIs
when the track is once again able to produce media output, an unmute event is sent.
MediaStreamTrack.stop() - Web APIs
once no media tracks are using the source, the source may actually be completely stopped.
MediaStreamTrack: unmute event - Web APIs
the unmute event is sent to a mediastreamtrack when the track's source is once again able to provide media data after a period of not being able to do so.
MediaStream Image Capture API - Web APIs
mediastream image capture concepts and usage the process of retrieving an image or video stream happens as described below.
MediaTrackConstraints.latency - Web APIs
in most cases, low latency is desirable for performance and user experience purposes, but when power consumption is a concern, or delays are otherwise acceptable, higher latency might be acceptable.
MediaTrackSettings.logicalSurface - Web APIs
the most common scenario in which a display surface may be a logical one is if the selected surface contains the entire content area of a window which is too large to display onscreen at once.
Media Capabilities API - Web APIs
'' : 'not ') + 'power efficient.') }) .catch(() => { console.log("decodinginfo error: " + contenttype) }); } media capabilities api concepts and usage there are a myriad of video and audio codecs.
Media Session API - Web APIs
media session concepts and usage the mediametadata interface lets a web site provide rich metadata to the platform ui for media that is playing.
Media Source API - Web APIs
media source extensions concepts and usage playing video and audio has been available in web applications without plugins for a few years now, but the basic features offered have really only been useful for playing single whole tracks.
MerchantValidationEvent.methodName - Web APIs
see merchant validation in payment processing concepts for more information on the process.
Metadata.modificationTime - Web APIs
once that file has been found, its metadata is obtained and the file's modification timestamp year is compared to the current year.
MutationObserver.observe() - Web APIs
example in this example, we demonstrate how to call the method observe() on an instance of mutationobserver, once it has been set up, passing it a target element and a mutationobserverinit options object.
MutationObserverInit.subtree - Web APIs
subtree can be used in concert with the other options to extend monitoring of attributes, text content, and child lists to the entire subtree rooted at the target node.
Navigation Timing API - Web APIs
concepts and usage you can use the navigation timing api to gather performance data on the client side, which you can then transmit to a server using xmlhttprequest or other techniques.
Web-based protocol handlers - Web APIs
registering the same protocol handler more than once will pop up a different notification, indicating that the protocol handler is already registered.
Navigator.registerProtocolHandler() - Web APIs
note: the title has been removed from the spec due to spoofing concerns, but all current browsers still require it.
Navigator.share() - Web APIs
WebAPINavigatorshare
return value a promise that will be fulfilled once a user has completed a share action (usually the user has chosen an application to share to).
Navigator.vibrate() - Web APIs
WebAPINavigatorvibrate
you may provide either a single value (to vibrate once for that many milliseconds) or an array of values to alternately vibrate, pause, then vibrate again.
Node.namespaceURI - Web APIs
WebAPINodenamespaceURI
note too that the namespace prefix, once it is associated with a particular node, cannot be changed.
Node.nodeType - Web APIs
WebAPINodenodeType
examples different types of nodes document.nodetype === node.document_node; // true document.doctype.nodetype === node.document_type_node; // true document.createdocumentfragment().nodetype === node.document_fragment_node; // true var p = document.createelement("p"); p.textcontent = "once upon a time…"; p.nodetype === node.element_node; // true p.firstchild.nodetype === node.text_node; // true comments this example checks if the first node inside the document element is a comment, and displays a message if not.
Node - Web APIs
WebAPINode
this can be used to abort loops once a node has been found (such as searching for a text node which contains a certain string).
NodeIterator.detach() - Web APIs
once this method had been called, calls to other methods on nodeiterator would raise the invalid_state_err exception.
NodeList.prototype.forEach() - Web APIs
WebAPINodeListforEach
the foreach() method of the nodelist interface calls the callback given in parameter once for each value pair in the list, in insertion order.
NodeList - Web APIs
WebAPINodeList
(in this case, the keys are numbers starting from 0 and the values are nodes.) nodelist.foreach() executes a provided function once per nodelist element, passing the element as an argument to the function.
Notification.onclick - Web APIs
examples in the following example, we use an onclick handler to open a webpage in a new tab (specified by the inclusion of the '_blank' parameter) once a notification is clicked: notification.onclick = function(event) { event.preventdefault(); // prevent the browser from focusing the notification's tab window.open('http://www.mozilla.org', '_blank'); } specifications specification status comment notifications apithe definition of 'onclick' in that specification.
OfflineAudioContext.OfflineAudioContext() - Web APIs
for more detail, read audio buffers: frames, samples and channels from our basic concepts guide.
OffscreenCanvas - Web APIs
once a new frame has finished rendering in this context, the transfertoimagebitmap() method can be called to save the most recent rendered image.
PaymentAddress - Web APIs
"success" : "failure"; await response.complete(result); } dopaymentrequest(); once the payment flow has been triggered using paymentrequest.show() and the promise resolves successfully, the paymentresponse object available inside the fulfilled promise (instrumentresponse above) will have a paymentresponse.details property that will contain response details.
PaymentRequest.onmerchantvalidation - Web APIs
ation = ev => { ev.complete(async () => { const merchantserverurl = window.location.origin + '/validation?url=' + encodeuricomponent(ev.validationurl); // get validation data, and complete validation; return await fetch(merchantserverurl).then(r => r.text()); }) }; const response = await request.show(); for more information, see merchant validation in payment processing concepts.
PaymentResponse.complete() - Web APIs
return value a promise which resolves with no input value once the payment interface has been fully closed.
PaymentResponse.methodName - Web APIs
see merchant validation in payment processing concepts for more information.
PaymentValidationErrors - Web APIs
error can be provided all by itself to provide only a generic error message, or in concert with the other properties to serve as an overview while other properties' values gude the user to errors in specific fields in the payment form.
performance.now() - Web APIs
WebAPIPerformancenow
the precision of the returned value is subject to change if/when the security concerns are alleviated through other means.
PerformanceEntry.duration - Web APIs
if the duration concept doesn't apply for a particular performance metric, the browser may choose to return a duration of 0.
PerformanceEventTiming - Web APIs
0 : infinity; document.addeventlistener('visibilitychange', (event) => { firsthiddentime = math.min(firsthiddentime, event.timestamp); }, {once: true}); // sends the passed data to an analytics endpoint.
Performance Timeline - Web APIs
(some performance entry types have no concept of duration and this value is set to '0' for such types.) this interface includes a tojson() method that returns the serialization of the performanceentry object.
Using the Permissions API - Web APIs
the permissions api provides the tools to allow developers to implement a better user experience as far as permissions are concerned.
ProgressEvent.lengthComputable - Web APIs
the progressevent.lengthcomputable read-only property is a boolean flag indicating if the resource concerned by the progressevent has a length that can be calculated.
Proximity Events - Web APIs
once captured, the event object gives access to different kinds of information: the deviceproximityevent event provides an exact match for the distance between the device and the object through its value property.
PushMessageData - Web APIs
unlike the similar methods in the fetch api, which only allow the method to be invoked once, these methods can be called multiple times.
Web Push API Notifications best practices - Web APIs
this at least prevents the user from getting spontaneously asked this question on web pages thaty've only glanced at once may rarely if ever look at again.
Push API - Web APIs
WebAPIPush API
push concepts and usage when implementing pushmanager subscriptions, it is vitally important that you protect against csrf/xsrf issues in your app.
RTCConfiguration.certificates - Web APIs
the certificates property's value cannot be changed once it's first specified.
RTCConfiguration - Web APIs
this configuration option cannot be changed after it is first specified; once the certificates have been set, this property is ignored in future calls to rtcpeerconnection.setconfiguration().
RTCDTMFToneChangeEvent - Web APIs
it appends each tone to a display box as it's played, and, once all tones have been sent, re-enabled a previously-disabled "send" button, allowing the next dmtf string to be entered.
RTCDataChannelEvent() - Web APIs
rtcdatachanneleventinit a rtcdatachanneleventinit dictionary, which has following fields: "channel" of type rtcdatachannel, representing the data channel being concerned by the event.
RTCDtlsTransport - Web APIs
for this reason, you'll sometimes see separate transports created at first, one for each track, then see them get bundled up once it's known that bundling is possible.
RTCIceCandidatePairStats.availableOutgoingBitrate - Web APIs
the candidate pair was once in use, but no longer is.
RTCIceCandidatePairStats.nominated - Web APIs
once a candidate pair has been nominated and the two peers have each reconfigured themselves to use the specified configuration, the ice negotiation process can potentially end (or it can continue, to allow the connection to adapt to changing conditions).
RTCIceCandidatePairStats.retransmissionsReceived - Web APIs
note: retransmissions are connectivity check requests with a transaction_transmit_counter attribute whose req field is greater than 1 (indicating that the request has been transmitted more than once).
RTCIceCandidatePairStats.retransmissionsSent - Web APIs
note: retransmissions are connectivity check requests with a transaction_transmit_counter attribute whose req field is greater than 1 (indicating that the request has been transmitted more than once).
RTCIceCandidatePairStats - Web APIs
any candidate pair that isn't the active pair of candidates for a transport gets deleted if the rtcicetransport performs an ice restart, at which point the state of the ice transport returns to new and negotiation starts once again.
RTCIceServer - Web APIs
.com", username: "louis@mozilla.com", credential: "webrtcdemo" }, { urls: [ "stun:stun.example.com", "stun:stun-1.example.com" ] }] }; var pc = new rtcpeerconnection(configuration); once the configuration object has been created, it is passed into the rtcpeerconnection() constructor to use it as the configuration for the new peer connection.
RTCIceTransport.onselectedcandidatepairchange - Web APIs
this event will occur at least once, and may occur more than once if the ice agent continues to identify candidate pairs that will work better, more closely match the requested parameters, and so forth.
RTCIceTransportState - Web APIs
if the restart occured during a transient "disconnected" state, the state transitions to "checking" the disconnected state "disconnected" is a transient state that occurs when the connection between the two peers fails in a manner that the webrtc infrastructure can automatically correct once the connection is available again.
RTCIdentityAssertion - Web APIs
once set it can't be changed.
RTCIdentityErrorEvent.idp - Web APIs
it is likely that it will correct this name when it will unprefix rtcpeerconnection, once spec and implementation will have been stabilized.
RTCIdentityErrorEvent.loginUrl - Web APIs
it is likely that it will correct this name when it will unprefix rtcpeerconnection, once spec and implementation will have been stabilized.
RTCIdentityErrorEvent.protocol - Web APIs
it is likely that it will correct this name when it will unprefix rtcpeerconnection, once spec and implementation will have been stabilized.
RTCIdentityErrorEvent - Web APIs
it is likely that it will correct this name when it will unprefix rtcpeerconnection, once spec and implementation will have been stabilized.
RTCIdentityEvent.assertion - Web APIs
it is likely that it will correct this name when it will unprefix rtcpeerconnection, once spec and implementation will have been stabilized.
RTCIdentityEvent - Web APIs
it is likely that it will correct this name when it will unprefix rtcpeerconnection, once spec and implementation will have been stabilized.
RTCInboundRtpStreamStats.averageRtcpInterval - Web APIs
since this value is also used to determine the number of seconds after a stream starts to flow before the first rtcp packet should be sent, the result is that if many users try to start using the service at the same time, the server won't be flooded with rtcp packets coming in all at once.
RTCOfferAnswerOptions.voiceActivityDetection - Web APIs
syntax var options = { voiceactivitydetection: trueorfalse }; value a boolean value indicating whether or not the connection should use voice detection once running.
RTCOutboundRtpStreamStats.averageRtcpInterval - Web APIs
since this value is also used to determine the number of seconds after a stream starts to flow before the first rtcp packet should be sent, the result is that if many users try to start using the service at the same time, the server won't be flooded with rtcp packets coming in all at once.
RTCPeerConnection() - Web APIs
this configuration option cannot be changed after it is first specified; once the certificates have been set, this property is ignored in future calls to rtcpeerconnection.setconfiguration().
RTCPeerConnection.addStream() - Web APIs
instead of using this obsolete method, you should instead use addtrack() once for each track you wish to send to the remote peer.
RTCPeerConnection.addTrack() - Web APIs
once that succeeds, it uses mediadevices.getusermedia() to obtain access to the local webcam and microphone.
RTCPeerConnection: addstream event - Web APIs
if (pc.addtrack !== undefined) { pc.ontrack = ev => { ev.streams.foreach(stream => doaddstream(stream)); } } else { pc.onaddstream = ev => { doaddstream(ev.stream); } } this calls a function doaddstream() once for each stream being added to the rtcpeerconnection, regardless of whether the browser sends addstream or track.
RTCPeerConnection.canTrickleIceCandidates - Web APIs
note: this property's value is determined once the local peer has called rtcpeerconnection.setremotedescription(); the provided description is used by the ice agent to determine whether or not the remote peer supports trickled ice candidates.
RTCPeerConnection.connectionState - Web APIs
<<< make this a link once i know where that will be documented "connected" every ice transport used by the connection is either in use (state "connected" or "completed") or is closed (state "closed"); in addition, at least one transport is either "connected" or "completed".
RTCPeerConnection.createAnswer() - Web APIs
once that succeeds, the answer is sent to the signaling server using whatever protocol you see fit.
RTCPeerConnection.getStats() - Web APIs
once the html for the report is generated, it is injected into the element whose class is "stats-box" by setting its innerhtml property.
RTCPeerConnection: icecandidate event - Web APIs
indicating that ice gathering is complete once all ice transports have finished gathering candidates and the value of the rtcpeerconnection object's icegatheringstate has made the transition to complete, an icecandidate event is sent with the value of complete set to null.
RTCPeerConnection.onnegotiationneeded - Web APIs
once that's succeeded in turn, the offer can be sent to the signaling server for delivery to the remote peer.
RTCPeerConnection.peerIdentity - Web APIs
once this promise resolves successfully, the resulting identity is the target peer identity and cannot change for the duration of the connection.
RTCPeerConnection.setConfiguration() - Web APIs
you cannot change the identity information for a connection once it's already been set.
RTCPeerConnectionIceErrorEvent - Web APIs
the 701 error is fired only once per server url, and only while the is icegatheringstate is gathering.
RTCPeerConnectionIceEvent() - Web APIs
options a dictionary of type rtcpeerconnectioninit, which may contain one or more of the following fields: "candidate" (optional, default is null): a rtcicecandidate representing the ice candidate being concerned by the event.
RTCRtpReceiver.transport - Web APIs
this is replaced with an rtcdtlstransport once the receiver's transport has been established.
RTCRtpSender.getStats() - Web APIs
syntax var promise = rtcrtpsender.getstats(); return value a javascript promise which is fulfilled once the statistics are available.
RTCRtpSender.replaceTrack() - Web APIs
return value a promise which is fulfilled once the track has been successfully replaced.
RTCRtpSender.setParameters() - Web APIs
you cannot change the number of encoding options once the sender has been created.
RTCRtpSender.setStreams() - Web APIs
once the track has been added to all of the streams, renegotiation of the connection will be triggered by the negotiationneeded event being dispatched to the rtcpeerconnection to which the sender belongs.
RTCRtpSender.transport - Web APIs
this is replaced with an rtcdtlstransport once the sender's transport has been established.
RTCSessionDescription - Web APIs
once the two peers agree upon a configuration for the connection, negotiation is complete.
RTCStatsIceCandidatePairState - Web APIs
once that check has succeeded, this pair will unfreeze and move into the waiting state.
ReadableByteStreamController.close() - Web APIs
note: readers will still be able to read any previously-enqueued chunks from the stream, but once those are read, the stream will become closed.
ReadableStream.pipeThrough() - Web APIs
the method will return a fulfilled promise once this process completes, unless an error is encountered while closing the destination in which case it will be rejected with that error.
ReadableStream.pipeTo() - Web APIs
the method will return a fulfilled promise once this process completes, unless an error is encountered while closing the destination in which case it will be rejected with that error.
ReadableStream.tee() - Web APIs
since a response body cannot be consumed more than once, you’d need two copies to do this.
ReadableStreamDefaultController.close() - Web APIs
readers will still be able to read any previously-enqueued chunks from the stream, but once those are read, the stream will become closed.
ReadableStreamDefaultController.error() - Web APIs
note: the error() method can be called more than once, and can be called when the stream is not readable.
Reporting API - Web APIs
concepts and usage there are a number of different features and problems on the web platform that generate information useful to web developers when they are trying to fix bugs or improve their websites in other ways.
Request - Web APIs
WebAPIRequest
note: the body functions can be run only once; subsequent calls will resolve with empty strings/arraybuffers.
Resize Observer API - Web APIs
concepts and usage there are a whole raft of use cases for responsive design techniques (and others besides) that respond to changes in an element's size, but previously their implementations have often been hacky and/or brittle.
SVGImageElement - Web APIs
returns a promise which resolves once the image data is ready to be used.
Using the Screen Capture API - Web APIs
once that's done, srcobject is set to null to make sure it's understood by anyone interested that there's no stream connected.
Screen Capture API - Web APIs
screen capture api concepts and usage the screen capture api is relatively simple to use.
Screen Wake Lock API - Web APIs
concepts and usage most devices by default turn off their screen after a specified amount of time to prolong the life of the hardware.
Selection.deleteFromDocument() - Web APIs
once you do, you can remove the selected content by clicking the button below.</p> <button>delete selected text</button> javascript let button = document.queryselector('button'); button.addeventlistener('click', deleteselection); function deleteselection() { let selection = window.getselection(); selection.deletefromdocument(); } result specifications specification status co...
Sensor APIs - Web APIs
sensor apis concepts and usage although the generic sensor api specification defines a sensor interface, as a web developer you will never use it.
Using server-sent events - Web APIs
for example, assuming the client script is on example.com: const evtsource = new eventsource("//api.example.com/ssedemo.php", { withcredentials: true } ); once you've instantiated your event source, you can begin listening for messages from the server by attaching a handler for the message event: evtsource.onmessage = function(event) { const newelement = document.createelement("li"); const eventlist = document.getelementbyid("list"); newelement.innerhtml = "message: " + event.data; eventlist.appendchild(newelement); } this code listens for i...
Server-sent events - Web APIs
concepts and usage to learn how to use server-sent events, see our article using server-sent events.
ServiceWorkerContainer.ready - Web APIs
once that condition is met, it resolves with the serviceworkerregistration.
ServiceWorkerContainer.startMessages() - Web APIs
explanation by default, all messages sent from a page's controlling service worker to the page (using client.postmessage()) are queued while the page is loading, and get dispatched once the page's html document has been loaded and parsed (i.e.
ServiceWorkerContainer - Web APIs
once that condition is met, it resolves with the serviceworkerregistration.
ServiceWorkerGlobalScope - Web APIs
once successfully registered, a service worker can and will be terminated when idle to conserve memory and processor power.
SourceBuffer.appendBufferAsync() - Web APIs
it returns a promise which is fulfilled once the buffer has been appended.
SourceBuffer.removeAsync() - Web APIs
return value a promise whose fulfillment handler is executed once the buffers in the specified time range have been removed from the sourcebuffer.
StorageManager.estimate() - Web APIs
this method operates asynchronously, so it returns a promise which resolves once the information is available.
Storage API - Web APIs
it's also conceivable that the browser might offer a user interface to customize these quotas.
StylePropertyMapReadOnly.forEach() - Web APIs
the stylepropertymapreadonly.foreach() method executes a provided function once for each element of stylepropertymapreadonly.
StylePropertyMapReadOnly - Web APIs
stylepropertymapreadonly.foreach() executes a provided function once for each element of stylepropertymapreadonly.
Visual Viewport API - Web APIs
visual viewport concepts and usage the mobile web contains two viewports, the layout viewport and the visual viewport.
WakeLockSentinel.release() - Web APIs
the release() method of the wakelocksentinel interface releases the wakelocksentinel, returning a promise that is resolved once the sentinel has been successfully released.
WaveShaperNode.oversample - Web APIs
once applied, the number of samples is reduced to its initial numbers.
WebGLRenderingContext.enableVertexAttribArray() - Web APIs
once that's been done, other methods can be used to access the attribute, including vertexattribpointer(), vertexattrib*(), and getvertexattrib().
WebGLRenderingContext.getExtension() - Web APIs
examples once a webgl extension is enabled, you are able to use the methods, properties or constants that this extension object provides.
WebGLRenderingContext.makeXRCompatible() - Web APIs
return value a promise which successfully resolves once the webgl context is ready to be used for rendering webxr content.
WebGLRenderingContext.uniform[1234][fi][v]() - Web APIs
they retain the values assigned to them by a call to this method until the next successful link operation occurs on the program object, when they are once again initialized to 0.
WebGLRenderingContext - Web APIs
to get an access to a webgl context for 2d and/or 3d graphics rendering, call getcontext() on a <canvas> element, supplying "webgl" as the argument: var canvas = document.getelementbyid('mycanvas'); var gl = canvas.getcontext('webgl'); once you have the webgl rendering context for a canvas, you can render within it.
Clearing by clicking - Web APIs
the event handler removes // itself, because it only needs to run once.
Clearing with colors - Web APIs
the event handler removes // itself, because it only needs to run once.
Scissor animation - Web APIs
for each square, we set its color once, and then update only its position every frame.
Matrix math for the web - Web APIs
while this article uses css to simplify explanations, matrices are a core concept used by many different technologies including webgl, the webxr (vr and ar) api, and glsl shaders.
Creating 3D objects using WebGL - Web APIs
colors = []; for (var j = 0; j < facecolors.length; ++j) { const c = facecolors[j]; // repeat each color four times for the four vertices of the face colors = colors.concat(c, c, c, c); } const colorbuffer = gl.createbuffer(); gl.bindbuffer(gl.array_buffer, colorbuffer); gl.bufferdata(gl.array_buffer, new float32array(colors), gl.static_draw); define the element array once the vertex arrays are generated, we need to build the element array.
Using WebGL extensions - Web APIs
in that case, their name can be prefixed by the vendor prefix (moz_, webkit_, etc.) or the extension is only available once a browser preference has been toggled.
WebRTC coding guide - Web APIs
once you have an overall understanding of what webrtc does and how it works, your mind likely turns to implementation.
Introduction to the Real-time Transport Protocol (RTP) - Web APIs
from this point on, the microphone is re-engaged and the remote user is once again able to hear the local user, as well as speak to them.
Introduction to WebRTC protocols - Web APIs
so that both peers can understand each other once the data is transferring.
Lifetime of a WebRTC session - Web APIs
only once signaling has been successfully completed can the true process of opening the webrtc peer connection begin.
WebSocket.bufferedAmount - Web APIs
this value resets to zero once all queued data has been sent.
Web Video Text Tracks Format (WebVTT) - Web APIs
there can be zero or more of them, and they can be used in any order so long as each setting is used no more than once.
Inputs and input sources - Web APIs
= null; let righthandsource = null; xrsession.addeventlistener("inputsourceschange", event => { inputsourcelist = event.session.inputsources; inputsourcelist.foreach(source => { switch(source) { case "left": lefthandsource = source; break; case "right": righthandsource = source; break; } }); }); the inputsourceschange event is also fired once when the session's creation callback first completes execution, so you can use it to fetch the input source list as soon as it's available at startup time.
Starting up and shutting down a WebXR session - Web APIs
preparing the new session for use once the requestsession() method's returned promise successfully resolves, you know you have a usable webxr session in hand.
Using the Web Animations API - Web APIs
alice").animate( [ { transform: 'rotate(0) translate3d(-50%, -50%, 0)', color: '#000' }, { color: '#431236', offset: 0.3}, { transform: 'rotate(360deg) translate3d(-50%, -50%, 0)', color: '#000' } ], { duration: 3000, iterations: infinity } ); what’s more, if we only wanted to specify the duration of the animation and not its iterations (by default, animations iterate once), we could pass in the milliseconds alone: document.getelementbyid("alice").animate( [ { transform: 'rotate(0) translate3d(-50%, -50%, 0)', color: '#000' }, { color: '#431236', offset: 0.3}, { transform: 'rotate(360deg) translate3d(-50%, -50%, 0)', color: '#000' } ], 3000); controlling playback with play(), pause(), reverse(), and updateplaybackrate() while we can write css ani...
Web Budget API - Web APIs
concepts and usage tbd interfaces budgetservice provides a programmatic interface to the user agent’s budget service.
Web Speech API - Web APIs
the web speech api has two parts: speechsynthesis (text-to-speech), and speechrecognition (asynchronous speech recognition.) web speech concepts and usage the web speech api makes web apps able to handle voice data.
Using the Web Storage API - Web APIs
basic concepts storage objects are simple key-value stores, similar to objects, but they stay intact through page loads.
Web Storage API - Web APIs
web storage concepts and usage the two mechanisms within web storage are as follows: sessionstorage maintains a separate storage area for each given origin that's available for the duration of the page session (as long as the browser is open, including page reloads and restores) stores data only for a session, meaning that the data is stored until the browser (or tab) is closed.
Web Workers API - Web APIs
web workers concepts and usage a worker is an object created using a constructor (e.g.
Window: animationstart event - Web APIs
if there is an animation-delay, this event will fire once the delay period has expired.
Window.defaultStatus - Web APIs
example <html> <body onload="window.defaultstatus='hello!';"/> <button onclick="window.confirm('are you sure you want to quit?');">confirm</button> </body> </html> notes to set the status once the window has been opened, use window.status.
Window.devicePixelRatio - Web APIs
then the updatepixelratio() function is called once to display the starting value, after which the media query is created using matchmedia() and addeventlistener() is called to set up updatepixelratio() as a handler for the change event.
Window.onappinstalled - Web APIs
the onappinstalled attribute of the window object serves as an event handler for the appinstalled event, which is dispatched once the web application is successfully installed as a progressive web app.
Window.onmozbeforepaint - Web APIs
this is used in concert with the window.mozrequestanimationframe() method to perform smooth, synchronized animations from javascript code.
window.postMessage() - Web APIs
security concerns if you do not expect to receive messages from other sites, do not add any event listeners for message events.
Window.sizeToContent() - Web APIs
in order for it to work, the dom content should be loaded when this function is called—for example, once the domcontentloaded event has been thrown.
Window - Web APIs
WebAPIWindow
the window interface is home to a variety of functions, namespaces, objects, and constructors which are not necessarily directly associated with the concept of a user interface window.
WindowClient.focus() - Web APIs
syntax windowclient.focus().then(function(windowclient) { // do something with your windowclient once it has been focused }); parameters none.
WindowOrWorkerGlobalScope.fetch() - Web APIs
the fetch() method of the windoworworkerglobalscope mixin starts the process of fetching a resource from the network, returning a promise which is fulfilled once the response is available.
Worker.prototype.postMessage() - Web APIs
note: postmessage() can only send a single object at once.
Worker.terminate() - Web APIs
WebAPIWorkerterminate
this does not offer the worker an opportunity to finish its operations; it is simply stopped at once.
Worker - Web APIs
WebAPIWorker
this does not let worker finish its operations; it is halted at once.
WritableStreamDefaultWriter - Web APIs
the writablestreamdefaultwriter interface of the the streams api is the object returned by writablestream.getwriter() and once created locks the writer to the writablestream ensuring that no other streams can write to the underlying sink.
XDomainRequest.onprogress - Web APIs
once loading is complete, the xdomainrequest.onload event handler gets called.
Using XMLHttpRequest - Web APIs
the most effective way to avoid this problem is to set a listener on the new window's activate event which is set once the terminated window has its unload event triggered.
XMLHttpRequest.getAllResponseHeaders() - Web APIs
sponseheaders(); // convert the header string into an array // of individual headers var arr = headers.trim().split(/[\r\n]+/); // create a map of header names to values var headermap = {}; arr.foreach(function (line) { var parts = line.split(': '); var header = parts.shift(); var value = parts.join(': '); headermap[header] = value; }); } } once this is done, you can, for example: var contenttype = headermap["content-type"]; this obtains the value of the content-type header into the variable contenttype.
XMLSerializer - Web APIs
once that's done, insertadjacenthtml() is used to insert the <input> element into the dom.
XPathExpression - Web APIs
this is useful when an expression will be reused in an application, because it is just compiled once and all namespace prefixes which occur within the expression are preresolved.
XRInputSource.targetRayMode - Web APIs
example this fragment of code shows part of a function to be called once every frame.
XRInputSource.targetRaySpace - Web APIs
example this fragment of code shows part of a function to be called once every frame.
XRInputSourceArray.values() - Web APIs
the loop exits once every input has been delivered to checkinput().
XRReferenceSpace: reset event - Web APIs
this way, the user's position only changes once rather than twice.
XRRigidTransform.position - Web APIs
in all cases, once the space has been obtained, it gets passed into the refspacecreated() function.
XRRigidTransform - Web APIs
even better, once it's been computed, it's cached so that subsequent requests are significantly faster.
XRSession.cancelAnimationFrame() - Web APIs
once started, the session schedules its first frame to be rendered by calling requestanimationframe().
XRSession.end() - Web APIs
WebAPIXRSessionend
the end() method shuts down the xrsession on which it's called, returning a promise which resolves once the session has fully shut down.
XRSession.requestAnimationFrame() - Web APIs
the specified callback is executed once before the next repaint; if you wish for it to be executed for the following repaint, you must call requestanimationframe() again.
XRSystem: requestSession() - Web APIs
while only one immersive vr session can be active at a time, multiple inline sessions can be in progress at once.
XRSystem - Web APIs
WebAPIXRSystem
if there isn't, we use requestsession() to start one and, once the returned promise resolves, we call a function onsessionstarted() to set up our session for rendering and so forth.
XRTargetRayMode - Web APIs
examples this fragment of code shows part of a function to be called once every frame.
XRWebGLLayer.getNativeFramebufferScaleFactor() static method - Web APIs
examples in this example, we request a frame buffer at the device's native resolution, regardless of any performance concerns: function requestnativescalewebgllayer(gl, xrsession) { return gl.makexrcompatible().then(() => { let scalefactor = xrwebgllayer.getnativeframebufferscalefactor(xrsession); let gllayer = new xrwebgllayer(xrsession, gl, { framebufferscalefactor: scalefactor }); xrsession.updaterenderstate({ baselayer: gllayer }); }); }; this starts by calling the webgl...
mssitemodejumplistitemremoved - Web APIs
syntax event property object.oncandidatewindowhide = handler; addeventlistener method object.addeventlistener("mssitemodejumplistitemremoved", handler, usecapture) general info synchronous no bubbles no cancelable no note this event is raised once for every item that has been removed since the last time mssitemodeshowjumplist was called.
Using the aria-hidden attribute - Accessibility
</p> accessibility concerns best practices aria-hidden="true" should not be added when: the html hidden attribute is present the element or the element's ancestor is hidden with display: none the element or the element's ancestor is hidden with visibility: hidden in all three scenarios, the attribute is unnecessary to add because the element has already been removed from the accessibility tree.
ARIA annotations - Accessibility
the annotations should just work once screenreader support is added.
ARIA: tabpanel role - Accessibility
<div role="tablist"> <div role="tab" aria-selected="true" aria-controls="tabpanel-id" id="tab-id" tabindex="0">tab label</div> accessibility concerns optionally, warn of any potential accessibility concerns that exist with using this property, and how to work around them.
ARIA: timer role - Accessibility
<div id="clock" role="timer" aria-live="polite" aria-atomic="true"></div> accessibility concerns improperly using the timer role can unintentionally xxx specifications specification status accessible rich internet applications (wai-aria) 1.1the definition of 'timer' in that specification.
ARIA: Comment role - Accessibility
i think the cowbell could distract from the solo.</p> <p><time datetime="2019-03-30t21:02">march 30 2019, 21:02</time></p> </div> </div> accessibility concerns landmark roles are intended to be used sparingly, to identify larger overall sections of the document.
ARIA: Complementary role - Accessibility
<li><a href="#">stop searching for the perfect lunch containers because i've found them</a></li> <li><a href="#">the time has come to finally decide what we should be calling these foods</a></li> <li><a href="#">17 really good posts we saw on tumblr this week</a></li> <li><a href="#">10 parent hacks we know work because we tried them</a></li> </ul> </div> accessibility concerns landmark roles are intended to be used sparingly, to identify larger overall sections of the document.
ARIA: contentinfo role - Accessibility
content is available under <a href="#">these licenses</a>.</p> </div> </body> accessibility concerns use sparingly landmark roles are intended to identify larger overall sections of the document.
ARIA: document role - Accessibility
once focus returns to the message list either by activating the back button or pressing an asociated keystroke, direct application interaction mode is invoked again, and the user can move to a different conversation in the list with the arrow keys.
ARIA: form role - Accessibility
</form> accessibility concerns use sparingly landmark roles are intended to identify larger overall sections of the document.
ARIA: grid role - Accessibility
break; case "pagedown": var i = maxrow; var result; do { result = moveto(i, event.target.dataset.col); i--; } while (result == false); break; case "enter": alert(event.target.textcontent); break; } event.preventdefault(); }); more examples data grid examples layout grids examples w3c/wai tutorial: tables accessibility concerns even if the keyboard use is properly implemented, some users might not be aware that they have to use the arrow keys.
ARIA: gridcell role - Accessibility
"gridcell">9.9</div> <div role="gridcell">778.6</div> <div role="gridcell">67</div> </div> </div> <div role="rowgroup"> <div role="row"> <div role="gridcell">saturn</div> <div role="gridcell">120,536</div> <div role="gridcell">10.7</div> <div role="gridcell">1433.5</div> <div role="gridcell">62</div> </div> </div> </div> accessibility concerns support for gridcell and certain gridcell-related aria roles and properties have poor support with assistive technologies.
ARIA: Main role - Accessibility
example <body> <!-- primary navigation --> <div role="main"> <h1>the the first indochina war</h1> <!-- article content --> </div> <!-- sidebar and footer --> </body> accessibility concerns use only one main role per document the main landmark role should only be used once per document.
ARIA: Mark role - Accessibility
accessibility concerns landmark roles are intended to be used sparingly, to identify larger overall sections of the document.
ARIA: Navigation Role - Accessibility
examples <div role="navigation" aria-label="customer service"> <ul> <li><a href="#">help</a></li> <li><a href="#">order tracking</li> <li><a href="#">shipping &amp; delivery</a></li> <li><a href="#">returns</a></li> <li><a href="#">contact us</a></li> <li><a href="#">find a store</a></li> </ul> </div> accessibility concerns landmark roles are intended to be used sparingly, to identify larger overall sections of the document.
ARIA: Region role - Accessibility
examples <div role="region" aria-labelledby="region-heading"> <h2 id="region-heading">this heading's <code>id</code> attribute helps this region have an accessible name</h2> <!-- region content --> </div> accessibility concerns use sparingly!
ARIA: search role - Accessibility
examples <form id="search" role="search"> <label for="search-input">search this site</label> <input type="search" id="search-input" name="search" spellcheck="false"> <input value="submit" type="submit"> </form> accessibility concerns landmark roles are intended to be used sparingly, to identify larger overall sections of the document.
ARIA: Suggestion role - Accessibility
</p> <div id="comment-source">suggested by chris, <time datetime="2019-03-30t19:29">march 30 2019, 19:29</time></div> browsers tend to provide a default black strikethrough for deletions, and a black underline for insertions, but you’ll probably want to use accessibility concerns landmark roles are intended to be used sparingly, to identify larger overall sections of the document.
ARIA: button role - Accessibility
{ var audio = document.getelementbyid('audio'); // check to see if the button is pressed var pressed = (element.getattribute("aria-pressed") === "true"); // change aria-pressed to the opposite state element.setattribute("aria-pressed", !pressed); // toggle the play state of the audio file if(pressed) { audio.pause(); } else { audio.play(); } } result accessibility concerns buttons are interactive controls and thus focusable.
ARIA: checkbox role - Accessibility
se"]::before { content: "[ ]"; } javascript function changecheckbox(event) { let item = document.getelementbyid('chkpref'); switch(item.getattribute('aria-checked')) { case "true": item.setattribute('aria-checked', "false"); break; case "false": item.setattribute('aria-checked', "true"); break; } } accessibility concerns when the checkbox role is added to an element, the user agent should do the following: expose the element as having a checkbox role in the operating system's accessibility api.
ARIA: heading role - Accessibility
role="heading" aria-level="3">chapter 1.1</div> <p>more text in a sub section.</p> ...</div> however, instead, you should do: <div id="container"> <h1>the main page heading</h1> <p>this article is about showing a page structure.</p> <h2>introduction</h2> <p>an introductory text.</p> <h2>chapter 1</h2> <p>text</p> <h3>chapter 1.1</h3> <p>more text in a sub section.</p> ...</div> accessibility concerns if you must use the heading role and aria-level attribute, do not go over level 6 so that you are consistent with html.
An overview of accessible web applications and widgets - Accessibility
once keyboard focus is inside the container, the arrow keys should allow the user to navigate between each tab (the <li> elements).
Accessibility documentation index - Accessibility
105 web accessibility for seizures and physical reactions media queries, peat, photosensitve epilepsy analysis tool, the harding test, color, epilepsy, musicogenic seizures, photosensitivity, prefers-reduced-motion, reflex epilepsy, saturation, seizure disorders, seizures, web animation this article introduces concepts behind making web content accessibile for those with vestibular disorders, and how to measure and prevent content leading to seizures and / or other physical reactions.
Keyboard-navigable JavaScript widgets - Accessibility
once keyboard focus lands on the containing <ul> element, the javascript developer must programmatically manage focus and respond to arrow keys.
:empty - CSS: Cascading Style Sheets
WebCSS:empty
--></p> </div> css body { display: flex; justify-content: space-around; } .box { background: pink; height: 80px; width: 80px; } .box:empty { background: lime; } result accessibility concerns assistive technology such as screen readers cannot parse interactive content that is empty.
:focus - CSS: Cascading Style Sheets
WebCSS:focus
syntax :focus examples html <input class="red-input" value="i'll be red when focused."><br> <input class="blue-input" value="i'll be blue when focused."> css .red-input:focus { background: yellow; color: red; } .blue-input:focus { background: yellow; color: blue; } result accessibility concerns make sure the visual focus indicator can be seen by people with low vision.
:has() - CSS: Cascading Style Sheets
WebCSS:has
instead, it could only be used with functions like document.queryselector(); this was due to performance concerns.
:invalid - CSS: Cascading Style Sheets
WebCSS:invalid
: 1px; padding: 1px; } .field { margin: 1px; padding: 1px; } input:invalid { background-color: #ffdddd; } form:invalid { border: 5px solid #ffdddd; } input:valid { background-color: #ddffdd; } form:valid { border: 5px solid #ddffdd; } input:required { border-color: #800000; border-width: 3px; } input:required:invalid { border-color: #c00000; } result accessibility concerns the color red is commonly used to indicate invalid input.
:optional - CSS: Cascading Style Sheets
WebCSS:optional
accessibility concerns if a form contains optional <input>s, required inputs should be indicated using the required attribute.
:required - CSS: Cascading Style Sheets
WebCSS:required
accessibility concerns mandatory <input>s should have the required attribute applied to them.
:target - CSS: Cascading Style Sheets
WebCSS:target
once targeted, the css changes their display so that they are shown.
:valid - CSS: Cascading Style Sheets
WebCSS:valid
accessibility concerns the color green is commonly used to indicate valid input.
speak-as - CSS: Cascading Style Sheets
accessibility concerns assistive technology support is very limited for the speak-as property.
@counter-style - CSS: Cascading Style Sheets
once the specified set of symbols have exhausted, the fallback style will be used for the rest of the list.
font-stretch - CSS: Cascading Style Sheets
accessibility concerns people with dyslexia and other cognitive conditions may have difficulty reading fonts that are too condensed, especially if the font has a low contrast color ratio.
font-weight - CSS: Cascading Style Sheets
accessibility concerns people experiencing low vision conditions may have difficulty reading text set with a font-weight value of 100 (thin/hairline) or 200 (extra light), especially if the font has a low contrast color ratio.
-ms-high-contrast - CSS: Cascading Style Sheets
@media screen and (-ms-high-contrast: active) { /* all high contrast styling rules */ } @media screen and (-ms-high-contrast: black-on-white) { div { background-image: url('image-bw.png'); } } @media screen and (-ms-high-contrast: white-on-black) { div { background-image: url('image-wb.png'); } } accessibility concerns theming high contrast mode's theme colors come from a limited subset of deprecated css2 system colors.
update - CSS: Cascading Style Sheets
none once it has been rendered, the layout can no longer be updated.
@media - CSS: Cascading Style Sheets
WebCSS@media
width width of the viewport including width of scrollbar accessibility concerns to best accommodate people who adjust a site's text size, use ems when you need a <length> for your media queries.
user-zoom - CSS: Cascading Style Sheets
accessibility concerns disabling zooming capabilities prevents people experiencing low vision conditions from being able to read and understand page content.
viewport-fit - CSS: Cascading Style Sheets
accessibility concerns when using the viewport-fit descriptor, one must keep in mind that not all device displays are rectangular, and should therefore make use of the safe area inset variables.
Coordinate systems - CSS: Cascading Style Sheets
it simply calls setcoords() once for each coordinate system, passing in the event that occurred.
CSS Animations tips and tricks - CSS: Cascading Style Sheets
this callback adds the "changing" class back onto the box, so that the repaint will start the animation once again.
Using CSS animations - CSS: Cascading Style Sheets
defining the animation sequence using keyframes once you’ve configured the animation’s timing, you need to define the appearance of the animation.
Box alignment in grid layout - CSS: Cascading Style Sheets
this means that you can set alignment for all of your grid items at once, then override any items that need a different alignment by applying the align-self or justify-self property to the rules for the individual grid items.
CSS Basic Box Model - CSS: Cascading Style Sheets
ight max-width min-height min-width properties controlling the margins of a box margin margin-bottom margin-left margin-right margin-top margin-trim properties controlling the paddings of a box padding padding-bottom padding-left padding-right padding-top other properties visibility guides introduction to the css box model explains one of the fundamental concept of css: the box model.
Handling Overflow in Multicol - CSS: Cascading Style Sheets
in fragmented media, once a fragment (for example a page) is filled with columns, the columns will move to a new page and fill that up with columns.
CSS Multi-column Layout - CSS: Cascading Style Sheets
reference multiple-column layout properties column-count column-fill column-gap column-rule column-rule-color column-rule-style column-rule-width column-span column-width columns related css fragmentation properties break-after break-before break-inside orphans widows guides basic concepts of multicol an overview of the multiple-column layout specification styling columns how to use column rules and manage the spacing between columns.
Using feature queries - CSS: Cascading Style Sheets
once a floated item becomes a grid item, the float is removed — something you can read more about in supporting older browsers.
CSS Containment - CSS: Cascading Style Sheets
key concepts and terminology this specification defines only one property, the contain property.
CSS Display - CSS: Cascading Style Sheets
css properties display css data types <display-outside> <display-inside> <display-listitem> <display-box> <display-internal> <display-legacy> guides css flow layout (display: block, display: inline) block and inline layout in normal flow flow layout and overflow flow layout and writing modes formatting contexts explained in flow and out of flow display: flex basic concepts of flexbox aligning items in a flex container controlling ratios of flex items along the main axis cross-browser flexbox mixins mastering wrapping of flex items ordering flex items relationship of flexbox to other layout methods backwards compatibility of flexbox typical use cases of flexbox display: grid basic concepts of grid layout relationship to other layout methods line-ba...
Aligning Items in a Flex Container - CSS: Cascading Style Sheets
once again we can switch our flex-direction to column in order to see how this property behaves when we are working by column.
Backwards Compatibility of Flexbox - CSS: Cascading Style Sheets
display: inline-block once an inline-block item becomes a flex item, it is blockified and so behavior of display: inline-block like preserving white space between items no longer applies.
Typical use cases of Flexbox - CSS: Cascading Style Sheets
this is something that may well change once box alignment is implemented in block layout.
CSS Flexible Box Layout - CSS: Cascading Style Sheets
justify-content align-content align-items align-self place-content place-items row-gap column-gap gap glossary entries flexbox flex container flex item main axis cross axis flex guides basic concepts of flexbox an overview of the features of flexbox relationship of flexbox to other layout methods how flexbox relates to other layout methods, and other css specifications aligning items in a flex container how the box alignment properties work with flexbox.
Flow Layout and Overflow - CSS: Cascading Style Sheets
once it fills the box, it continues to overflow in a visible way, displaying content outside the box, potentially displaying under subsequent content.
Flow Layout and Writing Modes - CSS: Cascading Style Sheets
logical properties and values once you are working in writing modes other than horizontal-tb many of the properties and values that are mapped to the physical dimensions of the screen seem strange.
Introduction to formatting contexts - CSS: Cascading Style Sheets
this article introduces the concept of formatting contexts, of which there are several types, including block formatting contexts, inline formatting contexts, and flex formatting contexts.
CSS Flow Layout - CSS: Cascading Style Sheets
once something is taken out of flow it works independently.
Variable fonts guide - CSS: Cascading Style Sheets
introducing the 'variation axis' the heart of the new variable fonts format is the concept of an axis of variation describing the allowable range of that particular aspect of the typeface design.
CSS Grid Layout and Accessibility - CSS: Cascading Style Sheets
the concept of visual display following document source order is detailed in the wcag techniques for success criteria – technique c27.
Grid template areas - CSS: Cascading Style Sheets
you can do this by redefining the grid, the position of items on the grid, or both at once.
CSS Grid Layout - CSS: Cascading Style Sheets
uto-columns grid-auto-rows grid-auto-flow grid grid-row-start grid-column-start grid-row-end grid-column-end grid-row grid-column grid-area row-gap column-gap gap css functions repeat() minmax() fit-content() css data types <flex> glossary entries grid grid lines grid tracks grid cell grid area gutters grid axis grid row grid column guides basic concepts of grid layout relationship of grid layout to other layout methods layout using line-based placement grid template areas layout using named grid lines auto-placement in css grid layout box alignment in css grid layout css grid, logical values and writing modes css grid layout and accessibility css grid and progressive enhancement realising common layouts using css grid subgrid ex...
Using CSS counters - CSS: Cascading Style Sheets
once initialized, a counter's value can be increased or decreased with counter-increment.
Logical properties for floating and positioning - CSS: Cascading Style Sheets
new two- and four-value shorthands as with other properties in the specification we have some new shorthand properties, which give the ability to set two or four values at once.
Logical properties for margins, borders and padding - CSS: Cascading Style Sheets
border examples the border properties are the main reason that logical properties and values seems to have so many properties, as we have the longhands for the color, width, and style of the border on each side of a box, along with the shorthand to set all three at once for each side.
Logical properties for sizing - CSS: Cascading Style Sheets
it sets both dimensions at once.
CSS Logical Properties and Values - CSS: Cascading Style Sheets
flow-block overflow-inline overscroll-behavior-block overscroll-behavior-inline resize (block and inline keywords) text-align (end and start keywords) deprecated properties offset-block-end (now inset-block-end ) offset-block-start (now inset-block-start ) offset-inline-end (now inset-inline-end ) offset-inline-start (now inset-inline-start ) guides basic concepts of logical properties and values logical properties for sizing logical properties for margins, borders and padding logical properties for floating and positioning specifications specification status comment css logical properties and values level 1 editor's draft initial definition.
Stacking context example 2 - CSS: Cascading Style Sheets
« css « understanding css z-index stacking context example 2 this is a very simple example, but it is the key for understanding the concept of stacking context.
Stacking context example 3 - CSS: Cascading Style Sheets
this is useful to group and position all of them at once.
Browser compatibility and Scroll Snap - CSS: Cascading Style Sheets
we also added the scroll-snap-type property twice, once with the y axis value needed for browsers that support the new spec, and once for firefox pre-68, which supports the property but without the y value.
CSS Scroll Snap - CSS: Cascading Style Sheets
line-end scroll-padding-block scroll-padding-block-start scroll-padding-block-end css properties on children scroll-snap-align scroll-margin scroll-margin-top scroll-margin-right scroll-margin-bottom scroll-margin-left scroll-margin-inline scroll-margin-inline-start scroll-margin-inline-end scroll-margin-block scroll-margin-block-start scroll-margin-block-end guides basic concepts of css scroll snap browser compatibility and scroll snap specification specification status comment css scroll snap module level 1 candidate recommendation initial definition ...
CSS Scrollbars - CSS: Cascading Style Sheets
accessibility concerns when you customize scrollbars, consider they have enough contrast and that their hit area is large enough for people who use touch input.
Basic Shapes - CSS: Cascading Style Sheets
.shape { float: left; shape-outside: inset(20px 10px 20px 10px round 10px); } using the same rules as we use for the margin shorthand, you can set more than one offset at once.
Shapes From Images - CSS: Cascading Style Sheets
in this next example i am using a radial gradient with an ellipse, once again using a transparent part of the gradient to create the shape.
Using CSS transforms - CSS: Cascading Style Sheets
.top { background: rgba(196, 196, 0, 0.7); transform: rotatex(90deg) translatez(50px); } .bottom { background: rgba(196, 0, 196, 0.7); transform: rotatex(-90deg) translatez(50px); } /* make the layout a little nicer */ section { background-color: #eee; padding: 10px; font-family: sans-serif; text-align: left; display: grid; grid-template-columns: repeat(3, 1fr); } result once you have done this, you can work on the element in the 3d space.
Inline formatting context - CSS: Cascading Style Sheets
this article explains the inline formatting context core concepts the inline formatting context is part of the visual rendering of a web page.
Breadcrumb Navigation - CSS: Cascading Style Sheets
accessibility concerns i have used the aria-label and aria-current attributes to help users understand what this navigation is and where the current page is in the structure.
Card - CSS: Cascading Style Sheets
accessibility concerns depending on the content of your card there may be things you could, or should do to enhance accessibility.
Cookbook template - CSS: Cascading Style Sheets
accessibility concerns include this is there are any specific things to watch out for in regard to accessibility.
Grid wrapper - CSS: Cascading Style Sheets
accessibility concerns although grid enables us to position items anwhere (within reason), it is important when placing items using css grid that your underlying markup follows a logical order (see css grid layout and accessibility for more details).
Using Media Queries for Accessibility - CSS: Cascading Style Sheets
reduced motion blinking and flashing animation can be problematic for people with cognitive concerns such as attention deficit hyperactivity disorder (adhd).
Mozilla CSS extensions - CSS: Cascading Style Sheets
once a given property is standardized and implemented without the prefix, the prefixed version is typically dropped after a while.
Scaling of SVG backgrounds - CSS: Cascading Style Sheets
this is very much like specifying a specific width and height, since once you have one dimension and a ratio, the other dimension is implied, but it's still a useful example.
Shorthand properties - CSS: Cascading Style Sheets
see also css key concepts: css syntax, at-rule, comments, specificity and inheritance, the box, layout modes and visual formatting models, and margin collapsing, or the initial, computed, resolved, specified, used, and actual values.
Cubic Bezier Generator - CSS: Cascading Style Sheets
lue; var y1 = document.getelementbyid('y1').value; var x2 = document.getelementbyid('x2').value; var y2 = document.getelementbyid('y2').value; drawbeziercurve(x1, y1, x2, y2); } const radius = 4; // place needed to draw the rulers const rulers = 30.5; const margin = 10.5; const basic_scale_size = 5; // size of 0.1 tick on the rulers var scaling; //limitation: scaling is computed once: if canvas.height/canvas.width change it won't be recalculated var dragsm = 0; // drag state machine: 0 = nodrag, others = object being dragged function initcanvas() { // get the canvas element using the dom var canvas = document.getelementbyid('bezier'); // make sure we don't execute when canvas isn't supported if (canvas.getcontext) { // use getcontext to use the canva...
Visual formatting model - CSS: Cascading Style Sheets
in this document we define the model and introduce some of the related terms and concepts, linking to more specific pages on mdn for further details.
WebKit CSS extensions - CSS: Cascading Style Sheets
deprecated -webkit- properties the following properties were once supported with the -webkit- prefix but are no longer supported in evergreen browsers, with or without the -webkit- prefix.
animation-delay - CSS: Cascading Style Sheets
it is often convenient to use the shorthand property animation to set all animation properties at once.
animation-direction - CSS: Cascading Style Sheets
it is often convenient to use the shorthand property animation to set all animation properties at once.
animation-duration - CSS: Cascading Style Sheets
it is often convenient to use the shorthand property animation to set all animation properties at once.
animation-fill-mode - CSS: Cascading Style Sheets
it is often convenient to use the shorthand property animation to set all animation properties at once.
animation-iteration-count - CSS: Cascading Style Sheets
it is often convenient to use the shorthand property animation to set all animation properties at once.
animation-name - CSS: Cascading Style Sheets
it is often convenient to use the shorthand property animation to set all animation properties at once.
animation-timing-function - CSS: Cascading Style Sheets
it is often convenient to use the shorthand property animation to set all animation properties at once.
animation - CSS: Cascading Style Sheets
WebCSSanimation
accessibility concerns blinking and flashing animation can be problematic for people with cognitive concerns such as attention deficit hyperactivity disorder (adhd).
background-color - CSS: Cascading Style Sheets
accessibility concerns it is important to ensure that the contrast ratio between the background color and the color of the text placed over it is high enough that people experiencing low vision conditions will be able to read the content of the page.
background-image - CSS: Cascading Style Sheets
accessibility concerns browsers do not provide any special information on background images to assistive technology.
border-block - CSS: Cascading Style Sheets
border-block: 1px; border-block: 2px dotted; border-block: medium dashed blue; border-block can be used to set the values for one or more of border-block-width, border-block-style, and border-block-color setting both the start and end in the block dimension at once.
border-image - CSS: Cascading Style Sheets
accessibility concerns assistive technology cannot parse border images.
box-flex-group - CSS: Cascading Style Sheets
once there are no more flex groups, and there is still space remaining, the extra space is divided within the containing box according to the box-pack property.
box-lines - CSS: Cascading Style Sheets
WebCSSbox-lines
once the number of lines has been determined, elements with a computed value for box-flex other than 0 stretch as necessary in an attempt to fill the remaining space on the lines.
calc() - CSS: Cascading Style Sheets
WebCSScalc
formal syntax calc( <calc-sum> )where <calc-sum> = <calc-product> [ [ '+' | '-' ] <calc-product> ]*where <calc-product> = <calc-value> [ '*' <calc-value> | '/' <number> ]*where <calc-value> = <number> | <dimension> | <percentage> | ( <calc-sum> ) accessibility concerns when calc() is used for controlling text size, be sure that one of the values includes a relative length unit, for example: h1 { font-size: calc(1.5rem + 3vw); } this ensures that text size will scale if the page is zoomed.
color - CSS: Cascading Style Sheets
WebCSScolor
accessibility concerns it is important to ensure that the contrast ratio between the color of the text and the background the text is placed over is high enough that people experiencing low vision conditions will be able to read the content of the page.
conic-gradient() - CSS: Cascading Style Sheets
accessibility concerns browsers do not provide any special information on background images to assistive technology.
content - CSS: Cascading Style Sheets
WebCSScontent
accessibility concerns css-generated content is not included in the dom.
cross-fade() - CSS: Cascading Style Sheets
accessibility concerns browsers do not provide any special information on background images to assistive technology.
flex-basis - CSS: Cascading Style Sheets
then, that change was reverted in bug 1093316, so auto once again means "look at my width or height property"; and a new content keyword is being introduced to trigger automatic sizing.
flex-direction - CSS: Cascading Style Sheets
accessibility concerns using the flex-direction property with values of row-reverse or column-reverse will create a disconnect between the visual presentation of content and dom order.
font-style - CSS: Cascading Style Sheets
slantlabel = document.queryselector('label[for="slant"]'); let slantinput = document.queryselector('#slant'); let sampletext = document.queryselector('.sample'); function update() { let slant = `oblique ${slantinput.value}deg`; slantlabel.textcontent = `font-style: ${slant};`; sampletext.style.fontstyle = slant; } slantinput.addeventlistener('input', update); update(); accessibility concerns large sections of text set with a font-style value of italic may be difficult for people with cognitive concerns such as dyslexia to read.
font-variant-caps - CSS: Cascading Style Sheets
accessibility concerns large sections of text set with a font-variant value of all-small-caps or all-petite-caps may be difficult for people with cognitive concerns such as dyslexia to read.
height - CSS: Cascading Style Sheets
WebCSSheight
accessibility concerns ensure that elements set with a height are not truncated and/or do not obscure other content when the page is zoomed to increase text size.
image-set() - CSS: Cascading Style Sheets
WebCSSimage-set
accessibility concerns browsers do not provide any special information on background images to assistive technology.
<image> - CSS: Cascading Style Sheets
WebCSSimage
accessibility concerns browsers do not provide any special information on background images to assistive technology.
image() - CSS: Cascading Style Sheets
accessibility concerns browsers do not provide any special information on background images to assistive technology.
initial - CSS: Cascading Style Sheets
WebCSSinitial
the all property lets you reset all properties to their initial, inherited, reverted, or unset state at once.
<length> - CSS: Cascading Style Sheets
WebCSSlength
300px, 50%, 30vw) to set the width of a result bar that will appear below it once you've pressed return.
letter-spacing - CSS: Cascading Style Sheets
accessibility concerns a large positive or negative letter-spacing value will make the word(s) the styling is applied to unreadable.
list-style-type - CSS: Cascading Style Sheets
example -moz-ethiopic-halehame-am example ethiopic-halehame-ti-er -moz-ethiopic-halehame-ti-er example ethiopic-halehame-ti-et -moz-ethiopic-halehame-ti-et example hangul -moz-hangul example example example hangul-consonant -moz-hangul-consonant example example example urdu -moz-urdu example accessibility concerns the voiceover screen reader has an issue where unordered lists with a list-style-type value of none applied to them will not be announced as a list.
margin-trim - CSS: Cascading Style Sheets
it also applies to ::first-letter and ::first-line.inheritednocomputed valueas specifiedanimation typediscrete formal syntax none | in-flow | all examples basic usage once support is implemented for this property, it will probably work like so: when you've got a container with some inline children and you want to put a margin between each child but not have it interfere with the spacing at the end of the row, you might do something like this: article { background-color: red; margin: 20px; padding: 20px; display: inline-block; } article > span { backgro...
max-height - CSS: Cascading Style Sheets
accessibility concerns ensure that elements set with a max-height are not truncated and/or do not obscure other content when the page is zoomed to increase text size.
max-width - CSS: Cascading Style Sheets
WebCSSmax-width
accessibility concerns ensure that elements set with a max-width are not truncated and/or do not obscure other content when the page is zoomed to increase text size.
max() - CSS: Cascading Style Sheets
WebCSSmax
accessibility concerns when max() is used for controlling text size, make sure the text is always large enough to read.
min() - CSS: Cascading Style Sheets
WebCSSmin
formal syntax min( <calc-sum># )where <calc-sum> = <calc-product> [ [ '+' | '-' ] <calc-product> ]*where <calc-product> = <calc-value> [ '*' <calc-value> | '/' <number> ]*where <calc-value> = <number> | <dimension> | <percentage> | ( <calc-sum> ) accessibility concerns when using min() to set a maximum font size, ensure that the font can still be scaled at least 200% for readability (without assistive technology like a zoom function).
opacity - CSS: Cascading Style Sheets
WebCSSopacity
for example: background: rgba(0, 0, 0, 0.4); accessibility concerns if text opacity is adjusted, it is important to ensure that the contrast ratio between the color of the text and the background the text is placed over is high enough that people experiencing low vision conditions will be able to read the content of the page.
order - CSS: Cascading Style Sheets
WebCSSorder
accessibility concerns using the order property will create a disconnect between the visual presentation of content and dom order.
outline-color - CSS: Cascading Style Sheets
accessibility concerns custom focus styles commonly involve making adjustments to the outline property.
outline - CSS: Cascading Style Sheets
WebCSSoutline
accessibility concerns assigning outline a value of 0 or none will remove the browser's default focus style.
Guide to scroll anchoring - CSS: Cascading Style Sheets
to opt out the entire document, you can set it on the <body> element: body { overflow-anchor: none; } to opt out a certain part of the document use overflow-anchor: none on its container element: .container { overflow-anchor: none; } note: the specification details that once scroll anchoring has been opted out of, you cannot opt back into it from a child element.
overscroll-behavior - CSS: Cascading Style Sheets
you may also have noticed that when you have a dialog box with scrolling content on top of a page of scrolling content, once the dialog box's scroll boundary is reached, the underlying page will then start to scroll — this is called scroll chaining.
padding - CSS: Cascading Style Sheets
WebCSSpadding
the padding css shorthand property sets the padding area on all four sides of an element at once.
place-content - CSS: Cascading Style Sheets
the place-content css shorthand property allows you to align content along both the block and inline directions at once (i.e.
place-items - CSS: Cascading Style Sheets
the css place-items shorthand property allows you to align items along both the block and inline directions at once (i.e.
place-self - CSS: Cascading Style Sheets
the place-self css shorthand property allows you to align an individual item in both the block and inline directions at once (i.e.
radial-gradient() - CSS: Cascading Style Sheets
to create a smooth gradient, the radial-gradient() function draws a series of concentric shapes radiating out from the center to the ending shape (and potentially beyond).
repeat() - CSS: Cascading Style Sheets
WebCSSrepeat
otherwise, the specified track list repeats only once.
repeating-conic-gradient() - CSS: Cascading Style Sheets
accessibility concerns browsers do not provide any special information on background images to assistive technology.
repeating-radial-gradient() - CSS: Cascading Style Sheets
at the center of its container, starting red, changing to blue, and finishing green, with the colors repeating every 30px */ repeating-radial-gradient(circle at center, red 0, blue, green 30px); /* an elliptical gradient near the top left of its container, starting red, changing to green and back again, repeating five times between the center and the bottom right corner, and only once between the center and the top left corner */ repeating-radial-gradient(farthest-corner at 20% 20%, red 0, green, red 20%); values <position> the position of the gradient, interpreted in the same way as background-position or transform-origin.
scroll-padding - CSS: Cascading Style Sheets
the scroll-padding shorthand property sets scroll padding on all sides of an element at once, much like the padding property does for padding on an element.
scrollbar-color - CSS: Cascading Style Sheets
accessibility concerns when using scrollbar-color property with specific color values, authors should ensure the specified colors have enough contrast between them.
scrollbar-width - CSS: Cascading Style Sheets
accessibility concerns use this property with caution — setting scrollbar-width to thin or none can make content hard or impossible to scroll if the author does not provide an alternative scrolling mechanism.
table-layout - CSS: Cascading Style Sheets
under the "fixed" layout method, the entire table can be rendered once the first table row has been downloaded and analyzed.
text-align - CSS: Cascading Style Sheets
accessibility concerns the inconsistent spacing between words created by justified text can be problematic for people with cognitive concerns such as dyslexia.
text-decoration-color - CSS: Cascading Style Sheets
accessibility concerns it is important to ensure that the contrast ratio between the color of the text, the background the text is placed over, and the text decoration line is high enough that people experiencing low vision conditions will be able to read the content of the page.
text-decoration-line - CSS: Cascading Style Sheets
when setting multiple line-decoration properties at once, it may be more convenient to use the text-decoration shorthand property instead.
text-decoration-style - CSS: Cascading Style Sheets
when setting multiple line-decoration properties at once, it may be more convenient to use the text-decoration shorthand property instead.
text-transform - CSS: Cascading Style Sheets
accessibility concerns large sections of text set with a text-transform value of uppercase may be difficult for people with cognitive concerns such as dyslexia to read.
scale() - CSS: Cascading Style Sheets
cartesian coordinates on ℝ2 homogeneous coordinates on ℝℙ2 cartesian coordinates on ℝ3 homogeneous coordinates on ℝℙ3 sx0 0sy sx000sy0001 sx000sy0001 sx0000sy0000100001 [sx 0 0 sy 0 0] accessibility concerns scaling/zooming animations are problematic for accessibility, as they are a common trigger for certain types of migraine.
transform - CSS: Cascading Style Sheets
WebCSStransform
accessibility concerns scaling/zooming animations are problematic for accessibility, as they are a common trigger for certain types of migraine.
user-select - CSS: Cascading Style Sheets
formal definition initial valueautoapplies toall elementsinheritednocomputed valueas specifiedanimation typediscrete formal syntax auto | text | none | contain | all examples html <p>you should be able to select this text.</p> <p class="unselectable">hey, you can't select this text!</p> <p class="all">clicking once will select all of this text.</p> css .unselectable { -moz-user-select: none; -webkit-user-select: none; -ms-user-select: none; user-select: none; } .all { -moz-user-select: all; -webkit-user-select: all; -ms-user-select: all; user-select: all; } result specifications specification status comment css basic user interface module level 4the defi...
visibility - CSS: Cascading Style Sheets
accessibility concerns using a visibility value of hidden on an element will remove it from the accessibility tree.
width - CSS: Cascading Style Sheets
WebCSSwidth
accessibility concerns ensure that elements set with a width aren't truncated and don't obscure other content when the page is zoomed to increase text size.
word-spacing - CSS: Cascading Style Sheets
examples html <div id="mozdiv1">here are many words...</div> <div id="mozdiv2">...and many more!</div> css #mozdiv1 { word-spacing: 15px; } #mozdiv2 { word-spacing: 5em; } accessibility concerns a large positive or negative word-spacing value will make the sentences the styling is applied to unreadable.
Getting Started - Developer guides
simple timed xhr example another simple example follows — here we are loading a text file via xhr, the structure of which is assumed to be like this: time: 312.05 time: 312.07 time: 312.10 time: 312.12 time: 312.14 time: 312.15 once the text file is loaded, we split() the items into an array at each newline character (\n — basically where each line break is in the text file), and then print the complete list of timestamps, and the last timestamp, onto the page.
Ajax - Developer guides
WebGuideAJAX
see also ajax: a new approach to web applications jesse james garrett, of adaptive path, wrote this article in february 2005, introducing ajax and its related concepts.
Adding captions and subtitles to HTML5 video - Developer guides
once the menu is built, it is then inserted into the dom at the bottom of the videocontainer.
Live streaming web audio and video - Developer guides
live streaming technology is often employed to relay live events such as sports, concerts and more generally tv and radio programmes that are output live.
Writing Web Audio API code that works in every browser - Developer guides
once you include it in your page, you can write in "modern web audio api" style, and do things such as: var audiocontext = new audiocontext(); everywhere, including chrome/ium, opera, safari, and ---of course!--- firefox.
Audio and video manipulation - Developer guides
= this.ctx1.getimagedata(0, 0, this.width, this.height); var l = frame.data.length / 4; for (var i = 0; i < l; i++) { var grey = (frame.data[i * 4 + 0] + frame.data[i * 4 + 1] + frame.data[i * 4 + 2]) / 3; frame.data[i * 4 + 0] = grey; frame.data[i * 4 + 1] = grey; frame.data[i * 4 + 2] = grey; } this.ctx1.putimagedata(frame, 0, 0); return; } }; once the page has loaded you can call processor.doload() result this is a pretty simple example showing how to manipulate video frames using a canvas.
Block formatting context - Developer guides
see also float, clear css key concepts: css syntax, at-rule, comments, specificity and inheritance, the box, layout modes and visual formatting models, and margin collapsing, or the initial, computed, resolved, specified, used, and actual values.
HTML5 - Developer guides
WebGuideHTMLHTML5
the term represents two different concepts.
A hybrid approach - Developer guides
the most important concept to remember is that server-side and client-side techniques can be combined to fit your situation.
SVG-in-OpenType - Developer guides
once we're ready for wider adoption the information from wiki.mozilla.org will be moved here, updated and expanded.
User input and controls - Developer guides
once you decided the input mechanisms, you can control them using tools offered by the web platform or javascript libraries.
The Web Open Font Format (WOFF) - Developer guides
WebGuideWOFF
woff (the web open font format) is a web font format developed by mozilla in concert with type supply, letterror, and other organizations.
HTML attribute: accept - HTML: Hypertext Markup Language
including the multiple attribute, as shown above, specifies that multiple files can be chosen at once.
The HTML autocomplete attribute - HTML: Hypertext Markup Language
it is possible that the document or application provides its own autocomplete feature, or that security concerns require that the field's value not be automatically entered.
HTML attribute: minlength - HTML: Hypertext Markup Language
once submission fails, some browsers will display an error message indicating the minimum length required and the current length.
HTML attribute: multiple - HTML: Hypertext Markup Language
recommendation accessibility concerns provide instructions to help users understand how to complete the form and use individual form controls.
HTML attribute: pattern - HTML: Hypertext Markup Language
<button>submit</button> </div> </form> div { margin-bottom: 10px; position: relative; } p { font-size: 80%; color: #999; } input + span { padding-right: 30px; } input:invalid+span:after { position: absolute; content: '✖'; padding-left: 5px; } input:valid+span:after { position: absolute; content: '✓'; padding-left: 5px; } this renders like so: accessibility concerns when a control has a pattern attribute, the title attribute, if used, must describe the pattern.
HTML attribute: required - HTML: Hypertext Markup Language
recommendation accessibility concerns provide an indication to users informing them the form control is required.
HTML attribute: step - HTML: Hypertext Markup Language
WebHTMLAttributesstep
recommendation accessibility concerns provide instructions to help users understand how to complete the form and use individual form controls.
Allowing cross-origin use of images and canvas - HTML: Hypertext Markup Language
this event is triggered once the downloaded data is all available.
<h1>–<h6>: The HTML Section Heading elements - HTML: Hypertext Markup Language
<h1>heading elements</h1> <h2>summary</h2> <p>some text here...</p> <h2>examples</h2> <h3>example 1</h3> <p>some text here...</p> <h3>example 2</h3> <p>some text here...</p> <h2>see also</h2> <p>some text here...</p> here is the result of this code: accessibility concerns navigation a common navigation technique for users of screen reading software is jumping from heading to heading to quickly determine the content of the page.
<audio>: The Embed Audio element - HTML: Hypertext Markup Language
WebHTMLElementaudio
the browser tries to load the first source element (opus) if it is able to play it; if not it falls back to the second (vorbis) and finally back to mp3: <audio controls> <source src="foo.opus" type="audio/ogg; codecs=opus"/> <source src="foo.ogg" type="audio/ogg; codecs=vorbis"/> <source src="foo.mp3" type="audio/mpeg"/> </audio> accessibility concerns audio with spoken dialog should provide both captions and transcripts that accurately describe its content.
<basefont> - HTML: Hypertext Markup Language
WebHTMLElementbasefont
though once (imprecisely) normalized in html 3.2, it wasn't supported in all major browsers.
<br>: The Line Break element - HTML: Hypertext Markup Language
WebHTMLElementbr
evelyn avenue<br> mountain view, ca<br> 94041<br> usa<br> the result looks like so: accessibility concerns creating separate paragraphs of text using <br> is not only bad practice, it is problematic for people who navigate with the aid of screen reading technology.
<button>: The Button element - HTML: Hypertext Markup Language
WebHTMLElementbutton
example <button name="button">press me</button> accessibility concerns icon buttons buttons that only show an icon to represent do not have an accessible name.
<canvas>: The Graphics Canvas element - HTML: Hypertext Markup Language
WebHTMLElementcanvas
</canvas> javascript then in the javascript code, call htmlcanvaselement.getcontext() to get a drawing context and start drawing onto the canvas: const canvas = document.queryselector('canvas'); const ctx = canvas.getcontext('2d'); ctx.fillstyle = 'green'; ctx.fillrect(10, 10, 100, 100); result accessibility concerns alternative content the <canvas> element on its own is just a bitmap and does not provide information about any drawn objects.
<del>: The Deleted Text element - HTML: Hypertext Markup Language
WebHTMLElementdel
examples <p><del>this text has been deleted</del>, here is the rest of the paragraph.</p> <del><p>this paragraph has been deleted.</p></del> result accessibility concerns the presence of the del element is not announced by most screen reading technology in its default configuration.
<dl>: The Description List element - HTML: Hypertext Markup Language
WebHTMLElementdl
accessibility concerns each screen reader announces <dl> content differently.
<embed>: The Embed External Content element - HTML: Hypertext Markup Language
WebHTMLElementembed
examples <embed type="video/quicktime" src="movie.mov" width="640" height="480" title="title of my video"> accessibility concerns use the title attribute on an embed element to label its content so that people navigating with assistive technology such as a screen reader can understand what it contains.
<font> - HTML: Hypertext Markup Language
WebHTMLElementfont
though once normalized in html 3.2, it was deprecated in html 4.01, at the same time as all elements related to styling only, then made obsolete in html5.
<footer> - HTML: Hypertext Markup Language
WebHTMLElementfooter
</footer> accessibility concerns the voiceover screen reader has an issue where the footer landmark role is not announced in the landmark rotor.
<html>: The HTML Document / Root element - HTML: Hypertext Markup Language
WebHTMLElementhtml
example <!doctype html> <html lang="en"> <head>...</head> <body>...</body> </html> accessibility concerns providing a lang attribute with a valid ietf identifying language tag on the <html> element will help screen reading technology determine the proper language to announce.
<iframe>: The Inline Frame element - HTML: Hypertext Markup Language
WebHTMLElementiframe
html <iframe src="https://mdn-samples.mozilla.org/snippets/html/iframe-simple-contents.html" title="iframe example 1" width="400" height="300"> </iframe> result accessibility concerns people navigating with assistive technology such as a screen reader can use the title attribute on an <iframe> to label its content.
<image>: The obsolete Image element - HTML: Hypertext Markup Language
WebHTMLElementimage
specifications this might have once been part of a specification, but nobody seems to remember.
<input type="button"> - HTML: Hypertext Markup Language
WebHTMLElementinputbutton
this makes it possible to enable and disable groups of elements all at once by enclosing them in a container such as a <fieldset> element, and then setting disabled on the container.
<input type="datetime-local"> - HTML: Hypertext Markup Language
the main reasons why this was removed are a lack of implementation in browsers, and concerns over the user interface/experience.
<input type="email"> - HTML: Hypertext Markup Language
WebHTMLElementinputemail
once data is entered into the box, the placeholder disappears; if the box is emptied, the placeholder reappears.
<input type="number"> - HTML: Hypertext Markup Language
WebHTMLElementinputnumber
once data is entered into the box, the placeholder disappears; if the box is emptied, the placeholder reappears.
<input type="tel"> - HTML: Hypertext Markup Language
WebHTMLElementinputtel
once data is entered into the box, the placeholder disappears; if the box is emptied, the placeholder reappears.
<input type="url"> - HTML: Hypertext Markup Language
WebHTMLElementinputurl
once data is entered into the box, the placeholder disappears; if the box is emptied, the placeholder reappears.
<ins> - HTML: Hypertext Markup Language
WebHTMLElementins
examples <ins>this text has been inserted</ins> result accessibility concerns the presence of the <ins> element is not announced by most screen reading technology in its default configuration.
<kbd>: The Keyboard Input element - HTML: Hypertext Markup Language
WebHTMLElementkbd
for example, you can explain how to choose the "new document" option in the "file" menu using html that looks like this: <p>to create a new file, choose the menu option <kbd><kbd><samp>file</samp></kbd>⇒<kbd><samp>new document</samp></kbd></kbd>.</p> <p>don't forget to click the <kbd><samp>ok</samp></kbd> button to confirm once you've entered the name of the new file.</p> this does some interesting nesting.
<label> - HTML: Hypertext Markup Language
WebHTMLElementlabel
examples simple label example <label>click me <input type="text"></label> using the "for" attribute <label for="username">click me</label> <input type="text" id="username"> accessibility concerns interactive content don't place interactive elements such as anchors or buttons inside a label.
<mark>: The Mark Text element - HTML: Hypertext Markup Language
WebHTMLElementmark
the results look like this: accessibility concerns the presence of the mark element is not announced by most screen reading technology in its default configuration.
<meta>: The Document-level Metadata element - HTML: Hypertext Markup Language
WebHTMLElementmeta
accessibility concerns pages set with a refresh value run the risk of having the time interval being too short.
<output>: The Output element - HTML: Hypertext Markup Language
WebHTMLElementoutput
<form oninput="result.value=parseint(a.value)+parseint(b.value)"> <input type="range" id="b" name="b" value="50" /> + <input type="number" id="a" name="a" value="10" /> = <output name="result" for="a b">60</output> </form> accessibility concerns many browsers implement this element as an aria-live region.
<p>: The Paragraph element - HTML: Hypertext Markup Language
WebHTMLElementp
ument.queryselector('button').addeventlistener('click', function (event) { document.queryselectorall('p').foreach(function (paragraph) { paragraph.classlist.toggle('pilcrow'); }); var newbuttontext = event.target.dataset.toggletext; var oldtext = event.target.innertext; event.target.innertext = newbuttontext; event.target.dataset.toggletext = oldtext; }); result accessibility concerns breaking up content into paragraphs helps make a page more accessible.
<pre>: The Preformatted Text element - HTML: Hypertext Markup Language
WebHTMLElementpre
example html <p>using css to change the font color is easy.</p> <pre> body { color: red; } </pre> result accessibility concerns it is important to provide an alternate description for any images or diagrams created using preformatted text.
<s> - HTML: Hypertext Markup Language
WebHTMLElements
examples <s>today's special: salmon</s> sold out<br> <span style="text-decoration:line-through;">today's special: salmon</span> sold out accessibility concerns the presence of the s element is not announced by most screen reading technology in its default configuration.
<select>: The HTML Select element - HTML: Hypertext Markup Language
WebHTMLElementselect
the <select> element has some unique attributes you can use to control it, such as multiple to specify whether multiple options can be selected, and size to specify how many options should be shown at once.
<source>: The Media or Image Source element - HTML: Hypertext Markup Language
WebHTMLElementsource
if the type attribute is specified, it's compared against the types the user agent can present, and if it's not recognized, the server doesn't even get queried; instead, the next <source> element is checked at once.
<sub>: The Subscript element - HTML: Hypertext Markup Language
WebHTMLElementsub
this is a common use case for <sub>: <p>according to the computations by nakamura, johnson, and mason<sub>1</sub> this will result in the complete annihilation of both particles.</p> the resulting output looks like this: variable subscripts in mathematics, families of variables related to the same concept (such as distances along the same axis) are represented using the same variable name with a subscript following.
<time> - HTML: Hypertext Markup Language
WebHTMLElementtime
14:54:39 14:54:39.929 a valid local date and time string 2011-11-18t14:54:39.929 2011-11-18 14:54:39.929 a valid global date and time string 2011-11-18t14:54:39.929z 2011-11-18t14:54:39.929-0400 2011-11-18t14:54:39.929-04:00 2011-11-18 14:54:39.929z 2011-11-18 14:54:39.929-0400 2011-11-18 14:54:39.929-04:00 a valid duration string pt4h18m3s examples simple example html <p>the concert starts at <time datetime="2018-07-07t20:00:00">20:00</time>.</p> output datetime example html <p>the concert took place on <time datetime="2001-05-15t19:00">may 15</time>.</p> output specifications specification status comment html living standardthe definition of '<time>' in that specification.
<title>: The Document Title element - HTML: Hypertext Markup Language
WebHTMLElementtitle
accessibility concerns it is important to provide a title value that describes the page's purpose.
<video>: The Video Embed element - HTML: Hypertext Markup Language
WebHTMLElementvideo
accessibility concerns videos should provide both captions and transcripts that accurately describe its content (see adding captions and subtitles to html5 video for more information on how to implement these).
itemprop - HTML: Hypertext Markup Language
an element introducing a property can also introduce multiple properties at once, to avoid duplication when some of the properties have the same value.
itemtype - HTML: Hypertext Markup Language
for example, musicevent indicates a concert performance, with startdate and location properties specifying the concert's key details.
tabindex - HTML: Hypertext Markup Language
accessibility concerns avoid using the tabindex attribute in conjunction with non-interactive content to make something intended to be interactive focusable by keyboard input.
title - HTML: Hypertext Markup Language
html <div title="cooltip"> <p>hovering here will show “cooltip”.</p> <p title="">hovering here will show nothing.</p> </div> result accessibility concerns use of the title attribute is highly problematic for: people using touch-only devices people navigating with keyboards people navigating with assistive technology such as screen readers or magnifiers people experiencing fine motor control impairment people with cognitive concerns this is due to inconsistent browser support, compounded by the additional assistive technology parsing of...
Global attributes - HTML: Hypertext Markup Language
from html 4.01 specification, the concept of global attributes is introduced and the dir, lang, style, id, class, tabindex, accesskey, and title are now true global attributes.
HTML documentation index - HTML: Hypertext Markup Language
WebHTMLIndex
once chosen, the files can be uploaded to a server using form submission, or manipulated using javascript code and the file api.
Inline elements - HTML: Hypertext Markup Language
conceptual differences in brief, here are the basic conceptual differences between inline and block-level elements: content model generally, inline elements may contain only data and other inline elements.
Microdata - HTML: Hypertext Markup Language
this vocabulary defines a standard set of type names and property names, for example, schema.org music event indicates a concert performance, with startdate and location properties to specify the concert's key details.
HTML: Hypertext Markup Language
WebHTML
introduction to html this module sets the stage, getting you used to important concepts and syntax such as looking at applying html to text, how to create hyperlinks, and how to use html to structure a web page.
HTTP authentication - HTTP
firefox once used iso-8859-1, but changed to utf-8 for parity with other browsers and to avoid potential problems as described in bug 1419658.
MIME types (IANA media types) - HTTP
(for example, safari will look at the file extension in the url if the sent mime type is unsuitable.) there are security concerns as some mime types represent executable content.
Reason: CORS preflight channel did not succeed - HTTP
make sure your code only preflights once per connection.
Cross-Origin Resource Sharing (CORS) - HTTP
WebHTTPCORS
control-request-headers: x-pingother, content-type http/1.1 204 no content date: mon, 01 dec 2008 01:15:39 gmt server: apache/2 access-control-allow-origin: https://foo.example access-control-allow-methods: post, get, options access-control-allow-headers: x-pingother, content-type access-control-max-age: 86400 vary: accept-encoding, origin keep-alive: timeout=2, max=100 connection: keep-alive once the preflight request is complete, the real request is sent: post /doc http/1.1 host: bar.other user-agent: mozilla/5.0 (macintosh; intel mac os x 10.14; rv:71.0) gecko/20100101 firefox/71.0 accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8 accept-language: en-us,en;q=0.5 accept-encoding: gzip,deflate connection: keep-alive x-pingother: pingpong content-type: text/xml; char...
HTTP caching - HTTP
WebHTTPCaching
freshness once a resource is stored in a cache, it could theoretically be served by the cache forever.
Using HTTP cookies - HTTP
WebHTTPCookies
cookies are mainly used for three purposes: session management logins, shopping carts, game scores, or anything else the server should remember personalization user preferences, themes, and other settings tracking recording and analyzing user behavior cookies were once used for general client-side storage.
Cross-Origin Resource Policy (CORP) - HTTP
history the concept was originally proposed in 2012 (as from-origin), but resurrected in q2 of 2018 and implemented in safari and chromium.
Feature Policy - HTTP
concepts and usage feature policy allows you to control which origins can use which features, both in the top-level page and in embedded frames.
Cache-Control - HTTP
revalidation and reloading must-revalidate indicates that once a resource becomes stale, caches must not use their stale copy without successful validation on the origin server.
CSP: report-uri - HTTP
'/csp-violations.log'; $log_file_size_limit = 1000000; // bytes - once exceeded no further entries are added $email_address = 'admin@example.com'; $email_subject = 'content-security-policy violation'; // end configuration $current_domain = preg_replace('/www\./i', '', $_server['server_name']); $email_subject = $email_subject .
Content-Security-Policy - HTTP
you can use the content-security-policy header more than once, as in the example below.
Index - HTTP
WebHTTPHeadersIndex
several parts can be requested with one range header at once, and the server may send back these ranges in a multipart document.
Origin - HTTP
WebHTTPHeadersOrigin
examples origin: https://developer.mozilla.org specifications specification comment rfc 6454, section 7: origin the web origin concept fetchthe definition of 'origin header' in that specification.
Range - HTTP
WebHTTPHeadersRange
several parts can be requested with one range header at once, and the server may send back these ranges in a multipart document.
Referer - HTTP
WebHTTPHeadersReferer
see referer header: privacy and security concerns for more information and mitigations.
Strict-Transport-Security - HTTP
strict transport security resolves this problem; as long as you've accessed your bank's web site once using https, and the bank's web site uses strict transport security, your browser will know to automatically use only https, which prevents hackers from performing this sort of man-in-the-middle attack.
HTTP Messages - HTTP
WebHTTPMessages
in http/2, the once human-readable message is now divided up into http frames, providing optimization and performance improvements.
CONNECT - HTTP
WebHTTPMethodsCONNECT
once the connection has been established by the server, the proxy server continues to proxy the tcp stream to and from the client.
PATCH - HTTP
WebHTTPMethodsPATCH
patch is somewhat analogous to the "update" concept found in crud (in general, http is different than crud, and the two should not be confused).
POST - HTTP
WebHTTPMethodsPOST
the difference between put and post is that put is idempotent: calling it once or several times successively has the same effect (that is no side effect), where successive identical post may have additional effects, like passing an order several times.
PUT - HTTP
WebHTTPMethodsPUT
the difference between put and post is that put is idempotent: calling it once or several times successively has the same effect (that is no side effect), whereas successive identical post requests may have additional effects, akin to placing an order several times.
HTTP range requests - HTTP
multipart ranges the range header also allows you to get multiple ranges at once in a multipart document.
HTTP resources and specifications - HTTP
proposed standard rfc 6454 the web origin concept proposed standard fetchthe definition of 'cors' in that specification.
A typical HTTP session - HTTP
WebHTTPSession
sending a client request once the connection is established, the user-agent can send the request (a user-agent is typically a web browser, but can be anything else, a crawler, for example).
HTTP response status codes - HTTP
WebHTTPStatus
it has been deprecated due to security concerns regarding in-band configuration of a proxy.
CSS Houdini
worklets are conceptually similar to web workers, and are called by and extend the rendering engine.
Closures - JavaScript
once makefunc() finishes executing, you might expect that the name variable would no longer be accessible.
Grammar and types - JavaScript
this concept is known as hoisting.
Indexed collections - JavaScript
ay of iterating over an array: let colors = ['red', 'green', 'blue'] colors.foreach(function(color) { console.log(color) }) // red // green // blue alternatively, you can shorten the code for the foreach parameter with es2015 arrow functions: let colors = ['red', 'green', 'blue'] colors.foreach(color => console.log(color)) // red // green // blue the function passed to foreach is executed once for every item in the array, with the array item passed as the argument to the function.
Meta programming - JavaScript
(this is analogous to the concept of traps in operating systems.) target object which the proxy virtualizes.
Numbers and dates - JavaScript
« previousnext » this chapter introduces the concepts, objects and functions used to work with and perform calculations using numbers and dates in javascript.
Regular expressions - JavaScript
once remembered, the substring can be recalled for other use.
Using Promises - JavaScript
error propagation you might recall seeing failurecallback three times in the pyramid of doom earlier, compared to only once at the end of the promise chain: dosomething() .then(result => dosomethingelse(result)) .then(newresult => dothirdthing(newresult)) .then(finalresult => console.log(`got the final result: ${finalresult}`)) .catch(failurecallback); if there's an exception, the browser will look down the chain for .catch() handlers or onrejected.
Working with objects - JavaScript
the concept of objects in javascript can be understood with real life, tangible objects.
JavaScript technologies overview - JavaScript
layered above the abstract concepts defined in dom core, html also defines the meaning of elements.
About the JavaScript reference - JavaScript
once you have a firm grasp of the fundamentals, you can use the reference to get more details on individual objects and language constructs.
Public class fields - JavaScript
syntax class classwithinstancefield { instancefield = 'instance field' } class classwithstaticfield { static staticfield = 'static field' } class classwithpublicinstancemethod { publicmethod() { return 'hello world' } } examples public static fields public static fields are useful when you want a field to exist only once per class, not on every class instance you create.
InternalError: too much recursion - JavaScript
once a condition is met, the function stops calling itself.
Array.prototype.every() - JavaScript
description the every method executes the provided callback function once for each element present in the array until it finds the one where callback returns a falsy value.
Array.prototype.filter() - JavaScript
description filter() calls a provided callback function once for each element in an array, and constructs a new array of all the values for which callback returns a value that coerces to true.
Array.prototype.find() - JavaScript
description the find method executes the callback function once for each index of the array until the callback returns a truthy value.
Array.prototype.findIndex() - JavaScript
description the findindex() method executes the callback function once for every index in the array until it finds the one where callback returns a truthy value.
Array.prototype.indexOf() - JavaScript
} else // all else for (; i !== len; ++i) if (that[i] === member) return i return -1 // if the value was not found, then return -1 } })(object, math.max, math.min) however, if you are more interested in all the little technical bits defined by the ecma standard, and are less concerned about performance or conciseness, then you may find this more descriptive polyfill to be more useful.
Array.prototype.map() - JavaScript
description map calls a provided callback function once for each element in an array, in order, and constructs a new array from the results.
Array.prototype.some() - JavaScript
description the some() method executes the callback function once for each element present in the array until it finds the one where callback returns a truthy value (a value that becomes true when converted to a boolean).
Array.prototype.sort() - JavaScript
the idea is to traverse the array once to extract the actual values used for sorting into a temporary array, sort the temporary array, and then traverse the temporary array to achieve the right order.
Array.prototype.unshift() - JavaScript
hence, calling unshift with n arguments once, or calling it n times with 1 argument (with a loop, for example), don't yield the same results.
BigInt.prototype.toString() - JavaScript
-0.0 is an ieee floating-point concept that only appears in the javascript number type.
BigInt64Array() constructor - JavaScript
once established, you can reference elements in the array using the object's methods, or by using standard array index syntax (that is, using bracket notation).
BigInt64Array - JavaScript
once established, you can reference elements in the array using the object's methods, or by using standard array index syntax (that is, using bracket notation).
BigUint64Array() constructor - JavaScript
once established, you can reference elements in the array using the object's methods, or by using standard array index syntax (that is, using bracket notation).
BigUint64Array - JavaScript
once established, you can reference elements in the array using the object's methods, or by using standard array index syntax (that is, using bracket notation).
Date.prototype.setMonth() - JavaScript
conceptually it will add the number of days given by the current day of the month to the 1st day of the new month specified as the parameter, to return the new date.
Float32Array() constructor - JavaScript
once established, you can reference elements in the array using the object's methods, or using standard array index syntax (that is, using bracket notation).
Float32Array - JavaScript
once established, you can reference elements in the array using the object's methods, or using standard array index syntax (that is, using bracket notation).
Float64Array() constructor - JavaScript
once established, you can reference elements in the array using the object's methods, or using standard array index syntax (that is, using bracket notation).
Float64Array - JavaScript
once established, you can reference elements in the array using the object's methods, or using standard array index syntax (that is, using bracket notation).
Function.prototype.bind() - JavaScript
if it's absolutely necessary and performance is not a concern, a far slower (but more specification-compliant solution) can be found at https://github.com/raynos/function-bind.
Function.prototype.call() - JavaScript
with call(), you can write a method once and then inherit it in another object, without having to rewrite the method for the new object.
Int16Array() constructor - JavaScript
once established, you can reference elements in the array using the object's methods, or using standard array index syntax (that is, using bracket notation).
Int16Array - JavaScript
once established, you can reference elements in the array using the object's methods, or using standard array index syntax (that is, using bracket notation).
Int32Array() constructor - JavaScript
once established, you can reference elements in the array using the object's methods, or using standard array index syntax (that is, using bracket notation).
Int32Array - JavaScript
once established, you can reference elements in the array using the object's methods, or using standard array index syntax (that is, using bracket notation).
Int8Array() constructor - JavaScript
once established, you can reference elements in the array using the object's methods, or using standard array index syntax (that is, using bracket notation).
Int8Array - JavaScript
once established, you can reference elements in the array using the object's methods, or using standard array index syntax (that is, using bracket notation).
Intl.Locale.prototype.toString() - JavaScript
description the locale object is a javascript representation of a concept unicode locale identifier.
JSON.parse() - JavaScript
we are especially concerned with "()" and "new" // because they can cause invocation, and "=" because it can cause mutation.
Map - JavaScript
map.prototype.foreach(callbackfn[, thisarg]) calls callbackfn once for each key-value pair present in the map object, in insertion order.
Object.preventExtensions() - JavaScript
there is no way to make an object extensible again once it has been made non-extensible.
Object.prototype.__proto__ - JavaScript
it is deprecated in favor of object.getprototypeof/reflect.getprototypeof and object.setprototypeof/reflect.setprototypeof (though still, setting the [[prototype]] of an object is a slow operation that should be avoided if performance is a concern).
Object.setPrototypeOf() - JavaScript
until engine developers address this issue, if you are concerned about performance, you should avoid setting the [[prototype]] of an object.
Promise.allSettled() - JavaScript
return value a pending promise that will be asynchronously fulfilled once every promise in the specified collection of promises has completed, either by successfully being fulfilled or by being rejected.
Promise.any() - JavaScript
it short-circuits after a promise fulfils, so it does not wait for the other promises to complete once it finds one.
Promise.prototype.then() - JavaScript
return value once a promise is fulfilled or rejected, the respective handler function (onfulfilled or onrejected) will be called asynchronously (scheduled in the current thread loop).
Proxy.revocable() - JavaScript
once a proxy is revoked, it will remain revoked and can be garbage collected.
String.prototype.padEnd() - JavaScript
syntax str.padend(targetlength [, padstring]) parameters targetlength the length of the resulting string once the current str has been padded.
String.prototype.padStart() - JavaScript
syntax str.padstart(targetlength [, padstring]) parameters targetlength the length of the resulting string once the current str has been padded.
TypedArray.prototype.every() - JavaScript
description the every method executes the provided callback function once for each element present in the typed array until it finds one where callback returns a falsy value (a value that becomes false when converted to a boolean).
TypedArray.prototype.filter() - JavaScript
description the filter() method calls a provided callback function once for each element in a typed array, and constructs a new typed array of all the values for which callback returns a true value.
TypedArray.prototype.find() - JavaScript
description the find method executes the callback function once for each element present in the typed array until it finds one where callback returns a true value.
TypedArray.prototype.findIndex() - JavaScript
description the findindex method executes the callback function once for each element present in the typed array until it finds one where callback returns a true value.
TypedArray.prototype.map() - JavaScript
description the map() method calls a provided callback function (mapfn) once for each element in a typed array, in order, and constructs a new typed array from the results.
TypedArray.prototype.reduce() - JavaScript
description the reduce method executes the callback function once for each element present in the typed array, excluding holes in the typed array, receiving four arguments: the initial value (or value from the previous callback call), the value of the current element, the current index, and the typed array over which iteration is occurring.
TypedArray.prototype.reduceRight() - JavaScript
description the reduceright method executes the callback function once for each element present in the typed array, excluding holes in the typed array, receiving four arguments: the initial value (or value from the previous callback call), the value of the current element, the current index, and the typed array over which iteration is occurring.
TypedArray.prototype.some() - JavaScript
description the some method executes the callback function once for each element present in the typed array until it finds one where callback returns a true value.
Uint16Array() constructor - JavaScript
once established, you can reference elements in the array using the object's methods, or using standard array index syntax (that is, using bracket notation).
Uint16Array - JavaScript
once established, you can reference elements in the array using the object's methods, or using standard array index syntax (that is, using bracket notation).
Uint32Array() constructor - JavaScript
once established, you can reference elements in the array using the object's methods, or using standard array index syntax (that is, using bracket notation).
Uint32Array - JavaScript
once established, you can reference elements in the array using the object's methods, or using standard array index syntax (that is, using bracket notation).
Uint8Array() constructor - JavaScript
once established, you can reference elements in the array using the object's methods, or using standard array index syntax (that is, using bracket notation).
Uint8Array - JavaScript
once established, you can reference elements in the array using the object's methods, or using standard array index syntax (that is, using bracket notation).
Uint8ClampedArray() constructor - JavaScript
once established, you can reference elements in the array using the object's methods, or using standard array index syntax (that is, using bracket notation).
Uint8ClampedArray - JavaScript
once established, you can reference elements in the array using the object's methods, or using standard array index syntax (that is, using bracket notation).
WeakSet - JavaScript
just as with sets, each object in a weakset may occur only once; all objects in a weakset's collection are unique.
eval() - JavaScript
this means that any concept of variable naming gets obliterated.
Comma operator (,) - JavaScript
examples if a is a 2-dimensional array with 10 elements on each side, the following code uses the comma operator to increment i and decrement j at once.
Object initializer - JavaScript
let object = { foo: 'bar', age: 42, baz: {myprop: 12} } accessing properties once you have created an object, you might want to read or change them.
Operator precedence - JavaScript
operator precedence determines how operators are parsed concerning each other.
Spread syntax (...) - JavaScript
can be used anywhere in the array literal, and may be used more than once.
this - JavaScript
function f() { return this.a; } var g = f.bind({a: 'azerty'}); console.log(g()); // azerty var h = g.bind({a: 'yoo'}); // bind only works once!
export - JavaScript
in other words, one can create a single module concentrating various exports from various modules.
for - JavaScript
syntax for ([initialization]; [condition]; [final-expression]) statement initialization an expression (including assignment expressions) or variable declaration evaluated once before the loop begins.
switch - JavaScript
the optional break statement associated with each case label ensures that the program breaks out of switch once the matched statement is executed and continues execution at the statement following switch.
try...catch - JavaScript
try { try { throw new error('oops'); } catch (ex) { console.error('inner', ex.message); throw ex; } finally { console.log('finally'); } } catch (ex) { console.error('outer', ex.message); } // output: // "inner" "oops" // "finally" // "outer" "oops" any given exception will be caught only once by the nearest enclosing catch-block unless it is rethrown.
Statements and declarations - JavaScript
the condition is evaluated after executing the statement, resulting in the specified statement executing at least once.
Transitioning to strict mode - JavaScript
once again, it can happen at the function granularity level.
Examples - MathML
below you'll find some examples you can look at to help you to understand how to use mathml to display increasingly complex mathematical concepts in web content.
MathML documentation index - MathML
WebMathMLIndex
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 increasingly complex mathematical concepts in web content.
Autoplay guide for media and Web Audio APIs - Web media technologies
play() returns a promise which is resolved once the media successfully begins to play, and is rejected when playback fails to begin (such as if autoplay is denied).
Media container formats (file types) - Web media technologies
however, quicktime for windows is no longer supported by apple as of early 2016, and should not be used, as there are known security concerns.
Using images in HTML - Web media technologies
WebMediaimages
learn html: responsive images in this article, we'll learn about the concept of responsive images — images that work well on devices with widely differing screen sizes, resolutions, and other such features — and look at what tools html provides to help implement them.
Animation performance and frame rate - Web Performance
for animated media, such as video and animated gifs, the main performance concern is file size - downloading the file size fast enough to not negatively impact performance is the greatest issue.
Recommended Web Performance Timings: How long is too long? - Web Performance
animation goal for scrolling and other animations to look smooth and feel responsive, the content repaints should occur at 60 frames per second (60fps), which is once every 16.7ms.
Understanding latency - Web Performance
disk latency used to be the main area of performance concern.
Web Performance
it is important to minimize the loading and response times and add additional features to conceal latency by making the experience as available and interactive as possible, as soon as possible, while asynchronously loading in the longer tail parts of the experience.
Privacy, permissions, and information security
privacy the concept of privacy is somewhat hard to define.
Making PWAs work offline with Service workers - Progressive web apps (PWAs)
be sure to check out our further documentation if you want to learn more about the concepts behind the service worker api and how to use it in more detail.
How to make PWAs re-engageable using Notifications and Push - Progressive web apps (PWAs)
*/ ); once the user is subscribed, they can receive push notifications from the server.
gradientUnits - SVG: Scalable Vector Graphics
when the object's bounding box is not square, the rings that are conceptually circular within object bounding box space will render as elliptical due to application of the non-uniform scaling transformation from bounding box space to user space.
text-anchor - SVG: Scalable Vector Graphics
(for text on a path, conceptually the text string is first laid out in a straight line.
<animate> - SVG: Scalable Vector Graphics
WebSVGElementanimate
accessibility concerns blinking and flashing animation can be problematic for people with cognitive concerns such as attention deficit hyperactivity disorder (adhd).
SVG documentation index - SVG: Scalable Vector Graphics
WebSVGIndex
it is important to understand the concept of namespaces and how they are used if you plan to author svg content.
Introduction - SVG: Scalable Vector Graphics
once you are familiar you should be able to use the element reference and the interface reference to find out anything else you need to know.
Paths - SVG: Scalable Vector Graphics
WebSVGTutorialPaths
this interactive demo might help understand the concepts behind svg arcs: http://codepen.io/lingtalfi/pen/yalwjg (tested in chrome and firefox only, might not work in your browser) « previousnext » ...
SVG fonts - SVG: Scalable Vector Graphics
internet explorer hasn't considered implementing this, the functionality has been removed from chrome 38 (and opera 25) and firefox has postponed its implementation indefinitely to concentrate on woff.
Information Security Basics - Web security
describes the primary security objectives, which are absolutely fundamental to understanding security security controls defines major categories of security controls and discusses their potential disadvantages tcp/ip security an overview of the tcp/ip model, with a focus on the security considerations for ssl threats briefly introduces major threat concepts vulnerabilities defines the major categories of vulnerabilities and discusses the presence of vulnerabilities in all software ...
How to turn off form autocompletion - Web security
these features are usually enabled by default, but they can be a privacy concern for users, so browsers can let users disable them.
Transport Layer Security - Web security
once parameters and a data exchange mode where application data, such http, is exchanged.
Web security
information leakage referer header policy: privacy and security concerns there are privacy and security risks associated with the referer http header.
Tutorials
html tutorials introductory level introduction to html this module sets the stage, getting you used to important concepts and syntax, looking at applying html to text, how to create hyperlinks, and how to use html to structure a webpage.
Using custom elements - Web Components
note: connectedcallback may be called once your element is no longer connected, use node.isconnected to make sure.
Web Components
concepts and usage as developers, we all know that reusing code as much as possible is a good idea.
XPath
this extensive introduction to xslt and xpath assumes no prior knowledge of the technologies, and guides the reader through background, context, structure, concepts, and introductory terminology.
<xsl:variable> - XSLT: Extensible Stylesheet Language Transformations
WebXSLTElementvariable
because xslt permits no side-effects, once the value of the variable has been established, it remains the same until the variable goes out of scope syntax <xsl:variable name=name select=expression > template </xsl:variable> required attributes name gives the variable a name.
XSLT elements reference - XSLT: Extensible Stylesheet Language Transformations
WebXSLTElement
use the {{listsubpages}} macro once the bcd for <xsl:fallback>, <xsl:import>, <xsl:namespace-alias>, <xsl:number>, <xsl:output>, <xsl:stylesheet>, <xsl:text> and <xsl:value-of> is fully migrated.
Resources - XSLT: Extensible Stylesheet Language Transformations
msdn: xslt concepts ...
Web technology for developers
developing web applications documentation for web application developers; web apps are true write-once, deploy anywhere apps for mobile, desktop, and firefox os.
Caching compiled WebAssembly modules - WebAssembly
chrome has support implemented behind the webassembly structured cloning support flag, but is yet to turn it on by default because of some concerns (see this discussion, for example).
Loading and running WebAssembly code - WebAssembly
running your webassembly code once you've got your webassembly instance available in your javascript, you can then start using features of it that have been exported via the webassembly.instance.exports property.
Converting WebAssembly text format to wasm - WebAssembly
once you’ve got the tool built, add the /wabt/out/clang/debug directory to your system path.
Understanding WebAssembly text format - WebAssembly
once a module declares an import, the caller of webassembly.instantiate() must pass in an import object that has the corresponding properties.
Compiling an Existing C Module to WebAssembly - WebAssembly
it also allocates an output buffer for us that we need to free using webpfree() once we are done with the webp image.