Search completed in 1.24 seconds.
Compositing and clipping - Web APIs
clip
ping paths a clip
ping path is like a normal canvas shape but it acts as a mask to hide unwanted parts of shapes.
...the red star shape is our clip
ping path.
... if we compare clip
ping paths to the globalcompositeoperation property we've seen above, we see two compositing modes that achieve more or less the same effect in source-in and source-atop.
...And 13 more matches
PaymentResponse.shippingAddress - Web APIs
the ship
pingaddress read-only property of the paymentrequest interface returns a paymentaddress object containing the ship
ping address provided by the user.
... syntax var ship
pingaddress = paymentrequest.ship
pingaddress; value a paymentaddress object providing details comprising the ship
ping address provided by the user.
... example generally, the user agent will fill the ship
pingaddress property for you.
...And 7 more matches
PaymentRequest.shippingAddress - Web APIs
the ship
pingaddress read-only property of the paymentrequest interface returns the ship
ping address provided by the user.
... syntax var paymentaddress = paymentrequest.ship
pingaddress; example generally, the user agent will fill the ship
pingaddress property value.
... you can trigger this by setting paymentoptions.requestship
ping to true when calling the paymentrequest constructor.
...And 6 more matches
PaymentRequest.shippingOption - Web APIs
the ship
pingoption read-only attribute of the paymentrequest interface returns either the id of a selected ship
ping option, null (if no ship
ping option was set to be selected) or a ship
ping option selected by the user.
... it is initially null by when no "selected" ship
ping options are provided.
... this attribute is only populated if the constructor is called with the requestship
ping flag set to true.
...And 6 more matches
PaymentRequest.onshippingoptionchange - Web APIs
the onship
pingoptionchange event of the paymentrequest interface is fired whenever the user changes a ship
ping option.
... syntax paymentrequest.addeventlistener('ship
pingoptionchange', ship
pingoptionchangeevent => { ...
... }); paymentrequest.onship
pingoptionchange = function(ship
pingoptionchangeevent) { ...
...And 5 more matches
PaymentResponse.shippingOption - Web APIs
the ship
pingoption read-only property of the paymentrequest interface returns the id attribute of the ship
ping option selected by the user.
... this option is only present when the requestship
ping option is set to true in the paymentoptions object passed to the paymentrequest constructor.
... syntax var ship
pingoption = paymentrequest.ship
pingoption; example in the example below, the paymentrequest.onship
pingaoptionchange event is called.
...And 5 more matches
CSSGroupingRule - Web APIs
an object implementing the cssgrou
pingrule interface represents any css at-rule that contains other rules nested within it.
... interface cssgrou
pingrule : cssrule { readonly attribute cssrulelist cssrules; unsigned long insertrule (domstring rule, unsigned long index); void deleterule (unsigned long index); } properties common to all cssgrou
pingrule instances the cssgrou
pingrule derives from cssrule and inherits all properties of this class.
... it has one specific property: cssgrou
pingrule.cssrules read only returns a cssrulelist of the css rules in the media rule.
...And 4 more matches
PaymentRequest.onshippingaddresschange - Web APIs
the onship
pingaddresschange event of the paymentrequest interface is fired whenever the user changes their ship
ping address, including when an address is added by the user for the first time.
... syntax paymentrequest.addeventlistener('ship
pingaddresschange', ship
pingaddresschangeevent => { ...
... }); paymentrequest.onship
pingaddresschange = function(ship
pingaddresschangeevent) { ...
...And 4 more matches
PaymentRequest: shippingoptionchange event - Web APIs
for payment requests that request ship
ping information, and for which ship
ping options are offered, the ship
pingoptionchange event is sent to the paymentrequest whenever the user chooses a ship
ping option from the list of available options.
... the string identifying the currently-selected ship
ping option can be found in the ship
pingoption property.
... bubbles no cancelable no interface paymentrequestupdateevent event handler property onship
pingoptionchange examples this code snippet sets up a handler for the ship
pingoptionchange event.
...And 4 more matches
PaymentRequest: shippingaddresschange event - Web APIs
the ship
pingaddresschange event is sent to the paymentrequest object when the user selects a ship
ping address or changes details of their ship
ping address.
... bubbles no cancelable no interface paymentrequestupdateevent event handler property onship
pingaddresschange usage notes depending on the browser, the ship
ping address information may be redacted for privacy reasons.
... that is, the paymentaddress which contains the ship
ping address may have some portions of its content altered, obscured, or left out entirely in order to prevent identifying the user without their consent (since if they choose to have you ship products to them, you'll need their address).
...And 3 more matches
Mastering Wrapping of Flex Items - CSS: Cascading Style Sheets
the container will need to have a height in order that the items will start wrap
ping and creating new columns, and items will stretch taller to fill each column completely.
... wrap
ping and flex-direction wrap
ping works as you might expect when combined with flex-direction.
... creating gutters between items when wrap
ping flex items, the need to space them out is likely to arise.
...And 3 more matches
Looping code - Learn web development
a condition — as mentioned before, this defines when the loop should stop loo
ping.
... after (contacts.length-1) iterations, if the contact name does not match the entered search the paragraph text is set to "contact not found.", and the loop continues loo
ping until the condition is no longer true.
... skip
ping iterations with continue the continue statement works in a similar manner to break, but instead of breaking out of the loop entirely, it skips to the next iteration of the loop.
...And 2 more matches
PaymentDetailsUpdate.shippingAddressErrors - Web APIs
the paymentdetailsupdate dictionary's ship
pingaddresserrors property, if present, contains an addresserrors object whose contents provide error messages for one or more of the values in the paymentaddress specified as paymentrequest.ship
pingaddress.
... syntax var addresserrors = paymentdetailsupdate.ship
pingaddresserrors; value an addresserrors object, which contains domstrings describing errors in the properties of a paymentaddress.
... for each property in paymentaddress, a property by the same name is found in ship
pingaddresserrors if and only if a validation error occurred for that property.
...And 2 more matches
Gamepad.mapping - Web APIs
the gamepad.map
ping property of the gamepad interface returns a string indicating whether the browser has remapped the controls on the device to a known layout.
...if the browser is able to map controls on the device to that layout the map
ping property will be set to the string standard.
... syntax readonly attribute domstring map
ping; example var gp = navigator.getgamepads()[0]; console.log(gp.map
ping); value a string.
... specifications specification status comment gamepadthe definition of 'gamepad.map
ping' in that specification.
PaymentRequest.shippingType - Web APIs
the ship
pingtype read-only property of the paymentrequest interface returns one of "ship
ping", "delivery", "pickup", or null if one was not provided by the constructor.
... syntax var ship
pingtype = paymentrequest.ship
pingtype value one of "ship
ping", "delivery", "pickup", or null.
... specifications specification status comment payment request apithe definition of 'ship
pingtype' in that specification.
... desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetship
pingtypechrome full support 61edge full support 15firefox full support 55notes disabled full support 55notes disabled notes available only in nightly builds.disabled from version 55: this feature is behind the dom.payments.
Grouping operator ( ) - JavaScript
the grou
ping operator ( ) controls the precedence of evaluation in expressions.
... syntax ( ) description the grou
ping operator consists of a pair of parentheses around an expression or sub-expression to override the normal operator precedence so that expressions with lower precedence can be evaluated before an expression with higher priority.
... examples using the grou
ping operator overriding multiplication and division first, then addition and subtraction to evaluate addition first.
... var a = 1; var b = 2; var c = 3; // default precedence a + b * c // 7 // evaluated by default like this a + (b * c) // 7 // now overriding precedence // addition before multiplication (a + b) * c // 9 // which is equivalent to a * c + b * c // 9 specifications specification ecmascript (ecma-262)the definition of 'the grou
ping operator' in that specification.
Chapter 2: Technologies used in developing extensions - Archive of obsolete content
if you've had experience develo
ping with dynamic html, you'll probably find it relatively easy to pick up the knowledge you'll need to develop firefox extensions.
...i will assume that you have experience develo
ping with dynamic html, as well as the topics below.
...it does not have strict ty
ping like java, making it extremely flexible and giving it qualities that in some senses could be considered similar to lisp.
Warning: -file- is being assigned a //# sourceMappingURL, but already has one - JavaScript
the javascript warning "-file- is being assigned a //# sourcemap
pingurl, but already has one." occurs when a source map has been specified more than once for a given javascript source.
... message warning: -file- is being assigned a //# sourcemap
pingurl, but already has one.
... examples setting source maps setting a source map by using a comment in the file: //# sourcemap
pingurl=http://example.com/path/to/your/sourcemap.map or, alternatively, you can set a header to your javascript file: x-sourcemap: /path/to/file.js.map ...
Dragging and Dropping Multiple Items - Web APIs
if a particular drop target only supports drop
ping a single item, it could either reject the dragged items or it could just use just the first item.
... the dodrop event hander is called when drop
ping an item.
Index - Web APIs
below is a list of all the apis and interfaces (object types) that you may be able to use while develo
ping your web app or site.
... 29 addresserrors api, address, addresserrors, dictionary, errors, interface, payment address, payment request, payment request api, reference, payment, paymentaddress the addresserrors dictionary is used by the payment request api to to report validation errors in a physical address (typically a billing address or a ship
ping address).
... 179 audioparammap draft, experimental the web audio api interface audioparammap represents a set of multiple audio parameters, each described as a map
ping of a domstring identifying the parameter to the audioparam object representing its value.
...And 42 more matches
Index - Archive of obsolete content
154 develo
ping for firefox mobile add-on sdk no summary!
... 174 bookmarks code snippets, develo
ping mozilla, extensions, places no summary!
... 175 boxes code snippets make the box style="display: block" and the wrap
ping behavior will occur when the box is resized: 176 canvas code snippets canvas, code snippets, graphics no summary!
...And 41 more matches
Index
8 generating guids add-ons, develo
ping mozilla, develo
ping_mozilla:tools, extensions, tools, xpcom guids are used in mozilla programming for identifying several types of entities, including xpcom interfaces (this type of guids is callled iid), components (cid), and legacy add-ons—like extensions and themes—that were created prior to firefox 1.5.
... 14 introduction to xpcom for the dom develo
ping mozilla warning: this document has not yet been reviewed by the dom gurus, it might contain some errors.
...it returns a reference to the clone: 33 components.utils.createobjectin add-ons, develo
ping mozilla, extensions, javascript, reference, référence(2), xpcom:language bindings, xpconnect components.utils.createobjectin creates a new javascript object in the scope of the specified object's compartment.
...And 34 more matches
nss tech note5
gestcontext, data, sizeof data); s = pk11_digestfinal(digestcontext, digest, &len, sizeof digest); /* now, digest contains the 'signed digest', and len contains the length of the digest */</big> clean up pk11_destroycontext(digestcontext, pr_true); pk11_freesymkey(symkey); pk11_freeslot(slot); you can also look at a sample program illustrating this symmetric key wrap
ping/unwrap
ping of a symmetric key include headers #include "nss.h" #include "pk11pub.h" make sure nss is initialized.the simplest init function, in case you don't need a nss database is nss_nodb_init(".") choose a wrap
ping mechanism.
... see wrapmechanismlist in security/nss/lib/pk11wrap/pk11slot.c and security/nss/lib/ssl/ssl3con.c for examples of wrap
ping mechanisms.
...you can get the best slot given a wrap mechanism (as shown above), or get the best wrap mechanism given a slot using:</big> ck_mechanism_type wrapmech = pk11_getbestwrapmechanism(slot) prepare the wrap
ping key if using a raw key /* turn the raw key into a secitem */ secitem keyitem; keyitem.data = /* ptr to an array of key bytes */ keyitem.len = /* length of the array of key bytes */ /* turn the secitem into a key object */ pk11symkey* wrap
pingsymkey = pk11_importsymkey(slot, wrapmech, ...
...And 23 more matches
SubtleCrypto.unwrapKey() - Web APIs
this is sometimes called the "unwrap
ping key".
... syntax const result = crypto.subtle.unwrapkey( format, wrappedkey, unwrap
pingkey, unwrapalgo, unwrappedkeyalgo, extractable, keyusages ); parameters format is a string describing the data format of the key to unwrap.
... unwrap
pingkey is the cryptokey to use to decrypt the wrapped key.
...And 17 more matches
Mobile accessibility - Learn web development
user input — make user input requirements as painless as possible on mobile (e.g., in forms, keep ty
ping to a minimum).
...for example: single-tap
ping an app will select it, and the device will read out what the app is.
... swi
ping left and right will move between apps, or buttons/controls if you are in a control bar.
...And 13 more matches
AddressErrors - Web APIs
the addresserrors dictionary is used by the payment request api to to report validation errors in a physical address (typically a billing address or a ship
ping address).
... addresserrors is the type of the object returned by ship
pingaddresserrors in the paymentdetailsupdate passed into paymentrequestupdateevent.updatewith() by the ship
pingaddresschange event handler if a change to the address resulted in a validation error occurring.
... examples snippet: limiting destination countries this first example is just a snippet showing an implementation of the event handler for the ship
pingaddresschange event which checks to be sure the chosen address is located within one of a limited number of countries.
...And 13 more matches
HTML documentation index - HTML: Hypertext Markup Language
72 <blockquote>: the block quotation element blockquote, element, html, html grou
ping content, html:flow content, html:palpable content, html:sectioning root, quotations, reference, web the html <blockquote> element (or html block quotation element) indicates that the enclosed text is an extended quotation.
... 87 <dd>: the description details element definition, description details, element, html, html grou
ping content, reference, web, dd, description list, details the html <dd> element provides the description, definition, or value for the preceding term (<dt>) in a description list (<dl>).
... 93 <div>: the content division element content division, element, html, html grou
ping content, html:flow content, layout, reference, web, div the html content division element (<div>) is the generic container for flow content.
...And 13 more matches
Index - MDN Web Docs Glossary: Definitions of Web-related terms
11 accessibility accessibility, glossary web accessibility (a11y) refers to best practices for kee
ping a website usable despite physical and technical restrictions.
... 66 card sorting card sorting, design, glossary card sorting is a simple technique used in information architecture whereby people involved in the design of a website (or other type of product) are invited to write down the content / services / features they feel the product should contain, and then organize those features into categories or grou
pings.
... 72 character encoding composing, glossary an encoding defines a map
ping between bytes and text.
...And 12 more matches
Inputs and input sources - Web APIs
this may involve the user simply tap
ping on a spot on the screen, tracking their eyes, or the use of a joystick or motion-sensing controller to move a cursor.
...the screen mode indicates that the target ray is determined based on the user interacting with the webxr context by engaging with the screen in some way—most likely by the viewer tap
ping the screen or dragging the target ray around with their fingers.
... map
ping the grip space to the world coordinate system.
...And 12 more matches
clip-path - CSS: Cascading Style Sheets
the clip-path css property creates a clip
ping region that sets what part of an element should be shown.
...if specified by itself, it causes the edges of the specified box, including any corner sha
ping (such as a border-radius), to be the clip
ping path.
... none no clip
ping path is created.
...And 11 more matches
CanvasRenderingContext2D.clip() - Web APIs
the canvasrenderingcontext2d.clip() method of the canvas 2d api turns the current or given path into the current clip
ping region.
... it replaces any previous clip
ping region.
... in the image below, the red outline represents a clip
ping region shaped like a star.
...And 10 more matches
SubtleCrypto.wrapKey() - Web APIs
wrap
ping a key helps protect it in untrusted environments, such as inside an otherwise unprotected data store or in transmission over an unprotected network.
...this is sometimes called the "wrap
ping key".
... syntax const result = crypto.subtle.wrapkey( format, key, wrap
pingkey, wrapalgo ); parameters format is a string describing the data format in which the key will be exported before it is encrypted.
...And 10 more matches
A guide to searching crash reports
grou
ping you can cluster the results of each search into groups using the same criteria.
...search is easy to understand, but the grou
ping capabilities are easy to overlook.
... grou
ping in the previous section we saw one example of grou
ping, in the "signature facet" tab that is shown by default.
...And 9 more matches
Using textures in WebGL - Web APIs
turn off mips and set // wrap
ping to clamp to edge gl.texparameteri(gl.texture_2d, gl.texture_wrap_s, gl.clamp_to_edge); gl.texparameteri(gl.texture_2d, gl.texture_wrap_t, gl.clamp_to_edge); gl.texparameteri(gl.texture_2d, gl.texture_min_filter, gl.linear); } }; image.src = url; return texture; } function ispowerof2(value) { return (value & (value - 1)) == 0; } the loadtexture() routine starts...
...after that we setup filtering and wrap
ping for the texture based on whether or not the image we download was a power of 2 in both dimensions or not.
...their wrap
ping mode must also be set to clamp_to_edge.
...And 9 more matches
ui/frame - Archive of obsolete content
if the frame script initiates the conversation, you need to specify "*" as the origin: window.parent.postmessage("
ping", "*"); if the frame script has received a message from the add-on already, it can use the origin property of the event object passed to the message hander: // listen for messages from the add-on, and send a reply window.addeventlistener("message", function(event) { event.source.postmessage("pong", event.origin) }, false); this frame script listens to change events on the "city-selector" <se...
... for targetorigin, you can use the origin property of the event object passed to the message listener: var { frame } = require("sdk/ui/frame"); var { toolbar } = require("sdk/ui/toolbar"); var frame = new frame({ url: "./city-info.html", onmessage: function(e) { // message only the frame that
pinged us e.source.postmessage("pong", e.origin); } }); var toolbar = toolbar({ name: "
ping-pong", title: "
ping pong", items: [frame] }); this does not have to be the message event: the other events frame can emit: attach, load and ready, also provide access to source and origin.
...if you send a json object, the sdk takes care of serializing and deserializing it for you: // frame.js var label = window.document.getelementbyid("linky"); label.addeventlistener("click", function() { window.parent.postmessage({ "type" : "
ping", "reason" : "they clicked me" }, "*"); }, true); // main.js var { frame } = require("sdk/ui/frame"); var frame = new frame({ url: "./frame.html" }); frame.on("message", pong); function pong(e) { if (e.data.type == "
ping") { console.log(e.data.reason); e.source.postmessage("pong", event.origin); } } globals constructors frame(options) creates an frame.
...And 8 more matches
PaymentRequest.PaymentRequest() - Web APIs
displayitems an array of optional line items for the payment request that the user agent may display, such as product details, tax, and ship
ping.
... ship
pingoptions the ship
ping options the user may choose from.
... if this sequence is blank, it indicates the merchant cannot ship to the current ship
ping address.
...And 8 more matches
WebGL model view projection - Web APIs
box.draw({ top : 0.9, // x bottom : 0, // x left : -0.9, // y right : 0.9, // y depth : 0.5, // z color : [0.4, 1, 0.4, 1] // green }); finally, for demonstration that clip
ping is actually going on, this box doesn't get drawn because it's entirely outside of clip space.
... the clip
ping of points and polygons from clip space actually happens after the homogeneous coordinates have been transformed back into cartesian coordinates (by dividing by w).
...see perspective projection matrix below for an introduction to how to use more complex matrices to help control and prevent clip
ping.
...And 8 more matches
Chapter 5: Let's build a Firefox extension - Archive of obsolete content
change your preferences for more efficient development before you get to work develo
ping your extension, you’ll want to change some of your firefox preferences.
... true javascript.options.strict (present in firefox 3.5+) enforces strict error output from javascript true table 1: preferences to set for develo
ping extensions to make these changes, start your development profile, type about:config into firefox’s location bar and open the preferences window; find the preferences listed in table 1 and double-click on them to set them accordingly.
...this is not required for develo
ping extensions, but it is handy to have around.
...And 7 more matches
PaymentRequest - Web APIs
paymentrequest.ship
pingaddress read only secure context if requested via payment options, returns the ship
ping address chosen by the user for the purposes of calculating ship
ping.
... this property is only populated if the constructor is called with the requestship
ping flag set to true.
... paymentrequest.ship
pingoption read only secure context returns the identifier of the selected ship
ping option.
...And 7 more matches
ARIA: gridcell role - Accessibility
it is intended to mimic the functionality of the html td element for table-style grou
ping of information.
...instead use the native html td element in conjunction with the and contenteditable attribute: <td>potato</td> <td>cabbage</td> <td>onion</td> description gridcells with dynamically added, hidden, or removed rows and columns any element with a role="gridcell" applied to it should use aria to describe its order in the table-style grou
ping, provided the table, grid, or treegrid has the ability to have rows and/or columns dynamically added, hidden, or removed.
... this sample code demonstrates a table-style grou
ping of information where the third and fourth columns have been removed.
...And 7 more matches
scroll-snap-type - CSS: Cascading Style Sheets
both the scroll container snaps to snap positions in both of its axes independently (potentially snap
ping to different elements in each axis).
... examples snap
ping in different axes html <div class="holster"> <div class="container x mandatory-scroll-snap
ping" dir="ltr"> <div>x mand.
... ltr</div> <div>2</div> <div>3</div> <div>4</div> <div>5</div> </div> <div class="container x proximity-scroll-snap
ping" dir="ltr"> <div>x prox.
...And 7 more matches
/loader - Archive of obsolete content
this is provided by a mandatory options.paths hash that represents the map
ping between module id prefixes and locations.
...in those cases you have to decide what the entry point module is relative to and provide an appropriate map
ping for it: let { loader } = require('toolkit/loader'); let loader = loader({ paths: { // resolve all modules starting with `toolkit/` as follows: // toolkit/foo -> resource://gre/modules/commonjs/toolkit/foo.js // toolkit/foo/bar -> resource://gre/modules/commonjs/toolkit/foo/bar.js 'toolkit/': 'resource://gre/modules/commonjs/toolkit/', // resolev all other non-relati...
...ce:///modules/devtools/gcli.js // panel -> resource:///modules/panel.js '': 'resource:///modules/', // allow relative urls and resolve them to add-on root: // ./main -> resource://my-addon/root/main.js './': 'resource://my-addon/root/' } }); the order of keys in paths is irrelevant since they are sorted by keys from longest to shortest to allow overlap
ping map
ping.
...And 6 more matches
How to convert an overlay extension to restartless - Archive of obsolete content
well, xul overlays and windows, jsm files, chrome & resource map
pings with localization, default preferences, but no xpcom components of your own.
...map
pings, so that you can access your files with custom paths such as: resource://myaddon/filename.ext chrome://myaddon/content/filename.ext step 2: no more resource:// uris for files internal to your bundle unfortunately, resource map
pings in your chrome.manifest were not usable in restartless add-ons until mozilla finally fixed this bug in firefox 38, which looked bad, but only because mozilla is st...
...resource map
pings for files in the mozilla distribution, such as services.jsm (above), will continue to work.
...And 6 more matches
Index - Learn web development
beginner, express, flask, learn, node, php, python, django, lamp, server-side, servers throughout most of the learning area, we tell you to just open your examples directly in a browser — this can be done by double clicking the html file, dragging and drop
ping it into the browser window, or choosing file > open...
... 46 how to contribute to the learning area on mdn beginner, contribute, documentation, guide, learn, mdn meta, l10n:priority on this page, you'll find everything you need to start hel
ping improve mdn's learning content.
...in this article, we'll look at all the common things that you really ought to know about strings when learning javascript, such as creating strings, esca
ping quotes in strings, and joining strings together.
...And 6 more matches
Arrays - Learn web development
suppose we want to store a shop
ping list in an array.
... paste the following code into the console: let shop
ping = ['bread', 'milk', 'cheese', 'hummus', 'noodles']; shop
ping; in the above example, each element is a string, but in an array we can store various data types — strings, numbers, objects, and even other arrays.
... enter the following into your console: shop
ping[0]; // returns "bread" you can also modify an item in an array by simply giving a single array item a new value.
...And 6 more matches
Index
there are tools for managing nss databases, for dum
ping or verifying certificates, for registering pkcs#11 modules with a database, for processing cms encrypted/signed messages, etc.
...nss has some flexibility that allows applications to use their own, independent database engine while kee
ping a shared database and working around the access issues.
...nss has some flexibility that allows applications to use their own, independent database engine while kee
ping a shared database and working around the access issues.
...And 6 more matches
Using the Payment Request API - Web APIs
details — an object containing information concerning the specific payment, such as the total payment amount, tax, ship
ping cost, etc.
... so for example, you could create a new paymentrequest instance like so: var request = new paymentrequest(buildsupportedpaymentmethoddata(), buildshop
pingcartdetails()); the functions invoked inside the constructor simply return the required object parameters: function buildsupportedpaymentmethoddata() { // example supported payment methods: return [{ supportedmethods: 'basic-card', data: { supportednetworks: ['visa', 'mastercard'], supportedtypes: ['debit', 'credit'] } }]; } function buildshop
pingcartdetails() { // hardcoded for demo purposes: return { id: 'order-123', displayitems: [ { label: 'example item', ...
... simulate immediate success: paymentresponse.complete('success') .then(function() { // for demo purposes: intropanel.style.display = 'none'; successpanel.style.display = 'block'; }); }) this object provides the developer with access to details they can use to complete the logical steps required after the payment completes, such as an email address to contact the customer, a ship
ping address for mailing goods out to them, etc.
...And 6 more matches
Writing WebSocket servers - Web APIs
once the server sends these headers, the handshake is complete and you can start swap
ping data!
... kee
ping track of clients this doesn't directly relate to the websocket protocol, but it's worth mentioning here: your server must keep track of clients' sockets so you don't keep handshaking again with clients who have already completed the handshake.
...
pings and pongs: the heartbeat of websockets at any point after the handshake, either the client or the server can choose to send a
ping to the other party.
...And 6 more matches
Cross-Origin Resource Sharing (CORS) - HTTP
the following is an example of a request that will be preflighted: const xhr = new xmlhttprequest(); xhr.open('post', 'https://bar.other/resources/post-here/'); xhr.setrequestheader('x-
pingother', '
pingpong'); xhr.setrequestheader('content-type', 'application/xml'); xhr.onreadystatechange = handler; xhr.send('<person><name>arun</name></person>'); the example above creates an xml body to send with the post request.
... also, a non-standard http x-
pingother request header is set.
...t/response: options /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 origin: http://foo.example access-control-request-method: post access-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 c...
...And 6 more matches
Storing the information you need — Variables - Learn web development
try ty
ping these lines into your web browser's console.
... you can test whether these values now exist in the execution environment by ty
ping just the variable's name, e.g.
...if they don't exist, you'll get an error message — try ty
ping in scoobydoo; note: don't confuse a variable that exists but has no defined value with a variable that doesn't exist at all — they are very different things.
...And 5 more matches
Index of archived content - Archive of obsolete content
toolbar annotator creating annotations displaying annotations implementing the widget overview storing annotations chrome authority creating event targets creating reusable modules develo
ping for firefox mobile display a popup getting started (jpm) getting started (cfx) list open tabs listen for page load listening for load and unload localization logging modifying web pages based on url modifying the page hosted by a tab open a web ...
...ase support in old browsers xpath getattributens common pitfalls communication between html and your extension creating custom firefox extensions with the mozilla build system custom about: urls default preferences deploying a plugin as an extension develo
ping add-ons displaying web content in an extension without security issues downloading json and javascript in extensions enhanced extension installation extension etiquette extension library extension packaging extension samples extension theming guidelines extension versioning, update and compatibility ...
... multiple item extension packaging offering a context menu for form controls overlay extensions firefox addons developer guide appendix: what you should know about open-source software licenses chapter 1: introduction to extensions chapter 2: technologies used in develo
ping extensions chapter 3: introduction to xul—how to build a more intuitive ui chapter 4: using xpcom—implementing advanced processes chapter 5: let's build a firefox extension chapter 6: firefox extensions and xul applications license and authors xul school tutorial ...
...And 4 more matches
Layout System Overview - Archive of obsolete content
this must happen very fast, so the user's ty
ping is not delayed.
...this is especially critical when the user is ty
ping into the document: it would be quite unusable if ty
ping a character at the end of a document in the html editor caused the entire document to be reformatted - it would be too slow, at least on low-end machines.
...clients generally do not want to incur the expense of traversing all of the frames from the root to find the frame they are interested in, so the frame manager provides some other map
pings based on the needs of the clients.
...And 4 more matches
JavaScript Client API - Archive of obsolete content
before develo
ping against the javascript api, it is recommended to speak to developers of the api.
...function foorecord(collection, id) { cryptowrapper.call(this, collection, id); } foorecord.prototype = { __proto__: cryptowrapper.prototype, _logname: "record.foo", ttl: foo_ttl, // optional get bar() this.cleartext.bar, set bar(value) { this.cleartext.bar = value; }, get baz() this.cleartext.baz, set baz(value) { this.cleartext.baz = value; } }; to save all that ty
ping for declaring the getters and setters, you can also use utils.defergetset: function foorecord(collection, id) { cryptowrapper.call(this, collection, id); } foorecord.prototype = { __proto__: cryptowrapper.prototype, _logname: "record.foo", ttl: foo_ttl // optional }; utils.defergetset(foorec, "cleartext", ["bar", "baz"]); the store object the store object (which extends store, as def...
... if not, you may have to invent your own map
ping from data objects to guids as long as it's consistent.
...And 4 more matches
3D collision detection - Game development
axis-aligned bounding boxes as with 2d collision detection, axis-aligned bounding boxes (aabb) are the quickest algorithm to determine whether the two game entities are overlap
ping or not.
... this consists of wrap
ping game entities in a non-rotated (thus axis-aligned) box and checking the positions of these boxes in the 3d coordinate space to see if they are overlap
ping.
...the overlap
ping area between two non-rotated boxes can be checked with logical comparisons alone, whereas rotated boxes require additional trigonometric operations, which are slower to calculate.
...And 4 more matches
TypeScript support in Svelte - Learn web development
objective: learn how to configure and use typescript when develo
ping svelte applications.
... typescript: optional static ty
ping for javascript typescript is a superset of javascript that provides features such as optional static ty
ping, classes, interfaces, and generics.
... readability: static ty
ping gives the code more structure, making it self-documenting and more readable.
...And 4 more matches
Command line crash course - Learn web development
a large number of tools can be used by ty
ping commands into the command line; many come pre-installed on your system, and a huge number of others are installable from package registries.
... the next images show the command prompts available in windows — there’s a good range of options from the "cmd" program to "powershell" — which can be run from the start menu by ty
ping the program name.
... try ty
ping this into your system's terminal: cd desktop if you want to move back up to the previous directory, you can use two dots: cd ..
...And 4 more matches
Localizing without a specialized tool
you can follow more detailed guidelines on compare-locale's page, but running the following command from the command line should be enough: $ sudo easy_install -u compare-locales to start, be sure to open your command line interface and change your directory to where you are kee
ping your localization files, the en-us sources $ cd /path/to/your/working/directory now, you will need run compare locales.
... to do this, enter the following commands, kee
ping sure to change "x-testing" to the actual locale code of your locale.
... you can do this by ty
ping: cd ../../ where each ".." represents the prior sub directory before the main directory where you want to be.
...And 4 more matches
NSS Sample Code Sample1
this program shows the following: rsa key pair generation naming rsa key pairs looking up a previously generated key pair by name creating aes and mac keys (or encryption and mac keys in general) wrap
ping symmetric keys using your own rsa key pair so that they can be stored on disk or in a database.
... as an alternative to token symmetric keys as a way to store large numbers of symmetric keys wrap
ping symmetric keys using an rsa key from another server unwrap
ping keys using your own rsa key pair the main part of the program shows a typical sequence of events for two servers that are trying to extablish a shared key pair.
...in particular, this // creates the key pair that is used for wrap
ping keys int init(); // generates keys for encryption (aes) and macing.
...And 4 more matches
Bytecode Descriptions
toasynciter stack: iter, next ⇒ asynciter create and push an async iterator wrap
ping the sync iterator iter.
...if the circumstances permit the optimization, tryskipawait replaces value with the result of the await expression (unwrap
ping the resolved promise, if any) and pushes true.
...if we did the lookup twice, there would be observable bugs, thanks to dynamic sco
ping.
...And 4 more matches
Logical properties for floating and positioning - CSS: Cascading Style Sheets
the logical properties and values specification contains logical map
pings for the physical values of float and clear, and also for the positioning properties used with positioned layout.
... mapped properties and values the table below details the properties and values discussed in this guide along with their physical map
pings.
...these have no map
ping to physical properties, aside from the inset property.
...And 4 more matches
scroll-snap-stop - CSS: Cascading Style Sheets
formal definition initial valuenormalapplies toall elementsinheritednocomputed valueas specifiedanimation typediscrete formal syntax normal | always examples snap
ping in different axes this example is duplicated from scroll-snap-type with minor variances.
...: center; justify-content: space-between; flex-flow: column nowrap; font-family: monospace; } .container { display: flex; overflow: auto; outline: 1px dashed lightgray; flex: none; } .container.x { width: 100%; height: 128px; flex-flow: row nowrap; } .container.y { width: 256px; height: 256px; flex-flow: column nowrap; } /* definite scroll snap */ .mandatory-scroll-snap
ping > div { scroll-snap-stop: always; } .proximity-scroll-snap
ping > div { scroll-snap-stop: normal; } /* scroll-snap */ .x.mandatory-scroll-snap
ping { scroll-snap-type: x mandatory; } .y.mandatory-scroll-snap
ping { scroll-snap-type: y mandatory; } .x.proximity-scroll-snap
ping { scroll-snap-type: x proximity; } .y.proximity-scroll-snap
ping { scroll-snap-type: y proximity; } .container...
...} .y.container > div { line-height: 256px; font-size: 128px; width: 256px; height: 256px; } /* appearance fixes */ .y.container > div:first-child { line-height: 1.3; font-size: 64px; } /* coloration */ .container > div:nth-child(even) { background-color: #87ea87; } .container > div:nth-child(odd) { background-color: #87ccea; } html <div class="container x mandatory-scroll-snap
ping" dir="ltr"> <div>x mand.
...And 4 more matches
SVG documentation index - SVG: Scalable Vector Graphics
41 clip-path svg, svg attribute the clip-path presentation attribute defines or associates a clip
ping path with the element it is related to.
... 218 text-anchor svg, svg attribute the text-anchor attribute is used to align (start-, middle- or end-alignment) a string of pre-formatted text or auto-wrapped text where the wrap
ping area is determined from the inline-size property relative to a given point.
... 273 clip
ping and masking advanced, svg, svg:tutorial erasing part of what one has created might at first sight look contradictory.
...And 4 more matches
ui/sidebar - Archive of obsolete content
s a simple but complete add-on that shows how to set up communication between main.js and a script in a sidebar, in the case where the sidebar script initiates communication: the html file includes just a script, "sidebar.js": <!doctype html> <html> <body> content for my sidebar <script type="text/javascript" src="sidebar.js"></script> </body> </html> the "sidebar.js" file sends a
ping message to main.js using port.emit() as soon as it loads, and adds a listener to the pong message.
... addon.port.emit("
ping"); addon.port.on("pong", function() { console.log("sidebar script got the reply"); }); the "main.js" file creates a sidebar object and adds a listener to its attach event.
... on attach, "main.js" starts listening to the
ping message, and responds with a pong: var sidebar = require("sdk/ui/sidebar").sidebar({ id: 'my-sidebar', title: 'my sidebar', url: require("sdk/self").data.url("sidebar.html"), onattach: function (worker) { worker.port.on("
ping", function() { console.log("add-on script got the message"); worker.port.emit("pong"); }); } }); try running the add-on, and showing the sidebar using the "view->sidebar->my sidebar" menu item.
...And 3 more matches
Using the Editor from XUL - Archive of obsolete content
for command state maintenance, starting and stop
ping the throbber etc.).
... nstexteditorkeylistener this event listener handles key presses for ty
ping, and other editing operations (backspace, delete, enter/return).
... cases that it does not handle explicitly it passes on to nshtmleditor::editorkeypress(), which is where normal ty
ping keys end up.
...And 3 more matches
Eclipse CDT
kee
ping the index up-to-date as the source changes from day-to-day, you'll want to update the index to keep the code assistance working well.
... to get a list of autocomplete options in an editor tab, start ty
ping the name of an identifier and then type ctrl-space.
... unfortunately, the autocomplete list cannot (currently) be configured to appear automatically as soon as you start ty
ping a character that might be the start of an identifier name.
...And 3 more matches
HTTP Cache
//github.com/realityripple/uxp/blob/master/netwerk/base/public/nsiloadcontextinfo.idl it is a helper interface wrap
ping following four arguments into a single one: private-browsing boolean flag anonymous load boolean flag app id number (0 for no app) is-in-browser boolean flag helper functions to create nsiloadcontextinfo objects: c++ consumers: functions at loadcontextinfo.h exported header js consumers: resource://gre/modules...
... this could be improved by kee
ping the network load running and being stored to the cache entry even after the writing channel has been canceled.
... adding a new storage should there be a need to add a new distinct storage for which the current sco
ping model would not be sufficient - use one of the two following ways: [preffered] add a new <your>storage method on nsicachestorageservice and if needed give it any arguments to specify the storage scope even more.
...And 3 more matches
SourceMap.jsm
names: an array of identifiers that can be referenced by individual map
pings.
... map
pings: a string of base64 vlqs which contain the actual map
pings.
... sourcemapgenerator.prototype.addmap
ping(map
ping) add a single map
ping from original source line and column to the generated source's line and column for this source map being created.
...And 3 more matches
PR_CreateFileMap
creates a file map
ping object.
... prot protection option for read and write accesses of a file map
ping.
... returns if successful, a file map
ping of type prfilemap.
...And 3 more matches
Web Replay
the tab will pause at this point and allow state to be inspected, forward/reverse step
ping, and so forth.
... this mechanism requires intercepting mmap (or similar low level allocation functions) so that any newly addressable memory is known — anonymous map
pings would not otherwise be intercepted or included in the recording, as heap allocation is non-deterministic while replaying.
... mprotect is intercepted and nop'ed to avoid interference with the dirty memory mechanism, and munmap is intercepted with no actual unmap
ping performed, so that memory does not need to be remapped when restoring a snapshot (a set of free regions is maintained to allow reusing this memory).
...And 3 more matches
The JavaScript input interpreter - Firefox Developer Tools
to enter multi-line expressions, press shift+enter after ty
ping each line, then enter to run all the entered lines.
...can access variables defined in the page, both built-in variables like window and variables added by javascript libraries like jquery: autocomplete the editor has autocomplete: enter the first few letters and a popup appears with possible completions: press enter, tab, or the right arrow key to accept the suggestion, use the up/down arrows to move to a different suggestion, or just keep ty
ping if you don't like any of the suggestions.
... when the "instant evaluation" feature is enabled, the interpreter displays results of expressions as you're ty
ping them in single-line mode.
...And 3 more matches
AudioBufferSourceNode.AudioBufferSourceNode() - Web APIs
loopend: an optional value, in seconds, where loo
ping should end if the loop attribute is true.
...if loopend is less than 0, loo
ping will end at 0.
... if loopend is greater than the duration of the buffer, loo
ping will end at the end of the buffer.
...And 3 more matches
Viewpoints and viewers: Simulating cameras in WebXR - Web APIs
in map
ping applications, the camera may either be placed directly over the scene, or might use various angles to show perspective.
... the following function returns a projection perspective matrix that integrates the specified field of view angle as well as the given near and far clip
ping plane distances: function createperspectivematrix(viewport, fovdegrees, nearclip, farclip) { const fovradians = fov * (math.pi / 180.0); const aspectratio = viewport.width / viewport.height; const transform = mat4.create(); mat4.perspective(transform, fovradians, aspectratio, nearclip, farclip); return transform; } after converting the fov angle, fovdegrees, from d...
... the perspective matrix encapsulates the field of view (technically, this is the vertical field of view), aspect ratio, and the near and far clip
ping planes within the 4x4 matrix transform, which is then returned to the caller.
...And 3 more matches
-webkit-mask-composite - CSS: Cascading Style Sheets
syntax values clear overlap
ping pixels in the source mask image and the destination mask image are cleared.
... source-in overlap
ping pixels in the source mask image and the destination mask image are replaced by the pixels of the source mask image; all other pixels are cleared.
... source-out overlap
ping pixels in the source mask image and the destination mask image are cleared; all remaining pixels of the source mask image are rendered.
...And 3 more matches
Logical properties for sizing - CSS: Cascading Style Sheets
in this guide we will explain the flow-relative map
pings between physical dimension properties and logical properties used for sizing elements on our pages.
...while these flow relative map
pings may well become the default for many of us, in a design you may well use both physical and logical sizing.
... map
pings for dimensions the table below provides map
pings between logical and physical properties.
...And 3 more matches
Basic concepts of CSS Scroll Snap - CSS: Cascading Style Sheets
the below example demonstrates scroll snap
ping along the y axis, with scroll-snap-align used on the section element to dictate the point the scrolling should stop.
... using scroll-snap-type the scroll-snap-type property needs to know the direction in which scroll snap
ping happens.
... this could be x or y, or the logical map
pings block or inline.
...And 3 more matches
Browser compatibility and Scroll Snap - CSS: Cascading Style Sheets
this will ensure your scroll snap
ping works in all browsers which implement the specification, including firefox.
... if you do not do this your scroll snap
ping will no longer work in firefox 68 and up.
... in this initial example we have used the old specification alongside the current specification in order to make scroll snap
ping work in all browsers which support some form of scroll snap
ping.
...And 3 more matches
HTML attribute: step - HTML: Hypertext Markup Language
the step sets the step
ping interval when clicking up and down spinner buttons, moving a slider left and right on a range, and validating the different date types.
...the value can must be a positive number - integer or float -- or the special value any, which means no step
ping is implied, and any value is allowed (barring other constraints, such as min and max).
... the default step
ping value for number inputs is 1, allowing only integers to be entered, unless the step
ping base is not an integer.
...And 3 more matches
<input type="date"> - HTML: Hypertext Markup Language
additional attributes along with the attributes common to all <input> elements, date inputs have the following attributes: attribute description max the latest acceptable date min the earliest acceptable date step the step
ping interval, when clicking up and down spinner buttons and validating the date max the latest date to accept.
...only values which are equal to the basis for step
ping (min if specified, value otherwise, and an appropriate default value if neither of those is provided) are valid.
... a string value of any means that no step
ping is implied, and any value is allowed (barring other constraints, such as min and max).
...And 3 more matches
<input type="datetime-local"> - HTML: Hypertext Markup Language
additional attributes in addition to the attributes common to all <input> elements, datetime-local inputs offer the following attributes: attribute description max the latest date and time to accept min the earliest date and time to accept step the step
ping interval to use for this input, such as when clicking arrows on spinner controls or performing validation max the latest date and time to accept.
...only values which are equal to the basis for step
ping (min if specified, value otherwise, and an appropriate default value if neither of those is provided) are valid.
... a string value of any means that no step
ping is implied, and any value is allowed (barring other constraints, such as min and max).
...And 3 more matches
<input type="number"> - HTML: Hypertext Markup Language
the browser may opt to provide stepper arrows to let the user increase and decrease the value using their mouse or by simply tap
ping with a fingertip.
...e id of the <datalist> element that contains the optional pre-defined autocomplete options max the maximum value to accept for this input min the minimum value to accept for this input placeholder an example value to display inside the field when it's empty readonly a boolean attribute indicating whether the value is read-only step a step
ping interval to use when using up and down arrows to adjust the value, as well as for validation list the values of the list attribute is the id of a <datalist> element located in the same document.
...only values which are equal to the basis for step
ping (min if specified, value otherwise, and an appropriate default value if neither of those is provided) are valid.
...And 3 more matches
<input type="week"> - HTML: Hypertext Markup Language
tion to the attributes common to <input> elements, week inputs offer the following attributes: attribute description max the latest year and week to accept as valid input min the earliest year and week to accept as valid input readonly a boolean which, if present, indicates that the user cannot edit the field's contents step the step
ping interval (the distance between allowed values) to use for both user interface and constraint validation max the latest (time-wise) year and week number, in the string format discussed in the value section above, to accept.
...only values which are equal to the basis for step
ping (min if specified, value otherwise, and an appropriate default value if neither of those is provided) are valid.
... a string value of any means that no step
ping is implied, and any value is allowed (barring other constraints, such as min and max).
...And 3 more matches
String.prototype.toLocaleUpperCase() - JavaScript
the tolocaleuppercase() method returns the calling string value converted to upper case, according to any locale-specific case map
pings.
... syntax str.tolocaleuppercase() str.tolocaleuppercase(locale) str.tolocaleuppercase([locale, locale, ...]) parameters locale optional the locale parameter indicates the locale to be used to convert to upper case according to any locale-specific case map
pings.
... return value a new string representing the calling string converted to upper case, according to any locale-specific case map
pings.
...And 3 more matches
<xsl:number> - XSLT: Extensible Stylesheet Language Transformations
syntax <xsl:number count=expression level="single" | "multiple" | "any" from=expression value=expression format=format-string lang=xml:lang-code letter-value="alphabetic" | "traditional" grou
ping-separator=character grou
ping-size=number /> required attributes none.
...the processor goes to the first node in the ancestor-or-self axis that matches the count attribute and then counts that node plus all its preceding siblings (stop
ping when it reaches a match to the from attribute, if there is one) that also match the count attribute.if no match is found, the sequence will be an empty list.
...the processor looks at all ancestors of the current node and the current node itself, stop
ping when it reaches a match for the from attribute, if there is one.
...And 3 more matches
Chapter 3: Introduction to XUL—How to build a more intuitive UI - Archive of obsolete content
there are earlier experiments going back a long way in develo
ping user interfaces using a combination of html and scripting languages, and xul could be considered an evolutionary step from that.
...for example, there is the mozilla amazon browser, which helps with shop
ping at amazon, and the presentation method in xul, a tool for writing and displaying presentations to try out the code samples in this chapter, save them as text files with .xul extensions and drag and drop them into the firefox browser window.
...if you are develo
ping an application with an interface that can open web pages, i recommend that you always use this declaration to limit access to the parent frame.
...And 2 more matches
The Box Model - Archive of obsolete content
in order to have wrap
ping descriptions, you need to set the text as a child node instead of using the value attribute: <description>&xulschoolhello.description.label;</description> even then, the text will extend as much as it can in a single line, so you need to add some css limits in order to make it wrap inside a xul dialog or window.
... never cut text lines into separate locale strings in order to bypass wrap
ping difficulties.
... there are other more complicated text wrap
ping cases where a description won't be good enough.
...And 2 more matches
MMgc - Archive of obsolete content
here's what the different poison values mean: 0xfafafafa uninitialized unmanaged memory 0xedededed unmanaged memory that was freed explicitly 0xbabababa managed memory that was freed by the sweep phase of the garbage collector 0xcacacaca managed memory that was freed by an explicit call to gc::free (including drc rea
ping) 0xdeadbeef this is written to the 4 bytes just after any object allocated via mmgc.
...// before swee
ping we check for missing write barriers bool gc::incrementalvalidation = false; // check for missing write barriers at every alloc bool gc::incrementalvalidationpedantic = false; if you suspect you have missing write barriers, turn these switches on in a debug build.
...also finalize builds up a lists of pages that need swee
ping so sweep doesn't need to visit every page.
...And 2 more matches
URIs and URLs - Archive of obsolete content
the resource is the conceptual map
ping to an entity or set of entities, not necessarily the entity which corresponds to that map
ping 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 map
ping is not changed in the process.
... esca
ping to be able to parse an url safely it is sometimes necessary to "escape" certain characters, to hide them from the parser.
...And 2 more matches
XForms Select1 Element - Archive of obsolete content
note, some representations of the select1 element do not support visual grou
ping.
...xhtml widget characteristics analogous widgets is <html:select/> visual grou
ping by choices element is supported selection="open" is supported if incremental attribute value is false, the bound node is updated when the select1 control is blurred (i.e.
... loses focus), otherwise it is updated upon item selection xul widget characteristics analogous widgets are <html:select/> and <xul:menulist/> visual grou
ping by choices element isn't implemented selection="open" attribute isn't supported if incremental attribute value is false, the bound node is updated when the select control is blurred (i.e.
...And 2 more matches
Anatomy of a video game - Game development
games are constantly loo
ping through these stages, over and over, until some end condition occurs (such as winning, losing, or exiting to go to bed).
...imagine that you are develo
ping a "find the differences between these two similar pictures"-type game.
... for the second issue, stop
ping the main loop, you will need to cancel the call to main() with window.cancelanimationframe().
...And 2 more matches
HTML text fundamentals - Learn web development
to style content with css, or make it do interesting things with javascript, you need to have elements wrap
ping the relevant content, so css/javascript can effectively target it.
...lists are everywhere in life—from your shop
ping list to the list of directions you subconsciously follow to get to your house every day, to the lists of instructions you are following in these tutorials!
... unordered unordered lists are used to mark up lists of items for which the order of the items doesn't matter—let's take a shop
ping list as an example.
...And 2 more matches
Graceful asynchronous programming with Promises - Learn web development
there are certain steps that you have to take for your order to be successful, which doesn't really make sense to try to execute out of order, or in order but before each previous step has quite finished: you choose what top
pings you want.
... with old-style callbacks, a pseudo-code representation of the above functionality might look something like this: choosetop
pings(function(top
pings) { placeorder(top
pings, 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.
...if we represented the above pseudo-code using asynchronous promises instead, we'd end up with something like this: choosetop
pings() .then(function(top
pings) { return placeorder(top
pings); }) .then(function(order) { return collectorder(order); }) .then(function(pizza) { eatpizza(pizza); }) .catch(failurecallback); this is much better — it is easier to see what is going on, we only need a single .catch() block to handle all the errors, it doesn't block the main thread (so we can keep playing video games while we wait for the pizza to be ready to collect), and each operation is guaranteed to wait for previous operations to complete before running.
...And 2 more matches
Server-side web frameworks - Learn web development
different frameworks use different mechanisms for the map
ping.
... @app.route("/") def hello(): return "hello world!" while django expects developers to define a list of url map
pings between a url pattern and a view function.
...the team_level is a choice field, so we also provide a map
ping between choices to be displayed and data to be stored, along with a default value.
...And 2 more matches
Creating localizable web applications
an important step of develo
ping a web application or creating web content is making sure that it can be localized.
... so in order to display a localized label of a category or a tab, you should create a map
ping between the non-localizable english names used in the urls and the localizable english strings used in the interface.
...good: function num_format($num, $decimals) { $locale_info = localeconv(); return number_format($num, $decimals, $locale_info['decimal_point'], $locale_info['thousands_sep']); } printf(_("%s mb"), num_format($size, 1)); wrap as few html tags as possible when wrap
ping the localizable content with the gettext function calls, put all the code that irrelevant to localization outside the function call.
...And 2 more matches
Index
7 gcintegration develo
ping mozilla, firefox, garbage collection, intermediate, intro, jsapi, needsupdate, spidermonkey, tools, memory the spidermonkey garbage collector (gc) will be changing a lot in the future.
... 269 js_fileescapedstring jsapi reference, reference, référence(2), spidermonkey js_fileescapedstring writes str into file fp esca
ping any non-printable or non-ascii character.
... 429 js_putescapedstring jsapi reference, reference, référence(2), spidermonkey js_putescapedstring and js_putescapedstring write str into buffer esca
ping any non-printable or non-ascii character using \escapes for js string literals.
...And 2 more matches
Index
41 mailnews xpcshell-tests automated testing, develo
ping mozilla, mailnews, seamonkey, thunderbird mailnews xpcshell-tests are written and run in the same manner as the core xpcshell-tests.
... initially, the training.dat file is empty (there was discussion of ship
ping with a default file) on spam detection, the user can choose to move spam to a special "junk" folder the user can configure junk mail can be automatically purged from the "junk" folder to analyze a message for spam, we need the entire message, not just the headers.
...depending on the installed theme the result will look something like this: 80 building a thunderbird extension 7: installation extensions, thunderbird while you are develo
ping the extension, there are two ways you can make thunderbird load it so you can test it as you go.
...And 2 more matches
Using IndexedDB - Web APIs
this way, you can run multiple transactions with non-overlap
ping scopes concurrently.
...you can concurrently run multiple readonly transactions with overlap
ping scopes, but you can have only one readwrite transaction for an object store.
...this way, you can run multiple transactions with non-overlap
ping scopes concurrently.
...And 2 more matches
PaymentDetailsUpdate.error - Web APIs
the paymentdetailsupdate dictionary's error property is a human-readable domstring which provides an error message to be displayed if the specified information doesn't offer any valid ship
ping options.
... syntax errorstring = paymentdetailsupdate.error; paymentdetailsupdate.error = errorstring; value a domstring specifying the string to display to the user if the information specified in the paymentdetailsupdate doesn't provide any valid ship
ping options.
... this happens if both of the following are true: the paymentrequest specifies using its requestship
ping property that ship
ping information is required.
...And 2 more matches
PaymentRequestUpdateEvent - Web APIs
the paymentrequestupdateevent interface is used for events sent to a paymentrequest instance when changes are made to ship
ping-related information for a pending paymentrequest.
... those events are: ship
pingaddresschange secure context dispatched whenever the user changes their ship
ping address.
... also available using the onship
pingaddresschange event handler property.
...And 2 more matches
ReadableStream.pipeTo() - Web APIs
the pipeto() method of the readablestream interface pipes the current readablestream to a given writablestream and returns a promise that fulfills when the pi
ping process completes successfully, or rejects if any errors were encountered.
... pi
ping a stream will generally lock it for the duration of the pipe, preventing other readers from locking it.
... options optional the options that should be used when pi
ping to the writable stream.
...And 2 more matches
Using server-sent events - Web APIs
develo
ping a web application that uses server-sent events is straightforward.
... you can also listen for events with addeventlistener(): evtsource.addeventlistener("
ping", function(event) { const newelement = document.createelement("li"); const time = json.parse(event.data).time; newelement.innerhtml = "
ping at " + time; eventlist.appendchild(newelement); }); this code is similar, except that it will be called automatically whenever the server sends a message with the event field set to "
ping"; it then parses the json in the data field and outputs that ...
... the php code for the example we're using here follows: date_default_timezone_set("america/new_york"); header("cache-control: no-cache"); header("content-type: text/event-stream"); $counter = rand(1, 10); while (true) { // every second, send a "
ping" event.
...And 2 more matches
Rendering and the WebXR frame animation callback - Web APIs
you achieve this by doing as much as is practicable off the main thread and by kee
ping your frame rendering callback as efficient as possible.
...this is called drop
ping frames.
...and if the device's refresh rate is 120 hz, you only have 0.00883333 seconds to render each frame if you want to avoid drop
ping frames.
...And 2 more matches
Realizing common layouts using CSS Grid Layout - CSS: Cascading Style Sheets
here i am kee
ping everything in source order, trying to avoid any disconnect between the source and display as described in the guide grid layout and accessibility.
...i find this named areas method very helpful at a prototy
ping stage, it is easy to play around with the location of elements.
... you could always begin to use grid in this way for prototy
ping, even if you can’t rely on it fully in production due to the browsers that visit your site.
...And 2 more matches
Basic concepts of Logical Properties and Values - CSS: Cascading Style Sheets
the logical properties and values specification introduces flow-relative map
pings for many of the properties and values in css.
...the logical properties and values specification defines map
pings for these physical values to their logical, or flow relative, counterparts — e.g.
... an example of why these map
pings might be needed is as follows.
...And 2 more matches
<input type="month"> - HTML: Hypertext Markup Language
ttribute description list the id of the <datalist> element that contains the optional pre-defined autocomplete options max the latest year and month to accept as a valid input min the earliest year and month to accept as a valid input readonly a boolean which, if present, indicates that the input's value can't be edited step a step
ping interval to use when incrementing and decrementing the value of the input field list the values of the list attribute is the id of a <datalist> element located in the same document.
...only values which are equal to the basis for step
ping (min if specified, value otherwise, and an appropriate default value if neither of those is provided) are valid.
... a string value of any means that no step
ping is implied, and any value is allowed (barring other constraints, such as min and max).
...And 2 more matches
<input type="range"> - HTML: Hypertext Markup Language
additional attributes in addition to the attributes shared by all <input> elements, range inputs offer the following attributes: attribute description list the id of the <datalist> element that contains optional pre-defined options max the maximum permitted value min the minimum permitted value step the step
ping interval, used both for user interface and validation purposes list the values of the list attribute is the id of a <datalist> element located in the same document.
...only values which are equal to the basis for step
ping (min if specified, value otherwise, and an appropriate default value if neither of those is provided) are valid.
... a string value of any means that no step
ping is implied, and any value is allowed (barring other constraints, such as min and max).
...And 2 more matches
<input type="time"> - HTML: Hypertext Markup Language
id of the <datalist> element that contains the optional pre-defined autocomplete options max the latest time to accept, in the syntax described under time value format min the earliest time to accept as a valid input readonly a boolean attribute which, if present, indicates that the contents of the time input should not be user-editable step the step
ping interval to use both for user interfaces purposes and during constraint validation unlike many data types, time values have a periodic domain, meaning that the values reach the highest possible value, then wrap back around to the beginning again.
...only values which are equal to the basis for step
ping (min if specified, value otherwise, and an appropriate default value if neither of those is provided) are valid.
... a string value of any means that no step
ping is implied, and any value is allowed (barring other constraints, such as min and max).
...And 2 more matches
String.prototype.toLocaleLowerCase() - JavaScript
the tolocalelowercase() method returns the calling string value converted to lower case, according to any locale-specific case map
pings.
... syntax str.tolocalelowercase() str.tolocalelowercase(locale) str.tolocalelowercase([locale, locale, ...]) parameters locale optional the locale parameter indicates the locale to be used to convert to lower case according to any locale-specific case map
pings.
... return value a new string representing the calling string converted to lower case, according to any locale-specific case map
pings.
...And 2 more matches
StringView - Archive of obsolete content
*/ /* map
ping...
...*/ /* map
ping...
...*/ /* map
ping...
...*/ for (var nidx = 0; nidx < noutptlen; nidx++) { awhole[nidx] = vsource.charcodeat(nidx) & 0xff; } break conversionswitch; case 5: /* domstring to utf-8 or to utf-16 */ /* map
ping...
Chapter 6: Firefox extensions and XUL applications - Archive of obsolete content
matsuzawa-san is a co-author of firefox 3 hacks (o'reilly japan, 2008.) this chapter discusses tools to assist in develo
ping extensions.
...it works like typical debuggers, and is useful not only for develo
ping extensions, but also for general web development.
... the author has done almost no work develo
ping extensions, but has used this to investigate how extensions were implemented.
... 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 ty
ping 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).
Anonymous Content - Archive of obsolete content
sco
ping and access using the dom when a binding is attached and certain conditions are met, the children of the binding's content element are cloned.
...because anonymous content elements can also have bindings attached that generate their own anonymous content, this sco
ping can be taken to an arbitrary level of nesting.
... bindings can fine-tune the control of the stylesheet sco
ping with the inheritstyle attribute, which indicates whether or not author sheets defined at outer scopes affect the anonymous content generated by the binding.
... for the primary generating binding only, this attribute is checked to see if any author sheets at outer levels of sco
ping should be applied to the anonymous content generated by the bindings attached to the bound element.
-ms-wrap-through - Archive of obsolete content
initial valuewrapapplies toblock-level elementsinheritednocomputed valueas specifiedanimation typediscrete syntax values wrap the exclusion element inherits its parent node's wrap
ping context.
... none the exclusion element does not inherit its parent node's wrap
ping context.
... the wrap
ping context of a box is a collection of exclusion areas contributed by its associated exclusion boxes.
... the inline flow content of a box is placed in the area that corresponds to the subtraction of its wrap
ping context from its own content area.
E4X for templating - Archive of obsolete content
security and esca
ping function e (str) { if (typeof str === 'xml') {str = str.tostring();} return str; } function quot (s) { // useful for placing user input within inline javascript; may be combined with escape function above as well if (typeof s === 'string') { return s.replace(/"/g, '"').replace(/'/g, '''); } if (typeof s === 'xml') { return s.tostring().replace(/"/g, ...
...he simple xmllist() constructor (<></>) may be useful to still be able to use an expression closure (i.e., without needing return statements and braces): {_if(elems.length(), function () <> <markup/> <markup/> </>)} note that, while it is convenient to store such e4x in separate file templates (to be eval()d at a later time, taking into account security considerations, such as esca
ping with the above), e4x content using such functions can also be easily serialized inline (and then perhaps converted to the dom) as needed: var list = <>{_if(elems.length(), function () <> <markup/> <markup/> </>)}</>.toxmlstring(); iterating functions such as the following foreach (which can work with arrays, objects, or e4x objects) are quite convenient in iterating over complex ...
...inline functions as explained in the tutorial, it is possible to use anonymous functions inline (returning the desired content, including potentially xmllist's) in order to execute more than a single related statement, kee
ping this logic together with the resulting xml.
... although a big advantage of e4x is being able to separate presentation from business logic, and the above-mentioned technique may fly in the face of this, if formatted well, it can also allow inline sha
ping of xml somewhat akin to the w3c standard xquery language, allowing the scripting to mix in context with the surrounding declarative xml: var a = <a><b/><c/><d/></a>; var b = <bar>{function () { var content = <></>; for each (var el in a) { el.@att = 'val'; content += el; } return content; }()}</bar>; giving: <bar> <b att="val"/> <c att="val"/> <d att="val"/> </bar> one may still wish to remove complex business logic and supply as variables to the e4x, but the above allows the sha
ping of resulting content to be made more clear (and sometimes design ...
Building up a basic demo with the PlayCanvas engine - Game development
environment setup to start develo
ping with playcanvas, you don't need much.
... playcanvas application to begin develo
ping our game we have to create the playcanvas application first (using the given <canvas> element), and then start the update loop.
...one = new pc.entity(); cone.addcomponent("model", { type: "cone" }); app.root.addchild(cone); cone.translate(2, 0, 0); var conematerial = new pc.phongmaterial(); conematerial.diffuse.set(0.9, 0.9, 0.9); conematerial.update(); cone.model.model.meshinstances[0].material = conematerial; the code above will create a new cone, add it to the app and move it by 2 units to the right so it's not overlap
ping the cylinder.
...we're wrap
ping the y scale value in math.abs to pass the absolute values (greater or equal to 0); sin varies between -1 and 0, and for negative values the cylinder scaling can render unexpectedly (in this case it looks black half the time.) now onto the movement part.
MVC - MDN Web Docs Glossary: Definitions of Web-related terms
model view controller example imagine a simple shop
ping list app.
... going back to our shop
ping list app, the model would specify what data the list items should contain — item, price, etc.
... in our shop
ping list app, the view would define how the list is presented to the user, and receive the data to display from the model.
... so for example, our shop
ping list could have input forms and buttons that allow us to add or delete items.
UI pseudo-classes - Learn web development
se generated content is placed relative to an element's formatting box, but form inputs work more like replaced elements and therefore don't have one), we will add an empty <span> to hang the generated content on: <div> <label for="fname">first name: </label> <input id="fname" name="fname" type="text" required> <span></span> </div> the immediate problem with this was that the span was drop
ping onto a new line below the input because the input and label are both set with width: 100%.
...a classic example is a ship
ping form — commonly you'll get asked if you want to use the same address for billing and ship
ping; if so, you can just send a single address to the server, and might as well just disable the billing address fields.
... <form> <fieldset id="ship
ping"> <legend>ship
ping address</legend> <div> <label for="name1">name: </label> <input id="name1" name="name1" type="text" required> </div> <div> <label for="address1">address: </label> <input id="address1" name="address1" type="text" required> </div> <div> <label for="pcode1">zip/postal code: </label> <input id="pcode1" name="pcode1" type="text" required> </div> </fieldset> <fieldset id="billing"> <legend>billing address</legend> <div> <label for="b...
...illing-checkbox">same as ship
ping address:</label> <input type="checkbox" id="billing-checkbox" checked> </div> <div> <label for="name" class="billing-label disabled-label">name: </label> <input id="name" name="name" type="text" disabled required> </div> <div> <label for="address2" class="billing-label disabled-label">address: </label> <input id="address2" name="address2" type="text" disabled required> </div> <div> <label for="pcode2" class="billing-label disabled-label">zip/postal code: </label> <input id="pcode2" name="pcode2" type="text" disabled required> </div> </fieldset> <div><button>submit</button></div> </form> now onto the css.
Document and website structure - Learn web development
<section> is similar to <article>, but it is more for grou
ping together a single part of the page that constitutes one single piece of functionality (e.g., a mini map, or a set of article headlines and summaries).
...for example, imagine a shop
ping cart widget that you could choose to pull up at any point during your time on an e-commerce site: <div class="shop
ping-cart"> <h2>shop
ping cart</h2> <ul> <li> <p><a href=""><strong>silver earrings</strong></a>: $99.95.</p> <img src="../products/3333-0985/thumb.png" alt="silver earrings"> </li> <li> ...
...scared, but determined to protect his friends, he raised his wand and prepared to do battle, ho
ping that his distress call had made it through.</p> <hr> <p>meanwhile, harry was sitting at home, staring at his royalty statement and pondering when the next spin off series would come out, when an enchanted distress letter flew through his window and landed in his lap.
...we'd advise going through the next article in the series first and not just skip
ping to it though!
Cooperative asynchronous JavaScript: Timeouts and intervals - Learn web development
requestanimationframe() requestanimationframe() is a specialized loo
ping function created for running animations efficiently in the browser.
...however, more frames means more processing, which can often cause stuttering and skip
ping — also known as drop
ping frames, or jank.
...(note that the function name starts with "cancel", not "clear" as with the "set..." methods.) just pass it the value returned by the requestanimationframe() call to cancel, which you stored in the variable raf: cancelanimationframe(raf); active learning: starting and stop
ping our spinner in this exercise, we'd like you to test out the cancelanimationframe() method by taking our previous example and updating it, adding an event listener to start and stop the spinner when the mouse is clicked anywhere on the page.
... function keyhandler(e) { let isover = false; console.log(e.key); if (e.key === "a") { result.textcontent = 'player 1 won!!'; isover = true; } else if (e.key === "l") { result.textcontent = 'player 2 won!!'; isover = true; } if (isover) { document.removeeventlistener('keydown', keyhandler); settimeout(reset, 5000); } }; } step
ping through this: first, cancel the spinner animation with cancelanimationframe() (it is always good to clean up unneeded processes), and hide the spinner container.
Manipulating documents - Learn web development
active learning: a dynamic shop
ping list to round off the article, we'd like to set you a little challenge — we want to make a simple shop
ping list example that allows you to dynamically add items to the list using a form input and button.
... to start with, download a copy of our shop
ping-list.html starting file and make a copy of it somewhere.
... finally, use the focus() method to focus the input element ready for entering the next shop
ping list item.
... note: if you get really stuck, have a look at our finished shop
ping list (see it running live also.) summary we have reached the end of our study of document and dom manipulation.
A first splash into JavaScript - Learn web development
then we can try ty
ping in the examples shown below — type in each one from the "example" columns exactly as shown, pressing return/enter after each one, and see what results they return.
...add the following line just below the let resetbutton; line near the top of your javascript, then save your file: guessfield.focus(); this line uses the focus() method to automatically put the text cursor into the <input> text field as soon as the page loads, meaning that the user can start ty
ping their first guess right away, without having to click the form field first.
...an object is a collection of related functionality stored in a single grou
ping.
... now try ty
ping guesses into the console and pressing return.
Handling text — strings in JavaScript - Learn web development
in this article, we'll look at all the common things that you really ought to know about strings when learning javascript, such as creating strings, esca
ping quotes in strings, and joining strings together.
... esca
ping characters in a string to fix our previous problem code line, we need to escape the problem quote mark.
... esca
ping characters means that we do something to them to make sure they are recognized as text, not part of the code.
... you can even do this with two numbers — you can force a number to become a string by wrap
ping it in quote marks.
Understanding client-side JavaScript frameworks - Learn web development
in this article we will first have a look at the desired functionality of our app, then we'll create a todos.svelte component and put static markup and styles in place, leaving everything ready to start develo
ping our to-do list app features, which we'll go on to in subsequent articles.
...dynamic behavior in svelte: working with variables and props now that we have our markup and styles ready we can start develo
ping the required features for our svelte to-do list app.
...kee
ping the list short is therefore helpful.
... note that we were ho
ping to have more frameworks included upon initial publication, but we decided to release the content and then add more framework guides later, rather than delay it longer.
Introduction to cross browser testing - Learn web development
once you've agreed on these details, you can go ahead and start develo
ping the site.
...you should split the different parts of the development into modules, for example you might split the different site areas up — home page, product page, shop
ping cart, payment workflow, etc.
... you might then further subdivide these — implement common site header and footer, implement product page detail view, implement persistent shop
ping cart widget, etc.
...to start with, you should make sure there are no general issues with your code that are stop
ping your feature from working: test it in a couple of stable browsers on your system, like firefox, safari, chrome, or ie/edge.
Handling common JavaScript problems - Learn web development
browser developer tools browser developer tools have many useful features for hel
ping to debug javascript.
... web workers api for running javascript in a separate thread, hel
ping to improve performance.
...whereas libraries are often usable for solving individual problems and drop
ping into existing sites, frameworks tend to be more along the lines of complete solutions for develo
ping complex web applications.
... for example, try going into your browser's developer console and start ty
ping window.audiocontext if this feature is supported in your browser, it will autocomplete.
Software accessibility: Where are we today?
ces and software include: screen reading software, which speaks text displayed on the screen using hardware or software text-to-speech, and which allows a blind person to use the keyboard to simulate mouse actions alternate input devices, which allow people with physical disabilities to use alternatives to a keyboard and mouse voice recognition software, which allows a person to simulate ty
ping on a keyboard or selecting with a mouse by speaking into the computer screen magnification software, which allows a low-vision computer user to more easily read portions of the screen comprehension software, which allows a dyslexic or learning disabled computer user to see and hear text as it is manipulated on the computer screen in fact, the entire adaptive technology industry has grown up ...
...mozilla developers follow the general front-end accessibility requirements: there are a number of potential "gotchas" when develo
ping xul ui.
... ensure correct keyboard accessibility when develo
ping new controls: mozilla's xul and html widgets already support proper keyboard accessibility, so let's not regress in that area.
... support msaa and atk via nsiaccessible when develo
ping new controls: mozilla is a great position to provide context so that custom controls can be made accessible.
How Mozilla determines MIME Types
externalhelperappservice (located at uriloader/exthandler/nsexternalhelperappservice.cpp) the file->mime type map
ping works like this: on beos, the operating system is asked for the type of the file (not quite yet, bug 217723) on macos, the type and creator code will be used to lookup the type of the file from the os a hardcoded list of extensions is checked (containing currently 13 entries, nsexternalhelperappservice.cpp line 463 (this is done for speed – it is faster to find data in the hardcoded list t...
... if that also failed, the list of loaded plugins is checked for a plugin that can handle this extension, and is asked for the mime type if no plugin is registered, the ext-to-type-map
ping xpcom category is searched for the extension.
... this allows extensions to register additional map
pings.
... if no ext-to-type-map
ping category is found, the externalhelperappservice returns application/x-extension-ext, where ext is the extension of the file.
Mozilla Web Developer FAQ
if you use downloadable fonts, please make sure the fonts have the right unicode map
pings and the content uses the right unicode characters.
...dom) and xslt transformations that do not disable output esca
ping.
... externally defined character entities other than the five pre-defined ones (<, >, &, " and ') are only supported if the document references a public identifier for which there is a map
ping in mozilla’s pseudo-dtd catalog and the document has not been declared standalone.
...this affects data round trip
ping using hidden form inputs.
Research and prep
e-commerce search these search engines should allow users to get connected to new and used products they want to buy as quickly and painlessly as possible in a "trusted" site -- for example, choosing the most popular auction, general shop
ping, or classified type sites that have the desired user experience are good choices.
... e-commerce search amazon broad set of products, simple search interface with no/limited advertising, popular shop
ping engine.
... e-commerce search amazon broad set of products, simple search interface with no/limited advertising, popular shop
ping engine.
... e-commerce search amazon broad set of products, simple search interface with no/limited advertising, popular shop
ping engine.
Creating a Cookie Log
change to your firefox directory (usually c:\program files\mozilla firefox) type "set nspr_log_file=c:\temp\cookie-log.txt", enter type "set nspr_log_modules=cookie:4" and press enter run firefox by ty
ping "firefox.exe" and pressing enter.
... run firefox by ty
ping "./firefox" and pressing enter mac os x open terminal.app, which is located in the /applications/utilities folder (these instructions are for bash, the default shell in mac os x 10.3 and higher; if you use something else, you probably know how to modify these instructions already).
... run firefox by ty
ping "./firefox-bin" and pressing return (note that firefox will launch behind windows for other applications).
... thanks for hel
ping us make firefox better!
NSS_3.12_release_notes.html
til sqlite nssdbm 1 new include file is shipped with nss3.12: utilrename.h new functions in the nss shared library: cert_checknamespace (see cert.h) cert_encodecertpoliciesextension (see cert.h) cert_encodeinfoaccessextension (see cert.h) cert_encodeinhibitanyextension (see cert.h) cert_encodenoticereference (see cert.h) cert_encodepolicyconstraintsextension (see cert.h) cert_encodepolicymap
pingextension (see cert.h) cert_encodesubjectkeyid (see certdb/cert.h) cert_encodeusernotice (see cert.h) cert_findcrlentryreasonexten (see cert.h) cert_findcrlnumberexten (see cert.h) cert_findnameconstraintsexten (see cert.h) cert_getclassicocspdisabledpolicy (see cert.h) cert_getclassicocspenabledhardfailurepolicy (see cert.h) cert_getclassicocspenabledsoftfailurepolicy (see cert.h) cert_getpkixver...
...g_source cert_rev_m_require_info_on_missing_source cert_rev_m_ignore_missing_fresh_info cert_rev_m_fail_on_missing_fresh_info cert_rev_m_stop_testing_on_fresh_info cert_rev_m_continue_testing_on_fresh_info cert_rev_mi_test_each_method_separately cert_rev_mi_test_all_local_information_first cert_rev_mi_no_overall_info_requirement cert_rev_mi_require_some_fresh_info_available cert_policy_flag_no_map
ping cert_policy_flag_explicit cert_policy_flag_no_any cert_enable_ldap_fetch cert_enable_http_fetch new macro in utilrename.h: smime_aes_cbc_128 the nssckbi pkcs #11 module's version changed to 1.70.
..._camellia_ecb ckm_camellia_cbc ckm_camellia_mac ckm_camellia_mac_general ckm_camellia_cbc_pad ckm_camellia_ecb_encrypt_data ckm_camellia_cbc_encrypt_data ckg: mfgs ckg_mgf1_sha224 new error codes (see secerr.h): sec_error_not_initialized sec_error_token_not_logged_in sec_error_ocsp_responder_cert_invalid sec_error_ocsp_bad_signature sec_error_out_of_search_limits sec_error_invalid_policy_map
ping sec_error_policy_validation_failed sec_error_unknown_aia_location_type sec_error_bad_http_response sec_error_bad_ldap_response sec_error_failed_to_encode_data sec_error_bad_info_access_location sec_error_libpkix_internal new mechanism flags (see secmod.h) public_mech_aes_flag public_mech_sha256_flag public_mech_sha512_flag public_mech_camellia_flag new oids (see secoidt.h) new ec signature ...
...rt_issuer sec_oid_x509_freshest_crl sec_oid_x509_inhibit_any_policy sec_oid_x509_subject_info_access camellia oids (rfc3657) sec_oid_camellia_128_cbc sec_oid_camellia_192_cbc sec_oid_camellia_256_cbc pkcs 5 v2 oids sec_oid_pkcs5_pbkdf2 sec_oid_pkcs5_pbes2 sec_oid_pkcs5_pbmac1 sec_oid_hmac_sha1 sec_oid_hmac_sha224 sec_oid_hmac_sha256 sec_oid_hmac_sha384 sec_oid_hmac_sha512 sec_oid_pkix_timestam
ping sec_oid_pkix_ca_repository sec_oid_iso_sha1_with_rsa_signature changed oids (see secoidt.h) sec_oid_pkcs12_key_usage changed to sec_oid_bogus_key_usage sec_oid_ansix962_ecdsa_signature_with_sha1_digest changed to sec_oid_ansix962_ecdsa_sha1_signature note: sec_oid_ansix962_ecdsa_signature_with_sha1_digest is also kept for compatibility reasons.
Hacking Tips
thus when dum
ping the assembly under gdb, this kind of instructions would be easily noticeable.
... (gdb) bt #0 0x00000000007eaad4 in js::inlinelist<js::jit::mbasicblock>::begin() const (this=0x33dbbc0) at …/js/src/jit/inlinelist.h:280 #1 0x00000000007cb845 in js::jit::mirgraph::begin() (this=0x33dbbc0) at …/js/src/jit/mirgraph.h:787 #2 0x0000000000837d25 in js::jit::buildphireversemap
ping(js::jit::mirgraph&) (graph=...) at …/js/src/jit/ionanalysis.cpp:2436 #3 0x000000000083317f in js::jit::optimizemir(js::jit::mirgenerator*) (mir=0x33dbdf0) at …/js/src/jit/ion.cpp:1570 … (gdb) frame 3 #3 0x000000000083317f in js::jit::optimizemir(js::jit::mirgenerator*) (mir=0x33dbdf0) at …/js/src/jit/ion.cpp:1570 (gdb) iongraph mir function 0 (asm.js compilation): success; 1 passes.
...be aware that functions which are usually dum
ping some output will do it in the shell where valgrind is started and not in the shell where gdb is started.
... dum
ping the javascript heap from the shell, you can call the dumpheap before firefox function to dump out all gc things (reachable and unreachable) that are present in the heap.
JS_MapGCRoots
syntax uint32 js_mapgcroots(jsruntime *rt, jsgcrootmapfun map, void *data); callback syntax #define js_map_gcroot_next 0 /* continue map
ping entries */ #define js_map_gcroot_stop 1 /* stop map
ping entries */ #define js_map_gcroot_remove 2 /* remove and free the current entry */ typedef int (*jsgcrootmapfun)(void *rp, const char *name, void *data); description call js_mapgcroots to map the gc's roots table using map(rp, name, data).
...to continue map
ping, return js_map_gcroot_next.
... this function acquires and releases rt's gc lock around the map
ping of the roots table, so the map function should run to completion in as few cycles as possible.
... the map function cannot call js_gc, js_maybegc, js_beginrequest, or any js api entry point that acquires locks, without double-trip
ping or deadlocking on the gc lock.
Querying Places
let options = placesutils.history.getnewqueryoptions(); // no query parameters will return everything let query = placesutils.history.getnewquery(); // execute the query let result = placesutils.history.executequery(query, options); result types nsinavhistoryqueryoptions has a resulttype property that allows configuration of the grou
ping and level of detail to be returned in the results.
...when you specify exactly one folder and no query parameters, the system will be more efficient querying and kee
ping the results up-to-date since this maps to exactly one bookmark folder.
... dump("folder " + node.title + " id = " + node.itemid + "\n"); break; case node.result_type_separator: dump("-----------\n"); break; } the result view interface if you are map
ping a result into ui, you can implement the nsinavhistoryresultviewer interface and attach it to the result with the nsinavhistoryresult.viewer attribute.
...for queries map
ping to one bookmark folder, this will be a nsinavhistorycontainerresultnode.
nsIAccessibleRole
thus, panes represent a level of grou
ping lower than frame windows or documents, but above individual controls.
... role_grou
ping 20 logically groups other objects.
... there is not always a parent-child relationship between the grou
ping object and the objects it contains.
... role_toolbar 22 represents a toolbar, which is a grou
ping of controls (push buttons or toggle buttons) that provides easy access to frequently used features.
Address book sync client design
// // the client keeps a sync map
ping table which holds the following: // // serverrecordid - unique id for a record provided by the // uab server.
... // // step 1: // when the user begins a sync, run through the local database and update the // sync map
ping table.
... // // sync approach - server handles all conflict resolution: // // step 2: // using the sync map
ping table and the local records database, generate the change // list to send to the server.
... save the changes to // the local database, clear the sync map
ping table flags and save the new sync // map
ping table.
UI Tour - Firefox Developer Tools
ignore source causes the debugger to skip the file when "step
ping into" functions; this can be helpful for avoiding step
ping into libraries used by your code.
... enable framework grou
ping collects items belonging to a framework into a collapsible group (for example, jquery in the screenshot above).
... when grou
ping is enabled, the menu option changes to disable framework grou
ping.
... ignore source causes the debugger to skip the file when "step
ping into" functions.
CanvasRenderingContext2D - Web APIs
canvasrenderingcontext2d.clip() creates a clip
ping path from the current sub-paths.
... everything drawn after clip() is called appears inside the clip
ping path only.
... for an example, see clip
ping paths in the canvas tutorial.
...the contents of the window's viewport are rendered, ignoring viewport clip
ping and scrolling.
Intersection Observer API - Web APIs
entries.foreach((entry) => { let box = entry.target; let visiblepct = (math.floor(entry.intersectionratio * 100)) + "%"; box.queryselector(".topleft").innerhtml = visiblepct; box.queryselector(".topright").innerhtml = visiblepct; box.queryselector(".bottomleft").innerhtml = visiblepct; box.queryselector(".bottomright").innerhtml = visiblepct; }); } startup(); clip
ping and the intersection rectangle the browser computes the final intersection rectangle as follows; this is all done for you, but it can be helpful to understand these steps in order to better grasp exactly when intersections will occur.
... starting at the target's immediate parent block and moving outward, each containing block's clip
ping (if any) is applied to the intersection rectangle.
... a block's clip
ping is determined based on the intersection of the two blocks and the clip
ping mode (if any) specified by the overflow property.
... setting overflow to anything but visible causes clip
ping to occur.
Key Values - Web APIs
allows ty
ping control characters.
...modifies keystrokes to allow ty
ping upper (or other) case letters, and to support ty
ping punctuation and other special characters.
... vk_oem_attn (0xf0) gdk_key_eisu_shift (0xff2f) gdk_key_eisu_toggle (0xff30) qt::key_eisu_shift (0x0100112f) qt::key_eisu_toggle (0x01001130) "codeinput" the code input key, which enables code input mode, which lets the user enter characters by ty
ping their code points (their unicode character numbers, typically).
... vk_info qt::key_info (0x0100011b) keycode_info (165) "instantreplay" tellls the device to perform an instant replay (typically some form of jum
ping back a short amount of time then playing it again, possibly but not usually in slow motion).
PaymentRequest: paymentmethodchange event - Web APIs
the code assumes the existence of a method detailsforship
ping(), which returns a paymentdetailsupdate object containing the ship
ping options for the ground ship
ping method, in the form found in the paymentship
pingoption dictionary.
... by doing so, the payment form defaults to the ground ship
ping method.
... const options = { requestship
ping: true }; const paymentrequest = new paymentrequest(paymentmethods, detailsforship
ping("ground"), options); paymentrequest.addeventlistener("paymentmethodchange", handlepaymentchange, false); paymentrequest.show() .then(response => response.complete("success")) .catch(err => console.log("error handling payment request: " + err)); the event handler function itself, handlepaymentchange(), looks like this: handlepaymentchange = event => { const detailsupdate = {}; if (event.methodname === "https://apple.com/apple-pay") { const servicefeeinfo = calculateservicefee(event.methoddetails); object.assign(detailsupdate, servicefeeinfo); } event.updatewith(detailsupdate); }, false); this begins by looking at the event's methodname prope...
... related events merchantvalidation, ship
pingaddresschange, ship
pingoptionchange, and payerdetailchange specifications specification status comment payment request apithe definition of 'paymentmethodchange' in that specification.
PaymentResponse - Web APIs
paymentresponse.ship
pingaddress read only secure context returns the ship
ping address supplied by the user.
... this option is only present when the requestship
ping option is set to true in the options parameter of the paymentrequest() constructor.
... paymentresponse.ship
pingoption read only secure context returns the id attribute of the ship
ping option selected by the user.
... this option is only present when the requestship
ping option is set to true in the options parameter of the paymentrequest() constructor.
ReadableStream.pipeThrough() - Web APIs
the pipethrough() method of the readablestream interface provides a chainable way of pi
ping the current stream through a transform stream or any other writable/readable pair.
... pi
ping a stream will generally lock it for the duration of the pipe, preventing other readers from locking it.
... options optional the options that should be used when pi
ping to the writable stream.
...in this case the method will return a promise rejected with an error indicating pi
ping to a closed stream failed, or with any error that occurs during canceling the source.
Movement, orientation, and motion: A WebXR example - Web APIs
d) { navigator.xr.issessionsupported(session_type) .then((supported) => { xrbutton.disabled = !supported; }); } else { navigator.xr.supportssession(session_type) .then(() => { xrbutton.disabled = false; }) .catch(() => { xrbutton.disabled = true; }); } } the label of the button gets adjusted in the code that handles actuallys ttarting and stop
ping the webxr session; we'll see that below.
... then the view's normal matrix is computed by taking the model view matrix, inverting it, and transposing it (swap
ping its columns and rows).
...if the image's dimensions aren't both powers of two (see the ispowerof2() function), mipmap
ping is disabled and wrap
ping is clamped to the edges.
...webgl 2 supports arbitratily-sized textures for mipmap
ping.
WindowOrWorkerGlobalScope.setInterval() - Web APIs
} function stoptextcolor() { clearinterval(nintervid); } </script> </head> <body onload="changecolor();"> <div id="my_box"> <p>hello world</p> </div> <button onclick="stoptextcolor();">stop</button> </body> </html> example 3: typewriter simulation the following example simulates typewriter by first clearing and then slowly ty
ping content into the nodelist that matches a specified group of selectors.
... <!doctype html> <html> <head> <meta charset="utf-8" /> <title>javascript typewriter - mdn example</title> <script> function typewriter (sselector, nrate) { function clean () { clearinterval(nintervid); bty
ping = false; bstart = true; ocurrent = null; asheets.length = nidx = 0; } function scroll (osheet, npos, beraseandstop) { if (!osheet.hasownproperty('parts') || amap.length < npos) { return true; } var orel, bexit = false; if (amap.length === npos) { amap.push(0); } while (amap[npos] < osheet.parts.length) { orel = osheet.parts[amap[npos]]; scroll(orel, npos + 1, beraseandstop) ?
...= spart.slice(1); } function sheet (onode) { this.ref = onode; if (!onode.haschildnodes()) { return; } this.parts = array.prototype.slice.call(onode.childnodes); for (var nchild = 0; nchild < this.parts.length; nchild++) { onode.removechild(this.parts[nchild]); this.parts[nchild] = new sheet(this.parts[nchild]); } } var nintervid, ocurrent = null, bty
ping = false, bstart = true, nidx = 0, spart = "", asheets = [], amap = []; this.rate = nrate || 100; this.play = function () { if (bty
ping) { return; } if (bstart) { var aitems = document.queryselectorall(sselector); if (aitems.length === 0) { return; } for (var nitem = 0; nitem < aitems.length; nitem++) { asheets.push(new sheet(aitems[nitem])); /*...
... uncomment the following line if you have previously hidden your elements via css: */ // aitems[nitem].style.visibility = "visible"; } bstart = false; } nintervid = setinterval(typewrite, this.rate); bty
ping = true; }; this.pause = function () { clearinterval(nintervid); bty
ping = false; }; this.terminate = function () { ocurrent.nodevalue += spart; spart = ""; for (nidx; nidx < asheets.length; scroll(asheets[nidx++], 0, false)); clean(); }; } /* usage: */ var otwexample1 = new typewriter(/* elements: */ '#article, h1, #info, #copyleft', /* frame rate (optional): */ 15); /* default frame rate is 100: */ var otwexample2 = new typewriter('#controls'); /* you can also change the frame rate value modifying the "rate" property...
ARIA Test Cases - Accessibility
new tests for internet explorer 8 rc1 on this msdn page the aria state/role map
ping in ie8 to msaa roles can be directly checked.
...label and current content as well as role are spoken, also when ty
ping in a new value, that gets reflected.
... but when drop
ping down the lists of states in either example, after the second or so list item, jaws turns off forms mode, and the user has to turn off v cursor to be able to make selections or tab to anything useful.
...t seems to be missing search) exact same failures as with firefox - - voiceover (leopard) n/a n/a - fail window-eyes - - - - nvda - n/a - - zoom (leopard) pass n/a pass pass zoomtext - - - - orca - - - - live regions thank you to charles chen for develo
ping the live region examples.
CSS Grid Layout and Accessibility - CSS: Cascading Style Sheets
this means that someone navigating using the keyboard could be tabbing through links on your site and suddenly find themselves jum
ping from the top to the bottom of the document due to a reordered item being next in line.
...check that you do not end up lea
ping from the top to the bottom of the layout in a peculiar way.
... given that interoperable support for display: contents is limited and we do not yet have subgrids, there is a definite temptation when develo
ping a site using css grid layout to flatten out the markup, to remove semantic elements in order to make it simpler to create a layout.
...be aware of this temptation and find ways to develop your design without strip
ping out the markup.
aspect-ratio - CSS: Cascading Style Sheets
this property is not yet implemented in browsers, however some browsers are implementing this internally in order to provide the aspect ratio map
ping described below.
... formal definition initial valueautoapplies toall elements except inline boxes and internal ruby or table boxesinheritednocomputed valueas specifiedanimation typediscrete formal syntax auto | <ratio> examples map
ping width and height to aspect-ratio firefox has added an internal aspect-ratio property (in version 69 onwards) that applies to replaced elements and other related elements that accept width and height attributes.
...chrome is also ship
ping this feature.
...l support 79notes notes chrome 79 adds internal support only for mapped valuesfirefox android no support noopera android no support nosafari ios no support nosamsung internet android no support nointernal map
ping of width and height experimentalchrome full support 79edge full support 79firefox full support 71 full support 71 no support 69 — 71disabled disabled from version 69 until version 71 (exclusi...
<input>: The Input (Form Input) element - HTML: Hypertext Markup Language
if they aren't grouped together in source order, if one of the group is checked, tabbing into the group starts when the first one in the group is encountered, skip
ping all those that aren't checked.
...the value can must be a positive number—integer or float—or the special value any, which means no step
ping is implied, and any value is allowed (barring other constraints, such as min and max).
... if any is not explicity set, valid values for the number, date/time input types, and range input types are equal to the basis for step
ping - the min value and increments of the step value, up to the max value, if specified.
...for 4.2 to be valid, step would have had to be set to any, 0.1, 0.2, or any the min value would have had to be a number ending in .2, such as <input type="number" min="-5.2"> note: when the data entered by the user doesn't adhere to the step
ping configuration, the value is considered invalid in contraint validation and will match the :invalid pseudoclass.
Browser detection using the user agent - HTTP
progressive enhancement this design technique involves develo
ping your web site in 'layers', using a bottom-up approach, starting with a simpler layer and improving the capabilities of the site in successive layers, each using more features.
...while user agent sniffing can sometimes detect these, not all devices are the same: some mobile devices have big screen sizes, some desktops have a small touchscreen, some people use smart tv's which are an entirely different ballgame altogether, and some people can dynamically change the width and height of their screen by flip
ping their tablet on its side!
...for the purposes of grou
ping the content meaningfully, all the cat boxes are separated from all the dog boxes such that the cat and dog boxes are not intermixed together.
...or, there might be some weird flip-phone-like device thing in the future where flip
ping it out extends the screen.
OPTIONS - HTTP
the access-control-request-headers header tells the server that when the actual request is sent, it will have the x-
pingother and content-type headers.
... options /resources/post-here/ http/1.1 host: bar.example 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 origin: https://foo.example access-control-request-method: post access-control-request-headers: x-
pingother, content-type the server now can respond if it will accept a request under these circumstances.
...(this header is similar to the allow response header, but used only for cors.) access-control-allow-headers any script inspecting the response is permitted to read the values of the x-
pingother and content-type headers.
... http/1.1 204 no content date: mon, 01 dec 2008 01:15:39 gmt server: apache/2.0.61 (unix) 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 specifications specification title rfc 7231, section 4.3.7: options hypertext transfer protocol (http/1.1): semantics and content ...
An overview of HTTP - HTTP
this immediately has the prospect of being problematic for users attempting to interact with certain pages coherently, for example, using e-commerce shop
ping baskets.
...http/2 went a step further by multiplexing messages over a single connection, hel
ping keep the connection warm and more efficient.
... relaxing the origin constraint to prevent snoo
ping and other privacy invasions, web browsers enforce strict separation between web sites.
...this is useful not only for e-commerce shop
ping baskets, but also for any site allowing user configuration of the output.
Closures - JavaScript
lexical sco
ping consider the following example code: function init() { var name = 'mozilla'; // name is a local variable created by init function displayname() { // displayname() is the inner function, a closure alert(name); // use variable declared in the parent function } displayname(); } init(); init() creates a local variable called name and a function called displayname().
...this is an example of lexical sco
ping, which describes how a parser resolves variable names when functions are nested.
... the word lexical refers to the fact that lexical sco
ping uses the location where a variable is declared within the source code to determine where that variable is available.
...thanks to javascript's lexical sco
ping, they each have access to the privatecounter variable and the changeby function.
Introduction - JavaScript
the javascript language resembles java but does not have java's static ty
ping and strong type checking.
...java's class inheritance and strong ty
ping generally require tightly coupled object hierarchies.
... variable data types are not declared (dynamic ty
ping, loosely typed).
... variable data types must be declared (static ty
ping, strongly typed).
clip-path - SVG: Scalable Vector Graphics
the clip-path presentation attribute defines or associates a clip
ping path with the element it is related to.
...path>, <ellipse>, <g>, <glyph>, <image>, <line>, <marker>, <mask>, <path>, <pattern>, <polygon>, <polyline>, <rect>, <svg>, <symbol>, <text>, <use> html,body,svg { height:100% } <svg viewbox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"> <clippath id="myclip" clippathunits="objectboundingbox"> <circle cx=".5" cy=".5" r=".5" /> </clippath> <!-- top-left: apply a custom defined clip
ping path --> <rect x="1" y="1" width="8" height="8" stroke="green" clip-path="url(#myclip)" /> <!-- top-right: apply a css basic shape on a fill-box geometry.
... this is the same as having a custom clip
ping path with a clippathunits set to objectboundingbox --> <rect x="11" y="1" width="8" height="8" stroke="green" clip-path="circle() fill-box" /> <!-- bottom-left --> <rect x="1" y="11" width="8" height="8" stroke="green" clip-path="circle() stroke-box" /> <!-- bottom-right: apply a css basic shape on a view-box geometry.
... this is the same as having a custom clip
ping path with a clippathunits set to userspaceonuse --> <rect x="11" y="11" width="8" height="8" stroke="green" clip-path="circle() view-box" /> </svg> usage notes value <url> | [ <basic-shape> || <geometry-box> ] | none default value none animatable yes <geometry-box> an extra information to tell how a <basic-shape> is applied to an element: fill-box indicates to use the object bounding box; stroke-box indicates to use the object bounding box extended with the stroke; view-box indicates to use the nearest svg viewport as the reference box.
<clipPath> - SVG: Scalable Vector Graphics
the <clippath> svg element defines a clip
ping path, to be used by the clip-path property.
... a clip
ping path restricts the region to which paint can be applied.
... conceptually, parts of the drawing that lie outside of the region bounded by the clip
ping path are not drawn.
...*/ @keyframes openyourheart {from {r: 0} to {r: 60px}} #myclip circle { animation: openyourheart 15s infinite; } a clip
ping path is conceptually equivalent to a custom viewport for the referencing element.
Common XSLT Errors - XSLT: Extensible Stylesheet Language Transformations
the disable-output-esca
ping attribute.
...while we could try to add some heuristics to serialize and reparse just the part of the output document which has disable-output-esca
ping applied, heuristics often get things wrong and lead to surprising results, hence we've been reluctant to add this so far.
... often times stylesheets contain code like <xsl:text disable-output-esca
ping="yes"> </xsl:text>, this is equivalent to simply putting   in the stylesheet which will work great in all xslt engines.
... we do realize that the lack of disable-output-esca
ping is a problem and we'd like to find a solution for it, however so far we haven't found any good solutions.
jpm - Archive of obsolete content
any add-on which you are in the process of develo
ping) in the branded release or beta versions of firefox.
... develo
ping without browser restarts because jpm run restarts the browser each time you invoke it, it can be a little cumbersome if you are making very frequent changes to an add-on.
...but if you're develo
ping the sdk modules themselves, of course, it isn't.
Getting started (cfx) - Archive of obsolete content
summary in this tutorial we've built and packaged an add-on using three commands: cfx init to initialize an empty add-on template cfx run to run a new instance of firefox with the add-on installed, so we can try it out cfx xpi to package the add-on into an xpi file for distribution these are the three main commands you'll use when develo
ping sdk add-ons.
...but if you're develo
ping the sdk modules themselves, of course, it isn't.
... develo
ping without cfx run because cfx run restarts the browser each time you invoke it, it can be a little cumbersome if you are making frequent changes to an add-on.
Creating custom Firefox extensions with the Mozilla build system - Archive of obsolete content
all of these documents currently assume, however, that you are develo
ping your extension using xul and javascript only.
...whether you build the whole mozilla tree or take this shortcut, you can build from now on by going to /mozilla/$(moz_objdir)/extensions/myextension/ and ty
ping "make" on the command line.
... kee
ping it complex if you're develo
ping a really complex extension with lots of xpcom components, you'll probably want to divide your code up into smaller modules.
Appendix E: DOM Building and Insertion (HTML & XUL) - Archive of obsolete content
var href = "http://www.google.com/"; var text = "google"; $("body").append( $("<div>", { class: "foo" }) .append($("<a>", { href: href, text: text }) .click(function (event) { alert(event.target.href) })) .append($("<span>").text("foo"))); innerhtml with html esca
ping this method is a last resort which should be used only as a temporary measure in established code bases.
...amp;", '"': """, "'": "'", "<": "<", ">": ">" })[m]); } or slightly more verbose, but slightly more efficient: function escapehtml(str) { return str.replace(/[&"'<>]/g, (m) => escapehtml.replacements[m]); } escapehtml.replacements = { "&": "&", '"': """, "'": "'", "<": "<", ">": ">" }; note that quotation marks must be escaped in order to prevent fragments esca
ping attribute values.
...in these cases, multiple attributes should be used, one for each variable: function clickify(elem, address) { elem.setattribute("href", address); elem.setattribute("onclick", "openwindow(this.getattribute('href'))"); } esca
ping functions when the code fragment in question is not an event handler attribute and there is no feasible way to pass the data through other means, they must be escaped with functions such as uneval, string.quote, json.stringify, or number.
Setting up an extension development environment - Archive of obsolete content
note: you could run firefox using your regular profile while develo
ping.
...note that since many people have this setting turned off when develo
ping, you will see lots of warnings for problems with their code in addition to warnings for your own extension.
... using directories rather than jars regardless of whether you choose to eventually package your extension's chrome in a jar or in directories, develo
ping in directories is simpler.
Add-ons - Archive of obsolete content
all of these documents currently assume, however, that you are develo
ping your extension using xul and javascript only.
...well, xul overlays and windows, jsm files, chrome & resource map
pings with localization, default preferences, but no xpcom components of your own.
... legacy add-ons this section contains links to documentation for legacy technology for add-on development, including: legacy extensions for firefox for android add-ons that work with desktop firefox do not automatically work in firefox for android: overlay extensions this page contains links to documentation for the approach to develo
ping extensions for gecko-based applications which uses: performance best practices in extensions one of firefox's great advantages is its extreme extensibility.
CSS3 - Archive of obsolete content
the sco
ping mechanism.
...these shapes describe areas, around which inline content wraps instead of wrap
ping around the bounding box.
... css object model (cssom) working draft css font loading module level 3 working draft css sco
ping module level 1 working draft css inline layout working draft css images module level 4 working draft extends: the image() functional notation to describe the directionality of the image (rtl or ltr), allowing for bidi-sensitive images.
List of Mozilla-Based Applications - Archive of obsolete content
s 9 clines a clone of color lines (game) standalone version cloud web operating system cloud browse iphone/ipad/ipod touch browser seems to be firefox running remotely on servers that people access through device conkeror keyboard-oriented browser convertigo enterprise mashup server server tool for transactional web scra
ping and for web clip
ping cometbird another firefox mod modified version of firefox correo email couac (fr) web-based email and jabber app couchdb document-oriented database uses spidermonkey courtanet benefit (fr) underwriting software for french insurance brokers crosscheck browserless testing framework ...
...uses mozilla rhino crowbar server tool cycloctopus screen scra
ping console cyclone3 content management system danger mobile platform uses gecko on the server side -- no longer active?
... orca browser web browser gecko-based version of avant browser pale moon web browser optimized browser developed by moonchild productions for gnu/linux & windows platforms, originally forked from firefox palo suite excel extension uses prism partygaming online gaming product uses gecko pencil tool for making diagrams and gui prototy
ping available as a firefox extension or a standalone app pentaho bi suite commercial open source business intelligence uses xul and mozilla rhino persevere tools for persistence and distributed computing uses mozilla rhino phloneme publishing tool for vocab collab phped php editor embedded mozilla browser in product pidgin im...
Creating a hybrid CD - Archive of obsolete content
mkhybrid -o ~/party.iso -r -j -hfs -v mozilla.party -map ~/hfsmap
ping ~/party/ cdrecord -v speed=2 dev=0,6,0 ~/party.iso its also handy to be able to mount an image file to test it.
... mount ~/party.iso /mnt/cdrom -t iso9660 -o loop=/dev/loop3,blocksize=1024 umount /mnt/cdrom here is the hfs map
ping that i used.
... # example filename map
ping file used by mkhybrid for hfs # # extn xlate creator type comment .hqx ascii 'sitx' 'text' "binhex file" .zip raw 'sitx' 'zip ' "zip file" .gz raw 'sitx' 'zip ' "gzip file" .tgz raw 'sitx' 'zip ' "tar.gz gzip file" .tar raw 'sitx' 'tarf' "tar file" .tif raw '8bim' 'tiff' "photoshop tiff image" .doc raw 'mswd' 'wdbn' "word file" .mov raw 'tvod' 'moov' "quicktime movie" .bin raw 'sitx' 'bina' "mac binary" .h ascii 'cwie' 'text' ...
Venkman Introduction - Archive of obsolete content
at the time if this writing, the order and grou
ping of file names cannot be changed.
... at the time of this writing, the local variables view's default sort order and grou
ping are not adjustable.
... if you would like to keep venkman from stop
ping in a particular stack frame in the future, check "don't debug" from the stack frame's context menu.
Creating XPI Installer Modules - Archive of obsolete content
package creation overview this tutorial describes the following sequence of steps for creating a new package: develo
ping the resources organizing the resources creating the contents.rdf file making the barley install script creating a xpi you can examine (or install!) the package described here by downloading the barley xpi file and using a zip unarchiver[zip] to open it.
...develo
ping the resources needless to say, one of the first things you will have to create is the actual software you wish to make redistributable.
...while you are develo
ping these resources and before you have made them a package of their own, you can test the basic layout and functionality by opening barley.xul from within mozilla by using file -> open.
Using XPInstall to Install Plugins - Archive of obsolete content
you can create an xpinstall file by first zip
ping all the items you want installed with winzip (create a zip archive) and then renaming it with the xpi file extension instead of the zip file extension.
...if you are develo
ping a plugin and wish to make it scriptable, read the relevant portions of the plugin api.
... using xpinstall to run an exe (native code) installer if you wish to run a native installer (exe) to install plugin software, but wish to make the delivery of this native installer streamlined and within the browser's process, then you ought to consider wrap
ping it in an xpi package.
Custom toolbar button - Archive of obsolete content
open the file in firefox (for example, by dragging it and drop
ping it in firefox, or by choosing file – open file...
... note: for information about how to find the profile directory, see: profile folder explanation: the profile directory contains information specific to a user, kee
ping it separate from the application.
... copy the name from here and paste it, to avoid ty
ping errors: custom-toolbar-button@example.com perform the following steps in this new directory, creating two files and a directory there.
label - Archive of obsolete content
if the box direction is reversed, the crop
ping is reversed.
... the caption is in the "value" attribute remember that the label element has a "value" attribute, unlike value in html whereas buttons, checkboxes use label="foo" as the attribute <label label="a caption"/> <!-- wrong --> <label value="a caption"/> <label value="click the button"/> <button label="a button"/> <checkbox label="a decision" value="1"/> wrap
ping by default, label text does not wrap.
... to enable wrap
ping, use a text node instead of the value attribute.
textbox - Archive of obsolete content
possible values: pasteintact paste newlines unchanged pastetofirst paste text up to the first newline, drop
ping the rest of the text replacewithcommas pastes the text with the newlines replaced with commas replacewithspaces pastes the text with newlines replaced with spaces strip pastes the text with the newlines removed stripsurroundingwhitespace pastes the text with newlines and adjacent whitespace removed onblur type: script code this event is sent when a textbox loses keyboard f...
... wrap type: string set this attribute to the value off to disable word wrap
ping in the textbox.
... if this attribute is not specified, word wrap
ping is enabled.
NPWindow - Archive of obsolete content
syntax typedef struct _npwindow { void* window; /* platform specific handle */ uint32_t x; /* coordinates of top left corner */ uint32_t y; /* relative to a netscape page */ uint32_t width; /* maximum window size */ uint32_t height; nprect cliprect; /* clip
ping rectangle coordinates */ #ifdef xp_unix void * ws_info; /* platform-dependent additional data */ #endif /* xp_unix */ npwindowtype type; /* window or drawable target */ } npwindow; fields the data structure has the following fields: window platform-specific handle to a native window element in the netscape window hierarchy on windows (hwnd) and unix (x window id).
... cliprect clip
ping rectangle of the plug-in; the origin is the top left corner of the drawable or window.
... clip
ping to the cliprect prevents the plug-in from overwriting the status bar, scroll bars, and other page elements when partially scrolled off the screen.
Sunbird Theme Tutorial - Archive of obsolete content
develo
ping your theme to develop your theme, make further changes to the theme files.
...you might prefer to use this method only while you are develo
ping your theme, and to use the normal method for public releases.
... installing a packaged theme install your packaged theme in the normal way, by dragging the jar (or a link to it) and drop
ping it in sunbird's themes window.
Building a Theme - Archive of obsolete content
try ty
ping this url into the location bar in firefox!
...during the development phase for firefox versions 2.0 and higher, you can point firefox to the folder where you are develo
ping the theme, and it'll load it up every time you restart firefox.
... on mac os or linux, you can use the command-line zip tool: zip -r my_theme.xpi install.rdf chrome.manifest browser communicator global mozapps or, if you have 7-zip installed, you can use that for zip
ping it up: 7z a -tzip my_theme.xpi chrome chrome.manifest note: the command-line tool will update an existing zip file, not replace it - so if you have files you've deleted from your theme, be sure to remove the .xpi file before running the zip command again.
Common Firefox theme issues and solutions - Archive of obsolete content
web console close button sprite map
ping is messed up on the web console (tools > web developer > web console) the sprite map
ping for the close button is messed up.
... resources amo editors theme testing guidelines when develo
ping and testing your themes, please refer to the theme testing guidelines amo editors use to review themes.
... mozillazine firefox nightly theme changes thread mozillazine's firefox nightly theme changes thread is a great resource for kee
ping up to date with the latest changes to the firefox ui and contains links to the bugzilla bug reports, which detail what changes were made.
XForms Select Element - Archive of obsolete content
note, some representations of the select element do not support visual grou
ping.
...characteristics analogous widgets are <html:select size="5" multiple="true"/> and <xul:listbox seltype="multiple"/> visual grou
ping by choices element isn't implemented if incremental attribute value is false, the bound node is updated when the select control is blurred (i.e.
...characteristics appearance attribute contains the value full there are no analogue widgets in xhtml or in xul visual grou
ping by choices element is supported if incremental attribute value is false then bound node is updated when item is blurred examples <xf:model> <xf:instance> <data xmlns=""> <values>g</values> </data> </xf:instance> </xf:model> <xf:select ref="/data/values" appearance="full"> <xf:choices> <xf:label>green colors</xf:label> <xf:item> <xf:label>pale green</xf:label> <xf:value>pg</xf:value> </xf:item> <xf:item> <xf:label>green</xf:label> <xf:value>g</xf:value> </xf:item> ...
Audio for Web games - Game development
jum
ping to, playing, and then pausing that silence will mean we can now use javascript to play that file at arbitrary points.
...this is often the way that musicians compose music anyway, and the web audio api is extremely good at kee
ping these parts in sync.
... see also web audio api on mdn <audio> on mdn develo
ping game audio with the web audio api (html5rocks) mixing positional audio and webgl (html5rocks) songs of diridum: pushing the web audio api to its limits making html5 audio actually work on mobile audio sprites (and fixes for ios) ...
Desktop gamepad controls - Game development
note: please remember that different devices may have different key map
pings, i.e.
...the same goes for the axes information — loo
ping through axes adds the values to the array.
...if we want to check the button is not held already (so it's a new press), then loo
ping through the cached states from the previous frame does the job — if the button was already pressed, then we ignore the new press and set it to false.
Implementing controls using the Gamepad API - Game development
the theme for the competition was "change", so they submitted a game where you have to feed the hungry fridge by tap
ping the healthy food (apples, carrots, lettuces) and avoid the "bad" food (beer, burgers, pizza.) a countdown changes the type of food the fridge wants to eat every few seconds, so you have to be careful and act quickly.
... map
ping: the layout type of the buttons; standard is the only available option for now.
... map
ping standard the map
ping type is now an enumerable object instead of a string: enum gamepadmap
pingtype { "", "standard" }; this enum defines the set of known map
pings for a gamepad.
Texel - MDN Web Docs Glossary: Definitions of Web-related terms
the process of map
ping the appropriate texel’s to their corresponding points on a polygon is called texture map
ping, which is a stage of the process of rendering a 3d image for display.
... texture map
ping is typically done prior to lighting the scene; however, in webgl, lighting is performed as part of the texture map
ping process.
...when texture map
ping occurs the renderer maps texel’s to the appropriate pixels.
HTML: A good basis for accessibility - Learn web development
you can then press enter/return to follow a focused link or press a button (we've included some javascript to make the buttons alert a message), or start ty
ping to enter text in a text input.
... <tr> <td>name</td> <td>age</td> <td>gender</td> </tr> <tr> <td>gabriel</td> <td>13</td> <td>male</td> </tr> <tr> <td>elva</td> <td>8</td> <td>female</td> </tr> <tr> <td>freida</td> <td>5</td> <td>female</td> </tr> </table> but this has problems — there is no way for a screen reader user to associate rows or columns together as grou
pings of data.
...they can improve accessibility by hel
ping a user quickly navigate to different sections of a document.
HTML: A good basis for accessibility - Learn web development
you can then press enter/return to follow a focused link or press a button (we've included some javascript to make the buttons alert a message), or start ty
ping to enter text in a text input.
... <tr> <td>name</td> <td>age</td> <td>gender</td> </tr> <tr> <td>gabriel</td> <td>13</td> <td>male</td> </tr> <tr> <td>elva</td> <td>8</td> <td>female</td> </tr> <tr> <td>freida</td> <td>5</td> <td>female</td> </tr> </table> but this has problems — there is no way for a screen reader user to associate rows or columns together as grou
pings of data.
...they can improve accessibility by hel
ping a user quickly navigate to different sections of a document.
Overflowing content - Learn web development
at worst, a site visitor will let you know that content is overlap
ping.
...this offers the advantage of kee
ping the layout consistent, instead of scrollbars appearing or disappearing, depending upon the amount of content in the container.
... when develo
ping a site, always keep overflow in mind.
Styling tables - Learn web development
zebra stri
ping we wanted to dedicate a separate section to showing you how to implement zebra stripes — alternating rows of color that make the different data rows in your table easier to parse and read.
... add the following css to the bottom of your style.css file: /* zebra stri
ping */ tbody tr:nth-child(odd) { background-color: #ff33cc; } tbody tr:nth-child(even) { background-color: #e495e4; } tbody tr { background-image: url(noise.png); } table { background-color: #ff33cc; } earlier on you saw the :nth-child selector being used to select specific child elements.
... use zebra stri
ping to make alternative rows easier to read.
Floats - Learn web development
the background of floats the float property was introduced to allow web developers to implement simple layouts involving an image floating inside a column of text, with the text wrap
ping around the left or right of it.
...clearing the following element doesn't help with this box clearing problem, where you want the bottom of the box to wrap the floated item and wrap
ping content even if the content is shorter.
...this involves inserting some generated content after the box which contains the float and wrap
ping content, and setting that to clear both.
How do you make sure your website works properly? - Learn web development
ping is a useful shell tool that tests the domain name you provide and tells you if the server's responding or not: $
ping mozilla.org
ping mozilla.org (63.245.215.20): 56 data bytes 64 bytes from 63.245.215.20: icmp_seq=0 ttl=44 time=148.741 ms 64 bytes from 63.245.215.20: icmp_seq=1 ttl=44 time=148.541 ms 64 bytes from 63.245.215.20: icmp_seq=2 ttl=44 time=148.734 ms 64 bytes from 63.245.215.20: ic...
...mp_seq=3 ttl=44 time=147.857 ms ^c --- mozilla.org
ping statistics --- 4 packets transmitted, 4 packets received, 0.0% packet loss round-trip min/avg/max/stddev = 147.857/148.468/148.741/0.362 ms just keep in mind a handy keyboard shortcut: ctrl+c.
... if you don't stop the runtime,
ping will
ping the server indefinitely.
Tips for authoring fast-loading HTML pages - Learn web development
minimize the number of files for performance while kee
ping unrelated css in separate files for maintenance.
... minimize the number of files for performance while kee
ping unrelated javascript in separate files for maintenance.
... minimize the number of files for performance while kee
ping unrelated javascript in separate files for maintenance.
Getting started with HTML - Learn web development
active learning: creating your first html element edit the line below in the input area by wrap
ping it with the tags <em> and </em>.
...(not entire paragraphs or grou
pings of content) an inline element will not cause a new line to appear in the document.
... make important words stand out in bold by wrap
ping them inside a <strong> opening tag and </strong> closing tag.
Functions — reusable blocks of code - Learn web development
kee
ping parts of your code locked away in functions avoids such problems, and is considered the best practice.
... active learning: playing with scope let's look at a real example to demonstrate sco
ping.
... note: the same sco
ping rules do not apply to loop (e.g.
Image gallery - Learn web development
loo
ping through the images we've already provided you with lines that store a reference to the thumb-bar <div> inside a constant called thumbbar, create a new <img> element, set its src attribute to a placeholder value xxx, and append this new <img> element inside thumbbar.
... you need to: put the section of code below the "loo
ping through images" comment inside a loop that loops through all 5 images — you just need to loop through five numbers, one representing each image.
... previous overview: building blocks in this module making decisions in your code — conditionals loo
ping code functions — reusable blocks of code build your own function function return values introduction to events image gallery ...
Making decisions in your code — conditionals - Learn web development
if you help me by going and doing the shop
ping, i'll give you some extra allowance so you can afford that toy you wanted." in javascript, we could represent this like so: let shop
pingdone = false; if (shop
pingdone === true) { let childsallowance = 10; } else { let childsallowance = 5; } this code as shown always results in the shop
pingdone variable returning false, meaning disappointment for our poor child.
... it'd be up to us to provide a mechanism for the parent to set the shop
pingdone variable to true if the child did the shop
ping.
...cheese available for making cheese on toast.'); } else { console.log('no cheese on toast for you today.'); } and, returning to our previous example about the child doing a chore for their parent, you could write it like this: let shop
pingdone = false; if (shop
pingdone) { // don't need to explicitly specify '=== true' let childsallowance = 10; } else { let childsallowance = 5; } nesting if ...
Client-side storage - Learn web development
storing the contents of a shop
ping cart from a previous session, remembering if a user was previously logged in).
...try ty
ping this into your javascript console (change the value to your own name, if you wish!): localstorage.setitem('name','chris'); the storage.getitem() method takes one parameter — the name of a data item you want to retrieve — and returns the item's value.
... now type these lines into your javascript console: let myname = localstorage.getitem('name'); myname upon ty
ping in the second line, you should see that the myname variable now contains the value of the name data item.
Drawing graphics - Learn web development
add the following block to the bottom of the draw() function: if (posx % 13 === 0) { if (sprite === 5) { sprite = 0; } else { sprite++; } } we are wrap
ping the whole block in if (posx % 13 === 0) { ...
...if so, we move on to the next sprite by incrementing sprite (wrap
ping to 0 after we're done with sprite #5).
...add the following chunk of code at the bottom of your javascript: let cube; let loader = new three.textureloader(); loader.load( 'metal003.png', function (texture) { texture.wraps = three.repeatwrap
ping; texture.wrapt = three.repeatwrap
ping; texture.repeat.set(2, 2); let geometry = new three.boxgeometry(2.4, 2.4, 2.4); let material = new three.meshlambertmaterial( { map: texture, shading: three.flatshading } ); cube = new three.mesh(geometry, material); scene.add(cube); draw(); }); there's a bit more to take in here, so let's go through it in stages: we first create a c...
Basic math in JavaScript — numbers and operators - Learn web development
for example, try ty
ping these lines into your console: let mynumber = '74'; mynumber + 3; you end up with the result 743, not 77, because mynumber is actually defined as a string.
... you can test this by ty
ping in the following: typeof mynumber; to fix the calculation, you can do this: number(mynumber) + 3; arithmetic operators arithmetic operators are the basic operators that we use to do sums in javascript: operator name purpose example + addition adds two numbers together.
...s the new variable value x -= 3; x = x - 3; *= multiplication assignment multiplies the variable value on the left by the value on the right, and returns the new variable value x *= 3; x = x * 3; /= division assignment divides the variable value on the left by the value on the right, and returns the new variable value x /= 5; x = x / 5; try ty
ping some of the above examples into your console, to get an idea of how they work.
Multimedia: video - Learn web development
video autoplay to ensure that a loo
ping background video autoplays, you must add several attributes to the video tag: autoplay, muted, and playsinline.
... <video autoplay="" loop="" muted="true" playsinline="" src="backgroundvideo.mp4"> while the loop and autoplay make sense for a loo
ping and autoplaying video, the muted attribute is required for autoplay in mobile browsers.
...it includes a video that is auto-playing, loo
ping, and muted.
React interactivity: Events and state - Learn web development
update it as follows: function handlesubmit(e) { e.preventdefault(); props.addtask("say hello!"); } clicking on the "add" button in your browser will prove that the addtask() callback function works, but it'd be nice if we could get the alert to show us what we're ty
ping in our input field!
... // near the top of the `form` component function handlechange(e) { console.log("ty
ping!"); } // down in the return statement <input type="text" id="new-todo-input" classname="input input__lg" name="text" autocomplete="off" value={name} onchange={handlechange} /> currently, your input’s value will not change as you type, but your browser will log the word "ty
ping!" to the javascript console, so we know our event listener is attached to the input.
...add the following right at the top of your app() function definition: const [tasks, settasks] = usestate(props.tasks); now, we can change our tasklist map
ping so that it is the result of map
ping tasks, instead of props.tasks.
Getting started with Svelte - Learn web development
it extends css by adding a sco
ping mechanism, allowing each component to define their own styles without the risk of clashing with other component's styles.
...this is one example of svelte extending javascript syntax to make it more useful, while kee
ping it familiar.
... components styles are scoped, kee
ping them from clashing with each other.
Creating our first Vue component - Learn web development
add an id to the checkbox, and a for attribute map
ping the checkbox to the label, as shown below.
...listing props as an object allows you to specify default values, mark props as required, perform basic object ty
ping (specifically around javascript primitive types), and perform simple prop validation.
...this will be sufficient for kee
ping component ids unique.
Introducing a complete toolchain - Learn web development
we will however be avoiding any superfluous tooling, with the aim of kee
ping complexity to a minimum.
...kee
ping them as separate dependencies reduces any unnecessary work when deploying to production (which we will look at in the next chapter).
...it's not a prerequisite of develo
ping for the web, but it's useful to have the tools configured correctly if they’re going to help catch errors during development — which eslint is particularly useful for.
Learn web development
we have started kee
ping learning area release notes to show what has changed — keep checking back frequently!
... if you're interested in hel
ping develop/improve the content, take a look at how you can help and get in touch!
... we are more than happy to talk to you, whether you are a learner, teacher, experienced web developer, or someone else interested in hel
ping to improve the learning experience.
Accessibility API cross-reference
the roles it specifies have already informed the 'semantic elements' of html5 (such as main and footer), but there is not a one-to-one map
ping between the aria roles and the semantics of html5.
... gridcell a type of mouse pointer used for resizing windows grip n/a n/a n/a probably a group box (titledbox in mozilla) grou
ping panel panel group <fieldset>, <div> a heading for a section of the page.
...fore leaving it n/a modal modal aria-modal=true edit control that can take multiple lines n/a multi_line multi_line aria-multiline=true can select more than one of the children multiselectable multiselectable multi_selectable aria-multiselectable=true currently off-screen offscreengrou
ping n/a n/a n/a indicates that every pixel is painted within the object's rectangular region n/a opaque opaque n/a bgcolor (deprecated in favor of css background-color) object is currently pressed down.
Gecko info for Windows accessibility vendors
kee
ping an internal cache current means getting new subtrees of iaccessibles whenever an event_reorder is received, indicating important changes have invalidated part of the model.
...cular type: store a pointer to the start_item if the current item has a flows_to relation, follow that relation otherwise, go to the next item in depth first search order if the current item matches your criteria, then return current_item if the current_item == start_item, return null (no item found) if the end has been reached, go back to the start if wrap
ping is desired, otherwise return null (no item found) go to step 2 checkable, required and invalid states are supported gecko defines three state constants using previously unused states: const unsigned long state_checkable = state_marqueed; // useful on menuitem, listitem // and treeitem.
... role_grou
ping html: <fieldset> xul: <groupbox> dhtml: role="wairole:group" or dhtml: role="wairole:radiogroup" for a <fieldset> the name is exposed using the <legend> role_separator xul: <separator> html: <hr> dhtml: role="wairole:separator" role_toolbar xul: <toolbar> dhtml: role="wairole:toolbar" ...
Accessible Toolkit Checklist
however, be aware that the wrap
ping layer will introduce accessibility bugs, and thus you will need to test extensively and fill in the holes.
... ty
ping letter or several letters to navigate (same letter goes to each item starting with that, different letters go to first item starting with that entire string).
... already selected up/down arrow key navigation left arrow to first collapse a branch, then move to parent right arrow to first expand a branch, then move to first child multiple selection is possible with ctrl+arrow to move focus without selecting, then space to select item, shift+space to select to current point or control+space to toggle selection of current item ty
ping letter or several letters to navigate (similar to list support for this) shift+f10 or context menu key to bring up context menu for current item (on os x ctrl+space is used to bring up context menu).
SVG Guidelines
you can also use svg grou
ping to avoid duplicating those attributes avoid introducing variants of the same file (color/style variants), and use sprites instead (with class names) default style values there's usually no need to set the default style value unless you're overriding a style.
... here are some commonly seen examples: style="display: none;" on <defs> elements (a <defs> element is hidden by default) type="text/css" on <style> elements stroke: none or stroke-width: 0 svg grou
ping style grou
ping group similarly styled shapes under one <g> tag; this avoids having to set the same class/styles on many shapes.
... avoid excessive grou
ping editors can sometimes do excessive grou
ping while exporting svgs.
Security best practices for Firefox front-end engineers
this article will help firefox developers understand the security controls in place and avoid common pitfalls when develo
ping front-end code for firefox.
... the last flag ensures that developers will identify and avoid the problems early on in the development cycle and before ship
ping the code.
...developers are able to avoid trip
ping the rule by using esca
ping functions in combination with template strings, for example: bar.innerhtml = escapehtml`<a href='${url}'>about</a>`; in system-privileged chrome code, any kind of remaining scripts will still be removed by our sanitizer.
overflow-clip-box-block
the overflow-clip-box-block css property specifies relative to which box the clip
ping happens when there is an overflow — in the block direction.
... syntax values padding-box this keyword makes the clip
ping be related to the padding box.
... content-box this keyword makes the clip
ping be related to the content box.
overflow-clip-box-inline
the overflow-clip-box-inline css property specifies relative to which box the clip
ping happens when there is an overflow — in the inline direction.
... syntax values padding-box this keyword makes the clip
ping be related to the padding box.
... content-box this keyword makes the clip
ping be related to the content box.
overflow-clip-box
the overflow-clip-box css property specifies relative to which box the clip
ping happens when there is an overflow.
... initial valuepadding-boxapplies toall elementsinheritednomediavisualcomputed valueas specifiedanimation typediscretecanonical orderthe unique non-ambiguous order defined by the formal grammar syntax values padding-box this keyword makes the clip
ping be related to the padding box.
... content-box this keyword makes the clip
ping be related to the content box.
Embedding the editor
that state would have to include the document, undo stack, and ty
ping state.
... the implementation of the editing session would be responsible for swap
ping out the editor's state on focus changes etc.
... steps to embedding this section attempts to lay out an implementation plan, with the aim of kee
ping everything working as the various steps are taken.
Application Translation with Mercurial
by pressing the windows key and r on the keyboard or by calling the "run..." command from the windows "start" button, and then ty
ping cmd and pressing the enter key.
...c:\mozilla\coding\buildtools\mozillabuild\start-shell-msvc2010.bat you can autocomplete the file path after ty
ping a few characters and then pressing the tabulator key.
...so let's go to c:\mozilla by ty
ping cd /c/mozilla/ create a new directory for the source code: mkdir mozilla-aurora initialize the new directory as new repository: hg init mozilla-aurora go into the new directory: cd mozilla-aurora unpack the source code: hg unbundle /path/to/the/downloaded/mozilla-aurora.hg this can take some time, mostly depending on the performance of the hard drive.
Index
3 bootstrap
ping a new locale localization, mercurial, translate, bit bucket (see also https://developer.mozilla.org/en/create_a_new_localization) 4 encodings for localization files internationalization, localization when creating a localization for mozilla products, it’s important to be aware of the encoding of the files that you generate.
...enjoy develo
ping your style guide!
... the documentation is divided into 4 parts: 35 creating localizable web applications internationalization, localizability, localization, web development an important step of develo
ping a web application or creating web content is making sure that it can be localized.
Localizing with Koala
user: type your name and your e-mail address in the form: "firstname lastname <me@example.com>" (be sure to type the wrap
ping quotes: "") note that you no longer have to edit the location now, it automatically fills in when you check the "mercurial" checkbox (e.g.
...this is helpful for kee
ping the localization files clean and tidy at all times.
...they're just a simple key=value map
ping.
Leak-hunting strategies and tips
--jesse) drop
ping a reference on the floor by: forgetting to release (because you weren't using nscomptr when you should have been): see bug 99180 or bug 93087 for an example or bug 28555 for a slightly more interesting one.
... drop
ping a non-refcounted object on the floor (especially one that owns references to reference counted objects).
...this needs to be done when running, since we do the address to symbol map
ping at runtime.
Phishing: a short definition
a relatively simple, yet effective, phishing scheme is sending an email with a fake invoice of a person’s favorite shop
ping site.
...the ss7 telephony system is vulnerable, making eavesdrop
ping, or rerouting text messages quite trivial.
...unfortunately, some users still feel it's too tedious unlocking a phone, opening the otp app, and manually ty
ping a few digits each time a provider requests a new token.
PR_CloseFileMap
closes a file map
ping.
... syntax #include <prio.h> prstatus pr_closefilemap(prfilemap *fmap); parameter the function has the following parameter: fmap the file map
ping to be closed.
... description when a file map
ping created with a call to pr_createfilemap is no longer needed, it should be closed with a call to pr_closefilemap.
PR_MemMap
syntax #include <prio.h> void* pr_memmap( prfilemap *fmap, print64 offset, pruint32 len); parameters the function has the following parameters: fmap a pointer to the file-map
ping object representing the file to be memory-mapped.
... description pr_memmap maps a section of the file represented by the file map
ping fmap to memory.
... when the file-map
ping memory region is no longer needed, it should be unmapped with a call to pr_memunmap.
NSS tools : ssltab
when used with loo
ping mode, the different connections are separated with horizontal lines.
...-l prefix turn on loo
ping; that is, continue to accept connections rather than stop
ping after the first connection is complete.
...to make the tool continue to accept connections, switch on loo
ping mode with the -l option.
NSS tools : ssltap
when used with loo
ping mode, the different connections are separated with horizontal lines.
...-l prefix turn on loo
ping; that is, continue to accept connections rather than stop
ping after the first connection is complete.
...to make the tool continue to accept connections, switch on loo
ping mode with the -l option.
NSS Tools ssltap
when used with loo
ping mode, the different connections are separated with horizontal lines.
... -l turn on loo
ping; that is, continue to accept connections rather than stop
ping after the first connection is complete.
...to make the tool continue to accept connections, switch on loo
ping mode with the -l option.
NSS tools : ssltap
when used with loo
ping mode, the different connections are separated with horizontal lines.
... -l prefix turn on loo
ping; that is, continue to accept connections rather than stop
ping after the first connection is complete.
...to make the tool continue to accept connections, switch on loo
ping mode with the -l option.
Scripting Java
so the previous example could be even shorter: js> java [javapackage java] we can access java classes simply by step
ping down the package hierarchy: js> java.io.file [javaclass java.io.file] if your scripts access a lot of different java classes, it can get awkward to use the full package name of the class every time.
...this is also acceptable, it just takes more ty
ping.
...this difference is inevitable given javascript's use of dynamic ty
ping as was discussed in chapter 2: since the type of a variable is not known until runtime, only then can overload resolution occur.
Statistics API
there are several ways to get access to this data: the environment variable moz_gctimer controls text dum
ping of gc stats.
... the browser preference javascript.options.mem.log controls dum
ping of human-readable gc stats messages to the developer console.
...gc work can be divided into phases, such as marking or swee
ping.
SpiderMonkey Internals
provided so far: traps, with which breakpoints, single-step
ping, step over, step out, and so on can be implemented.
... line number to pc and back map
ping functions.
... if (eval(sumofdivisors[divisor]) == divisor) { print("" + divisor + " = " + sumofdivisors[divisor]); } } delete sumofdivisors; print("that's all."); } the line number to pc and back map
pings can be tested using the js program with the following script: load("perfect.js"); print(perfect); dis(perfect); print(); for (var ln = 0; ln <= 40; ln++) { var pc = line2pc(perfect, ln); var ln2 = pc2line(perfect, pc); print("\tline " + ln + " => pc " + pc + " => line " + ln2); } the result of the for loop over lines 0 to 40 inclusive is: line 0 => pc 0 => line 16 line 1 => pc 0 ...
WebReplayRoadmap
to that end, this document will be revised over time as we find new and better ways of hel
ping developers.
... points on the path could be clicked to seek there, which should offer faster and less clunky navigation than step
ping buttons.
... aggregate call graph and data flow (not yet implemented) when develo
ping a complex web app it is often hard to find where a function is called, the callees at a call site, where some data in an object came from or where it is used, or what type a value has.
Gecko Roles
thus, panes represent a level of grou
ping lower than frame windows or documents, but above individual controls.
... role_grou
ping logically groups other objects.
... role_toolbar represents a toolbar, which is a grou
ping of controls (push buttons or toggle buttons) that provides easy access to frequently used features.
An Overview of XPCOM
it can raise some real housekee
ping problems when, for example, a client uses an interface and forgets to decrement the reference count.
...most of these types are simple map
pings.
... variable map
pings nsrefcnt default reference count type.
Component Internals
component manifests the component manifest is a map
ping of files to components and components to classes.
... it specifies the following information: location on disk of registered components with file size class id to location map
ping contract id to class id map
ping the component manifest maps component files to unique identifiers for the specific implementations (class ids), which in turn are mapped to more general component identifiers (contract ids).
... type library manifests type library manifests contain the following information: location of all type library files map
ping of all known interfaces to type libraries where these structures are defined using the data in these two manifests, xpcom knows exactly which component libraries have been installed and what implementations go with which interfaces.
IAccessible2
groupposition() returns grou
ping information.
...another use of this value by an at is to identify when a grou
ping object has changed, for example when moving from a radio button in one group to a radio button in a different group.
...without the availability of windowhandle, the at would have to get the window handle by using windowfromaccessibleobject on each iaccessible, which is slow because it's implemented by oleacc.dll as a loop which crawls up the ancestor chain and looks for a role_window object, map
ping that back to a window handle.
mozIRegistry
there are some bootstrap
ping issues related to using the service manager to access the moziregistry interface.
...i'll be discussing that implementation only briefly (mainly because i'm ho
ping i can pawn off the chore of implementing it to somebody else).
...nsrepository is essentially a map
ping from xpcom clsids to class factories, plus code to manage that map
ping, including functions that create instances of a given clsid.
nsIHttpServer
* * @param path * the path which is to be mapped to the given file; must begin with "/" and * be a valid uri path (i.e., no query string, hash reference, etc.) * @param file * the file to serve for the given path, or null to remove any map
ping that * might exist; this file must exist for the lifetime of the server */ void registerfile(in string path, in nsifile file); /** * registers a custom path handler.
...path * the absolute path on the server against which requests will be served * from dir (e.g., "/", "/foo/", etc.); must begin and end with a forward * slash * @param dir * the directory to be used to serve all requests for paths underneath path * (except those further overridden by another, deeper path registered with * another directory); if null, any current map
ping for the given path is * removed * @throws ns_error_invalid_arg * if dir is non-null and does not exist or is not a directory, or if path * does not begin with and end with a forward slash */ void registerdirectory(in string path, in nsifile dir); /** * associates files with the given extension with the given content-type when * served by this server, in the absence...
... if type is empty, removes any extant * map
ping, if one is present.
nsISelectionPrivate
allowadjacent specifies whether the returned ranges are allowed to touch the input range rather than merely overlap
ping it.
... allowadjacent specifies whether the returned ranges are allowed to touch the input range rather than merely overlap
ping it.
... allowadjacent specifies whether the returned ranges are allowed to touch the input range rather than merely overlap
ping it.
nsIUTF8ConverterService
skip
ping asciiness/utf8ness check.
...converturispectoutf8() ensure that aspec (after url-unesca
ping it) is encoded in utf-8.
...make sure that all characters outside us-ascii in your input spec are url-escaped if your spec is not in utf-8 (before url-esca
ping) because the presence of non-ascii characters is blindly regarded as an indication that your input spec is in unescaped utf-8 and it will be returned without further processing.
LDAP Support
mail compose typedown in mail compose, when ty
ping a partial mail address, a typedown window appears listing possible matches against address books and ldap directories.
... these relationships ensure: generality is maintained when map
ping from ldap attributes to address book.
... consistent round trip
ping when editing address book attributes which are stored on an ldap server.
WebIDL bindings
also, unless stated otherwise, nullable types are represented by wrap
ping nullable<> around the base type.
... in all cases, optional arguments which do not have a default value are represented by wrap
ping const optional<>& around the representation of the argument type.
...this can mean xpcom interfaces (whether declared in xpidl or not) or it can mean some type that there's a castable native unwrap
ping function for.
Mozilla
browser security an important aspect of develo
ping code for any browser, including firefox, as well as any web-oriented project, is its security.
... performance the articles linked to from here will help you improve performance, whether you're develo
ping core mozilla code or an add-on.
...firefox and thunderbird releases are both signed before ship
ping; this article describes the process.
Drawing and Event Handling - Plugins
//the npwindow structure typedef enum { npwindowtypewindow = 1, npwindowtypedrawable } npwindowtype; typedef struct _npwindow { void* window; /* platform-specific handle */ uint32 x; /* position of top-left corner */ uint32 y; /* relative to a netscape page */ uint32 width; /* maximum window size */ uint32 height; nprect cliprect; /* clip
ping rectangle in port coordinates */ #ifdef xp_unix void * ws_info; /* platform-dependent additional data */ #endif /* xp_unix */ npwindowtype type; /* whether this is a window or a drawable */ } npwindow; the window parameter is a platform-specific handle to a native window element in the browser window hierarchy on windows and unix.
... the cliprect field defines the clip
ping rectangle of the plug-in in a coordinate system where the origin is the top-left corner of the drawable or window.
...the mac os grafport structure's cliprgn field should be set to the clip
ping rectangle for the instance in port coordinates.
Debugger - Firefox Developer Tools
however, the onnewglobalobject method allows the api user to monitor all global object creation that occurs anywhere within the javascript system (the “jsruntime”, in spidermonkey terms), thereby esca
ping the capability-based limits.
...however, the addallglobalsasdebuggees method allows the api user to monitor all global object creation that occurs anywhere within the javascript system (the “jsruntime”, in spidermonkey terms), thereby esca
ping the capability-based limits.
...however, findallglobals allows the api user to find all global objects anywhere within the javascript system (the “jsruntime”, in spidermonkey terms), thereby esca
ping the capability-based limits.
Examine and edit CSS - Firefox Developer Tools
you can add a class to the element by ty
ping a name in the add new class field below the rules toolbar.
... ty
ping in the search box performs a live filtering of the list, so, for example, if you just want to see font-related settings, you can type "font" in the search box, and only properties with "font" in the name will be listed.
... as you start ty
ping a property name, you'll see a list of autocomplete suggestions.
AudioWorkletNode.port - Web APIs
examples to demonstrate bidirectional communication capabilities, we'll create an audioworkletprocessor, which will output silence and respond to
ping requests from its audioworkletnode.
... //
ping-pong-processor.js class
pingpongprocessor extends audioworkletprocessor { constructor (...args) { super(...args) this.port.onmessage = (e) => { console.log(e.data) this.port.postmessage('pong') } } process (inputs, outputs, parameters) { return true } } registerprocessor('
ping-pong-processor',
pingpongprocessor) now in our main scripts file we'll load the processor, create an instance of audioworkletnode passing the name of the processor, and connect the node to an audio graph.
... const audiocontext = new audiocontext() await audiocontext.audioworklet.addmodule('
ping-pong-processor.js') const
pingpongnode = new audioworkletnode(audiocontext, '
ping-pong-processor') // send the message containing '
ping' string // to the audioworkletprocessor from the audioworkletnode every second setinterval(() =>
pingpongnode.port.postmessage('
ping'), 1000)
pingpongnode.port.onmessage = (e) => console.log(e.data)
pingpongnode.connect(audiocontext.destination) this will output "
ping" and "pong" strings to the console every second.
AudioWorkletProcessor.port - Web APIs
examples to demonstrate bidirectional communication capabilities, we'll create an audioworkletprocessor, which will output silence and respond to
ping requests from its audioworkletnode.
... //
ping-pong-processor.js class
pingpongprocessor extends audioworkletprocessor { constructor (...args) { super(...args) this.port.onmessage = (e) => { console.log(e.data) this.port.postmessage('pong') } } process (inputs, outputs, parameters) { return true } } registerprocessor('
ping-pong-processor',
pingpongprocessor) now in our main scripts file we'll load the processor, create an instance of audioworkletnode passing the name of the processor, and connect the node to an audio graph.
... const audiocontext = new audiocontext() await audiocontext.audioworklet.addmodule('
ping-pong-processor.js') const
pingpongnode = new audioworkletnode(audiocontext, '
ping-pong-processor') // send the message containing '
ping' string // to the audioworkletprocessor from the audioworkletnode every second setinterval(() =>
pingpongnode.port.postmessage('
ping'), 1000)
pingpongnode.port.onmessage = (e) => console.log(e.data)
pingpongnode.connect(audiocontext.destination) this will output "
ping" and "pong" strings to the console every second.
CSSConditionRule - Web APIs
it is a child of cssgrou
pingrule.
... interface cssconditionrule : cssgrou
pingrule { attribute domstring conditiontext; } properties the cssconditionrule derives from cssrule, cssgrou
pingrule and inherits all properties of these classes.
... methods the cssconditionrule derives from cssrule, cssgrou
pingrule and inherits all methods of these classes.
CSSMediaRule - Web APIs
it implements the cssconditionrule interface, and therefore the cssgrou
pingrule and the cssrule interface with a type value of 4 (cssrule.media_rule).
... interface cssmediarule : cssconditionrule { readonly attribute medialist media; } properties as a cssconditionrule, and therefore both a cssgrou
pingrule and a cssrule, cssmediarule also implements the properties of these interfaces.
... methods as a cssconditionrule, and therefore both a cssgrou
pingrule and a cssrule, cssmediarule also implements the methods of that interface.
CSSSupportsRule - Web APIs
it implements the cssconditionrule interface, and therefore the cssrule and cssgrou
pingrule interfaces with a type value of 12 (cssrule.supports_rule).
... interface csssupportsrule : cssconditionrule { } properties as a cssconditionrule and therefore a cssrule and a cssgrou
pingrule, csssupportsrule also implements the properties of these interfaces.
... methods as a cssconditionrule and therefore a cssruleand a cssgrou
pingrule, csssupportsrule also implements the methods of that interface.
Document.querySelector() - Web APIs
since javascript also uses backslash esca
ping, be especially careful when writing string literals using these characters.
... see esca
ping special characters for more information.
... esca
ping special characters to match against an id or selectors that do not follow standard css syntax (by using a colon or space inappropriately, for example), you must escape the character with a backslash ("\").
Document.querySelectorAll() - Web APIs
since javascript also uses backslash esca
ping, special care must be taken when writing string literals using these characters.
... see esca
ping special characters for more information.
...you can use any common loo
ping statement, such as: var highlighteditems = userlist.queryselectorall(".highlighted"); highlighteditems.foreach(function(useritem) { deleteuser(useritem); }); user notes queryselectorall() behaves differently than most common javascript dom libraries, which might lead to unexpected results.
Element.querySelectorAll() - Web APIs
since javascript also uses backspace esca
ping, special care must be taken when writing string literals using these characters.
... see esca
ping special characters for more information.
...you can use any common loo
ping statement, such as: var highlighteditems = userlist.queryselectorall(".highlighted"); highlighteditems.foreach(function(useritem) { deleteuser(useritem); }); note: nodelist is not a genuine array, that is to say it doesn't have the array methods like slice, some, map etc.
Using the Gamepad API - Web APIs
this information is intended to allow you to find a map
ping for the controls on the device as well as display useful feedback to the user.
... map
ping: a string indicating whether the browser has remapped the controls on the device to a known layout.
...if the browser is able to map controls on the device to that layout the map
ping property will be set to the string standard.
HTML Drag and Drop API - Web APIs
for more information, see dragging and drop
ping multiple items.
... function dragstart_handler(ev) { ev.datatransfer.dropeffect = "copy"; } for more details, see: drag effects define a drop zone by default, the browser prevents anything from happening when drop
ping something onto most html elements.
... examples and demos copying and moving elements with the datatransfer interface copying and moving elements with the datatransferlistitem interface dragging and drop
ping files (firefox only): http://jsfiddle.net/9c2ef/ dragging and drop
ping files (all browsers): https://jsbin.com/hiqasek/ a parking project using the drag and drop api: https://park.glitch.me/ (you can edit here) specifications specification status comment html living standard living standard see also drag operations dragging and drop
ping mult...
PaymentAddress - Web APIs
the paymentaddress interface of the payment request api is used to store ship
ping or payment address information.
... examples in the following example, the paymentrequest() constructor is used to create a new payment request, which takes three objects as parameters — one containing details of the payment methods that can be used for the payment, one containing details of the actual order (such as items bought and ship
ping options), and an optional object containing further options.
... const supportedinstruments = [ { supportedmethods: "basic-card", }, ]; const details = { total: { label: "donation", amount: { currency: "usd", value: "65.00" } }, displayitems: [ { label: "original donation amount", amount: { currency: "usd", value: "65.00" }, }, ], ship
pingoptions: [ { id: "standard", label: "standard ship
ping", amount: { currency: "usd", value: "0.00" }, selected: true, }, ], }; const options = { requestship
ping: true }; async function dopaymentrequest() { const request = new paymentrequest(supportedinstruments, details, options); // add event listeners here.
PaymentDetailsUpdate - Web APIs
for address field specific errors, use ship
pingaddresserrors.
... ship
pingaddresserrors optional an addresserrors object which includes an error message for each property of the ship
ping address that could not be validated.
... ship
pingoptions optional an array of paymentship
pingoption objects, each describing one available ship
ping option from which the user may choose.
PaymentRequest.show() - Web APIs
those look like this: async/await syntax using await to wait for a promise to be resolved makes it possible to write the code to handle payments particularly cleanly: async function processpayment() { try { const payrequest = new paymentrequest(methoddata, details, options); payrequest.onship
pingaddresschange = ev => ev.updatewith(checkaddress(payrequest)); payrequest.onship
pingoptionchange = ev => ev.updatewith(checkship
ping(payrequest)); const repsonse = await payrequest.show(); await validateresponse(response); } catch(err) { /* handle the error; aborterror usually means a user cancellation */ } } in this code, the methods checkaddress() and checkship
ping(), resp...
...ectively, check the ship
ping address and the ship
ping option changes and supply in response either a paymentdetailsupdate object or a promise to return one; this object contains the fields in the paymentresponse which have been or need to be changed.
... then/catch syntax you can also use the older promise-based approach to work with payments, using the then() and catch() functions on the promise returned by show(): function processspayment() { const payrequest = new paymentrequest(methoddata, details, options); payrequest.onship
pingaddresschange = ev => ev.updatewith(checkaddress(payrequest)); payrequest.onship
pingoptionchange = ev => ev.updatewith(checkship
ping(payrequest)); payrequest.show() .then(response => validateresponse(response)) .catch(err => handleerror(err)); } this is functionally equivalent to the processpayment() method using the await syntax.
PaymentRequestUpdateEvent.updateWith() - Web APIs
for address field specific errors, use ship
pingaddresserrors.
... ship
pingaddresserrors optional an addresserrors object which includes an error message for each property of the ship
ping address that could not be validated.
... ship
pingoptions optional an array of paymentship
pingoption objects, each describing one available ship
ping option from which the user may choose.
PaymentResponse.retry() - Web APIs
this lets your app gracefully deal with situations such as invalid ship
ping addresses or declined credit cards.
... ship
pingaddress optional an addresserrors object which contains error messages for any of the fields in the ship
ping address that failed validation.
...async function recursivevalidate(request, response) { const promisestofixthings = []; const errors = await validate(request, response); if (!errors) { return; } if (errors.ship
pingaddress) { // "ship
pingaddresschange" fired at request object const promise = fixfield(request, "ship
pingaddresschange", ship
pingvalidator); promisestofixthings.push(promise); } if (errors.payer) { // "payerdetailchange" fired at response object const promise = fixfield(response, "payerdetailchange", payervalidator); promisestofixthings.push(promise); } await promis...
Payment Request API - Web APIs
payment request concepts and usage many problems related to online shop
ping-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.
... credentials management: users can manage their credit cards and ship
ping addresses directly in the browser.
... interfaces paymentaddress an object that contains address information; used for billing and ship
ping addresses, for example.
Web Push API Notifications best practices - Web APIs
this article provides a useful summary of best practices to keep in mind when develo
ping web sites and applications that use push notifications for user engagement.
...win them back with an expiring offer of free ship
ping that they can’t ignore!
... what are you ho
ping to achieve with this push notification?
WaveShaperNode.oversample - Web APIs
this leads to better results by avoiding some aliasing, but comes at the expense of a lower precision sha
ping curve.
... '2x' double the amount of samples before applying the sha
ping curve.
... '4x' multiply by 4 the amount of samples before applying the sha
ping curve.
WebGL2RenderingContext.getSamplerParameter() - Web APIs
gl.texture_wrap_r: returns a glenum indicating the texture wrap
ping function for the texture coordinate r.
... gl.texture_wrap_s: returns a glenum indicating the texture wrap
ping function for the texture coordinate s.
... gl.texture_wrap_t: returns a glenum indicating the texture wrap
ping function for the texture coordinate t.
WebGL2RenderingContext.samplerParameter[if]() - Web APIs
gl.texture_wrap_r: a glenum specifying the texture wrap
ping function for the texture coordinate r.
... gl.texture_wrap_s: a glenum specifying the texture wrap
ping function for the texture coordinate s.
... gl.texture_wrap_t: a glenum specifying the texture wrap
ping function for the texture coordinate t.
WebGLRenderingContext.depthRange() - Web APIs
the webglrenderingcontext.depthrange() method of the webgl api specifies the depth range map
ping from normalized device coordinates to window or viewport coordinates.
... syntax void gl.depthrange(znear, zfar); parameters znear a glclampf specifying the map
ping of the near clip
ping plane to window or viewport coordinates.
... zfar a glclampf specifying the map
ping of the far clip
ping plane to window or viewport coordinates.
WebGLRenderingContext.getTexParameter() - Web APIs
gl.texture_wrap_s glenum wrap
ping function for texture coordinate s gl.repeat (default value), gl.clamp_to_edge, gl.mirrored_repeat.
... gl.texture_wrap_t glenum wrap
ping function for texture coordinate t gl.repeat (default value), gl.clamp_to_edge, gl.mirrored_repeat.
... gl.texture_wrap_r glenum wrap
ping function for texture coordinate r gl.repeat (default value), gl.clamp_to_edge, gl.mirrored_repeat.
WebGLRenderingContext.texParameter[fi]() - Web APIs
gl.texture_wrap_s wrap
ping function for texture coordinate s gl.repeat (default value),gl.clamp_to_edge, gl.mirrored_repeat.
... gl.texture_wrap_t wrap
ping function for texture coordinate t gl.repeat (default value),gl.clamp_to_edge, gl.mirrored_repeat.
... gl.texture_wrap_r wrap
ping function for texture coordinate r gl.repeat (default value), gl.clamp_to_edge, gl.mirrored_repeat.
WebGL best practices - Web APIs
kee
ping the application's vram usage under this cap will help to avoid out-of-memory errors and associated instability.
...consider reducing canvas.width and height and kee
ping canvas.style.width and height at a constant size.
... however, for 2d resources that are never "zoomed out", don't pay the 30% memory surcharge for mipmaps: const tex = gl.createtexture(); gl.bindtexture(gl.texture_2d, tex); gl.texparameterf(gl.texture_2d, gl.texture_min_filter, gl.linear); // defaults to nearest_mipmap_linear, for mipmap
ping!
Web Video Text Tracks Format (WebVTT) - Web APIs
cues may have overlap
ping timings.
... if the webvtt file is being used for chapters (<track> kind is chapters) then the file cannot have overlap
ping timings.
... example 10 - basic cue timing examples 00:00:22.230 --> 00:00:24.606 00:00:30.739 --> 00:00:34.074 00:00:34.159 --> 00:00:35.743 00:00:35.827 --> 00:00:40.122 example 11 - overlap
ping cue timing examples 00:00:00.000 --> 00:00:10.000 00:00:05.000 --> 00:01:00.000 00:00:30.000 --> 00:00:50.000 example 12 - non-overlap
ping cue timing examples 00:00:00.000 --> 00:00:10.000 00:00:10.000 --> 00:01:00.581 00:01:00.581 --> 00:02:00.100 00:02:01.000 --> 00:02:01.000 cue settings cue settings are optional components used to position where the cue payload text will be displayed ove...
Using the Web Animations API - Web APIs
we no longer need to rely on dom-heavy techniques such as writing css properties and sco
ping classes onto elements to control playback direction.
...we use updateplaybackrate() instead of setting the playbackrate directly since that produces a smooth update: setinterval( function() { // make sure the playback rate never falls below .4 if (redqueen_alice.playbackrate > .4) { redqueen_alice.updateplaybackrate(redqueen_alice.playbackrate * .9); } }, 3000); but urging them on by clicking or tap
ping causes them to speed up by multiplying their playbackrate: var gofaster = function() { redqueen_alice.updateplaybackrate(redqueen_alice.playbackrate * 1.1); } document.addeventlistener("click", gofaster); document.addeventlistener("touchstart", gofaster); the background elements also have playbackrates that are impacted when you click or tap.
... } } note: getanimations() and effect are not ship
ping in all browsers as of this writing, but the polyfill does support them today.
Migrating from webkitAudioContext - Web APIs
changes to starting and stop
ping nodes in webkitaudiocontext, there are two ways to start and stop audiobuffersourcenode and oscillatornode: the noteon() and noteoff() methods, and the start() and stop() methods.
...var src = context.createbuffersource(); src.buffer = somebuffer; src.buffer.gain = 0.5; src.connect(context.destination); src.noteon(0); // new standard audiocontext code: var src = context.createbuffersource(); src.buffer = somebuffer; var gain = context.creategain(); src.connect(gain); gain.gain.value = 0.5; gain.connect(context.destination); src.start(0); removal of audiobuffersourcenode.loo
ping the loo
ping attribute of audiobuffersourcenode has been removed.
...instead of having code like this: var source = context.createbuffersource(); source.loo
ping = true; you can change it to respect the last version of the specification: var source = context.createbuffersource(); source.loop = true; note, the loopstart and loopend attributes are not supported in webkitaudiocontext.
Background audio processing using AudioWorklet - Web APIs
or you can process each input independently, applying an algorithm to the incoming data on each channel of each input and writing the results into the corresponding outputs' channels (kee
ping in mind that the number of inputs and outputs may differ, and the channel counts on those inputs and outputs may also differ).
...each sample is added to the corresponding sample in the output buffer, with a simple code fragment in place to prevent the samples from exceeding the legal range of -1.0 to 1.0 by cap
ping the values; there are other ways to avoid clip
ping that are perhaps less prone to distortion, but this is a simple example that's better than nothing.
...in other words, true overrides the api's logic and gives you control over your processor's lifetime policy, kee
ping the processor's owning audioworkletnode running even when it would otherwise decide to shut down the node.
Implementing a Microsoft Active Accessibility (MSAA) Server - Accessibility
screen magnifiers will zoom to the focus, kee
ping it on the screen at all times, or even allow the user to enter a special low vision document reading mode, with a variety of features such as ticker mode where text is streamed on a single line.
...rollbar role_grip role_sound role_cursor role_caret role_alert role_window [inserted by system] role_client [important] role_menupopup [important] role_menuitem [important] role_tooltip role_application role_document role_pane [important] role_chart role_dialog [semi-important, not currently used by all at's] role_border role_grou
ping role_separator [important] role_toolbar role_statusbar [important] role_table [important] role_columnheader role_rowheader role_column role_row role_cell [important] role_link [important] role_helpballoon role_character role_list [important] role_listitem [important] role_outline [important] role_outlineitem [important] role_paget...
...for popup listboxes used for dropdowns in autocomplete text fields, change the color value by 1 when the user is ty
ping in the textfield as opposed to arrowing through the list.
Accessibility documentation index - Accessibility
it is intended to mimic the functionality of the html td element for table-style grou
ping of information.
... 88 architecture accessibility, develo
ping mozilla the implementation of text and embedded objects in mozilla is clever but confusing.
...this table reflects map
ping rules for specific elements only, it doesn't reflect any general rules applicable to all elements.
-webkit-mask-repeat-x - CSS: Cascading Style Sheets
space the image is repeated as much as possible without clip
ping.
...the mask-position property is ignored unless only one image can be displayed without clip
ping.
... the only case where clip
ping happens using space is when there isn't enough room to display one image.
-webkit-mask-repeat-y - CSS: Cascading Style Sheets
space the image is repeated as much as possible without clip
ping.
...the mask-position property is ignored unless only one image can be displayed without clip
ping.
... the only case where clip
ping happens using space is when there isn't enough room to display one image.
font-weight - CSS: Cascading Style Sheets
certain commonly used values correspond to common weight names, as described in the common weight name map
ping section below.
... common weight name map
ping the numerical values 100 to 900 roughly correspond to the following common weight names: value common weight name 100 thin (hairline) 200 extra light (ultra light) 300 light 400 normal 500 medium 600 semi bold (demi bold) 700 bold 800 extra bold (ultra bold) 900 black (hea...
...vy) variable fonts most fonts have a particular weight which corresponds to one of the numbers in common weight name map
ping.
Controlling Ratios of Flex Items Along the Main Axis - CSS: Cascading Style Sheets
in a browser that supports this keyword you should be able to see that the text has taken all of the soft wrap
ping opportunities available to it, becoming as small as it can be without overflowing.
...it gets as big as it possibly can be, taking no soft-wrap
ping opportunities.
...the items will be floored at their min-content size — the size that they become if they take advantage of any soft wrap
ping opportunities available to them.
Overview of CSS Shapes - CSS: Cascading Style Sheets
the specification defines four <basic-shape> values, which are: inset() circle() ellipse() polygon() using the value inset() wraps text around a rectangular shape however you are able to add offset values, thus pulling the line boxes of any wrap
ping content closer to the object than would otherwise happen.
...this will further shorten the line boxes of any content wrap
ping the shape, pushing it away from the shape itself.
... developer tools for shapes along with css shapes support in the browser, firefox are ship
ping a shape path editor in the firefox devtools.
CSS Shapes - CSS: Cascading Style Sheets
the specification defines a number of different ways to define a shape on a floated element, causing wrap
ping lines to wrap round the shape rather than following the rectangle of the element's box.
...this creates a circle shape, and the content wrap
ping the float now wraps around that shape.
... this changes the length of the wrap
ping text's line boxes.
Selector list - CSS: Cascading Style Sheets
syntax element, element, element { style properties } examples single line grou
ping grou
ping selectors in a single line using a comma-separated lists.
... h1, h2, h3, h4, h5, h6 { font-family: helvetica; } multi line grou
ping grou
ping selectors in a multiple lines using a comma-separated lists.
... working draft renamed to "selector list" css level 1the definition of 'grou
ping' in that specification.
background-repeat - CSS: Cascading Style Sheets
space the image is repeated as much as possible without clip
ping.
...the background-position property is ignored unless only one image can be displayed without clip
ping.
... the only case where clip
ping happens using space is when there isn't enough room to display one image.
background-size - CSS: Cascading Style Sheets
values contain scales the image as large as possible without crop
ping or stretching the image.
...opera 9.5 also interprets the two-value form as a horizontal scaling factor and, from appearances, a vertical clip
ping dimension.
...opera 9.5 also interprets the two-value form as a horizontal scaling factor and, from appearances, a vertical clip
ping dimension.
font-weight - CSS: Cascading Style Sheets
certain commonly used values correspond to common weight names, as described in the common weight name map
ping section below.
... inherited value bolder lighter 100 400 100 200 400 100 300 400 100 400 700 100 500 700 100 600 900 400 700 900 400 800 900 700 900 900 700 common weight name map
ping the numerical values 100 to 900 roughly correspond to the following common weight names (see the opentype specification): value common weight name 100 thin (hairline) 200 extra light (ultra light) 300 light 400 normal (regular) 500 medium 600 semi bold (demi bold) 700 bold 800 extra b...
...old (ultra bold) 900 black (heavy) 950 extra black (ultra black) variable fonts most fonts have a particular weight which corresponds to one of the numbers in common weight name map
ping.
mask-repeat - CSS: Cascading Style Sheets
space the image is repeated as much as possible without clip
ping.
...the mask-position property is ignored unless only one image can be displayed without clip
ping.
... the only case where clip
ping happens using space is when there isn't enough room to display one image.
shape-outside - CSS: Cascading Style Sheets
by default, inline content wraps around its margin box; shape-outside provides a way to customize this wrap
ping, making it possible to wrap text around complex objects rather than simple boxes.
...the shape follows the normal border radius sha
ping rules for the outside of the border.
...the shape follows the normal border radius sha
ping rules for the inside of the border.
Using HTML sections and outlines - Developer guides
they are intended to enhance the limited semantics of earlier versions of html, which included only the <div> tag as a generic mechanism for grou
ping related content.
... html section element (<section>) defines a section of a document to indicate a related grou
ping of semantic meaning.
...g involved</h1> <article> <header> <h2>how to become an mdn contributor</h2> <p>do you want to help protect the web?....</p> </header> <section> <h3>steps to editing an article</h3> </section> <footer> <p>author info</p> <p>publication date</p> </footer> </article> </section> section element the section element is used for a thematic grou
ping of content.
Applying color to HTML elements using CSS - HTML: Hypertext Markup Language
then we'll wrap things up with a brief discussion of how to use color wisely: how to select appropriate colors, kee
ping in mind the needs of people with differing visual capabilities.
...while they can't replace having a good designer hel
ping you make these decisions, they can definitely get you started.
...it's not really a resource for hel
ping you with the color sleection process, but is still full of useful information.
HTML attribute reference - HTML: Hypertext Markup Language
dropzone global attribute indicates that the element accepts the drop
ping of content onto it.
... hidden global attribute prevents rendering of given element, while kee
ping child elements, e.g.
...
ping <a>, <area> the
ping attribute specifies a space-separated list of urls to be notified if a user follows the hyperlink.
<video>: The Video Embed element - HTML: Hypertext Markup Language
autoplay a boolean attribute; if specified, the video automatically begins to play back as soon as it can do so without stop
ping to finish loading the data.
... canplaythrough the browser estimates it can play the media up to its end without stop
ping for content buffering.
... 16 00:03:22 --> 00:03:24 it's… it's a… 16 00:03:25 --> 00:03:32 [loud thum
ping] [dishes clattering] captions should not obstruct the main subject of the video.
Link types - HTML: Hypertext Markup Language
<a>, <area>, <form> <link>
pingback defines an external resource uri to call if one wishes to make a comment or a citation about the webpage.
... the protocol used to make such a call is defined in the
pingback 1.0 specification.
... note: if the x-
pingback: http header is also present, it supersedes the <link> element with this link type.
A typical HTTP session - HTTP
to work around this problem, web developers use several techniques:
ping the server periodically via the xmlhttprequest, fetch apis, using the websockets api, or similar protocols.
...(contains a site-customized page hel
ping the user to find the missing resource) notification that the requested resource doesn't exist: http/1.1 404 not found content-type: text/html; charset=utf-8 content-length: 38217 connection: keep-alive cache-control: no-cache, no-store, must-revalidate, max-age=0 content-language: en-us date: thu, 06 dec 2018 17:35:13 gmt expires: thu, 06 dec 2018 17:35:13 gmt server: meinheld/0.6.1 strict-tra...
...(contains a site-customized page hel
ping the user to find the missing resource) response status codes http response status codes indicate if a specific http request has been successfully completed.
SyntaxError: Using //@ to indicate sourceURL pragmas is deprecated. Use //# instead - JavaScript
use //# instead warning: syntaxerror: using //@ to indicate sourcemap
pingurl pragmas is deprecated.
... //@ sourcemap
pingurl=http://example.com/path/to/your/sourcemap.map standard syntax use the "#" sign instead.
... //# sourcemap
pingurl=http://example.com/path/to/your/sourcemap.map or, alternatively, you can set a sourcemap header to your javascript file to avoid having a comment at all: sourcemap: /path/to/file.js.map ...
Array.prototype.reduce() - JavaScript
note: if initialvalue is not provided, reduce() will execute the callback function starting at index 1, skip
ping the first index.
...lue ) => accumulator.concat(currentvalue), [] ) counting instances of values in an object let names = ['alice', 'bob', 'tiff', 'bruce', 'alice'] let countednames = names.reduce(function (allnames, name) { if (name in allnames) { allnames[name]++ } else { allnames[name] = 1 } return allnames }, {}) // countednames is: // { 'alice': 2, 'bob': 1, 'tiff': 1, 'bruce': 1 } grou
ping objects by a property let people = [ { name: 'alice', age: 21 }, { name: 'max', age: 20 }, { name: 'jane', age: 20 } ]; function groupby(objectarray, property) { return objectarray.reduce(function (acc, obj) { let key = obj[property] if (!acc[key]) { acc[key] = [] } acc[key].push(obj) return acc }, {}) } let groupedpeople = groupby(people, 'age') // groupedp...
...e((resolve, reject) => { resolve(a * 2) }) } // function 3 - will be wrapped in a resolved promise by .then() function f3(a) { return a * 3 } // promise function 4 function p4(a) { return new promise((resolve, reject) => { resolve(a * 4) }) } const promisearr = [p1, p2, f3, p4] runpromiseinsequence(promisearr, 10) .then(console.log) // 1200 function composition enabling pi
ping // building-blocks to use for composition const double = x => x + x const triple = x => 3 * x const quadruple = x => 4 * x // function composition enabling pipe functionality const pipe = (...functions) => input => functions.reduce( (acc, fn) => fn(acc), input ) // composed functions for multiplication of specific values const multiply6 = pipe(double, triple) const multiply9 = pipe(tri...
Array.prototype.map() - JavaScript
due to the algorithm defined in the specification, if the array which map was called upon is sparse, resulting array will also be sparse kee
ping same indices blank.
...return a return a; }; } examples map
ping an array of numbers to an array of square roots the following code takes an array of numbers and creates a new array containing the square roots of the numbers in the first array.
... let kvarray = [{key: 1, value: 10}, {key: 2, value: 20}, {key: 3, value: 30}] let reformattedarray = kvarray.map(obj => { let robj = {} robj[obj.key] = obj.value return robj }) // reformattedarray is now [{1: 10}, {2: 20}, {3: 30}], // kvarray is still: // [{key: 1, value: 10}, // {key: 2, value: 20}, // {key: 3, value: 30}] map
ping an array of numbers using a function containing an argument the following code shows how map works when a function requiring one argument is used with it.
Atomics.notify() - JavaScript
the static atomics.notify() method notifies up some agents that are slee
ping in the wait queue.
... count optional the number of slee
ping agents to notify.
... examples using notify given a shared int32array: const sab = new sharedarraybuffer(1024); const int32 = new int32array(sab); a reading thread is slee
ping and waiting on location 0 which is expected to be 0.
Operator precedence - JavaScript
note on grou
ping and short-circuiting in the table below, grou
ping is listed as having the highest precedence.
... however, that does not always mean the expression within the grou
ping symbols ( … ) is evaluated first, especially when it comes to short-circuiting.
... precedence operator type associativity individual operators 21 grou
ping n/a ( … ) 20 member access left-to-right … .
Strict mode - JavaScript
you can also take the approach of wrap
ping the entire contents of a script in a function and having that outer function use strict mode.
...in normal javascript misty
ping a variable in an assignment creates a new property on the global object and continues to "work" (although future failure is possible: likely, in modern javascript).
...javascript sometimes makes this basic map
ping of name to variable definition in the code impossible to perform until runtime.
Web audio codec guide - Web media technologies
for that reason, speech-specific codecs often begin by drop
ping sound that falls outside a set range.
...the simplest are those which are meant for rip
ping cds or pulling in audio files and quickly and automatically converting them to mp3 or aac format to store in a library, such as itunes.
... but when develo
ping web apps that use audio as a component of the app, such as games, you will need more control over the encoding process and more options surrounding the format used while encoding the audio.
Web video codec guide - Web media technologies
additionally, in saturated portions of the image (that is, where colors are pure and intense, such as a bright, pure red [rgba(255, 0, 0, 1)]), color depths below 10 bits per component (10-bit color) allow banding, where gradients cannot be represented without visible step
ping of the colors.
... note the blue and pink fringes around the edges of the star above (as well as the step
ping and other significant compression artifacts).
...for exmaple, instead of computing motion differences for two frames that are two pixels apart due to inter-frame motion, skip
ping every other frame could lead to computing a difference that comes out to four pixels of movement.
Optimizing startup performance - Web Performance
it's worth kee
ping in mind that most browsers typically start complaining that your script is blocking the main thread for too long at around 10 seconds or so.
...you should also consider gzip
ping your data to make it as small as you can.
...avoid doing this without kee
ping the user apprised that the game is in fact still starting up.
Add to Home screen - Progressive web apps (PWAs)
part of this is the simple gesture of accessing an app by tap
ping its icon on your home screen, and then having it appear neatly in its own window.
... tap
ping this will show a confirmation banner — pressing the big + add to home screen button completes the action, adding the app to the home screen.
... tap
ping this icon opens it up, but as a fullscreen app, you'll no longer see the browser ui around it.
Installing and uninstalling web apps - Progressive web apps (PWAs)
this makes it simple for a user to use a gesture to access an app by tap
ping or clicking its icon.
... tap
ping this will show a confirmation banner—pressing the banner's big "+ add to home screen" button completes the action, adding the app to the home screen.
... tap
ping that icon should then take you to the same confirmation banner shown in firefox above.
Graphic design for responsive sites - Progressive web apps (PWAs)
in 1996, many people involved in building the web would have laughed at you if you had told them that less than 20 years in the future we would be develo
ping web sites that worked well on mobile phones, tablets, tvs, even cars and home lighting.
...this article provides a high level discussion aimed at hel
ping you to choose the best option for your graphical needs.
... co
ping with different resolutions in this section we'll review different strategies for dealing with getting images to work across devices with different resolutions.
Applying SVG effects to HTML content - SVG: Scalable Vector Graphics
example: clip
ping this example demonstrates using svg to clip html content.
...</p> <button onclick="toggleradius()">toggle radius</button> <svg height="0"> <clippath id="clip
ping-path-1" clippathunits="objectboundingbox"> <circle cx="0.25" cy="0.25" r="0.25" id="circle"/> <rect x="0.5" y="0.2" width="0.5" height="0.8"/> </clippath> </svg> .target { clip-path: url(#clip
ping-path-1); } p { width: 300px; border: 1px solid #000; display: inline-block; } this establishes a clip
ping area made of a circle and rectangle, assigns it the id #clip
ping-path-1, th...
...you can rotate the text: <svg height="60" width="200"> <text x="0" y="15" fill="blue" transform="rotate(30 20,50)">example text</text> </svg> using external references svg used for clip
ping, masking, and filtering can be loaded from an external source, as long as that source comes from the same origin as the html document to which it's applied.
clip - SVG: Scalable Vector Graphics
the value of auto defines a clip
ping path along the bounds of the viewport created by the given element.
... as a presentation attribute, it can be applied to any element but it has effect only on the following six elements: <svg>, <symbol>, <image>, <foreignobject>, <pattern>, <marker> html,body,svg { height:100% } <svg viewbox="0 0 20 10" xmlns="http://www.w3.org/2000/svg"> <!-- auto clip
ping --> <svg x="0" width="10" height="10" clip="auto"> <circle cx="5" cy="5" r="4" stroke="green" /> </svg> <!-- rect(top, right, bottom, left) clip
ping --> <svg x="10" width="10" height="10" clip="rect(1, 9, 8, 2)"> <circle cx="5" cy="5" r="4" stroke="green" /> </svg> </svg> usage notes warning: this property is deprecated.
... value auto | rect() default value auto animatable yes the value auto defines a clip
ping path along the bounds of the viewport created by the given element.the value rect() defines a clip
ping rectangle following the following syntax: rect(<top>, <right>, <bottom>, <left>).
display - SVG: Scalable Vector Graphics
it has implications for the <tspan>, <tref>, and <altglyph> elements, event processing, for bounding box calculations and for calculation of clip
ping paths: if display is set to none on a <tspan>, <tref>, or <altglyph> element, then the text string is ignored for the purposes of text layout.
... the geometry of a graphics element with display set to none is not included in bounding box and clip
ping paths calculations.
...similarly, setting display="none" on a child of a <clippath> element will prevent the given child element from contributing to the clip
ping path.
2015 MDN Fellowship Program - Archive of obsolete content
in 2015, mdn will expand the impact of this content by develo
ping kits of key learning materials, including such elements as code samples, videos and other elements being finalized.
... activities and deliverables act as lead curator for technical curriculum addressing a key web technology, develo
ping code samples, videos, interactive exercises and other components to be determined.
SDK and XUL Comparison - Archive of obsolete content
advantages of the sdk simplicity the sdk provides high-level javascript apis to simplify many common tasks in add-on development, and tool support which greatly simplifies the process of develo
ping, testing, and packaging an add-on.
... mobile support starting in sdk 1.5, we've added experimental support for develo
ping add-ons on the new native version of firefox mobile.
panel - Archive of obsolete content
// // set the focus to the text area so the user can // just start ty
ping.
...// // set the focus to the text area so the user can // just start ty
ping.
widget - Archive of obsolete content
st data = require("sdk/self").data; var player = widgets.widget({ id: "player", width: 72, label: "player", contenturl: data.url("buttons.html"), contentscriptfile: data.url("button-script.js") }); player.port.on("play", function() { console.log("playing"); }); player.port.on("pause", function() { console.log("pausing"); }); player.port.on("stop", function() { console.log("stop
ping"); }); to learn much more about content scripts, see the working with content scripts guide.
...quire("sdk/widget"); const data = require("sdk/self").data; var player = widgets.widget({ id: "player", width: 72, label: "player", contenturl: data.url("buttons.html") }); player.port.emit("init"); player.port.on("play", function() { console.log("playing"); }); player.port.on("pause", function() { console.log("pausing"); }); player.port.on("stop", function() { console.log("stop
ping"); }); attaching panels to widgets you can supply a panel to the widget's constructor: if you do this, the panel is automatically displayed when the user clicks the widget.
core/promise - Archive of obsolete content
for example grou
ping promises to observe single resolution of all of them is as simple as this: var group = promised(array); var abc = group(aasync, basync, casync).then(function(items) { return items[0] + items[1] + items[2]; }); all the all function is provided to consume an array of promises and return a promise that will be accepted upon the acceptance of all the promises in the initial array.
... treat all values as promises module provides a simple function for wrap
ping values into promises: const { resolve } = require('sdk/core/promise'); var a = resolve(5).then(function(value) { return value + 2; }); a.then(console.log); // => 7 also resolve not only takes values, but also promises.
cfx - Archive of obsolete content
this flag is particularly useful for sdk developers or people working with the development version of the sdk, who may want to run an add-on using newer versions of the modules than than those ship
ping in firefox.
... this flag is particularly useful for sdk developers or people working with the development version of the sdk, who may want to run an add-on using newer versions of the modules than than those ship
ping in firefox.
Boxes - Archive of obsolete content
wrap
ping contents in html you can use a div as a container and when the div changes size, the contents will wrap or adjust the layout.
...make the box style="display: block" and the wrap
ping behavior will occur when the box is resized: <?xml version="1.0"?> <?xml-stylesheet href="chrome://global/skin/" type="text/css"?> <window id="yourwindow" xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"> <hbox style="display: block"> <label value="aaa"/> <label value="bbb"/> <label value="ccc"/> <label value="ddd"/> <label value="eee"/> <label value="fff"/> <label value="ggg"/> <label value="hhh"/> <label value="iii"/> <label value="jjj"/> <label value="kkk"/> <label value="lll"/> <label value="mmm"/> <label value="nnn"/> <label value="ooo"/> <label value="p...
Drag & Drop - Archive of obsolete content
drop
ping files onto an xul application it's possible to setup drag and drop events to handle drop
ping files from external applications or os file managers onto your xul-based application.
...if the file types are present in the drag data, the function returns that drop
ping the data is allowed.
Enhanced Extension Installation - Archive of obsolete content
these include: the application profile directory <profile>/extensions/ the application install directory <application>/extensions/ any location specified in a text file with a {guid} name placed in one of the above locations, useful for develo
ping extensions at another location, e.g.
... any location specified in a guid-to-path registry key map
ping, e.g.
Appendix D: Loading Scripts - Archive of obsolete content
debuggable: development tools support debugging javascript loaded by script tags disadvantages sco
ping: scripts loaded via script tags share the global scope with all other scripts loaded into the same window.
... disadvantages limited sco
ping: as data from the main thread may only be accessed via json message passing, there are significant difficulties in performing many operations in worker scopes.
Getting Started with Firefox Extensions - Archive of obsolete content
they allow the application to be customized to fit the personal needs of each user if they need additional features, while kee
ping the applications small to download.
...if you're only getting started develo
ping add-ons, the add-ons sdk provides a great way to quickly create simple ones and build on them.
Introduction - Archive of obsolete content
this tutorial is meant to be the step
ping stone that will turn you into a professional firefox extension developer in no time.
...gecko versions are somewhat independent from firefox versions, and you can see a map
ping of firefox versions and gecko versions at the gecko page.
JavaScript Object Management - Archive of obsolete content
it's one of the funky properties of javascript: all objects are nothing more than name / value map
pings.
... javascript code modules javascript code modules (also known as jsm) are new to firefox 3, and they're the best tool for kee
ping everything in sync between windows.
XPCOM Objects - Archive of obsolete content
just like in component identifiers, the nsi prefix is just a way of kee
ping things in order.
... step
ping into the time machine, we see the preferences service component page.
Overlay extensions - Archive of obsolete content
this page contains links to documentation for the approach to develo
ping extensions for gecko-based applications which uses: xul overlays to specify the interface apis available to privileged code, such as tabbrowser and javascript modules, to interact with the application and content.
... firefox add-ons developer guide a guide to develo
ping overlay extensions.
Inner-browsing extending the browser navigation paradigm - Archive of obsolete content
extending traditional hypertext navigation the hypertext approach to develo
ping web pages, in which developers format text layouts into pages and link those pages to related content, is analogous to a book or a magazine: readers view pages, go to other pages for more information, and view resources listed as references on that page.
...the incorrect words are highlighted while the user is ty
ping.
Notes on HTML Reflow - Archive of obsolete content
in reflowdirtychild, the parent frame sets the ns_frame_has_dirty_child state bit on itself, and does any bookkee
ping necessary to remember which child is dirty (for example, the block frame marks the linebox dirty that contains the child frame).
...the target frame recovers its bookkee
ping information (e.g., the block frame iterates through the dirty lineboxes), and reflows the dirty child frames.
Documentation for BiDi Mozilla - Archive of obsolete content
where the system is capable of tasks such as reversing and sha
ping text, symmetric swap
ping, numeric translation, etc., no special text rendering is needed, though there may be a call to a native api to set the base text direction (for example settextalign on windows).
...ype summary of new classes class name xpcom interface (if applicable) implementation comments nsibidi intl\unicharutil\public\nsibidi.h intl\unicharutil\src\nsbidiimp.cpp implementation of the unicode bidi algorithm nsiubidiutils intl\unicharutil\public\nsiubidiutils.h intl\unicharutil\src\nsbidiutilsimp.cpp utilities for bidi processing, including: character classification symmetric swap
ping reordering sha
ping numeric translation conversion to/from presentation forms nsbidipresutils layout/base/nsbidipresutils.cpp utilities for the layout engine including: resolve frames by bidi level split framesreorder frames format bidi text support for deletion and insertion of frames by editor nsbiditextframe layout/generic/nsbidiframes.cpp subclass of nsframe with additional method seto...
jspage - Archive of obsolete content
ntdefault(); },stoppropagation:function(){if(this.event.stoppropagation){this.event.stoppropagation();}else{this.event.cancelbubble=true;}return this;},preventdefault:function(){if(this.event.preventdefault){this.event.preventdefault(); }else{this.event.returnvalue=false;}return this;}});function class(b){if(b instanceof function){b={initialize:b};}var a=function(){object.reset(this);if(a._prototy
ping){return this; }this._current=$empty;var c=(this.initialize)?this.initialize.apply(this,arguments):this;delete this._current;delete this.caller;return c;}.extend(this); a.implement(b);a.constructor=class;a.prototype.constructor=a;return a;}function.prototype.protect=function(){this._protected=true;return this;};object.reset=function(a,c){if(c==null){for(var e in a){object.reset(a,e); }return a;}de...
...lete a[c];switch($type(a[c])){case"object":var d=function(){};d.prototype=a[c];var b=new d;a[c]=object.reset(b);break;case"array":a[c]=$unlink(a[c]); break;}return a;};new native({name:"class",initialize:class}).extend({instantiate:function(b){b._prototy
ping=true;var a=new b;delete b._prototy
ping;return a; },wrap:function(a,b,c){if(c._origin){c=c._origin;}return function(){if(c._protected&&this._current==null){throw new error('the method "'+b+'" cannot be called.'); }var e=this.caller,f=this._current;this.caller=f;this._current=arguments.callee;var d=c.apply(this,arguments);this._current=f;this.caller=e;return d;}.extend({_owner:a,_origin:c,_name:b}); }});class.implement({implement:function(a,d){if($type(a)=="object"){for(var e in a){this.implement(e,a[e]);}return this;}var f=class.mutators[a]...
Modularization techniques - Archive of obsolete content
the nscomponentmanager is simply a map
ping of class ids to factories and their containing libraries.
...note that one interface can have a number of classes that implement it, so there is not necessarily a one-to-one map
ping from iids to cids.
Running Tamarin acceptance tests - Archive of obsolete content
build/hg/tamarin-redux/generated/shell_toplevel.abc $ export avm=/users/build/hg/tamarin-redux/objdir-release/shell/avmshell $ python runtests.py tamarin tests started: 2010-09-28 10:37:06.410676 current configuration: x64-mac-tvm-release avm version: 5260:6d1899261bac executing 2532 tests against vm: /users/build/hg/builds/5260-6d1899261bac/mac/avmshell_64 2532 running abcasm/abs_helper.as skip
ping...
... reason: 2531 running abcasm/adhoc.abs skip
ping...
Using Breakpoints in Venkman - Archive of obsolete content
the following meta comment types are available: the //@jsd_log comment will insert a breakpoint which is set to execute the script that follows without stop
ping.
... the //@jsd_eval command will insert a breakpoint which is set to execute the script that follows without stop
ping and without logging the result.
Video presentations - Archive of obsolete content
this article is a jum
ping-off point to help you find those presentations.
...(as quicktime; 138 mb and 132 mb) develo
ping mozilla these presentations cover various aspects of the process of working on the mozilla project, including building, testing, and debugging.
Unix stub installer - Archive of obsolete content
build the unix installer (debug or non-debug target) by ty
ping "make" in the src2 directory grab a nightly build, say from <http://ftp.mozilla.org/pub/mozilla/n...staller.tar.gz> gunzip and untar the build to some temporary location like /tmp.
... if you need to use gdb to debug the installer run it by ty
ping "gdb mozilla-installer-bin" on the shell prompt.
XPJS Components Proposal - Archive of obsolete content
the xpjsmanager is in charge of loading these .js files, hel
ping them register themselves, and acting as an intermediary between the xpcom component manager and the js code.
...the xpjsmanager will receive this call from the js code, store the map
ping of clsid to .js filespec in the registry for its own use later, and then call the real component manager to do the registration.
panel.flip - Archive of obsolete content
horizontal flip
ping doesn't normally happen, since this would cause menus to open in strange places.
... an arrow panel can also specify a value of slide, which causes the arrow to "slide" instead of flip
ping when the panel doesn't have room.
wrap - Archive of obsolete content
« xul reference home wrap type: string set this attribute to the value off to disable word wrap
ping in the textbox.
... if this attribute is not specified, word wrap
ping is enabled.
Index - Archive of obsolete content
959 complete this page is for readers who have followed the custom toolbar button tutorial for firefox, thunderbird and sunbird, or the custom toolbar button:seamonkey tutorial for seamonkey, and who want to learn more about develo
ping extensions.
... 1062 stacks and decks tutorials, xul, xul_tutorial there may be need to display elements as a set of overlap
ping cards.
The Joy of XUL - Archive of obsolete content
key features and benefits powerful widget-based markup language the goal of xul is to build cross platform applications, in contrast with dhtml which is intended for develo
ping web pages.
... conclusion mozilla, featuring xul, delivers a compelling technology for develo
ping cross-platform applications with the same rich user interface and end user experience as native desktop applications.
Creating toolbar buttons (Customize Toolbar Window) - Archive of obsolete content
to include the style on your chrome.manifest file: style chrome://global/content/customizetoolbar.xul chrome://myextension/skin/toolbar-button.css if you are develo
ping for firefox 1.0, attach it to the customize toolbar window (chrome://global/content/customizetoolbar.xul) using skin/contents.rdf.
...1.0:packages"> <li resource="urn:mozilla:skin:classic/1.0:myextension"/> </seq> </chrome:packages> </description> <seq about="urn:mozilla:stylesheets"> <li resource="chrome://global/content/customizetoolbar.xul"/> </seq> <seq about="chrome://global/content/customizetoolbar.xul"> <li>chrome://myextension/skin/toolbar-button.css</li> </seq> </rdf> the skin/contents.rdf file is denigrated in develo
ping for later releases of firefox.
Complete - Archive of obsolete content
this page is for readers who have followed the custom toolbar button tutorial for firefox, thunderbird and sunbird, or the custom toolbar button:seamonkey tutorial for seamonkey, and who want to learn more about develo
ping extensions.
...for more information about develo
ping extensions, see the main extensions page here.
SeaMonkey - making custom toolbar (SM ver. 1.x) - Archive of obsolete content
open the file in seamonkey (for example, by dragging it and drop
ping it in the navigator window, or by choosing file – open file...
...copy and paste the line from here, to avoid ty
ping errors: content,install,url,resource:/chrome/custombutton/ explanation: this line registers your custom toolbar button extension, linking it into seamonkey.
Element Positioning - Archive of obsolete content
examples of setting widths and heights <button label="1" style="width: 100px;"/> <button label="2" style="width: 100em; height: 10px;"/> <button label="3" flex="1" style="min-width: 50px;"/> <button label="4" flex="1" style="min-height: 2ex; max-width: 100px"/> <textbox flex="1" style="max-width: 10em;"/> <description style="max-width: 50px">this is some boring but simple wrap
ping text.</description> example 1 the first button will be displayed with a width of 100 pixels (px means pixels).
... crop
ping text and buttons you could potentially create a button element that contains a label that is larger than the maximum width of the button.
List Controls - Archive of obsolete content
you cannot enter your own text by ty
ping it in.
...n editable menulist, add the editable attribute as follows: example 6 : source view <menulist editable="true"> <menupopup> <menuitem label="www.mozilla.org" /> <menuitem label="www.xulplanet.com" /> <menuitem label="www.dmoz.org" /> </menupopup> </menulist> the url field created here has three pre-populated choices that the user can select or they can enter one of their own by ty
ping it into the field.
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 stop
ping the capturing or bubbling phases from continuing.
...note that preventing the default action is not the same as stop
ping event propagation with the stoppropagation method.
Property Files - Archive of obsolete content
in case you need to format a string that already contains the percentage character in it (to get something like "50% off" returned), escape the percentage character with another percentage character, like this: my.percentage.string = %s%% off not esca
ping the percentage character will generate an incorrect string that strips the space character between the percentage character and the next word of the string ("50%off").
... non-ascii characters, utf-8 and esca
ping gecko 1.8.x (or later) supports property files encoded in utf-8.
XUL Structure - Archive of obsolete content
this directory is called 'chrome' probably because it seemed like a convenient name to use in kee
ping with the chrome packages that are included with mozilla.
...in firefox, this preference may be added to the user preferences by ty
ping "about:config" in the address field, and setting this value to true.
browser - Archive of obsolete content
disableglobalhistory type: boolean disables global history for the docshell attached to the browser while kee
ping session history active.
... showcaret type: boolean whether or not to cause a ty
ping caret to be visible in the content area.
menuitem - Archive of obsolete content
if the box direction is reversed, the crop
ping is reversed.
...this would be useful if the images are stored remotely or you plan on swap
ping the image frequently.
menulist - Archive of obsolete content
if the box direction is reversed, the crop
ping is reversed.
... editable type: boolean indicates that the value of the menulist can be modified by ty
ping directly into the value field.
panel - Archive of obsolete content
horizontal flip
ping doesn't normally happen, since this would cause menus to open in strange places.
... an arrow panel can also specify a value of slide, which causes the arrow to "slide" instead of flip
ping when the panel doesn't have room.
tab - Archive of obsolete content
if the box direction is reversed, the crop
ping is reversed.
...this would be useful if the images are stored remotely or you plan on swap
ping the image frequently.
treecol - Archive of obsolete content
if the box direction is reversed, the crop
ping is reversed.
...any splitter to either side will resize those columns while kee
ping the fixed column at a constant size.
XULRunner Hall of Fame - Archive of obsolete content
build instructions pencil the pencil project's unique mission is to build a free and opensource tool for making diagrams and gui prototy
ping that everyone can use.
... crowbar a web scra
ping environment based on the use of a server-side headless mozilla-based browser.
MacFAQ - Archive of obsolete content
note that in order to copy the framework while kee
ping the relative soft-links in the framework, do something like: % ( cd dist ; gnutar cf - xul.framework | ( cd /library/frameworks ; gnutar xf - )) installing your application your application must be installed as a xulrunner app before you can open it.
...here's how to implement command-line trap
ping when the app is already running, without getting into appleevents or c++ code.
nsIContentPolicy - Archive of obsolete content
this interface can be very useful if you are develo
ping a content-aware plugin (blocking ads or altering the look of content, for example), or if you want to stop or allow user-browsed urls.
... type_
ping 10 indicates a
ping triggered by a click on an <a> element using the
ping attribute.
2006-10-06 - Archive of obsolete content
problem loo
ping c_opensession problem in thunderbird christian bongiorno has run into a problem develo
ping a pkcs11 module for a new card.
... thunderbird is continuously repeating 7 functions including c_opensession which accesses the card that he is develo
ping.
NPN_SetValue - Archive of obsolete content
luginwindowbool: sets windowed/windowless mode for plugin display; true=windowed, false=windowless nppvplugintransparentbool: sets transparent mode for display of a plugin; true=transparent, false=opaque nppvjavaclass nppvpluginwindowsize nppvplugintimerinterval nppvpluginscriptableinstance nppvpluginscriptableiid nppvjavascriptpushcallerbool: specifies whether you are pushing or pop
ping the jscontext off the stack nppvpluginkeeplibraryinmemory: tells browser that the plugin dll should live longer than usual nppvpluginneedsxembed nppvpluginscriptablenpobject nppvformvalue nppvplugindrawingmodel value the value of the specified variable to be set.
... nppvjavascriptpushcallerbool sets whether you are pushing or pop
ping the appropriate jscontext off the stack (see the two-way scriptability article on the mozilla plugins project page for more details).
Introduction to Public-Key Cryptography - Archive of obsolete content
for an overview of ssl, see "introduction to ssl." for an overview of encryption and decryption, see "encryption and decryption." information on digital signatures is available from "digital signatures." public-key cryptography is a set of well-established techniques and standards for protecting communications from eavesdrop
ping, tampering, and impersonation attacks.
...users have difficulty kee
ping track of different passwords, tend to choose poor ones, and tend to write them down in obvious places.
Vulnerabilities - Archive of obsolete content
for example, the address resolution protocol (arp) trusts that an arp reply contains the correct map
ping between media access control (mac) and internet protocol (ip) addresses.
...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 misty
ping 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.
Processing XML with E4X - Archive of obsolete content
the syntax is designed to be familiar to javascript programmers, but e4x does not provide a direct map
ping from xml to native javascript objects; just the illusion of one.
...variables and expressions can be used to create attribute values by simply wrap
ping them with braces ({}) and omitting quotation marks that would normally go around an attribute value, as the following example illustrates: var a = 2; var b = <foo bar={a}>"hi"</foo>; upon execution the variable is evaluated and quotes are automatically added where appropriate.
Old Proxy API - Archive of obsolete content
proxies can be either be trap
ping or fixed.
... function handlermaker(obj) { return { // fundamental traps getownpropertydescriptor: function(name) { var desc = object.getownpropertydescriptor(obj, name); // a trap
ping proxy's properties must always be configurable if (desc !== undefined) { desc.configurable = true; } return desc; }, getpropertydescriptor: function(name) { var desc = object.getpropertydescriptor(obj, name); // not in es5 // a trap
ping proxy's properties must always be configurable if (desc !== undefined) { desc.configurable = true; } return desc; ...
Writing JavaScript for XHTML - Archive of obsolete content
a third solution is to use only external scripts, neatly sidestep
ping the special-character problem.
... solution: use dom methods many people avoided dom methods because of the ty
ping to create one simple element, when document.write() worked.
Choosing Standards Compliance Over Proprietary Practices - Archive of obsolete content
for example, if an organization is develo
ping a web-based client, they may have to adhere to standards imposed by these organizations: ansi (american national standards institute ) atsc (advanced television systems committee ) ieee (institute of electrical and electronics engineers ) ietf (internet engineering task force ) irtf (internet research task force ) iso (international standards organization ) itu (international telecommuni...
...consequently, xerox eventually had to shut down the production of their workstation development because of escalating manufacturing and develo
ping costs and slowed sales.
Game promotion - Game development
develo
ping and publishing your game is not enough.
...sometimes you have to spend more time promoting a game than actually develo
ping it.
Explaining basic 3D theory - Game development
applying textures onto objects during the fragment processing stage of the rendering pipeline allows us to adjust it by wrap
ping and filtering it if necessary.
... texture wrap
ping allows us to repeat the 2d image around the 3d object.
Building up a basic demo with Babylon.js - Game development
environment setup to start develo
ping with babylon.js, you don't need much.
... initialising the babylon.js engine we have to create a babylon.js engine instance first (passing it the <canvas> element to render on) before we start develo
ping our game.
Build the brick field - Game development
s as shown below: for(c=0; c<brickinfo.count.col; c++) { for(r=0; r<brickinfo.count.row; r++) { var brickx = 0; var bricky = 0; newbrick = game.add.sprite(brickx, bricky, 'brick'); game.physics.enable(newbrick, phaser.physics.arcade); newbrick.body.immovable = true; newbrick.anchor.set(0.5); bricks.add(newbrick); } } here we're loo
ping through the rows and columns to create the new bricks and place them on the screen.
...the ball goes through the bricks without stop
ping — we need proper collision detection.
Intrinsic Size - MDN Web Docs Glossary: Definitions of Web-related terms
for text the min-content size would be if the text wrapped as small as it can in the inline direction without causing an overflow, doing as much soft-wrap
ping as possible.
... the max-content size is the opposite — in the case of text, this would have the text display as wide as possible, doing no soft-wrap
ping, even if an overflow was caused.
Round Trip Time (RTT) - MDN Web Docs Glossary: Definitions of Web-related terms
the rtt between a network and server can be determined by using the
ping command.
... $
ping example.com
ping example.com (216.58.194.174): 56 data bytes 64 bytes from 216.58.194.174: icmp_seq=0 ttl=55 time=25.050 ms 64 bytes from 216.58.194.174: icmp_seq=1 ttl=55 time=23.781 ms 64 bytes from 216.58.194.174: icmp_seq=2 ttl=55 time=24.287 ms 64 bytes from 216.58.194.174: icmp_seq=3 ttl=55 time=34.904 ms 64 bytes from 216.58.194.174: icmp_seq=4 ttl=55 time=26.119 ms --- google.com
ping statistics --- 5 packets transmitted, 5 packets received, 0.0% packet loss round-trip min/avg/max/stddev = 23.781/26.828/34.904/4.114 ms in the above example, the average round trip time is shown on the final line as 26.8ms.
MDN Web Docs Glossary: Definitions of Web-related terms
e dmz dns doctype document directive document environment dom (document object model) domain domain name domain sharding dominator dos attack dtls (datagram transport layer security) dtmf (dual-tone multi-frequency signaling) dynamic programming language dynamic ty
ping e ecma ecmascript effective connection type element empty element encapsulation encryption endianness engine entity entity header event exception expando f fallback alignment falsy favicon fetch directive ...
...moke test smpte (society of motion picture and television engineers) smtp snap positions soap spa (single-page application) specification speculative parsing speed index sql sql injection sri stacking context state machine statement static method static ty
ping strict mode string stun style origin stylesheet svg svn symbol symmetric-key cryptography synchronous syntax syntax error synthetic monitoring t tag tcp tcp handshake tcp slow start telnet texel thread ...
WAI-ARIA basics - Learn web development
this is a fairly trivial example, but just imagine if you were creating a complex ui with lots of constantly updating content, like a chat room, or a strategy game ui, or a live updating shop
ping cart display — it would be impossible to use the app in any effective way without some kind of way of alerting the user to the updates.
... form validation and error alerts first of all, let's revisit the form example we first looked at in our css and javascript accessibility article (read kee
ping it unobtrusive for a full recap).
Advanced styling effects - Learn web development
mix-blend-mode, which blends together the element it is set on with elements it is overlap
ping — both background and content.
... the css shapes specification enables the wrap
ping of text around a non-rectangular shape.
Debugging CSS - Learn web development
you can click the closing curly brace in the rule to start entering a new declaration into it, at which point you can start ty
ping the new property and devtools will show you an autocomplete list of matching properties.
...if you need to ask for help, they will show the person hel
ping you what you have already tried.
Organizing your CSS - Learn web development
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 strip
ping out anything unnecessary in the production version.
... wrap
ping up this is the final part of our learning css guide, and as you can see there are many ways in which your exploration of css can continue from this point.
Test your skills: The Box Model - Learn web development
the box model three in this example the inline element has a margin, padding and border however the lines above and below are overlap
ping it.
... what can you add to your css to cause the size of the margin, padding, and border to be respected by the other lines, while still kee
ping the element inline?
The box model - Learn web development
margin box: the margin is the outermost layer, wrap
ping the content, padding and border as whitespace between this box and other elements.
...this is useful for situations where you do not want an item to break onto a new line, but do want it to respect width and height and avoid the overlap
ping seen above.
Flexbox - Learn web development
wrap
ping one issue that arises when you have a fixed amount of width or height in your layout is that eventually your flexbox children will overflow their container, breaking the layout.
...here we lay them out in a wrap
ping row, and align them in the center of the available space like we did in the individual button example we saw earlier.
Getting started with CSS - Learn web development
wrap
ping up in this tutorial, we have taken a look at a number of ways in which you can style a document using css.
... we will be develo
ping this knowledge as we move through the rest of the lessons.
What is CSS? - Learn web development
css is constantly develo
ping, with new features coming available.
... browser support once css has been specified then it is only useful for us in develo
ping web pages if one or more browsers have implemented it.
Styling lists - Learn web development
the unstyled example is available on github (check out the source code too.) the html for our list example looks like so: <h2>shop
ping (unordered) list</h2> <p>paragraph for reference, paragraph for reference, paragraph for reference, paragraph for reference, paragraph for reference, paragraph for reference.</p> <ul> <li>hummus</li> <li>pita</li> <li>green salad</li> <li>halloumi</li> </ul> <h2>recipe (ordered) list</h2> <p>paragraph for reference, paragraph for reference, paragraph for reference, paragraph for refer...
...this means that each paragraph and list will have the same font size and top and bottom spacing, hel
ping to keep the vertical rhythm consistent.
How do I start to design my website? - Learn web development
therefore, before jum
ping into the technical side—for example, code and tools—you must first step back and decide in detail what you want to do.
...mail?) define how people will find those contact channels from your website sell goodies create the goodies store the goodies find a way to handle ship
ping find a way to handle payment make a mechanism on your site for people to place orders teach music through videos record video lessons prepare video files viewable online (again, could you do this with existing web services?) give people access to your videos on some part of your website two things to notice.
How do I use GitHub Pages? - Learn web development
every operating system comes with a command line tool: windows: command prompt can be accessed by pressing the windows key, ty
ping command prompt, and choosing it from the list that appears.
...you tell the computer to do something in the terminal by ty
ping in a command and hitting enter, as seen above.
How to build custom form controls - Learn web development
.select:after { content : "▼"; /* we use the unicode character u+25bc; make sure to set a charset meta tag */ position: absolute; z-index : 1; /* this will be important to keep the arrow from overlap
ping the list of options */ top : 0; right : 0; box-sizing : border-box; height : 100%; width : 2em; padding-top : .1em; border-left : .2em solid #000; border-radius: 0 .1em .1em 0; background-color : #000; color : #fff; text-align : center; } next, let's style the list of options: .select .optlist { z-index : 2; /* we explicitly said the list of options will al...
...this switch is a couple of lines: if at page load time our script is running, it will remove the no-widget class and add the widget class, thereby swap
ping the visibility of the <select> element and the custom control.
Front-end web developer - Learn web development
the learning and getting help article provides you with a series of tips for looking up information and hel
ping yourself.
...the case study tutorials at the end of the second and third modules prepare you for gras
ping the essentials of modern tooling.
HTML basics - Learn web development
try to create a meaningful sequence of headings on your pages, without skip
ping levels.
...the most common list types are ordered and unordered lists: unordered lists are for lists where the order of the items doesn't matter, such as a shop
ping list.
Creating hyperlinks - Learn web development
anatomy of a link a basic link is created by wrap
ping the text or other content, see block level links, inside an <a> element and using the href attribute, also known as a hypertext reference, or target, that contains the web address.
...for example: screenreader users like jum
ping around from link to link on the page, and reading links out of context.
Making asynchronous programming easier with async and await - Learn web development
try ty
ping the following lines into your browser's js console: function hello() { return "hello" }; hello(); the function returns "hello" — nothing special, right?
...status: ${response.status}`); } else { return await response.blob(); } } myfetch().then((blob) => { let objecturl = url.createobjecturl(blob); let image = document.createelement('img'); image.src = objecturl; document.body.appendchild(image); }).catch(e => console.log(e)); you can try ty
ping in the example yourself, or running our live example (see also the source code).
Test your skills: Loops - Learn web development
this aim of this skill test is to assess whether you've understood our loo
ping code article.
... loops 1 in our first loo
ping task we want you start by creating a simple loop that goes through all the items in the provided myarray and prints them out on the screen inside list items (i.e., <li> elements), which are appended to the provided list.
Fetching data from the server - Learn web development
enter ajax this led to the creation of technologies that allow web pages to request small chunks of data (such as html, xml, json, or plain text) and display them only when needed, hel
ping to solve the problem described above.
...this may not be such a big issue on a desktop on a broadband connection, but it's a major issue on mobile devices and in develo
ping countries that don't have ubiquitous fast internet service.
JavaScript object basics - Learn web development
the live version will give you a blank screen, but that's ok — again, open your devtools and try ty
ping in the above commands to see the object structure.
...let's say we wanted users to be able to store custom value types in their people data, by ty
ping the member name and value into two text inputs.
Getting started with Ember - Learn web development
ember has clear conventions that are useful for enforcing consistency and hel
ping team members get up to speed quickly.
... starting the development server you may start the app in development mode by ty
ping the following command in your terminal, while inside the todomvc directory: ember server this should give you an output similar to the following: build successful (190ms) – serving on http://localhost:4200/ slowest nodes (totaltime >= 5%) | total (avg) -----------------------------------------+----------- broccolimergetrees (17) | 35ms (2 ms) package /assets/vendor...
Getting started with React - Learn web development
setting up your first react app there are many ways to use react, but we're going to use the command-line interface (cli) tool create-react-app, as mentioned earlier, which expedites the process of develo
ping a react application by installing some packages and creating some files for you, handling the tooling described above.
... the public directory contains files that will be read by your browser while you're develo
ping the app; the most important of these is index.html.
Starting our Svelte Todo list app - Learn web development
in this article we will first have a look at the desired functionality of our app, then we'll create a todos.svelte component and put static markup and styles in place, leaving everything ready to start develo
ping our to-do list app features, which we'll go on to in subsequent articles.
...this will be the basic functionality that we'll be develo
ping in this tutorial series, plus we'll look at some more advanced concepts along the way too.
Deployment and next steps - Learn web development
git commit -m "initial commit" git push -u origin master note: you could use the git protocol instead of https, which is faster and saves you from ty
ping your username and password every time you access your origin repo.
...after completing this series of tutorials you should have a strong base from which to start develo
ping professional web applications with svelte.
Handling common accessibility problems - Learn web development
you can then press enter/return to follow a focused link or press a button (we've included some javascript to make the buttons alert a message), or start ty
ping to enter text in a text input (other form elements have different controls, for example the <select> element can have its options displayed and cycled between using the up and down arrow keys).
...a basic data table can be written with very simple markup (see bad-table.html live, and source), but this has problems — there is no way for a screen reader user to associate rows or columns together as grou
pings of data — to do this you need to know what the header rows are, and if they are heading up rows, columns, etc.
Deploying our app - Learn web development
we are ho
ping that this section will at least make you aware of the need for testing, and will plant the seed that inspires you to go and learn more.
...while there is a long way to go before you can consider yourself a client-side tooling wizard, we are ho
ping that this module has given you that first important step towards understanding client-side tooling, and the confidence to learn more and try out new things.
Package management basics - Learn web development
we've met npm already, but step
ping back from npm itself, a package manager is a system that will manage your project dependencies.
...the javascript bundle my-project.fb76efcf.js is a whop
ping 195k — very large, given that all it does is print a line of text.
Multiprocess on Windows
interceptors are, essentially, wrapper objects which implement the same interfaces as the object that they are wrap
ping.
...this should be the iid that we want the interceptor to actually use when wrap
ping the array element.
Mozilla’s UAAG evaluation report
ntrolling popup behavior: turn window.open off for particular sites: user_pref("capability.policy.popupsites.sites", "http://www.annoyingsite1.com http://www.popupsite2.com"); user_pref("capability.policy.popupsites.windowinternal.open", "noaccess"); or turn it off everywhere: user_pref("capability.policy.default.windowinternal.open", "noaccess"); override pop
ping up new windows on target=anything: user_pref("browser.target_new_blocked", true); override popup windows at beginning of new page load (blocks most popup advertisements): user_pref("dom.disable_open_during_load", true); 5.4 selection and focus in viewport.
...(p1) vg mozilla implements standard keyboard bindings there are a few missing pieces, such as support in xul comboboxes (menulist) for selecting items by ty
ping alphanumeric keystrokes 7.3 operating environment conventions.
Add-ons
develo
ping extensions in the past, there were several toolsets for develo
ping firefox extensions, but as of november 2017, extensions must be built using webextensions apis.
...you’ll find: overview of the firefox extension features tools and processes for develo
ping and testing how to publish your extension on addons.mozilla.org or distribute it yourself how to manage your published extension an enterprise guide for develo
ping and using extensions how to develop themes for firefox firefox developer communities extensions for firefox for android in 2020, mozilla will release a new firefox for android experience.
Android-specific test suites
while develo
ping, you can launch these tests from within android studio, which is the fastest way to iterate on code and tests.
...while develo
ping, lint warnings should appear within android studio, although this is not infallible.
Chrome registration
the chrome registry the gecko runtime maintains a service known as the chrome registry that provides map
pings from chrome package names to the physical location of chrome packages on disk.
... resource aliases can be created using the resource instruction: resource aliasname uri/to/files/ [flags] this will create a map
ping for resource://<aliasname>/ uris to the path given.
Debugging on Windows
avoiding step
ping into certain functions you can avoid step
ping into certain functions, such as nscomptr methods, using an undocumented feature of vc.
...because the code is optimized, step
ping through the code may occasionally provide small surpises when the debugger jumps over something.
Configuring Build Options
skip
ping any step may cause the build to fail, or the built software to be unusable.
... people develo
ping patches (especially in c++) should generally use this option.
How Mozilla's build system works
for many developers, ty
ping mach build to build the tree is sufficient to work with the source tree.
...a tier is a grou
ping of related directories containing makefiles of their own.
pymake
to run tests instead of ty
ping make mochitest-plain in the object directory, you would type python ../build/pymake/make.py mochitest-plain.
... try ty
ping just pymake into the shell and press enter.
Interface development guide
the articles linked from this page offer guidelines for develo
ping and using these interfaces.
... mailing list newsgroup rss feed related topics javascript, xpcom, develo
ping mozilla ...
Experimental features in Firefox
due to a bug that came up during testing of the user interface, we have decided to postpone ship
ping this api while discussions over potential changes to the api are held.
... nightly 75 no developer edition 75 no beta 75 no release 75 no preference name devtools.webconsole.input.context mobile gesture support in responsive design mode mouse gestures are used to simulate mobile gestures like swi
ping/scrolling, double-tap and pinch-zooming and long-press to select/open the context menu.
Index
168 performance best practices for firefox front-end engineers best practices, develo
ping firefox, develo
ping mozilla, firefox, front-end, mozilla, performance this guide will help firefox developers working on front-end code produce code which is as performant as possible—not just on its own, but in terms of its impact on other parts of firefox.
... 172 security best practices for firefox front-end engineers best practices, develo
ping firefox, develo
ping mozilla, firefox, front-end, mozilla, performance this article will help firefox developers understand the security controls in place and avoid common pitfalls when develo
ping front-end code for firefox.
Chrome-only CSS reference
d by the properties attribute.css -moz-bool-pref() @supports functionthe -moz-bool-pref() @supports condition is available to gecko chrome and ua stylesheets to check if a boolean preference is enabled.css <display-xul> component</display-xul>firefox supports the following -moz- prefixed xul display values:overflow-clip-boxthe overflow-clip-box css property specifies relative to which box the clip
ping happens when there is an overflow.
... it is short hand for the overflow-clip-box-inline and overflow-clip-box-block properties.overflow-clip-box-blockthe overflow-clip-box-block css property specifies relative to which box the clip
ping happens when there is an overflow — in the block direction.overflow-clip-box-inlinethe overflow-clip-box-inline css property specifies relative to which box the clip
ping happens when there is an overflow — in the inline direction.
Introduction to Layout in Mozilla
structures content node elements, attributes, leaves dom frame rectangular formatting primitive geometric information [0..n] per content node 2nd thru nth are “continuations” style context non-geometric information may be shared by adjacent frames reference counted, owned by frame view clip
ping, z-order, transparency [0..1] per frame, owned by frame widget native window [0..1] per view, owned by view key data structures the document owns the content model, and one or more presentations exposed programmatically via dom apis the presentation owns the frame hierarchy frames own the style contexts, views, widgets pre...
...notifications passes these to the style set object, who in turn passes to the frame constructor frame constructor creates frames constructframeinternal recursively walks content tree, resolves style and creates frames either created by tag (<select>) or by display type (<p>) frame manager maintains map
ping from content to frame style resolution compute stylistic information based on the style rules that apply for the frame’s content node style data broken into different structures display, visibility, font, color, background, … inherit vs.
Following the Android Toasts Tutorial from a JNI Perspective
because we don't want to keep ty
ping string signatures everywhere, we can end up with typos and hard to trace back errors, we use the sig object.
...because we want to avoid typos, we will avoid ty
ping the signatures and user our sig object.
Localization and Plurals
if you're here to make your code (e.g., extensions) localizable for plural forms, you can jump straight to develo
ping with pluralform.
...: initial version with pluralrule check, properties input loading, table generation, sample output display 0.2: use pluralform.numforms() to get the number of forms instead of figuring out locally to better support future rules - requires build from 2007/01/27 or later 0.3: generate a list of what numbers fall into which plural form to minimize the sample output to at most 3 of each form develo
ping with pluralform the functionality for getting the correct plural forms is provided by a javascript module, pluralform.jsm.
What every Mozilla translator should know
we have the main repository called mozilla-central (or trunk) where the day to day develo
ping work is done.
...all the content of the trunk is copied to this new branch so that the develo
ping work is done in two (or more) parallel places: the generic trunk and the version oriented branch(es).
Mozilla Style System
when script dynamically changes the data represented by a css style rule, we create a new nsistylerule object; kee
ping the old one around briefly helps to determine what changed and how we need to handle that change.
... the grou
ping of properties into structs follows two rules: any properties in the same style struct must also be in the same css struct all of the properties in a style struct must be inherited or they must all be non-inherited (see inheritance for an explanation of the difference) the first of these rules is no longer important (in fact, the separation of the specified values into nscss* structs is no l...
DMD
launch launch fennec either by tap
ping on the icon as usual, or from the command line (as before, be sure to replace org.mozilla.fennec_$username with the app identifier as appropriate).
... adb shell am start -n org.mozilla.fennec_$username/.app trigger use the existing memory-report dum
ping hook: adb shell am broadcast -a org.mozilla.gecko.memory_dump in logcat, you should see output similar to this: i/dmd (20731): opened /storage/emulated/0/download/memory-reports/dmd-default-20731.json.gz for writing ...
Profiling with Xperf
tips in the summary views, the yellow bar can be dragged left and right to change the grou
ping -- for example, drag it to the left of the module column to have grou
ping happen only by process (stuff that's to the left), so that you get symbols in order of weight, regardless of what module they're in.
... dragging the columns around will change grou
ping in various ways; experiment to get the data that you're looking for.
Profiling with the Firefox Profiler
at present there is no central list of these thread names, but you can find them by grep
ping the source.
... warning: dum
ping texture data slows performance considerably, and requires a lot of storage for the profile files.
Scroll-linked effects
this constant moving and snap
ping will result in a jittery visual effect.
... example 2: scroll snap
ping below is an implementation of scroll snap
ping, where the scroll position snaps to a particular destination when the user's scrolling stops near that destination.
about:memory
these files can be loaded as is, but they can also be loaded after unzip
ping.
...all the measurements within a single tree are non-overlap
ping.
Performance
the articles linked to from here will help you improve performance, whether you're develo
ping core mozilla code or an add-on.
... related topics javascript, xpcom, develo
ping mozilla, extensions, addons ...
ui.tooltipDelay
ui.tooltipdelay stores the delay in milliseconds between the mouse stop
ping over an element and the appearing of its tooltip.
... type:integer default value:500 exists by default: no application support: gecko 11.0 (firefox 11.0 / thunderbird 11.0 / seamonkey 2.8) status: active; last updated 2012-02-21 introduction: pushed to nightly on 2011-12-15 bugs: bug 204786 values integer (milliseconds, default: 500) the time for delay between the mouse stop
ping over the element and the tooltip appearing is stored in milliseconds and the default value is 500ms.
NSS 3.12.4 release notes
unnecessary esca
ping is permitted.
...inside a union, to be matched and not treated as a special character, these characters must be escaped: \ ( | ) [ ~ except when they occur inside a bracketed expression, where only \ and ] require esca
ping.
NSS API Guidelines
nss makes use of traditional memory allocation functions, wrap
ping nspr's pr_alloc in a util function called port_alloc.
... list and array returning functions should be available at the higher layers of the api, most wrap
ping layer_traverse() functions.
Enc Dec MAC Output Public Key as CSR
(-0x2000) #define port_errortostring(err) pr_errortostring((err), pr_language_i_default) #endif #endif /* * print usage message and exit */ static void usage(const char *progname) { fprintf(stderr, "\nusage: %s -c -d [-z ] " "[-p | -f ] -s -r -i -o \n\n", progname); fprintf(stderr, "%-20s specify 'g' for generating rsa keypair for wrap
ping\n\n", "g"); fprintf(stderr, "%-20s specify 'e' for encrypt operation\n\n", "e"); fprintf(stderr, "%-20s specify 'd' for decrypt operation\n\n", "d"); fprintf(stderr, "%-20s specify db directory path\n\n", "-d "); fprintf(stderr, "%-20s specify db password [optional]\n\n", "-p "); fprintf(stderr, "%-20s speci...
.../ mackey = generatesymkey(slot, ckm_generic_secret_key_gen, 160/8, &mackeyid, pwdata); if (mackey == null) { pr_fprintf(pr_stderr, "generatesymkey for macing returned null.\n"); rv = secfailure; goto cleanup; } /* wrap encrypt key */ rv = wrapkey(enckey, pubkey, &wrappedenckey); if (rv != secsuccess) { pr_fprintf(pr_stderr, "error while wrap
ping encrypt key\n"); goto cleanup; } /* wrap mac key */ rv = wrapkey(mackey, pubkey, &wrappedmackey); if (rv != secsuccess) { pr_fprintf(pr_stderr, "error while wrap
ping mac key\n"); goto cleanup; } if (noisefilename) { rv = seedfromnoisefile(noisefilename); if (rv != secsuccess) { port_seterror(pr_end_of_file_error); ...
FC_UnwrapKey
name fc_unwrapkey - unwrap a key syntax ck_rv fc_unwrapkey( ck_session_handle hsession, ck_mechanism_ptr pmechanism, ck_object_handle hunwrap
pingkey, ck_byte_ptr pwrappedkey, ck_ulong uswrappedkeylen, ck_attribute_ptr ptemplate, ck_ulong usattributecount, ck_object_handle_ptr phkey ); parameters hsession [in] session handle.
...hunwrap
pingkey [in] handle of the ket to use for unwrap
ping.
FC_WrapKey
name fc_wrapkey - wrap a key syntax ck_rv fc_wrapkey( ck_session_handle hsession, ck_mechanism_ptr pmechanism, ck_object_handle hwrap
pingkey, ck_object_handle hkey, ck_byte_ptr pwrappedkey, ck_ulong_ptr puswrappedkeylen ); parameters hsession [in] session handle.
...hwrap
pingkey [in] pointer to the public key template.
NSS tools : certutil
--extpm add the policy map
pings extension to the certificate.
...nss has some flexibility that allows applications to use their own, independent database engine while kee
ping a shared database and working around the access issues.
sslerr.html
cause the pkcs#11 token is not logged in." sec_error_ocsp_responder_cert_invalid -8036 "the configured ocsp responder's certificate is invalid." sec_error_ocsp_bad_signature -8035 "ocsp response has an invalid signature." sec_error_out_of_search_limits -8034 "certification validation search is out of search limits." sec_error_invalid_policy_map
ping -8033 "policy map
ping contains any-policy." sec_error_policy_validation_failed -8032 "certificate chain fails policy validation." sec_error_unknown_aia_location_type -8031 "unknown location type in certificate aia extension." sec_error_bad_http_response -8030 "server returned a bad http response." sec_error_bad_ldap_response -8029 ...
...odule returned ckr_device_error, indicating that a problem has occurred with the token or slot." sec_error_bad_info_access_method -8022 "unknown information access method in certificate extension." sec_error_crl_import_failed -8021 "error attempting to import a crl." sec_error_unknown_pkcs11_error -8018 "unknown pkcs #11 error." (unknown error value map
ping) ...
certutil
--extpm add the policy map
pings extension to the certificate.
...nss has some flexibility that allows applications to use their own, independent database engine while kee
ping a shared database and working around the access issues.
Network Security Services
nss api guidelines explains how the libraries and code are organized, and guidelines for develo
ping code (naming conventions, error handling, thread safety, etc.) nss technical notes links to nss technical notes, which provide latest information about new nss features and supplementary documentation for advanced topics in programming with nss.
... nss tools tools for develo
ping, debugging, and managing applications that use nss.
Rhino Examples
the programs may be specified as files on the command line or by ty
ping interactively while the shell is running.
... primitivewrapfactory primitivewrapfactory.java is an example of a wrapfactory that can be used to control the wrap
ping behavior of the rhino engine on calls to java methods.
Garbage collection
swee
ping todo generational gc todo gc statistics api you can access the light statistics the gc keeps at runtime through the gc statistics api.
... gc/memory.{h,cpp} contains a few functions for map
ping and unmap
ping pages, along with platform-specific implementations.
JSAPI User Guide
similarly, you can create a js::value wrap
ping a jsobject, double, or jsstring pointer to a js::value using js::objectvalue(jsobject&), js::doublevalue(double), or js::stringvalue(jsstring*).
... kee
ping objects alive if your jsapi application crashes, it is likely due to a gc-related error.
JS_FileEscapedString
this article covers features introduced in spidermonkey 1.8.5 write string into file with esca
ping.
... description js_fileescapedstring writes str into file fp esca
ping any non-printable or non-ascii character.
JS_PutEscapedString
this article covers features introduced in spidermonkey 1.8.5 write a string into buffer with esca
ping.
... description js_putescapedstring and js_putescapedstring write str into buffer esca
ping any non-printable or non-ascii character using \escapes for js string literals.
Secure Development Guidelines
the following content will likely see significant revision, though can be used as a reference for security best practices to follow when develo
ping code for mozilla.
...is exploitable (in some browsers) with a simple request such as: http://www.victim.com?something=<script>alert('oops')</script> xss: prevention escape all dynamic input that will be sent back to the user html encoding & → & < → < > → > " → " ' → ' url encoding % encoding java/vbscript esca
ping depends on the context; in a single-quoted string, esca
ping ' would suffice sql injection occurs when un-trusted input is mixed with a sql string sql is a language used to interact with databases code injection attack that is similar to xss but targeted at sql rather than html and javascript if input is mixed with sql, it could itself become an sql instruction and be used to: ...
Browser security
an important aspect of develo
ping code for any browser, including firefox, as well as any web-oriented project, is its 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 develo
ping 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.
Animated PNG graphics
0 indicates infinite loo
ping.
...conceptually, such scaling occurs while map
ping the output buffer onto the canvas.
XUL Accessibility
<label value="it's label for control" control="control" /> <hbox role="grou
ping" id="control" /> get tooltiptext attribute if the element is anonymous child of the element that is the direct child of toolbaritem element or the element is direct child of toolbaritem element then title attribute of toolbaritem element is used (currently it's used in firefox ui only) if the element has aria role and the role allows to aggregate name from subtree of element then generate name ...
... <description value="it's label for control" control="control" /> <hbox role="grou
ping" id="control" /> get tooltiptext attribute value if the aria role is used and it allows to have accessible value then aria-valuetext or aria-valuenow are used if the element is xlink then value is generated from link location actions if the element is xlink then jump action is exposed if the element has registered click event handler then click action is exposed xul elements notification u...
Avoiding leaks in JavaScript XPCOM components
j has a pointer to n, so the wrapper wrap
ping n owns a reference to n as long as j is reachable from a garbage collection root.
... n has a pointer to j, so the wrapper wrap
ping j exists as long as n doesn't release the pointer, and creates a garbage collection root that roots j.
Using XPCOM Utilities to Make Things Easier
but there are only a few places in that code that are unique to the weblock component, and it was a lot of ty
ping.
...to avoid these kinds of redundancies, to regulate the way generic code is written, and to save ty
ping, xpcom providesgeneric module macros that expand into the module code you've already seen.
Mozilla internal string guide
string(); mtitle = new nsstring(); } ~foo() { delete mlocalname; delete mtitle; } private: // these store utf-8 and utf-16 values respectively nscstring* mlocalname; nsstring* mtitle; }; the above code may appear to save the cost of the string objects, but nsstring/nscstring are small objects - the overhead of the allocation outweighs the few bytes you'd save by kee
ping a pointer.
... wrap
ping character buffers nsdependentstring nsdependentcstring wrap const char* / const char16_t* buffers.
XPCOM Stream Guide
zip input and output for getting an input stream from a zip archive, see the nsizipreader interface: // file is an nsifile object map
ping to a zip archive var zipreader = components.classes["@mozilla.org/libjar/zip-reader;1"] .createinstance(components.interfaces.nsizipreader); zipreader.open(file); var stream = zipreader.getinputstream("/path/to/zipped/file"); // process the stream // when we don't need the zipreader anymore zipreader.close(); for writing from an input stream to a zip archive, see the...
... nsizipwriter interface: // file is an nsifile object map
ping to a zip archive var zipwriter = components.classes["@mozilla.org/zipwriter;1"] .createinstance(components.interfaces.nsizipwriter); zipwriter.open(file, ioflags); // stream is the output stream zipwriter.addentrystream("/path/to/zipped/file", modtime, compression, stream, queueforlater); // if queued for later operations, and all operations are queued zipwriter.processqueue(); // when we don't need the zipwriter anymore zipwriter.close(); concatenating input streams var stringstream = components.constructor("@mozilla.org/io/string-input-stream;1", "nsistringinputstream", "setdata"); function buildstream(data) { ...
XPConnect wrappers
this wrapper is responsible for map
ping calls from javascript into c++.
... double wrap
ping.
NS_ConvertASCIItoUTF16
@param aeliminateleading controls strip
ping of leading ws @param aeliminatetrailing controls strip
ping of trailing ws parameters prbool aeliminateleading prbool aeliminatetrailing assignwithconversion void assignwithconversion(const nsacstring_internal&) - source assign/append/insert with _lossy_ conversion parameters nsacstring_internal& astring void assignwithconversion(const char*, print32) - source parameters char* a...
... @param achar -- char to be stripped @param aoffset -- where in this string to start strip
ping chars parameters prunichar achar print32 aoffset ...
NS_ConvertUTF16toUTF8
@param aeliminateleading controls strip
ping of leading ws @param aeliminatetrailing controls strip
ping of trailing ws parameters prbool aeliminateleading prbool aeliminatetrailing assignwithconversion void assignwithconversion(const nsastring_internal&) - source assign/append/insert with _lossy_ conversion parameters nsastring_internal& astring void assignwithconversion(const prunichar*, print32) - source parameters prun...
... @param achar -- char to be stripped @param aoffset -- where in this string to start strip
ping chars parameters char achar print32 aoffset ...
NS_ConvertUTF8toUTF16
@param aeliminateleading controls strip
ping of leading ws @param aeliminatetrailing controls strip
ping of trailing ws parameters prbool aeliminateleading prbool aeliminatetrailing assignwithconversion void assignwithconversion(const nsacstring_internal&) - source assign/append/insert with _lossy_ conversion parameters nsacstring_internal& astring void assignwithconversion(const char*, print32) - source parameters char* a...
... @param achar -- char to be stripped @param aoffset -- where in this string to start strip
ping chars parameters prunichar achar print32 aoffset ...
NS_LossyConvertUTF16toASCII
@param aeliminateleading controls strip
ping of leading ws @param aeliminatetrailing controls strip
ping of trailing ws parameters prbool aeliminateleading prbool aeliminatetrailing assignwithconversion void assignwithconversion(const nsastring_internal&) - source assign/append/insert with _lossy_ conversion parameters nsastring_internal& astring void assignwithconversion(const prunichar*, print32) - source parameters prun...
... @param achar -- char to be stripped @param aoffset -- where in this string to start strip
ping chars parameters char achar print32 aoffset ...
nsAdoptingCString
@param aeliminateleading controls strip
ping of leading ws @param aeliminatetrailing controls strip
ping of trailing ws parameters prbool aeliminateleading prbool aeliminatetrailing assignwithconversion void assignwithconversion(const nsastring_internal&) - source assign/append/insert with _lossy_ conversion parameters nsastring_internal& astring void assignwithconversion(const prunichar*, print32) - source parameters prun...
... @param achar -- char to be stripped @param aoffset -- where in this string to start strip
ping chars parameters char achar print32 aoffset ...
nsAdoptingString
@param aeliminateleading controls strip
ping of leading ws @param aeliminatetrailing controls strip
ping of trailing ws parameters prbool aeliminateleading prbool aeliminatetrailing assignwithconversion void assignwithconversion(const nsacstring_internal&) - source assign/append/insert with _lossy_ conversion parameters nsacstring_internal& astring void assignwithconversion(const char*, print32) - source parameters char* a...
... @param achar -- char to be stripped @param aoffset -- where in this string to start strip
ping chars parameters prunichar achar print32 aoffset ...
nsAutoString
@param aeliminateleading controls strip
ping of leading ws @param aeliminatetrailing controls strip
ping of trailing ws parameters prbool aeliminateleading prbool aeliminatetrailing assignwithconversion void assignwithconversion(const nsacstring_internal&) - source assign/append/insert with _lossy_ conversion parameters nsacstring_internal& astring void assignwithconversion(const char*, print32) - source parameters char* a...
... @param achar -- char to be stripped @param aoffset -- where in this string to start strip
ping chars parameters prunichar achar print32 aoffset ...
nsCAutoString
@param aeliminateleading controls strip
ping of leading ws @param aeliminatetrailing controls strip
ping of trailing ws parameters prbool aeliminateleading prbool aeliminatetrailing assignwithconversion void assignwithconversion(const nsastring_internal&) - source assign/append/insert with _lossy_ conversion parameters nsastring_internal& astring void assignwithconversion(const prunichar*, print32) - sour...
... @param achar -- char to be stripped @param aoffset -- where in this string to start strip
ping chars parameters char achar print32 aoffset ...
nsCString
@param aeliminateleading controls strip
ping of leading ws @param aeliminatetrailing controls strip
ping of trailing ws parameters prbool aeliminateleading prbool aeliminatetrailing assignwithconversion void assignwithconversion(const nsastring_internal&) - source assign/append/insert with _lossy_ conversion parameters nsastring_internal& astring void assignwithconversion(const prunichar*, print32) - source parameters prun...
... @param achar -- char to be stripped @param aoffset -- where in this string to start strip
ping chars parameters char achar print32 aoffset ...
nsDependentCString
@param aeliminateleading controls strip
ping of leading ws @param aeliminatetrailing controls strip
ping of trailing ws parameters prbool aeliminateleading prbool aeliminatetrailing assignwithconversion void assignwithconversion(const nsastring_internal&) - source assign/append/insert with _lossy_ conversion parameters nsastring_internal& astring void assignwithconversion(const prunichar*, print32) - source parameters prun...
... @param achar -- char to be stripped @param aoffset -- where in this string to start strip
ping chars parameters char achar print32 aoffset ...
nsDependentString
@param aeliminateleading controls strip
ping of leading ws @param aeliminatetrailing controls strip
ping of trailing ws parameters prbool aeliminateleading prbool aeliminatetrailing assignwithconversion void assignwithconversion(const nsacstring_internal&) - source assign/append/insert with _lossy_ conversion parameters nsacstring_internal& astring void assignwithconversion(const char*, print32) - source parameters char* a...
... @param achar -- char to be stripped @param aoffset -- where in this string to start strip
ping chars parameters prunichar achar print32 aoffset ...
nsFixedCString
@param aeliminateleading controls strip
ping of leading ws @param aeliminatetrailing controls strip
ping of trailing ws parameters prbool aeliminateleading prbool aeliminatetrailing assignwithconversion void assignwithconversion(const nsastring_internal&) - source assign/append/insert with _lossy_ conversion parameters nsastring_internal& astring void assignwithconversion(const prunichar*, print32) - source parameters prun...
... @param achar -- char to be stripped @param aoffset -- where in this string to start strip
ping chars parameters char achar print32 aoffset ...
nsFixedString
@param aeliminateleading controls strip
ping of leading ws @param aeliminatetrailing controls strip
ping of trailing ws parameters prbool aeliminateleading prbool aeliminatetrailing assignwithconversion void assignwithconversion(const nsacstring_internal&) - source assign/append/insert with _lossy_ conversion parameters nsacstring_internal& astring void assignwithconversion(const char*, print32) - source parameters char* a...
... @param achar -- char to be stripped @param aoffset -- where in this string to start strip
ping chars parameters prunichar achar print32 aoffset ...
nsPromiseFlatCString
@param aeliminateleading controls strip
ping of leading ws @param aeliminatetrailing controls strip
ping of trailing ws parameters prbool aeliminateleading prbool aeliminatetrailing assignwithconversion void assignwithconversion(const nsastring_internal&) - source assign/append/insert with _lossy_ conversion parameters nsastring_internal& astring void assignwithconversion(const prunichar*, print32) - source parameters prun...
... @param achar -- char to be stripped @param aoffset -- where in this string to start strip
ping chars parameters char achar print32 aoffset ...
nsPromiseFlatString
@param aeliminateleading controls strip
ping of leading ws @param aeliminatetrailing controls strip
ping of trailing ws parameters prbool aeliminateleading prbool aeliminatetrailing assignwithconversion void assignwithconversion(const nsacstring_internal&) - source assign/append/insert with _lossy_ conversion parameters nsacstring_internal& astring void assignwithconversion(const char*, print32) - source parameters char* a...
... @param achar -- char to be stripped @param aoffset -- where in this string to start strip
ping chars parameters prunichar achar print32 aoffset ...
nsString
@param aeliminateleading controls strip
ping of leading ws @param aeliminatetrailing controls strip
ping of trailing ws parameters prbool aeliminateleading prbool aeliminatetrailing assignwithconversion void assignwithconversion(const nsacstring_internal&) - source assign/append/insert with _lossy_ conversion parameters nsacstring_internal& astring void assignwithconversion(const char*, print32) - source parameters char* a...
... @param achar -- char to be stripped @param aoffset -- where in this string to start strip
ping chars parameters prunichar achar print32 aoffset ...
nsXPIDLCString
@param aeliminateleading controls strip
ping of leading ws @param aeliminatetrailing controls strip
ping of trailing ws parameters prbool aeliminateleading prbool aeliminatetrailing assignwithconversion void assignwithconversion(const nsastring_internal&) - source assign/append/insert with _lossy_ conversion parameters nsastring_internal& astring void assignwithconversion(const prunichar*, print32) - source parameters prun...
... @param achar -- char to be stripped @param aoffset -- where in this string to start strip
ping chars parameters char achar print32 aoffset ...
nsXPIDLString
@param aeliminateleading controls strip
ping of leading ws @param aeliminatetrailing controls strip
ping of trailing ws parameters prbool aeliminateleading prbool aeliminatetrailing assignwithconversion void assignwithconversion(const nsacstring_internal&) - source assign/append/insert with _lossy_ conversion parameters nsacstring_internal& astring void assignwithconversion(const char*, print32) - source parameters char* a...
... @param achar -- char to be stripped @param aoffset -- where in this string to start strip
ping chars parameters prunichar achar print32 aoffset ...
imgIContainer
flag_clamp: extend the image to the fill area by clam
ping image sample coordinates instead of by tiling.
...when aflags includes flag_clamp, the image will be extended to this area by clam
ping image sample coordinates.
nsIClassInfo
obsolete since gecko 2.0 methods gethelperforlanguage() get a language map
ping specific helper object that may assist in using objects of this class in a specific lanaguage.
... nsisupports gethelperforlanguage( in pruint32 language ); parameters language this parameter selects the language map
ping specific helper object to be returned.
nsILocalFileMac
setfiletypeandcreatorfromextension() obsolete since gecko 1.9.2 (firefox 3.6 / thunderbird 3.1 / fennec 1.0) sets the file type and creator code from a file extension internet config is used to determine the map
ping.
...internet config is used to determine the map
ping.
nsIMsgHeaderParser
exceptions thrown missing exception missing description reformatunquotedaddresses() given a string, will make it safe to use by adding missing quote and esca
ping needed quote wstring reformatunquotedaddresses( in wstring line ); parameters line the header line to parse.
... removealiasestome allows the address parser to use the preference which contains regular expressions which also mean 'me' for the purpose of strip
ping the user's email address(es) out of addrs string removeduplicateaddresses( in string addrs, in string other_addrs, in prbool removealiasestome ); parameters addrs the addresses to remove duplicates from.
nsINavHistoryContainerResultNode
toolkit/components/places/public/nsinavhistoryservice.idlscriptable a foundation for the interfaces that provide a description of a query result on the places service that describes a container (which is any kind of grou
ping, including bookmark folders).
...for host and day grou
pings, doing this has no performance cost since the children have already been computed.
nsISelection2
allowadjacent specifies whether the returned ranges are allowed to touch the input range rather than merely overlap
ping it.
... allowadjacent specifies whether the returned ranges are allowed to touch the input range rather than merely overlap
ping it.
nsITextInputProcessor
however, especially for kee
ping compatibility with legacy api, you may want to modify only the modifier state of a textinputprocessor instance.
...but the computation doesn't emulate the map
ping of native key event handling completely because it has some special cases depending on platform or selected keyboard layout.
nsIWebBrowserPersist
encode_flags_raw 4 output without formatting or wrap
ping the content.
...parameter is ignored if wrap
ping is not specified by the encoding flags.
nsIWinTaskbar
this id is used by the taskbar for grou
ping windows and when associating pinned shortcuts with running instances and jump lists.
...setgroupidforwindow() set the grou
ping id for a window.
XPCOM reference
xpcom3 to specify static xpcom modules.standard xpcom componentsthere are a number of components provided in the standard implementation of xpcom; these are as follows.xpcom glue classesthese "glue" classes are provided to make it easier to use xpcom from c++ code.xpcom interface referencethis is a reference to the xpcom interfaces provided by the mozilla platform.xpcom interface reference by grou
pingthis page lists the current (as of dec.
...grou
ping and category names were made by somewhat arbitrary decision by the author.
Getting Started Guide
this takes a little getting used to on your part, but ends up with less ty
ping, clearer, safer code, and less leaks.
... you can tell nscomptr it doesn't need to addref the new value on assignment by wrap
ping the new value in dont_addref.
wrappedJSObject
// constructor function helloworld() { }; helloworld.prototype = { hello: function() { return "hello world!"; }, queryinterface: function(aiid) { if (!aiid.equals(components.interfaces.nsisupports) && !aiid.equals(components.interfaces.nsihelloworld)) throw components.results.ns_error_no_interface; return this; } }; xpconnect wrap
ping now let's get a reference to our component.
... this functionality can be used for quick prototy
ping, as well as to painlessly pass arbitrary js values to the component (which can be used for sharing complex js data in particular).
XUL Overlays
if you are develo
ping a mozilla extension, note that the id namespace is shared by all the extensions.
...because an overlay is superimposed on the master document, there are no ambiguities relating to sco
ping of style sheets or scripts.
Thunderbird extensions
an overview of thunderbird components developer reference docs: folder classes db views (message list) message summary database mailnews protocols mailnews filters error reporting tools steel library (obsolete as of thunderbird 52, use https://github.com/protz/thunderbird-stdlib) develo
ping new account types useful newsgroup discussions (anything that's very old should be regarded suspiciously, because there has been significant api rewrite over the past years making most techniques considerably easier) thunderbird api docs (mostly a collection of out-of-date pages, relevance is rather dubious) general links finding the code for a featur...
...ommunity / communications thunderbird specific : add-ons section on developer.thunderbird.net thunderbird communication channels add-on developers forum/mailing list #maildev irc channel more general : mozillazine extension development forum general developer channels related topics xul, javascript, xpcom, themes, develo
ping mozilla categori ...
Plugins
tutorials and references the articles below are developer information about the develo
ping for click-to-play, and plugin blocking.
... archived information legacy documentation about develo
ping npapi plugins.
Debugging service workers - Firefox Developer Tools
if this is not enough to help you figure out the problem, you could also try going to the javascript debugger and step
ping through your code to pinpoint exactly where it is going wrong.
...when pressed, this takes you straight to the javascript debugger view of your service worker code, and you can use the full power of the debugger to debug it — step
ping through code, etc.
Set a breakpoint - Firefox Developer Tools
continue to here: when step
ping through code, this option tells the debugging to continue execution through to this point.
... inline variable preview new in firefox 71, the source pane now gives you an inline preview of the variables on each line of code you've stepped through: this is a very useful timesaver when step
ping through your code.
Use a source map - Firefox Developer Tools
the comment's syntax is like this: //# sourcemap
pingurl=http://example.com/path/to/your/sourcemap.map in the video above we load https://mdn.github.io/devtools-examples/sourcemaps-in-console/index.html.
...the compiled source contains a comment like this, that points to a source map: //# sourcemap
pingurl=main.js.map in the debugger's source list pane, the original coffeescript source now appears as "main.coffee", and we can debug it just like any other source.
Firefox Developer Tools
memory figure out which objects are kee
ping memory in use.
... bugs.firefox-dev.tools a tool hel
ping to find bugs to work on.
Animation.playbackRate - Web APIs
examples in the growing/shrinking alice game example, clicking or tap
ping the bottle causes alice's growing animation (alicechange) to reverse, causing her to shrink: var shrinkalice = function() { alicechange.playbackrate = -1; alicechange.play(); } // on tap or click, alice will shrink.
...stener("mousedown", growalice, false); cake.addeventlistener("touchstart", growalice, false); in another example, the red queen's race game, alice and the red queen are constantly slowing down: setinterval( function() { // make sure the playback rate never falls below .4 if (redqueen_alice.playbackrate > .4) { redqueen_alice.playbackrate *= .9; } }, 3000); but clicking or tap
ping on them causes them to speed up by multiplying their playbackrate: var gofaster = function() { redqueen_alice.playbackrate *= 1.1; } document.addeventlistener("click", gofaster); document.addeventlistener("touchstart", gofaster); specifications specification status comment web animationsthe definition of 'animation.playbackrate' in that specification.
AudioBufferSourceNode.loop - Web APIs
syntax var loo
pingenabled = audiobuffersourcenode.loop; audiobuffersourcenode.loop = true | false; value a boolean which is true if loo
ping is enabled; otherwise, the value is false.
... when loo
ping is enabled, the sound begins playing at the time specified as the start point when start() is called.
BasicCardRequest - Web APIs
hose are: amex cartebancaire diners discover jcb mastercard mir unionpay visa examples in the following example, the paymentrequest() constructor is used to create a new payment request, which takes three objects as parameters — one containing details of the payment methods that can be used for the payment, one containing details of the actual order (such as items bought and ship
ping options), and an optional object that describes what data is needed to fullfil the payment (e.g., a ship
ping address).
...{ supportedmethods: 'basic-card', data: { supportednetworks: ['visa', 'mastercard', 'amex', 'jcb', 'diners', 'discover', 'mir', 'unionpay'] } }]; var details = { total: {label: 'donation', amount: {currency: 'usd', value: '65.00'}}, displayitems: [ { label: 'original donation amount', amount: {currency: 'usd', value: '65.00'} } ], ship
pingoptions: [ { id: 'standard', label: 'standard ship
ping', amount: {currency: 'usd', value: '0.00'}, selected: true } ] }; var options = {requestship
ping: true}; try { var request = new paymentrequest(supportedinstruments, details, options); // add event listeners here.
BasicCardResponse - Web APIs
examples in the following example, the paymentrequest() constructor is used to create a new payment request, which takes three objects as parameters — one containing details of the payment methods that can be used for the payment, one containing details of the actual order (such as items bought and ship
ping options), and an optional object containing further options.
...a: { supportednetworks: ['visa', 'mastercard', 'amex', 'jcb', 'diners', 'discover', 'mir', 'unionpay'], supportedtypes: ['credit', 'debit'] } }]; var details = { total: {label: 'donation', amount: {currency: 'usd', value: '65.00'}}, displayitems: [ { label: 'original donation amount', amount: {currency: 'usd', value: '65.00'} } ], ship
pingoptions: [ { id: 'standard', label: 'standard ship
ping', amount: {currency: 'usd', value: '0.00'}, selected: true } ] }; var options = {requestship
ping: true}; try { var request = new paymentrequest(supportedinstruments, details, options); // add event listeners here.
DOMMatrixReadOnly - Web APIs
dommatrixreadonly.flipx() returns a new dommatrix created by flip
ping the source matrix around its x-axis.
... dommatrixreadonly.flipy() returns a new dommatrix created by flip
ping the source matrix around its y-axis.
GlobalEventHandlers.onkeypress - Web APIs
html <label>enter numbers only: <input> </label> javascript function numbersonly(event) { return event.charcode === 0 || /\d/.test(string.fromcharcode(event.charcode)); } const input = document.queryselector('input'); input.onkeypress = numbersonly; // prevent pasting (since pasted content might include non-number characters) input.onpaste = event => false; result capture the ty
ping of a hidden word the following javascript function will do something after the user types the word "exit" in any point of a page.
...*/ alert("yesss!!!"); location.assign("https://developer.mozilla.org/"); } return true; }; })(); note: a more complete framework for capturing the ty
ping of hidden words is available on github.
GlobalEventHandlers.onpointerdown - Web APIs
var targetbox = document.getelementbyid("target"); targetbox.onpointerdown = handledown; function handledown(evt) { var action; switch(evt.pointertype) { case "mouse": action = "clicking"; break; case "pen": action = "tap
ping"; break; case "touch": action = "touching"; break; default: action = "interacting with"; break; } targetbox.innerhtml = "<strong>thanks for " + action + " me!</strong>"; evt.preventdefault(); } this simply uses onpointerdown to establish the function handledown() as the event handler for pointer down events.
...try tap
ping, clicking, or touching the box and see what happens.
The HTML DOM API - Web APIs
dragging and drop
ping of content on webpages.
... nodes may be strictly organizational, providing a means for grou
ping other nodes together or for providing a point at which a hierarchy can be constructed; other nodes may represent visible components of a document.
Recommended Drag Types - Web APIs
see dragging and drop
ping multiple items for more details about this.
...dir.path); var file = cc['@mozilla.org/file/local;1'].createinstance(components.interfaces.nsilocalfile); file.initwithpath(dir.path); file.appendrelativepath(name); console.log("output final path is =" + file.path); // now you can write or copy the file yourself… } } } see also html drag and drop api (overview) drag operations dragging and drop
ping multiple items html5 living standard: drag and drop ...
Basic concepts - Web APIs
a database connection can have several active transactions associated with it at a time, so long as the writing transactions do not have overlap
ping scopes.
...as for reading transactions, you can have several of them — even overlap
ping ones.
Browser storage limits and eviction criteria - Web APIs
here's the actual map
ping to directories under a user's firefox profile (other browsers may differ slightly): <profile>/storage — the main top-level directory for storages maintained by the quota manager (see below) <profile>/storage/permanent — persistent data storage repository <profile>/storage/temporary — temporary data storage repository <profile>/storage/default — default data storage repository no...
...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 kee
ping open datastores).
Checking when a deadline is due - Web APIs
this is the least avoidable bit of user ty
ping.
...2013, '13, 13?), i decided the best solution was to give them a choice to pick from, which also saves on annoying ty
ping for mobile users.
Timing element visibility with the Intersection Observer API - Web APIs
addeventlistener("visibilitychange", handlevisibilitychange, false); let observeroptions = { root: null, rootmargin: "0px", threshold: [0.0, 0.75] }; adobserver = new intersectionobserver(intersectioncallback, observeroptions); buildcontents(); refreshintervalid = window.setinterval(handlerefreshinterval, 1000); } first, a reference to the content wrap
ping <main> element is obtained, so we can insert our content into it.
... these are accessed through each ad's htmlelement.dataset attribute, which provides a domstringmap map
ping each custom attribute's name to its value.
Keyboard API - Web APIs
keyboard map
ping provides an interface for retrieving the string generated by particular physical key on a keyboard to correctly identify that key to a user.
... keyboard api concepts and usage keyboard map
ping 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.
LocalMediaStream - Web APIs
see stop
ping a video stream in mediastreamtrack to learn how.
...see stop
ping a video stream in mediastreamtrack to learn how to stop an entire stream.
ParentNode.querySelector() - Web APIs
since javascript also uses backspace esca
ping, special care must be taken when writing string literals using these characters.
... see esca
ping special characters for more information.
ParentNode.querySelectorAll() - Web APIs
since javascript also uses backslash esca
ping, special care must be taken when writing string literals using these characters.
... see esca
ping special characters for more information.
PaymentResponse.onpayerdetailchange - Web APIs
examples in the example below, onpayerdetailchange is used to set up a listener for the payerdetailchange event in order to validate the information entered by the user, requesting that any mistakes be corrected // options for paymentrequest(), indicating that ship
ping address, // payer email address, name, and phone number all be collected.
... const options = { requestship
ping: true, requestpayeremail: true, requestpayername: true, requestpayerphone: true, }; const request = new paymentrequest(methods, details, options); const response = request.show(); // get the data from the response let { payername: oldpayername, payeremail: oldpayeremail, payerphone: oldpayerphone, } = response; // set up a handler for payerdetailchange events, to // request corrections as needed.
PaymentResponse: payerdetailchange event - Web APIs
cancelable no interface paymentrequestupdateevent event handler property onpayerdetailchange examples in the example below, onpayerdetailchange is used to set up a listener for the payerdetailchange event in order to validate the information entered by the user, requesting that any mistakes be corrected // options for paymentrequest(), indicating that ship
ping address, // payer email address, name, and phone number all be collected.
... const options = { requestship
ping: true, requestpayeremail: true, requestpayername: true, requestpayerphone: true, }; const request = new paymentrequest(methods, details, options); const response = request.show(); // get the data from the response let { payername: oldpayername, payeremail: oldpayeremail, payerphone: oldpayerphone, } = response; // set up a handler for payerdetailchange events, to // request corrections as needed.
RTCRtpTransceiver.stop() - Web APIs
the stop() method in the rtcrtptransceiver interface permanently stops the transceiver by stop
ping both the associated rtcrtpsender and rtcrtpreceiver.
... note: stop
ping the transceiver causes a negotiationneeded event to be sent to the transceiver's rtcpeerconnection, so the connection can adapt to the change.
ReadableStream - Web APIs
readablestream.pipethrough() provides a chainable way of pi
ping the current stream through a transform stream or any other writable/readable pair.
... readablestream.pipeto() pipes the current readablestream to a given writablestream and returns a promise that fulfills when the pi
ping process completes successfully, or rejects if any errors were encountered.
Using the Screen Capture API - Web APIs
stop
ping display capture the stopcapture() method is called when the "stop capture" button is clicked.
... function stopcapture(evt) { let tracks = videoelem.srcobject.gettracks(); tracks.foreach(track => track.stop()); videoelem.srcobject = null; } dum
ping configuration information for informational purposes, the startcapture() method shown above calls a method named dumpoptions(), which outputs the current track settings as well as the constraints that were placed upon the stream when it was created.
SubtleCrypto - Web APIs
the wrapped key matches the format specified in the given parameters, and wrap
ping is done by the given wrap
ping key, using the specified algorithm.
... if the key is sensitive you should use wrapkey(), which exports the key and then encrypts it using another key; the api calls a "key-wrap
ping key".
WaveShaperNode.WaveShaperNode() - Web APIs
options optional options are as follows: curve: the sha
ping curve used for the wavesha
ping effect.
... oversample: specifies what type of oversampling (if any) should be used when applying the sha
ping curve.
WebGLRenderingContext - Web APIs
viewing and clip
ping webglrenderingcontext.scissor() defines the scissor box.
... webglrenderingcontext.depthrange() specifies the depth range map
ping from normalized device coordinates to window or viewport coordinates.
Raining rectangles - Web APIs
the game loop is responsible for drawing the animation frames, and kee
ping the animation responsive to user input.
... var diffpos = [ position[0] - rainingrect.position[0], position[1] - rainingrect.position[1] ]; if ( diffpos[0] >= 0 && diffpos[0] < rainingrect.size[0] && diffpos[1] >= 0 && diffpos[1] < rainingrect.size[1] ) { score += 1; scoredisplay.innerhtml = score; rainingrect = new rectangle(); } } function rectangle () { // kee
ping a reference to the new rectangle object, rather // than using the confusing this keyword.
Taking still photos with WebRTC - Web APIs
initialization we start by wrap
ping the whole script in an anonymous function to avoid global variables, then setting up various variables we'll be using.
... wrap
ping up the startup() method there are only two more lines of code in the startup() method: clearphoto(); } this is where we call the clearphoto() method we'll describe below in the section clearing the photo box.
Using WebRTC data channels - Web APIs
this makes it easy to write efficient routines that make sure there's always data ready to send without over-using memory or swam
ping the channel completely.
...with eor support in place, rtcdatachannel payloads can be much larger (officially up to 256kib, but firefox's implementation caps them at a whop
ping 1gib).
Fundamentals of WebXR - Web APIs
the overlap
ping area, which is sort of a shade of purple, is the area in which the viewer has binocular vision and, as a result, depth perception.
...these devices often work by snap
ping your phone into the headset so that its screen and onboard graphics processor can be used to render and display the xr scene.
Spaces and reference spaces: Spatial tracking in WebXR - Web APIs
because getviewerpose() is only available in an xrframe, you will need to begin this process in your rendering callback, possibly using a worker to do the computations in order to reduce frame drop
ping.
... on the other hand, if your app involves the user physically moving in real space to move around through your virtual world, simply adopting the new tracking position and jum
ping there can be unsettling to the user, and should be avoided if possible.
Starting up and shutting down a WebXR session - Web APIs
important: you should always test your code on actual ar and/or vr hardware before releasing or ship
ping a product!
... with the new reference space in hand and stored into the worlddata object for safe-kee
ping, we call the session's requestanimationframe() method to schedule a callback to be executed when it's time to render the next frame of animation for the webxr session.
Example and tutorial: Simple synth keyboard - Web APIs
the range element will typically be presented as a slider control; we configure it to allow any value between 0.0 and 1.0, step
ping by 0.01 each position.
... stop
ping a tone the notereleased() function is the event handler called when the user releases the mouse button or moves the mouse out of the key that's currently playing.
Web Audio API - Web APIs
dynamicscompressornode the dynamicscompressornode interface provides a compression effect, which lowers the volume of the loudest parts of the signal in order to help prevent clip
ping and distortion that can occur when multiple sounds are played and multiplexed together at once.
...it is an audionode that use a curve to apply a wavesha
ping distortion to the signal.
Using the Web Speech API - Web APIs
for this basic demo, we are just kee
ping things simple.
... browser support support for web speech api speech synthesis is still getting there across mainstream browsers, and is currently limited to the following: firefox desktop and mobile support it in gecko 42+ (windows)/44+, without prefixes, and it can be turned on by flip
ping the media.webspeech.synth.enabled flag to true in about:config.
XRInputSource - Web APIs
the orientation of this space indicates the angle at which the hand is grip
ping the object.
...a primary squeeze action should correspond to a grip
ping act in reality, such as taking hold of an object or pressing a trigger on a tool or weapon.
XRSession - Web APIs
this includes things such as the near and far clip
ping planes (distances defining how close and how far away objects can be and still get rendered), as well as field of view information.
...this indicates that the device being squeezed has been released, and may represent drop
ping a grabbed object, for example.
Web APIs
below is a list of all the apis and interfaces (object types) that you may be able to use while develo
ping your web app or site.
... blobevent bluetooth bluetoothadvertisingdata bluetoothcharacteristicproperties bluetoothdevice bluetoothremotegattcharacteristic bluetoothremotegattdescriptor bluetoothremotegattserver bluetoothremotegattservice body broadcastchannel budgetservice budgetstate buffersource bytelengthqueuingstrategy bytestring c cdatasection css cssconditionrule csscounterstylerule cssgrou
pingrule cssimagevalue csskeyframerule csskeyframesrule csskeywordvalue cssmathproduct cssmathsum cssmathvalue cssmediarule cssnamespacerule cssnumericvalue cssomstring csspagerule csspositionvalue cssprimitivevalue csspseudoelement cssrule cssrulelist cssstyledeclaration cssstylerule cssstylesheet cssstylevalue csssupportsrule cssunitvalue cssunparsedvalue cssvalue cssva...
ARIA: button role - Accessibility
aria-expanded if the button controls a grou
ping of other elements, the aria-expanded state indicates whether the controlled grou
ping is currently expanded or collapsed.
... if the button has aria-expanded="false" set, the grou
ping is not currently expanded; if the button has aria-expanded="true" set, it is currently expanded; if the button has aria-expanded="undefined" set or the attribute is ommitted, it is not expandable.
Cognitive accessibility - Accessibility
if you have added content to links for screen readers, and that content is verbose and potentially confusing to sighted readers, consider clip
ping the added text to visually hide it from those not using assistive technologies.
... be consistent and predictable, and use norms while unlabeled iconography is not the most effective method of conveying information, kee
ping the use of the icons (and if labeled, their label text) consistent helps people to understand what the icon represents.
HTML To MSAA - Accessibility
this table reflects map
ping rules for specific elements only, it doesn't reflect any general rules applicable to all elements.
...le_system_ whitespace '\n' (new line char) state_system_ readonly n/a n/a n/a button role_system_ pushbutton from child nodes n/a state_system_ focusable state_system_ default if @type attribute has value "submit" n/a "press" n/a caption bstr role n/a n/a n/a description_for (0x100f), points to table element div bstr role n/a n/a n/a n/a n/a n/a fieldset role_system_ grou
ping text equivalent from child legend element n/a n/a labelled_by (1003), points to legend element n/a n/a hr role_system_ separator n/a n/a n/a n/a n/a n/a img, input @type=image role_system_ graphic from @alt attribute, empty @alt attribute means name can't be calculated at all n/a state_system_ animated if image has more than one frame n/a "showlongdesc" if @longdesc attribute is presented...
Text labels and names - Accessibility
use a legend to label a fieldset when grou
ping a set of form elements together with a <fieldset> element, you should include a nested <legend> element inside it, containing a clear description of the group.
...do not rely on placeholder text, because it disappears as soon as the user starts ty
ping.
:disabled - CSS: Cascading Style Sheets
/* selects any disabled <input> */ input:disabled { background: #ccc; } syntax :disabled examples this example shows a basic ship
ping form.
... html <form action="#"> <fieldset id="ship
ping"> <legend>ship
ping address</legend> <input type="text" placeholder="name"> <input type="text" placeholder="address"> <input type="text" placeholder="zip code"> </fieldset> <br> <fieldset id="billing"> <legend>billing address</legend> <label for="billing-checkbox">same as ship
ping address:</label> <input type="checkbox" id="billing-checkbox" checked> <br> <input type="text" placeholder="name" disabled> <input type="text" placeholder="address" disabled> <input type="text" placeholder="zip code" disabled> </fieldset> </form> css input[type="text"]:disabled { background: #ccc; } javascript // wait for t...
In Flow and Out of Flow - CSS: Cascading Style Sheets
you can see the background colour of the following paragraph running underneath, it is only the line boxes of that paragraph that have been shortened to cause the effect of wrap
ping content around the float.
... when taking an item out of flow with positioning, you will need to manage the possibility of content overlap
ping.
Auto-placement in CSS Grid Layout - CSS: Cascading Style Sheets
grid-gap: 10px; } .wrapper div:nth-child(4n+1) { grid-column-end: span 2; grid-row-end: span 2; background-color: #ffa94d; } .wrapper div:nth-child(2) { grid-column: 3; grid-row: 2 / 4; } .wrapper div:nth-child(5) { grid-column: 1 / 3; grid-row: 1 / 3; } filling in the gaps so far, other than items we have specifically placed, grid is always progressing forward and kee
ping items in dom order.
...definition lists are an interesting challenge to style as they are flat, there is nothing wrap
ping the groups of dt and dd items.
Basic Concepts of grid layout - CSS: Cascading Style Sheets
control of overlap
ping content more than one item can be placed into a grid cell or area and, they can partially overlap each other.
... grid-row-start: 1; grid-row-end: 3; } .box2 { grid-column-start: 1; grid-row-start: 2; grid-row-end: 4; } * {box-sizing: border-box;} .wrapper { border: 2px solid #f76707; border-radius: 5px; background-color: #fff4e6; } .box { border: 2px solid #ffa94d; border-radius: 5px; background-color: #ffd8a8; padding: 1em; color: #d9480f; } the item box2 is now overlap
ping box1, it displays on top as it comes later in the source order.
CSS reference - CSS: Cascading Style Sheets
universal selector *, ns|*, *|*, |* type selector elementname class selector .classname id selector #idname attribute selector [attr=value] grou
ping selectors selector list a, b specifies that both a and b elements are selected.
... this is a grou
ping method to select several matching elements.
Adapting to the new two-value syntax of display - CSS: Cascading Style Sheets
there are map
pings for all of the existing values of display; the most common ones are listed in the table below.
... the single values of display are described in the specification as legacy values, and currently you gain no benefit from using the two-value versions, as there is a direct map
ping for each two-value version to a legacy version, as demonstrated in the table above.
display - CSS: Cascading Style Sheets
inline-table the inline-table value does not have a direct map
ping in html.
...x 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 wrap
ping 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-based placement grid template areas layout using named grid lines auto-placement in grid layout box alignment in grid layout grids, logical values and ...
line-break - CSS: Cascading Style Sheets
the different wrap
ping opportunities must not be prioritized.
... formal definition initial valueautoapplies toall elementsinheritedyescomputed valueas specifiedanimation typediscrete formal syntax auto | loose | normal | strict | anywhere examples setting text wrap
ping see whether the text is wrapped before "々", "ぁ" and "。".
mask - CSS: Cascading Style Sheets
the mask css shorthand property hides an element (partially or fully) by masking or clip
ping the image at specific points.
...h and height of 50px */ mask: url(masks.svg#star) repeat-x; /* element within svg graphic used as horizontally repeated mask */ mask: url(masks.svg#star) stroke-box; /* element within svg graphic used as mask extending to the box enclosed by the stroke */ mask: url(masks.svg#star) exclude; /* element within svg graphic used as mask and combined with background using non-overlap
ping parts */ /* global values */ mask: inherit; mask: initial; mask: unset; /* multiple masks */ mask: url(masks.svg#star) left / 16px repeat-y, /* element within svg graphic is used as a mask on the left-hand side with a width of 16px */ url(masks.svg#circle) right / 16px repeat-y; /* element within svg graphic is used as a mask on the right-hand side with a width of 16px */ values <...
Guide to scroll anchoring - CSS: Cascading Style Sheets
scroll anchoring is a browser feature that aims to solve this problem of content jum
ping, which happens if content loads in after the user has already scrolled to a new part of the document.
...in most cases anchored scrolling is exactly what you want — content jum
ping is a poor experience for anyone.
scroll-margin-inline-end - CSS: Cascading Style Sheets
the scroll-margin-inline-end property defines the margin of the scroll snap area at the end of the inline dimension that is used for snap
ping this box to the snapport.
...the outer container is styled like this: .scroller { text-align: left; width: 250px; height: 250px; overflow-x: scroll; display: flex; box-sizing: border-box; border: 1px solid #000; scroll-snap-type: x mandatory; } the main parts relevant to the scroll snap
ping are overflow-x: scroll, which makes sure the contents will scroll and not be hidden, and scroll-snap-type: x mandatory, which dictates that scroll snap
ping must occur along the horizontal axis, and the scrolling will always come to rest on a snap point.
scroll-margin-inline-start - CSS: Cascading Style Sheets
the scroll-margin-inline-start property defines the margin of the scroll snap area at the start of the inline dimension that is used for snap
ping this box to the snapport.
...the outer container is styled like this: .scroller { text-align: left; width: 250px; height: 250px; overflow-x: scroll; display: flex; box-sizing: border-box; border: 1px solid #000; scroll-snap-type: x mandatory; } the main parts relevant to the scroll snap
ping are overflow-x: scroll, which makes sure the contents will scroll and not be hidden, and scroll-snap-type: x mandatory, which dictates that scroll snap
ping must occur along the horizontal axis, and the scrolling will always come to rest on a snap point.
scroll-margin-inline - CSS: Cascading Style Sheets
description the scroll-margin values represent outsets defining the scroll snap area that is used for snap
ping this box to the snapport.
...the outer container is styled like this: .scroller { text-align: left; width: 250px; height: 250px; overflow-x: scroll; display: flex; box-sizing: border-box; border: 1px solid #000; scroll-snap-type: x mandatory; } the main parts relevant to the scroll snap
ping are overflow-x: scroll, which makes sure the contents will scroll and not be hidden, and scroll-snap-type: x mandatory, which dictates that scroll snap
ping must occur along the horizontal axis, and the scrolling will always come to rest on a snap point.
scroll-margin - CSS: Cascading Style Sheets
thus, the scroll-margin values represent outsets defining the scroll snap area that is used for snap
ping this box to the snapport.
...the outer container is styled like this: .scroller { text-align: left; width: 250px; height: 250px; overflow-x: scroll; display: flex; box-sizing: border-box; border: 1px solid #000; scroll-snap-type: x mandatory; } the main parts relevant to the scroll snap
ping are overflow-x: scroll, which makes sure the contents will scroll and not be hidden, and scroll-snap-type: x mandatory, which dictates that scroll snap
ping must occur along the horizontal axis, and the scrolling will always come to rest on a snap point.
text-transform - CSS: Cascading Style Sheets
the text-transform property takes into account language-specific case map
ping rules such as the following: in turkic languages, like turkish (tr), azerbaijani (az), crimean tatar (crh), volga tatar (tt), and bashkir (ba), there are two kinds of i, with and without the dot, and two case pairings: i/İ and ı/i.
... authors should not expect capitalize to follow language-specific title casing conventions (such as skip
ping articles in english).
white-space - CSS: Cascading Style Sheets
nowrap collapses white space as for normal, but suppresses line breaks (text wrap
ping) within the source.
... the following table summarizes the behavior of the various white-space values: new lines spaces and tabs text wrap
ping end-of-line spaces normal collapse collapse wrap remove nowrap collapse collapse no wrap remove pre preserve preserve no wrap preserve pre-wrap preserve preserve wrap hang pre-line preserve collapse wrap remove break-spaces preserve preserve wrap wrap formal ...
Introduction to Web development - Developer guides
for another (overlap
ping) set of links to learning resources, see the mdn learning pages.
... common css questions — common questions and answers for beginners intermediate css concepts — grou
ping, pseudo-classes and more.
User input and controls - Developer guides
finger touch when develo
ping web applications meant to be installed on touchscreen devices, it’s a good practice to take into consideration the different capabilities in terms of screen resolution and user input.
... tutorials touch events guide managing screen orientation using fullscreen mode dragging and drop
ping multiple items drag operations guide reference mouseevent keyboardevent touch events pointer_lock_api screen orientation api fullscreen api drag & drop content editable ...
HTML attribute: rel - HTML: Hypertext Markup Language
not allowed annotation annotation
pingback gives the address of the
pingback server that handles
pingbacks to the current document.
...
pingback gives the address of the
pingback server that handles
pingbacks to the current document.
<h1>–<h6>: The HTML Section Heading elements - HTML: Hypertext Markup Language
avoid skip
ping heading levels: always start from <h1>, next use <h2> and so on.
... <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 jum
ping from heading to heading to quickly determine the content of the page.
<button>: The Button element - HTML: Hypertext Markup Language
you have to set a form owner, either by wrap
ping it in a <form> or set the attribute form to the id of the form.
... desktop browsers windows 8.1 os x 10.x firefox yes - firefox 30.0 no (even with a tabindex) firefox 63 chrome yes - chrome 35 yes - chrome 65 safari n/a no (even with a tabindex) safari 12 (bug 22261) internet explorer yes - internet explorer 11 n/a presto yes - opera 12 yes - opera 12 does tap
ping on a <button> give it focus?
<dl>: The Description List element - HTML: Hypertext Markup Language
<dl> <dt>name</dt> <dd>godzilla</dd> <dt>born</dt> <dd>1952</dd> <dt>birthplace</dt> <dd>japan</dd> <dt>color</dt> <dd>green</dd> </dl> tip: it can be handy to define a key-value separator in the css, such as: dt::after { content: ": "; } wrap
ping name-value groups in <div> elements whatwg html allows wrap
ping each name-value group in a <dl> element in a <div> element.
...because of this, make sure each list item's content is written in such a way that it communicates its relationship to the other list items in the list grou
ping.
<table>: The Table element - HTML: Hypertext Markup Language
mdn adding a caption to your table with <caption> caption & summary • tables • w3c wai web accessibility tutorials sco
ping rows and columns the scope attribute on header elements is redundant in simple contexts, because scope is inferred.
...in addition to hel
ping 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.
HTML elements reference - HTML: Hypertext Markup Language
<optgroup> the html <optgroup> element creates a grou
ping of options within a <select> element.
... <nobr> the non-standard, obsolete html <nobr> element prevents the text it contains from automatically wrap
ping across multiple lines, potentially resulting in the user having to scroll horizontally to see the entire width of the text.
HTTP conditional requests - HTTP
integrity of a partial download partial downloading of files is a functionality of http that allows to resume previous operations, saving bandwidth and time, by kee
ping the already obtained information: a server supporting partial downloads broadcasts this by sending the accept-ranges header.
...it is then up to the client to deal with the error: either by notifying the user to start again (this time on the newest version), or by showing the user a diff of both versions, hel
ping them decide which changes they wish to keep.
Using HTTP cookies - HTTP
typically, it's used to tell if two requests came from the same browser — kee
ping a user logged-in, for example.
... cookies are mainly used for three purposes: session management logins, shop
ping 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.
CSP: connect-src - HTTP
the apis that are restricted are: <a>
ping, fetch, xmlhttprequest, websocket, eventsource, and navigator.sendbeacon().
... examples violation cases given this csp header: content-security-policy: connect-src https://example.com/ the following connections are blocked and won't load: <a
ping="https://not-example.com"> <script> var xhr = new xmlhttprequest(); xhr.open('get', 'https://not-example.com/'); xhr.send(); var ws = new websocket("https://not-example.com/"); var es = new eventsource("https://not-example.com/"); navigator.sendbeacon("https://not-example.com/", { ...
A re-introduction to JavaScript (JS tutorial) - JavaScript
the first is good for basic loo
ping; 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!
...in this way, we can pass in any number of arguments into the function while kee
ping our code minimal.
Grammar and types - JavaScript
esca
ping characters for characters not listed in the table, a preceding backslash is ignored, but this usage is deprecated and should be avoided.
...this is known as esca
ping the quotation mark.
SyntaxError: missing ; before statement - JavaScript
however, oftentimes, this error is only a consequence of another error, like not esca
ping strings properly, or using var wrongly.
... examples unescaped strings this error can occur easily when not esca
ping strings properly and the javascript engine is expecting the end of your string already.
Intl.Locale.prototype.hourCycle - JavaScript
the intl.locale.prototype.hourcycle property is an accessor property that returns the time kee
ping format convention used by the locale.
... description there are 2 main types of time kee
ping conventions (clocks) used around the world: the 12 hour clock and the 24 hour clock.
Intl.NumberFormat.prototype.resolvedOptions() - JavaScript
usegrou
ping the values provided for these properties in the options argument or filled in as defaults.
...ns = de.resolvedoptions(); usedoptions.locale; // "de-de" usedoptions.numberingsystem; // "latn" usedoptions.notation; // "standard" usedoptions.signdisplay; // "auto" usedoption.style; // "decimal" usedoptions.minimumintegerdigits; // 1 usedoptions.minimumfractiondigits; // 0 usedoptions.maximumfractiondigits; // 3 usedoptions.usegrou
ping; // true specifications specification ecmascript internationalization api (ecma-402)the definition of 'intl.numberformat.prototype.resolvedoptions' in that specification.
TypedArray.prototype.map() - JavaScript
examples map
ping a typed array to a typed array of square roots the following code takes a typed array and creates a new typed array containing the square roots of the numbers in the first typed array.
... const numbers = new uint8array([1, 4, 9]); const roots = numbers.map(math.sqrt); // roots is now: uint8array [1, 2, 3], // numbers is still uint8array [1, 4, 9] map
ping a typed array of numbers using a function containing an argument the following code shows how map works when a function requiring one argument is used with it.
eval() - JavaScript
"a.b.c" eval( 'var result = obj.' + proppath ); avoiding eval() here could be done by splitting the property path and loo
ping through the different properties: function getdescendantprop(obj, desc) { var arr = desc.split('.'); while (arr.length) { obj = obj[arr.shift()]; } return obj; } var obj = {a: {b: {c: 0}}}; var proppath = getproppath(); // returns e.g.
... pass data instead of code for example, an extension designed to scrape contents of web-pages could have the scra
ping rules defined in xpath instead of javascript code.
Destructuring assignment - JavaScript
let a, b; [a=5, b=7] = [1]; console.log(a); // 1 console.log(b); // 7 swap
ping variables two variables values can be swapped in one destructuring expression.
... without destructuring assignment, swap
ping two values requires a temporary variable (or, in some low-level languages, the xor-swap trick).
block - JavaScript
examples block sco
ping rules with var or function declaration in non-strict mode variables declared with var or created by function declarations in non-strict mode do not have block scope.
... block sco
ping rules with let, const or function declaration in strict mode by contrast, identifiers declared with let and const do have block scope: let x = 1; { let x = 2; } console.log(x); // logs 1 the x = 2 is limited in scope to the block in which it was defined.
let - JavaScript
examples sco
ping rules variables declared by let have their scope in the block for which they are defined, as well as in any contained sub-blocks.
...ply undeclared variables and variables that hold a value of undefined, using the typeof operator to check for the type of a variable in that variable's temporal dead zone will throw a referenceerror: // prints out 'undefined' console.log(typeof undeclaredvariable); // results in a 'referenceerror' console.log(typeof i); let i = 10; another example of temporal dead zone combined with lexical sco
ping due to lexical sco
ping, the identifier foo inside the expression (foo + 55) evaluates to the if block's foo, and not the overlying variable foo with the value of 33.
Autoplay guide for media and Web Audio APIs - Web media technologies
autoplay availability as a general rule, you can assume that media will be allowed to autoplay only if at least one of the following is true: the audio is muted or its volume is set to 0 the user has interacted with the site (by clicking, tap
ping, pressing keys, etc.) if the site has been whitelisted; this may happen either automatically if the browser determines that the user engages with media frequently, or manually through preferences or other user interface features if the autoplay feature policy is used to grant autoplay support to an <iframe> and its document.
... autoplay of media elements now that we've covered what autoplay is and what can prevent autoplay from being allowed, we'll look at how your web site or app can automatically play media upon page load, how to detect when autoplay fails to occur, and tips for co
ping when autoplay is denied by the browser.
Image file type and format guide - Web media technologies
png (portable network graphics) the png (pronounced "
ping") image format uses lossless or lossy compression to provide more efficient compression, and supports higher color depths than gif, as well as full alpha transparency support.
...loo
ping is supported.
Web Performance
resource timing api resource loading and timing the loading of those resources, including managing the resource buffer and co
ping with cors the performance timeline the performance timeline standard defines extensions to the performance interface to support client-side latency measurements within applications.
... web performance checklist a performance checklist of features to consider when develo
ping applications with links to tutorials on how to implement each feature, include service workers, diagnosing performance problems, font loading best practices, client hints, creating performant animations, etc.
Privacy, permissions, and information security
privacy and security controls there are multiple layers of controls for hel
ping to protect users against security and privacy breaches.
... kee
ping personal data safe managing site permissions bringing it all together <using feature policy with permissions and so forth; how to use them together, how they interact, etc> permission requests in <iframe> elements things can get tricky when your web app uses the <iframe> element to embed content from another site inside your own, especially if the document you load into the frame has its own...
How to make PWAs installable - Progressive web apps (PWAs)
these technologies allow the app to be launched directly from the device's home screen, rather than the user having to open the browser and then navigate to the site by using a bookmark or ty
ping the url.
...if develo
ping your app using firefox, be aware that you will need a service worker to be compatible with chromium-based browsers.
Introduction to progressive web apps - Progressive web apps (PWAs)
you can install a native app so that it works offline, and users love tap
ping their icons to easily access their favorite apps, rather than navigating to it using a browser.
... safety the web platform provides a secure delivery mechanism that prevents snoo
ping while simultaneously ensuring that content hasn’t been tampered with, as long as you take advantage of https and develop your apps with security in mind.
Mobile first - Progressive web apps (PWAs)
therefore we should try to simplify things on mobile, kee
ping each view cut down to a single, simple purpose where possible, and reducing the amount of ty
ping users are expected to do.
... mobile navigation when develo
ping mobile app layouts, you often run into problems with navigation menus.
clip-rule - SVG: Scalable Vector Graphics
the following fragment of code will cause an evenodd clip
ping rule to be applied to the clip
ping path because clip-rule is specified on the <path> element that defines the clip
ping shape: <g> <clippath id="myclip"> <path d="..." clip-rule="evenodd" /> </clippath> <rect clip-path="url(#myclip)" ...
... /> </g> whereas the following fragment of code will not cause an evenodd clip
ping rule to be applied because the clip-rule is specified on the referencing element, not on the object defining the clip
ping shape: <g> <clippath id="myclip"> <path d="..." /> </clippath> <rect clip-path="url(#myclip)" clip-rule="evenodd" ...
clipPathUnits - SVG: Scalable Vector Graphics
value userspaceonuse | objectboundingbox default value userspaceonuse animatable yes userspaceonuse this value indicates that all coordinates inside the <clippath> element refer to the user coordinate system as defined when the clip
ping path was created.
... objectboundingbox this value indicates that all coordinates inside the <clippath> element are relative to the bounding box of the element the clip
ping path is applied to.
SVG 2 support in Mozilla - SVG: Scalable Vector Graphics
aving systemlanguage attribute according to allowreorder smil attribute implementation status unknown made <tspan> and <textpath> graphics elements implementation status unknown allow x, y, width, and height on <symbol> implementation status unknown made <use> element shadow trees consistent with shadow dom spec implementation status unknown role map
ping of <a> element depending on whether it is a valid link implementation status unknown aria state and property attributes animatable implementation status unknown styling change notes contentstyletype attribute removed implementation status unknown linkstyle on svgstyleelement implemented (bug 1239128 (firefox 46.0 / thunderbird 46.0 / ...
...mplemented (bug 1238882) <meshrow> (renamed meshrow) not implemented (bug 1238882) <meshpatch> (renamed meshpatch) not implemented (bug 1238882) <hatch> not implemented (bug 1239147) <hatchpath> (renamed hatchpath) not implemented (bug 1239147) display behavior of paint server elements defined by ua style sheet not implemented clip
ping, masking, and compositing change notes overflow respected on outermost <svg> elements inline in html implementation status unknown interactivity change notes tabindex attribute implemented (bug 778654) bounding-box on pointer-events not implemented (bug 945187) load, abort, error, and unload instead of svgload, ...
SVG Tutorial - SVG: Scalable Vector Graphics
if you're able, please help out by chip
ping in and writing a paragraph or two.
... introducing svg from scratch introduction getting started positions basic shapes paths fills and strokes gradients patterns texts basic transformations clip
ping and masking other content in svg filter effects svg fonts svg image tag tools for svg svg and css the following topics are more advanced and hence should get their own tutorials.
<xsl:decimal-format> - XSLT: Extensible Stylesheet Language Transformations
syntax <xsl:decimal-format name=name decimal-separator=character grou
ping-separator=character infinity=string minus-sign=character nan=string percent=character per-mille=charater zero-digit=character digit=character pattern-separator=character /> required attributes none.
... grou
ping-separator specifies the thousands separator character.
<xsl:text> - XSLT: Extensible Stylesheet Language Transformations
syntax <xsl:text disable-output-esca
ping="yes" | "no"> text </xsl:text> required attributes none.
... optional attributes disable-output-esca
ping (netscape does not serialize the result of transformation - the "output" below - so this attribute is essentially irrelevant in context.
<xsl:value-of> - XSLT: Extensible Stylesheet Language Transformations
syntax <xsl:value-of select=expression disable-output-esca
ping="yes" | "no" /> required attributes select specifies the xpath expression to be evaluated and written to the output tree.
... optional attributes disable-output-esca
ping (netscape does not serialize the result of transformation - the "output" below - so this attribute is essentially irrelevant in context.
Modules - Archive of obsolete content
the module system used by the sdk is based on the commonjs specification: it is implemented using a loader object, which handles all the bookkee
ping related to module loading, such as resolving and caching urls.
Module structure of the SDK - Archive of obsolete content
except for scripts that interact directly with web content, all the javascript code you'll write or use when develo
ping add-ons using the sdk is part of a commonjs module, including: sdk modules: the javascript modules which the sdk provides, such as panel and page-mod.
cfx to jpm - Archive of obsolete content
permanently removed fields data fullname - use title instead lib packages tests icon64 package.json esca
ping where with cfx you might have had to escape with 2 upto 3 backslashes ( \ ), jpm only needs one now.
console - Archive of obsolete content
if you're develo
ping your add-on using the extension auto-installer, then the add-on is installed in firefox, meaning that messages will appear in the browser console.
Getting Started (jpm) - Archive of obsolete content
summary in this tutorial we've built and packaged an add-on using three commands: jpm init to initialize an empty add-on template jpm run to run a new instance of firefox with the add-on installed, so we can try it out jpm xpi to package the add-on into an xpi file for distribution these are the three main commands you'll use when develo
ping sdk add-ons.
Localization - Archive of obsolete content
english has two forms, which can be described by map
ping "1" to "one" and "everything else" to "other": one → n is 1; other → everything else russian uses four forms, that can be described as follows: one → n mod 10 is 1 and n mod 100 is not 11; few → n mod 10 in 2..4 and n mod 100 not in 12..14; many → n mod 10 is 0 or n mod 10 in 5..9 or n mod 100 in 11..14; other → everything else plural rules for all languages can be found ...
HTML in XUL for rich tooltips - Archive of obsolete content
he mouse is over (which will soon launch the tooltip) var txt = event.target.getattribute("tooltiphtml"); // get the html div element that is inside the custom xul tooltip var div = document.getelementbyid("myhtmltipdiv"); //clear the html div element of any prior shown custom html while(div.firstchild) div.removechild(div.firstchild); //safely convert html string to a simple dom object, strip
ping it of javascript and more complex tags var injecthtml = components.classes["@mozilla.org/feed-unescapehtml;1"] .getservice(components.interfaces.nsiscriptableunescapehtml) .parsefragment(txt, false, null, div); //attach the dom object to the html div element div.appendchild(injecthtml); } } window.addeventlistener('load', htmltip.onload, false); in the xul overlay, xmlns:html is used to ena...
Preferences - Archive of obsolete content
er.register(); and next, here is a more evolved version of the previous code better fit for code reuse both within a project and across projects (for example, using javascript code modules): /** * @constructor * * @param {string} branch_name * @param {function} callback must have the following arguments: * branch, pref_leaf_name */ function preflistener(branch_name, callback) { // kee
ping a reference to the observed preference branch or it will get // garbage collected.
Progress Listeners - Archive of obsolete content
using the following code, you will get notified when user navigates to another page (by clicking a link, using the back/forward button, by ty
ping an address in the location bar, etc.) and also when user switches tabs.
getAttributeNS - Archive of obsolete content
return thisitem.getattribute('xml:'+nsatt); // prefix must be 'xml' per the specs } var attrs2, result; var attrs = thisitem.attributes; var prefixatt = new regexp('^(.*):'+nsatt.replace(/\./g, '\\.')+'$'); // e.g., xlink:href // find any prefixes with the local-name being searched (escape period since only character (besides colon) allowed in an xml name which needs esca
ping) for (var j = 0; j < attrs.length; j++) { // thisitem's atts // e.g., abc:href, xlink:href while (((result = prefixatt.exec(attrs[j].nodename)) !== null) && thisitem.nodename !== '#document' && thisitem.nodename !== '#document-fragment') { var xmlnsprefix = new regexp('^xmlns:'+result[1]+'$'); // e.g., xmnls:xl, xmlns:xlink // check higher ...
List of Former Mozilla-Based Applications - Archive of obsolete content
old article available about how borland embedded mozilla in kylix 2 mango im client last news item on site from january 2007 mobidvd dvd/vcd/cd rip
ping software site down mozilla suite internet application suite development shifted to firefox, thunderbird and seamonkey applications netscape navigator browser support for netscape ended on february 1, 2008 nvu web authoring tool development stopped in 2005 and is being continued as an unofficial bugfix release by the kompozer project pogo ...
Localizing an extension - Archive of obsolete content
the stockwatcher2.dtd file contains the map
pings for the stockwatcher2.xul file: <!entity panel_loading "loading..."> <!entity menu_refresh_now.label "refresh now"> <!entity menu_apple.label "apple (aapl)"> <!entity menu_google.label "google (goog)"> <!entity menu_microsoft.label "microsoft (msft)"> <!entity menu_yahoo.label "yahoo (yhoo)"> update the xul files each xul file needs to reference its corresponding locale file.
Source Navigator - Archive of obsolete content
source navigator then loads the database and then display the following symbols window: searching a method by ty
ping in the method name viewing the definition/declaration by highlighting the method in the code ...
Protecting Mozilla's registry.dat file - Archive of obsolete content
in other windows versions, internet explorer (which is hard to kick off completely) likes to install "personnalized settings" when the user logs in for the first time, and this seems to have the interesting "side-effect" of wi
ping any non-microsoft subfolders from %userprofile%\application data, including mozilla's .
Creating a Firefox sidebar extension - Archive of obsolete content
chrome.manifest content emptysidebar chrome/content/ locale emptysidebar en-us chrome/locale/ skin emptysidebar classic/1.0 chrome/skin/ overlay chrome://browser/content/browser.xul chrome://emptysidebar/content/firefoxoverlay.xul test while you're develo
ping your sidebar, you will need to test it frequently from firefox.
Code snippets - Archive of obsolete content
components.utils.import("resource://services-sync/main.js"); weave.service._freshstart(); // if you want to do it without wi
ping the server (which will cause corruption!): weave.service.generatenewsymmetrickeys(); print out a list of large bookmark records // change '1000' as appropriate.
Firefox Sync - Archive of obsolete content
related info javascript client api (useful for interacting with sync from mozilla applications, including develo
ping extensions against sync) syncing custom preferences (useful for extension developers) code snippets (demonstrates common actions with the javascript api) ...
GRE - Archive of obsolete content
xulrunner: the new gre xulrunner is the new version of the gre, which not only allows embedding but is capable of bootstrap
ping entire xul applications such as firefox.
BundleLibrary - Archive of obsolete content
aol email : aolemail.webapp bbc radio player bbcradioplayer.webapp bloglines : bloglines.webapp bloglines beta: beta.bloglines.webapp chandler: chandler.webapp flash earth (integrates all major map
ping sites) flashearth.webapp flickr: flickr.webapp gollum wikipedia browser in english:gollum_en.webapp google notebook: gnote.webapp google page creator: google_pagecreator.webapp google reader + gtalk : prism-bundle-google-reader-with-gtalk.webapp google webmaster tools: google_webmastertools.webapp grandcentral inbox: grandc.webapp (note: grandcentral requires the flash plugin.
Extensions - Archive of obsolete content
then install the extension by either dragging and drop
ping the extension onto the dialog, or by clicking the “install…” button, navigating to the extension and selecting it for installation.
Table Layout Strategy - Archive of obsolete content
so we specify it (this breaks in some other browsers) <col width="0*"><col><tbody></tbody>foobar <table border width="200px"> <col width="0*"><col> <tbody> <tr><td>foo</td><td>bar</td></tr> </tbody> </table> this shrink wrap
ping width has usually the suffix 0proportional effective columns <tbody></tbody>foobarbazzap <table width="200px" border> <tbody> <tr><td>foo</td><td colspan="2" width="120px">bar</td></tr> <tr><td>baz</td><td>zap</td></tr> </tbody> </table> the colspan here is bogus, so the third column should not get any width.
Tuning Pageload - Archive of obsolete content
as in, if the user is moving the mouse or ty
ping in that window, we'll be more responsive; if there is no user activity, we will aim for less parser interruption and less responsiveness but lower overall load time.
Venkman - Archive of obsolete content
related topics javascript, web development, develo
ping mozilla original document information author(s): robert ginda other contributors: doctor unclear last updated date: july 13, 2007 copyright information: portions of this content are © 1998–2007 by individual mozilla.org contributors; content available under a creative commons license | details.
XBL 1.0 Reference - Archive of obsolete content
implementation constructor destructor field property getter setter method parameter body handlers handler resources stylesheet image binding attachment and detachment attachment using css attachment using element.style property <constructor> call <destructor> call binding documents dom interfaces the nsidomdocumentxbl interface anonymous content introduction sco
ping and access using the dom content generation rules for generation attribute forwarding insertion points <children> handling dom changes event flow and targeting flow and targeting across scopes focus and blur events mouseover and mouseout events anonymous content and css selectors and scopes binding stylesheets binding implementations ...
XBL - Archive of obsolete content
still living "shadow dom" related specs shadow dom (editor's draft) css sco
ping » shadow encapsulation see also introduction to xbl from the xul tutorial.
addFile - Archive of obsolete content
some file transfer programs will convert apple binaries to this format on transfer if you transfer them from a macintosh to a unix/windows machine before zip
ping up those files on that target system.
newlines - Archive of obsolete content
possible values: pasteintact paste newlines unchanged pastetofirst paste text up to the first newline, drop
ping the rest of the text replacewithcommas pastes the text with the newlines replaced with commas replacewithspaces pastes the text with newlines replaced with spaces strip pastes the text with the newlines removed stripsurroundingwhitespace pastes the text with newlines and adjacent whitespace removed ...
popupanchor - Archive of obsolete content
anchor to the bottom right cornersyntax<element popupanchor="none | topleft | topright | bottomleft | bottomright" /> example<element id="edit-context" popup="editor-popup" popupanchor="topleft" popupalign="bottomright" /> notesthe popupanchor attribute can be used to specify that the popup content should come up anchored to one of the four corners of the content object (e.g., the button pop
ping up the content).
statustext - Archive of obsolete content
example <!-- sets the status message when mouse is over buttons --> <button label="connect" statustext="connect to remote server" onmouseover="setstatusmessage(this)" onmouseout="clearstatusmessage()"/> <button label="
ping" statustext="
ping the server" onmouseover="setstatusmessage(this)" onmouseout="clearstatusmessage()"/> <statusbar> <statusbarpanel id="mystatuspanel" label="" flex="1"/> <spacer flex="1"/> </statusbar> <script> function setstatusmessage(obj){ document.getelementbyid('mystatuspanel').label = obj.getattribute('statustext'); } function clearstatusmessage(obj){ document.getelementbyid...
MenuItems - Archive of obsolete content
if (gundobuffertype == "ty
ping") menuitem.label = "undo ty
ping"; else if (gundobuffertype == "paste") menuitem.label = "undo paste"; else menuitem.label = "undo"; see modifying a menu for examples of how to add and remove items from a menu ...
PopupKeys - Archive of obsolete content
the following table lists the keys that are checked, and what the menu keyboard listener does in response: cursor up/down move the highlight within the menu up or down, wrap
ping around if necessary.
Providing Command-Line Options - Archive of obsolete content
ehandler.idl // specifically, flag descriptions should start at // character 24, and lines should be wrapped at // 72 characters with embedded newlines, // and finally, the string should end with a newline helpinfo : " -myapp open my application\n" + " -viewapp <uri> view and edit the uri in my application,\n" + " wrap
ping this description\n" }; var nsgetfactory = xpcomutils.generatensgetfactory([commandlinehandler]); ...
Sorting and filtering a custom tree view - Archive of obsolete content
this way, we don't have to deal with //map
ping between the two data.push({name: "leonardo", description: "leader", weapon: "dual katanas"}); data.push({name: "michaelangelo", description: "party dude", weapon: "nunchaku"}); data.push({name: "donatello", description: "does machines", weapon: "bo"}); data.push({name: "raphael", description: "cool, but rude", weapon: "sai"}); data.push({name: "splinter", description: "rat", weapon: "wa...
hbox - Archive of obsolete content
example <!-- two button on the right --> <hbox> <spacer flex="1"/> <button label="connect"/> <button label="
ping"/> </hbox> attributes inherited from xul element align, allowevents, allownegativeassertions, class, coalesceduplicatearcs, collapsed, container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup...
iframe - Archive of obsolete content
f.net" /> <menuitem label="freshmeat" value="http://freshmeat.net"/> </menupopup> </menulist> <iframe id="myframe" flex="1"/> <script> function donav(obj) { var url = obj.selecteditem.value; // note the firstchild is the menupopup element document.getelementbyid('myframe').setattribute('src', url); } </script> attributes showcaret type: boolean whether or not to cause a ty
ping caret to be visible in the content area.
Getting started with XULRunner - Archive of obsolete content
he 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 ty
ping: /library/frameworks/xul.framework/xulrunner-bin "/<full path>/testapp/application.ini" note: the full path is required or a "error: couldn't parse application.ini."-message will be returned.
2006-11-22 - Archive of obsolete content
if anyone has experience with these issues, and is comfortable hel
ping out in the mozilla/accessible module, would you please take a look at https://bugzilla.mozilla.org/show_bug.cgi?id=166994 he stated that he almost had it working a couple of years ago.
2006-10-06 - Archive of obsolete content
discussion highlights: ziga sancin suggests writing an introductory article for potential developers containing basic project information (history, list of main developers, project goals, roadmap and available communication channels, etc), tools needed to start develo
ping and building tb, documentation on source structure as well as links to help one get started on the project.
2006-10-20 - Archive of obsolete content
help required designing new home for quality.mozilla.org - talented web designers and/or artists interested in hel
ping the design for quality.mozilla.org please read this posting.
2006-11-10 - Archive of obsolete content
discussions develo
ping an extension like xmlhttprequest / nsidocument / mozilla_internal_api a discussion on how to develop an extension similar to xmlhttprequest but for a different protocol than http, emulating the asynchronous aspect.
2006-11-24 - Archive of obsolete content
discussions tutorials: non c++ bindings for xpcom tutorials on how to interface with firefox using xpcom on a similar basis to how a developer can with internet explorer through it's com interface tutorals and references related to extension development tutorials on develo
ping extensions which use the third party libraries for firefox references to mozilla api exposed javascript component + xmldocument not accessible a discussion on error: uncaught exception: permission denied to get property xmldocument.textcontent creating xpcom components a good discussion about "components.classes[cid] has no properties" error firefox http explanation about how firefox handles the http ...
NPVariant - Archive of obsolete content
javascript type to npvarianttype enumeration map
ping when using npvariants to access javascript objects in the browser, or vise versa, the map
ping of javascript values to npvariants is as follows: javascript type npvarianttype undefined npvarianttype_void null npvarianttype_null boolean npvarianttype_bool number npvarianttype_int32 or npvari...
Plugins - Archive of obsolete content
ship
ping a plugin as a toolkit bundle plugins can be shipped as a toolkit bundle, allowing a user to easily install, uninstall and manage their personal plugins.
Atomic RSS - Archive of obsolete content
documentation selected articles atomic rss tim bray talks about using atom 1.0 as a micro format and extension module for rss 2.0; kee
ping rss 2.0 as your sydication format but bringing in and using selected atom 1.0 elements.
RSS - Archive of obsolete content
atomic rss tim bray talks about using atom 1.0 as a micro format and extension module for rss 2.0; kee
ping rss 2.0 as your sydication format but bringing in and using selected atom 1.0 elements.
SAX - Archive of obsolete content
space='" + uri + "', localname='" + localname + "', qname='" + qname + "'"); }, characters: function(value) { print("characters: " + value); }, processinginstruction: function(target, data) { print("processinginstruction: target='" + target + "', data='" + data + "'"); }, ignorablewhitespace: function(whitespace) { // don't care }, startprefixmap
ping: function(prefix, uri) { // don't care }, endprefixmap
ping: function(prefix) { // don't care }, // nsisupports queryinterface: function(iid) { if(!iid.equals(components.interfaces.nsisupports) && !iid.equals(components.interfaces.nsisaxcontenthandler)) throw components.results.ns_error_no_interface; return this; } }; start parsing the xml reader compo...
Security - Archive of obsolete content
digital signaturesencryption and decryption address the problem of eavesdrop
ping, one of the three internet security issues mentioned at the beginning of this document.
UUID - Archive of obsolete content
uuid: universal unique identifier a uuid can be obtained by visiting http://www.famkruithof.net/uuid/uuidgen or by ty
ping "firebot: uuid?" on irc.mozilla.org in a channel where nickname "firebot" is present.
Using the W3C DOM - Archive of obsolete content
ml speed and performance comparison between innerhtml attribute and dom's nodevalue when modifying the text data of a text node by gérard talbot interactive dom level 2 characterdata interface attributes and methods tests: other ways to modify (replace, delete, manipulate) efficiently text nodes in the dom by gérard talbot <- previous section: using web standards: how next section: develo
ping cross-browser pages -> ...
Using Web Standards in your Web Pages - Archive of obsolete content
contents benefits of using web standards making your page using web standards - how to using the w3c dom develo
ping cross browser and cross platform pages using xmlhttprequest summary of changes references original document information author(s): mike cowperthwaite, marcio galli, jim ley, ian oeschger, simon paquet, gérard talbot last updated date: may 29, 2008 copyright information: portions of this content are © 1998–2008 by individual mozilla.org contributors; content available under a creati...
Displaying notifications (deprecated) - Archive of obsolete content
otification 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 by tap
ping the button below.
Array comprehensions - Archive of obsolete content
here is one that filters just the even numbers, then creates an array containing their doubles: var numbers = [1, 2, 3, 21, 22, 30]; var doubledevens = [for (i of numbers) if (i % 2 === 0) i * 2]; console.log(doubledevens); // logs 4,44,60 the square brackets of an array comprehension introduce an implicit block for sco
ping purposes.
Archived JavaScript Reference - Archive of obsolete content
d.reflect.enumerate()the static reflect.enumerate() method used to return an iterator with the enumerable own and inherited properties of the target object, but has been removed in ecmascript 2016 and is deprecated in browsers.string.prototype.quote()the non-standard quote() method returns a copy of the string, replacing various special characters in the string with their escape sequences and wrap
ping the result in double-quotes (").
background-size - Archive of obsolete content
and anyway, it's more the -moz-border-image that seems to be the problem - that gets inherited even if i add in -moz-border-image: none, to <body> or <html>, and setting the height to 100% is more a matter of covering it up rather than stop
ping it happening (see further examples a, b and c - b and c look ok, but adding margin or padding reveals that the image applies to both <body> and <html> even though explicitly set to none) user:robertc 2009-08-14 see also bug 509681 and bug 497995.
Reference - Archive of obsolete content
while also holding in account the previous example where it was avalable in both instances when prototy
ping object it should be : function->object->instance or (function=object)->instance and ofcourse function == object return false ;) and the following statements also tells me that function == object although math is only an instance of object...
Troubleshooting XForms Forms - Archive of obsolete content
if you are develo
ping on your local machine using apache tomcat for example then add the following regular expression on a new line: ^http://localhost:8080/.* use the xforms buddy to view instance data the xforms buddy extension allows you to dynamically view model instance data while the xforms is running in the firefox browser.
XForms Group Element - Archive of obsolete content
example <group ref="address"> <label>ship
ping address</label> <input ref="line_1"> <label>address line 1</label> </input> <input ref="line_2"> <label>address line 2</label> </input> <input ref="postcode"> <label>postcode</label> </input> </group> ...
XForms - Archive of obsolete content
other strengths that xforms brings to the table is the separation of data from presentation, strong data ty
ping, the ability to submit xml data to servers instead of name/value pairs, and a descriptive way to author forms so that they can be displayed by a wide variety of devices.
RDF in Fifty Words or Less - Archive of obsolete content
and fundamentally, there's no reason that you shouldn't be able to treat these as "bookmarks" as well, grou
ping them together into folders as you please, or maybe even creating "smart" folders that, when you open them, dynamically generate their contents by running common search that you define.
Using the Right Markup to Invoke Plugins - Archive of obsolete content
thus, in the following example, instead of stop
ping at the activex control, ie will display the same animation twice since it also understands the mime type for flash: <!-- usage will not work as intended --> <object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0" width="366" height="142" id="myflash"> <param name="movie" value="javascript-to-...
Game distribution - Game development
the chrome web store is also an attractive option — again, having a manifest file ready, zip
ping your game and filling in the online submission form is about all that's required.
Bounding volume collision detection with THREE.js - Game development
// expand three.js sphere to support collision tests vs box3 // we are creating a vector outside the method scope to // avoid spawning a new instance of vector3 on every check three.sphere.__closest = new three.vector3(); three.sphere.prototype.intersectsbox = function (box) { // get box closest point to sphere center by clam
ping three.sphere.__closest.set(this.center.x, this.center.y, this.center.z); three.sphere.__closest.clamp(box.min, box.max); var distance = this.center.distancetosquared(three.sphere.__closest); return distance < (this.radius * this.radius); }; demos we have prepared some live demos to demonstrate these techniques, with source code to examine.
GLSL Shaders - Game development
we can ignore the fourth parameter and leave it with the default 1.0 value; this is used to manipulate the clip
ping of the vertex position in the 3d space, but we don't need in our case.
Mobile touch controls - Game development
for example, tap
ping on the right side of the screen will fire the weapon: this.buttonshoot = this.add.button(this.world.width*0.5, 0, 'button-alpha', null, this); this.buttonshoot.oninputdown.add(this.goshootpressed, this); this.buttonshoot.oninputup.add(this.goshootreleased, this); the code above will create a new button using a transparent image that covers the right half of the screen.
Build the brick field - Game development
k like this: function drawbricks() { for(var c=0; c<brickcolumncount; c++) { for(var r=0; r<brickrowcount; r++) { bricks[c][r].x = 0; bricks[c][r].y = 0; ctx.beginpath(); ctx.rect(0, 0, brickwidth, brickheight); ctx.fillstyle = "#0095dd"; ctx.fill(); ctx.closepath(); } } } again, we're loo
ping through the rows and columns to set the x and y position of each brick, and we're also painting a brick on the canvas — size brickwidth x brickheight — with each loop iteration.
Buttons - Game development
kee
ping the paddle still before the game starts it works as expected, but we can still move the paddle when the game hasn't started yet, which looks a bit silly.
The score - Game development
compare your code you can check the finished code for this lesson in the live demo below, and play with it to understand better how it works: next steps we now have a scoring system, but what's the point of playing and kee
ping score if you can't win?
Gecko FAQ - Gecko Redirect 1
content developers are sick and tired of develo
ping and testing every single web page multiple times in order to support the different, incompatible, proprietary doms of browsers from different vendors.
Card sorting - MDN Web Docs Glossary: Definitions of Web-related terms
card sorting is a simple technique used in information architecture whereby people involved in the design of a website (or other type of product) are invited to write down the content / services / features they feel the product should contain, and then organize those features into categories or grou
pings.
DNS - MDN Web Docs Glossary: Definitions of Web-related terms
the most prominent function of dns is the translation of human-friendly domain names (such as mozilla.org) to a numeric ip address (such as 151.106.5.172); this process of map
ping a domain name to the appropriate ip address is known as a dns lookup.
Flex - MDN Web Docs Glossary: Definitions of Web-related terms
t 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 wrap
ping of flex items css flexbox guide: typical use cases of flexbox ...
Flexbox - MDN Web Docs Glossary: Definitions of Web-related terms
t 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 wrap
ping of flex items css flexbox guide: typical use cases of flexbox ...
Normative - MDN Web Docs Glossary: Definitions of Web-related terms
specifications might also contain sections that are marked as non-normative or informative, which means those are provided there for the purpose of hel
ping the reader understand the specifications better or to showcase an example or best practice, which need not be followed as a rule.
Placeholder names - MDN Web Docs Glossary: Definitions of Web-related terms
placeholder names are commonly used in cryptography to indicate the participants in a conversation, without resorting to terminology such as "party a," "eavesdropper," and "malicious attacker." the most commonly used names are: alice and bob, two parties who want to send messages to each other, occasionally joined by carol, a third participant eve, a passive attacker who is eavesdrop
ping on alice and bob's conversation mallory, an active attacker ("man-in-the-middle") who is able to modify their conversation and replay old messages ...
Polyfill - MDN Web Docs Glossary: Definitions of Web-related terms
at the time, javascript developers were gras
ping at straws trying to get their website to work across all devices because there was such a discrepancy between browsers that the website might have to be programmed radically differently and have a much different user interface based upon the user's browser.
non-normative - MDN Web Docs Glossary: Definitions of Web-related terms
software specifications often contains information marked as non-normative or informative, which means that those are provided there for the purpose of hel
ping the readers to understand the specification better or to show an example or a best practice, and not needed to be followed as a rule.
CSS selectors - Learn web development
h1, ..special { color: blue; } types of selectors there are a few different grou
pings of selectors, and knowing which type of selector you might need will help you to find the right tool for the job.
What software do I need to build a website? - Learn web development
there are dozens of browser options for your personal use, but when you're develo
ping a website you should test it at least with the following major browsers, to make sure your site works for most people: mozilla firefox google chrome microsoft internet explorer apple safari if you're targeting a specific group (e.g., technical platform or country), you may have to test the site with additional browsers, like opera, konqueror, or uc browser.
Advanced form styling - Learn web development
if you really need full control over the option styling, you'll have to either use some kind of library to generate a custom control, or build your own custom control, or in the case of select use the multiple attribute, which makes all the options appear on the page, sidestep
ping this particular problem: <select id="select" name="select" multiple> ...
Other form controls - Learn web development
the values are soft (the default value), which means the text submitted is not wrapped but the text rendered by the browser is wrapped; hard (the cols attribute must be specified when using this value), which means both the submitted and rendered texts are wrapped, and off, which stops wrap
ping.
Advanced text formatting - Learn web development
ment.queryselector('p'); para.onclick = function() { alert('owww, stop poking me!'); }</code></pre> <p>you shouldn't use presentational elements like <code><font></code> and <code><center></code>.</p> <p>in the above javascript example, <var>para</var> represents a paragraph element.</p> <p>select all the text with <kbd>ctrl</kbd>/<kbd>cmd</kbd> + <kbd>a</kbd>.</p> <pre>$ <kbd>
ping mozilla.org</kbd> <samp>
ping mozilla.org (63.245.215.20): 56 data bytes 64 bytes from 63.245.215.20: icmp_seq=0 ttl=40 time=158.233 ms</samp></pre> the above code will look like so: marking up times and dates html also provides the <time> element for marking up times and dates in a machine-readable format.
What’s in the head? Metadata in HTML - Learn web development
let's look at an example: <meta name="author" content="chris mills"> <meta name="description" content="the mdn web docs learning area aims to provide complete beginners to the web with all they need to know to get started with develo
ping web sites and applications."> specifying an author is beneficial in many ways: it is useful to be able to understand who wrote the page, if you have any questions about the content and you would like to contact them.
Adding vector graphics to the Web - Learn web development
inlining svg is the only approach that lets you use css interactions (like :focus) and css animations on your svg image (even in your regular stylesheet.) you can make svg markup into a hyperlink by wrap
ping it in an <a> element.
Responsive images - Learn web development
note: when testing this with a desktop browser, if the browser fails to load the narrower images when you've got its window set to the narrowest width, have a look at what the viewport is (you can approximate it by going into the browser's javascript console and ty
ping in document.queryselector('html').clientwidth).
HTML table advanced features and accessibility - Learn web development
previous overview: tables next in the second article in this module, we look at some more advanced features of html tables — such as captions/summaries and grou
ping your rows into table head, body and footer sections — as well as looking at the accessibility of tables for visually impaired users.
HTML Tables - Learn web development
html table advanced features and accessibility this module looks at some more advanced features of html tables — such as captions/summaries and grou
ping your rows into table head, body and footer sections — as well as looking at the accessibility of tables for visually impaired users.
Build your own function - Learn web development
previous overview: building blocks next in this module making decisions in your code — conditionals loo
ping code functions — reusable blocks of code build your own function function return values introduction to events image gallery ...
Introduction to events - Learn web development
for a start, it is not a good idea to mix up your html and your javascript, as it becomes hard to parse — kee
ping your javascript separate is best practice; if it is in a separate file you can apply it to multiple html documents.
Ember app structure and componentization - Learn web development
looking at the code next to the rendered todo app, there are a number of ways we could decide how to break up the ui, but let's plan on splitting the html out into the following components: the component grou
pings are as follows: the main input / "new-todo" (red in the image) the containing body of the todo list + the mark-all-complete button (purple in the image) the mark-all-complete button, explicitly highlighted for reasons given below (yellow in the image) each todo is an individual component (green in the image) the footer (blue in the image) something odd to note is that the ma...
Introduction to automated testing - Learn web development
once the install completes, test that node is installed by ty
ping 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.
Handling common HTML and CSS problems - Learn web development
store a reference to this element in a variable, for example: const test = document.getelementbyid('hplogo'); now try to set a new value for the css property you are interested in on that element; you can do this using the style property of the element, for example try ty
ping these into the javascript console: test.style.transform = 'rotate(90deg)' test.style.webkittransform = 'rotate(90deg)' as you start to type the property name representation after the second dot (note that in javascript, css property names are written in lower camel case, not hyphenated), the javascript console should begin to autocomplete the names of the properties that exist in the browse...
Strategies for carrying out testing - Learn web development
the most common devices/browsers you'll want to test are as follows: the official android studio ide for develo
ping android apps is a bit heavy weight for just testing websites on google chrome or the old stock android browser, but it does come with a robust emulator.
Setting up your own test automation environment - Learn web development
we could add a sleep() method to our quick_test.js test too — try wrap
ping your last line of code in a block like this: driver.sleep(2000).then(function() { input.sendkeys('filling in my form'); input.getattribute("value").then(function(value) { if(value !== '') { console.log('form input editable'); } }); }); webdriver will now wait for 2 seconds before filling in the form field.
Cross browser testing - Learn web development
what users, browsers, and devices do you most need to worry about?), how to go about doing testing, the main issues that you'll face with different types of code and how to mitigate them, what tools are most useful in hel
ping you test and fix problems, and how to use automation to speed up testing.
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 pop
ping up to say hello if something has gone wrong.
Tools and testing - Learn web development
what users, browsers and devices do you most need to worry about?), how to go about testing, the main issues that you'll face with different types of code and how to fix/mitigate those, what tools are most useful in hel
ping you test and fix problems, and how to use automation to speed up testing.
Accessibility/LiveRegionDevGuide
this developer's guide lays out general guidelines that assistive technology (at) developers can use in develo
ping live region support.
Mozilla accessibility architecture
the member variables kee
ping track of the number of children, parent, first child and next sibling allow us to have instant traversal around accessible nodes that have already been visited.
Embedding API for Accessibility
.sites", "http://www.annoyingsite1.com http://www.popupsite2.com"); user_pref("capability.policy.popupsites.windowinternal.open","noaccess"); // or turn it off everywhere: user_pref("capability.policy.default.windowinternal.open","noaccess"); // override pop
ping up new windows on target=anything user_pref("browser.block.target_new_window", true); // override popup windows at beginning of new page load (blocks most popup advertisements) user_pref("dom.disable_open_during_load", true); moz 0.8 client side redirects ...
Accessibility and Mozilla
this developer's guide lays out general guidelines that assistive technology (at) developers can use in develo
ping live region support.
Index
685 obsolete add-ons, archive, look & feel, obsolete, themes this page contains theme documents and resources that we don't expect will ever be updated, but which we're kee
ping for the time being as potential source material for updated docs.
Obsolete
this page contains theme documents and resources that we don't expect will ever be updated, but which we're kee
ping for the time being as potential source material for updated docs.
Adding a new event
eventnamelist.h defines map
ping between dom event name, internal event message, event handler attribute owner and internal event class.
Testopia
develo
ping plugins or extensions for any software is like trying to hit a moving target.
Debugging Table Reflow
0 constraint=3 widths=360 540 -1 -1 -1 -1 -1 -1 540 360 **end col dump** **start col dump** colindex=3 isanonymous=0 constraint=0 widths=360 540 -1 -1 -1 -1 -1 -1 -1 360 **end col dump** ***end table dump*** the first column has already the minimum content width, the table column can't shrink below that, the desired content width of 540 twips, that's the space to layout cell 1 without wrap
ping the text and the 1230 which correspond to the style="width:80px" at the first cell.
Debugging on Mac OS X
once done, you should be able to open any file quickly by hitting cmd-shift-o and ty
ping in the name of a file.) in the product menu, select scheme > new scheme and name your scheme (for example, "debug").
Gmake vs. Pymake
note that ty
ping "python build/pymake/make.py -f client.mk" does not trigger a relative configure.
Interface Compatibility
if necessary, it is possible for an extension to support multiple versions by ship
ping multiple shared libraries (dlls) in the same extension package, and selecting the correct version using versioning flags in its chrome.manifest file.
Contributing to the Mozilla code base
if you don't hear back within this time, naturally reach out to them: add a comment to the bug saying 'review
ping?', check the "need more information from" box, and add the reviewer's name.
Displaying Places information using views
the following table shows the map
pings between these magic column id values and their corresponding nsinavhistoryresultnode properties: treecol id or anonid corresponding nsinavhistoryresultnode property title title url uri date time visitcount accesscount keyword * description * dateadded dateadded lastmodified lastmodified ...
Multiple Firefox profiles
you can remove such add-ons from your profile for nightly use while kee
ping them for use with other profiles.
Cross Process Object Wrappers
*/ browsermm.loadframescript("chrome://my-addon/content/frame-script.js", false); browsermm.addmessagelistener("my-addon-message", function(message) { let wrapper = message.objects.element; wrapper.addeventlistener("click", function() { console.log("they clicked"); }); }); map
ping content documents to xul browsers a common pattern is to get the xul <browser> that corresponds to a content document.
Frame script loading and lifetime
to define the map
ping between a chrome:// url and a frame script packaged with an extension, use a "chrome.manifest" file to register a chrome url: // chrome.manifest content my-e10s-extension chrome/content/ // chrome script mm.loadframescript("chrome://my-e10s-extension/content/content.js", true); allowdelayedload if the message manager is a global frame message manager or a window message manager then: if...
Performance
better: instead of only kee
ping the state in the parent an addon can employ a master-slave architecture where the parent has the authoritative state and replicates it to the child processes in advance so they can act based on their local copy.
Storage access policy: Block cookies from trackers
for example, a request for content from tracker.example on news.example will not reuse an http connection with a request for content from tracker.example on shop
ping.example or with requests that occur when tracker.example is visited directly (i.e., as a first party).
Firefox
always keep in mind the side effects your changes may have, from blocking other tasks, to interfering with other user interface elements.privacythis document lists privacy-related documentation.security best practices for firefox front-end engineersthis article will help firefox developers understand the security controls in place and avoid common pitfalls when develo
ping front-end code for firefox.site identity buttonthe site identity button is a feature in firefox that gives users more information about the sites they visit.
Browser API
htmliframeelement.stop() allows stop
ping of the <iframe>'s content loading.
ChromeWorker
summary if you're develo
ping privileged code, and would like to create a worker that can use js-ctypes to perform calls to native code, you can do so by using chromeworker instead of the standard worker object.
Chrome-only API reference
it currently works in (privileged) chrome code on firefox desktop (version 47 and above).chromeworkerif you're develo
ping privileged code, and would like to create a worker that can use js-ctypes to perform calls to native code, you can do so by using chromeworker instead of the standard worker object.
Embedding Tips
this interface also has methods for reloading, stop
ping a load and going back and forward in the history.
Gecko
view all… community view mozilla forums: mailing list newsgroup rss feed related topics web standards xul embedding mozilla develo
ping mozilla ...
Getting Started with Chat
/msg nick message sends a private message to the specified user /nick nickname change your current nickname nickname:
ping get a user's attention (nickname is the name of the user you want the attention of) nickname: pong respond to a user's
ping (nickname is the name of the user who wants your attention) /query nickname opens a private chat with the specified user /quit message disconnects you from the current server displaying the message in all connected channels prior to qui...
Mozilla projects on GitHub
opennews the knight-mozilla open news project, hel
ping the journalism/technology community do great work through shared knowledge and code.
Investigating leaks using DMD heap scan mode
clam
ping is the same kind of analysis that a conservative gc does: if a word-aligned value in a heap block points to somewhere within another heap block, replace that value with the address of the block.
GC and CC logs
in particular, cc logs can be used to understand why the cycle collector is kee
ping an object alive.
TimerFirings logging
it is sometimes useful to pre-process the output by strip
ping out certain parts of each line before doing this aggregation step, for example, by inserting one or more of the following commands into the command pipeline.
powermetrics
the grou
ping of parent and child processes (in coalitions) is obvious.
A brief guide to Mozilla preferences
modifying preferences advanced users can set named preferences via the advanced preferences editor, by ty
ping about:config in the location bar.
Preference reference
er.ui.textselectbackgroundui.textselectbackground saves the color in which the background of a text selection in the user interface or in content will be styled.ui.textselectforegroundui.textselectforeground saves the color in which the text of a text selection in the user interface or the content will be styled.ui.tooltipdelayui.tooltipdelay stores the delay in milliseconds between the mouse stop
ping over an element and the appearing of its tooltip.view_source.syntax_highlightthe preference view_source.syntax_highlight controls whether markup in the view source view is syntax highlighted.
Preferences
related topics xul, javascript, xpcom, extensions, develo
ping mozilla ...
Crash reporting
see also understanding crash reports a guide to searching crash reports crash-stats crash
pings (telemetry) and crash reports (socorro/crash stats) building firefox with debug symbols environment variables affecting crash reporting in-code documentation crash reporter crash manager crash
ping ...
About NSPR
history a good portion of the library's purpose, and perhaps the primary purpose in the gromit environment, was to provide the underpinnings of the java vm, more or less map
ping the sys layer that sun defined for the porting of the java vm to various platforms.
PRFileMap
before actually map
ping a file to memory, you must create a memory-mapped file object by calling pr_createfilemap, which returns a pointer to prfilemap.
PR_PushIOLayer
caution kee
ping the pointer to the stack even as layers are pushed onto the top of the stack is accomplished by swap
ping the contents of the file descriptor being pushed and the stack's current top layer file descriptor.
PR_Unmap
description pr_memunmap removes the file map
ping for the memory region (addr, addr + len).
PR_dtoa
1 like 0, but with steele & white stop
ping rule.
Threads
getting a thread's scope pr_getthreadscope gets the sco
ping of the current thread.
Running NSPR tests
they will be invoked by their companion test programs (e.g., pipe
ping and sock
ping).
An overview of NSS Internals
there are tools for managing nss databases, for dum
ping or verifying certificates, for registering pkcs#11 modules with a database, for processing cms encrypted/signed messages, etc.
Building NSS
if you don't have a domain suffix you can add an entry to /etc/hosts (on windows, c:\windows\system32\drivers\etc\hosts) as follows: 127.0.0.1 localhost.localdomain validate this opening a command shell and ty
ping:
ping localhost.localdomain.
Certificate functions
cert_encodegeneralname mxr 3.4 and later cert_encodeinfoaccessextension mxr 3.12 and later cert_encodeinhibitanyextension mxr 3.12 and later cert_encodenoticereference mxr 3.12 and later cert_encodeocsprequest mxr 3.6 and later cert_encodepolicyconstraintsextension mxr 3.12 and later cert_encodepolicymap
pingextension mxr 3.12 and later cert_encodesubjectkeyid mxr 3.12 and later cert_encodeusernotice mxr 3.12 and later cert_extractpublickey mxr 3.2 and later cert_findcertbyname mxr 3.2 and later cert_findcrlentryreasonexten mxr 3.12 and later cert_findcrlnumberexten mxr 3.12 and later cert_findname...
Encrypt Decrypt MAC Keys As Session Objects
slot, ckm_generic_secret_key_gen, 160/8, &mackeyid, pwdata); if (mackey == null) { pr_fprintf(pr_stderr, "generatesymkey for macing returned null.\n"); rv = secfailure; goto cleanup; } /* get the encrypt key cka_id */ rv = gathercka_id(enckey, &encckaid); if (rv != secsuccess) { pr_fprintf(pr_stderr, "error while wrap
ping encrypt key\n"); goto cleanup; } /* get the mac key cka_id */ rv = gathercka_id(mackey, &macckaid); if (rv != secsuccess) { pr_fprintf(pr_stderr, "can't get the mac key cka_id.\n"); goto cleanup; } if (noisefilename) { rv = seedfromnoisefile(noisefilename); if (rv != secsuccess) { port_seterror(pr_end_of_file_error); ...
Encrypt and decrypt MAC using token
slot, ckm_generic_secret_key_gen, 160/8, &mackeyid, pwdata); if (mackey == null) { pr_fprintf(pr_stderr, "generatesymkey for macing returned null.\n"); rv = secfailure; goto cleanup; } /* get the encrypt key cka_id */ rv = gathercka_id(enckey, &encckaid); if (rv != secsuccess) { pr_fprintf(pr_stderr, "error while wrap
ping encrypt key\n"); goto cleanup; } /* get the mac key cka_id */ rv = gathercka_id(mackey, &macckaid); if (rv != secsuccess) { pr_fprintf(pr_stderr, "can't get the mac key cka_id.\n"); goto cleanup; } if (noisefilename) { rv = seedfromnoisefile(noisefilename); if (rv != secsuccess) { port_seterror(pr_end_of_file_error); ...
JSS FAQ
with that understanding, the best directory to look for sample code is in the org/mozilla/jss/tests directory: http://lxr.mozilla.org/mozilla/source/security/jss/org/mozilla/jss/tests org/mozilla/jss/tests/closedbs.java org/mozilla/jss/tests/keyfactorytest.java org/mozilla/jss/tests/digesttest.java org/mozilla/jss/tests/jcasigtest.java org/mozilla/jss/tests/keywrap
ping.java org/mozilla/jss/tests/listcerts.java org/mozilla/jss/tests/pk10gen.java org/mozilla/jss/tests/sdr.java org/mozilla/jss/tests/selftest.java org/mozilla/jss/tests/setupdbs.java org/mozilla/jss/tests/sigtest.java org/mozilla/jss/tests/symkeygen.java org/mozilla/jss/tests/testkeygen.java org/mozilla/jss/tests/sslclientauth.java org/mozi...
JSS Provider Notes
; keypair dsapair = dsakpg.generatekeypair(); supported classes cipher dsaprivatekey dsapublickey keyfactory keygenerator keypairgenerator mac messagedigest rsaprivatekey rsapublickey secretkeyfactory secretkey securerandom signature what's not supported the following classes don't work very well: keystore: there are many serious problems map
ping the jca keystore interface onto nss's model of pkcs #11 modules.
Mozilla-JSS JCA Provider notes
what's not supported the following classes don't work very well: keystore: there are many serious problems map
ping the jca keystore interface onto nss's model of pkcs #11 modules.
NSS_3.12.1_release_notes.html
bug 429716: debug builds of libpkix unconditionally dump socket traffic to stdout bug 430368: vfychain -t option is undocumented bug 430369: vfychain -o succeeds even if -pp is not specified bug 430399: vfychain -pp crashes bug 430405: error log is not produced by cert_pkixverifycert bug 430743: update ssltap to understand the tls session ticket extension bug 430859: pkix: policy map
ping fails verification with error invalid arguments bug 430875: document the policy for the order of cipher suites in ssl_implementedciphers.
NSS 3.30 release notes
in ssl.h ssl_alertreceivedcallback - register a callback function, that will be called whenever an ssl/tls alert is received ssl_alertsentcallback - register a callback function, that will be called whenever an ssl/tls alert is sent ssl_setsessionticketkeypair - configures an asymmetric key pair, for use in wrap
ping session ticket keys, used by the server.
NSS 3.50 release notes
574643 - upgrade hacl* verified implementations of chacha20, poly1305, and 64-bit curve25519 bug 1608327 - two problems with neon-specific code in freebl bug 1575843 - detect aarch64 cpu features on freebsd bug 1607099 - remove the buildbot configuration bug 1585429 - add more hkdf test vectors bug 1573911 - add more rsa test vectors bug 1605314 - compare all 8 bytes of an mp_digit when clam
ping in windows assembly/mp_comba bug 1604596 - update wycheproof vectors and add support for cbc, p256-ecdh, and cmac tests bug 1608493 - use aes-ni for non-gcm aes ciphers on platforms with no assembly-optimized implementation, such as macos.
NSS 3.51 release notes
bug 1538980 - secu_readderfromfile calls strstr on a string that isn't guaranteed to be null-terminated bug 1561337 - correct a warning for comparison of integers of different signs: 'int' and 'unsigned long' in security/nss/lib/freebl/ecl/ecp_25519.c:88 bug 1609751 - add test for mp_int clam
ping bug 1582169 - don't attempt to read the fips_enabled flag on the machine unless nss was built with fips enabled bug 1431940 - fix a null pointer dereference in blake2b_update bug 1617387 - fix compiler warning in secsign.c bug 1618400 - fix a openbsd/arm64 compilation error: unused variable 'getauxval' bug 1610687 - fix a crash on unaligned cmaccontext.aes.keyschedule when using aes-ni intri...
Encrypt Decrypt_MAC_Using Token
slot, ckm_generic_secret_key_gen, 160/8, &mackeyid, pwdata); if (mackey == null) { pr_fprintf(pr_stderr, "generatesymkey for macing returned null.\n"); rv = secfailure; goto cleanup; } /* get the encrypt key cka_id */ rv = gathercka_id(enckey, &encckaid); if (rv != secsuccess) { pr_fprintf(pr_stderr, "error while wrap
ping encrypt key\n"); goto cleanup; } /* get the mac key cka_id */ rv = gathercka_id(mackey, &macckaid); if (rv != secsuccess) { pr_fprintf(pr_stderr, "can't get the mac key cka_id.\n"); goto cleanup; } if (noisefilename) { rv = seedfromnoisefile(noisefilename); if (rv != secsuccess) { port_seterror(pr_end_of_file_error); ...
NSS Sample Code Sample_3_Basic Encryption and MACing
slot, ckm_generic_secret_key_gen, 160/8, &mackeyid, pwdata); if (mackey == null) { pr_fprintf(pr_stderr, "generatesymkey for macing returned null.\n"); rv = secfailure; goto cleanup; } /* get the encrypt key cka_id */ rv = gathercka_id(enckey, &encckaid); if (rv != secsuccess) { pr_fprintf(pr_stderr, "error while wrap
ping encrypt key\n"); goto cleanup; } /* get the mac key cka_id */ rv = gathercka_id(mackey, &macckaid); if (rv != secsuccess) { pr_fprintf(pr_stderr, "can't get the mac key cka_id.\n"); goto cleanup; } if (noisefilename) { rv = seedfromnoisefile(noisefilename); if (rv != secsuccess) { port_seterror(pr_end_of_file_error); ...
NSS Sample Code Utilities_1
f, int rsize) { char meter[] = { "\r| |" }; int fd, count; int c; secstatus rv = secsuccess; cc_t orig_cc_min; cc_t orig_cc_time; tcflag_t orig_lflag; struct termios tio; fprintf(stderr, "to generate random numbers, " "continue ty
ping until the progress meter is full:\n\n"); fprintf(stderr, "%s", meter); fprintf(stderr, "\r|"); /* turn off echo on stdin & return on 1 char instead of nl */ fd = fileno(stdin); tcgetattr(fd, &tio); orig_lflag = tio.c_lflag; orig_cc_min = tio.c_cc[vmin]; orig_cc_time = tio.c_cc[vtime]; tio.c_lflag &= ~echo; tio.c_lflag &= ~icanon; tio.c_cc[vmin] = 1; ...
EncDecMAC using token object - sample 3
*/ mackey = generatesymkey(slot, ckm_generic_secret_key_gen, 160/8, &mackeyid, pwdata); if (mackey == null) { pr_fprintf(pr_stderr, "generatesymkey for macing returned null.\n"); rv = secfailure; goto cleanup; } /* get the encrypt key cka_id */ rv = gathercka_id(enckey, &encckaid); if (rv != secsuccess) { pr_fprintf(pr_stderr, "error while wrap
ping encrypt key\n"); goto cleanup; } /* get the mac key cka_id */ rv = gathercka_id(mackey, &macckaid); if (rv != secsuccess) { pr_fprintf(pr_stderr, "can't get the mac key cka_id.\n"); goto cleanup; } if (noisefilename) { rv = seedfromnoisefile(noisefilename); if (rv != secsuccess) { port_seterror(pr_end_of_file_error); return secfailure; } rv = pk11_generaterandom(iv, blocksize); if (rv != secsucce...
Utilities for nss samples
f, int rsize) { char meter[] = { "\r| |" }; int fd, count; int c; secstatus rv = secsuccess; cc_t orig_cc_min; cc_t orig_cc_time; tcflag_t orig_lflag; struct termios tio; fprintf(stderr, "to generate random numbers, " "continue ty
ping until the progress meter is full:\n\n"); fprintf(stderr, "%s", meter); fprintf(stderr, "\r|"); /* turn off echo on stdin & return on 1 char instead of nl */ fd = fileno(stdin); tcgetattr(fd, &tio); orig_lflag = tio.c_lflag; orig_cc_min = tio.c_cc[vmin]; orig_cc_time = tio.c_cc[vtime]; tio.c_lflag &= ~echo; tio.c_lflag &= ~icanon; tio.c_cc[vmin] = 1; ...
NSS sources building testing
as a test, it must be possible to successfully use the command "
ping $host.$domsuf" on your computer (
ping reports receiving replies).
nss tech note1
sec_quickderdecodeitem supports skip
ping the decoding of optional components if you define the tag of the component in the template sec_asn1_inner: recurse into the component and saves its content, without the surrounding asn.1 tag and length sec_asn1_save: saves the component data, but does not proceed to the next component if within a sequence template array.
nss tech note4
critical : indicates whether the extension is critical value : the value of the extension loo
ping through all extensions certcertextension** extensions =cert->extensions; if (extensions) { while (*extensions) { secitem *ext_oid = &(*extensions)->id; secitem *ext_critical = &(*extensions)->critical; secitem *ext_value = &(*extensions)->value; /* id attrib...
nss tech note7
both of these functions do the pkcs #1 wrap
ping of the data.
NSS Tools sslstrength
you can obtain this list of character->cipher map
pings by doing 'sslstrength ciphers'.
PKCS11 FAQ
how is the private key stored to the smartcard, and how is the public key sent to the server (with wrap
ping?).
PKCS #11 Module Specs
values can contain embedded blanks either through quoting the entire value, or by esca
ping the embedded blanks with '\'.
PKCS11 Implement
it uses a single session for all single-part rsa operations such as logging in, logging out, signing, verifying, generating keys, wrap
ping keys, and so on.
Python binding for NSS
the design of python-nss follows these basic guiding principles: be a thin layer with almost a one-to-one map
ping of nss/nspr calls to python methods and functions.
NSPR functions
pr_getuniqueidentity pr_createiolayerstub pr_getdefaultiomethods pr_getidentitieslayer pr_getlayersidentity pr_pushiolayer pr_popiolayer wrap
ping a native file descriptor if your current tcp socket code uses the standard bsd socket api, a lighter-weight method than creating your own nspr i/o layer is to simply import a native file descriptor into nspr.
FIPS mode of operation
fc_wrapkey: rsa key wrap
ping fc_unwrapkey: rsa key wrap
ping fc_derivekey: diffie-hellman, ec diffie-hellman random number generation functions fc_seedrandom fc_generaterandom: performs continuous random number generator test.
NSS functions
cert_encodegeneralname mxr 3.4 and later cert_encodeinfoaccessextension mxr 3.12 and later cert_encodeinhibitanyextension mxr 3.12 and later cert_encodenoticereference mxr 3.12 and later cert_encodeocsprequest mxr 3.6 and later cert_encodepolicyconstraintsextension mxr 3.12 and later cert_encodepolicymap
pingextension mxr 3.12 and later cert_encodesubjectkeyid mxr 3.12 and later cert_encodeusernotice mxr 3.12 and later cert_extractpublickey mxr 3.2 and later cert_findcertbyname mxr 3.2 and later cert_findcrlentryreasonexten mxr 3.12 and later cert_findcrlnumberexten mxr 3.12 and later cert_findname...
NSS tools : modutil
nss has some flexibility that allows applications to use their own, independent database engine while kee
ping a shared database and working around the access issues.
NSS tools : pk12util
nss has some flexibility that allows applications to use their own, independent database engine while kee
ping a shared database and working around the access issues.
NSS Tools modutil
saves ty
ping when there is more than one platform using the same settings.
NSS Tools sslstrength
you can obtain this list of character->cipher map
pings by doing 'sslstrength ciphers'.
NSS tools : modutil
nss has some flexibility that allows applications to use their own, independent database engine while kee
ping a shared database and working around the access issues.
NSS tools : pk12util
nss has some flexibility that allows applications to use their own, independent database engine while kee
ping a shared database and working around the access issues.
NSS tools : signver
nss has some flexibility that allows applications to use their own, independent database engine while kee
ping a shared database and working around the access issues.
Necko Architecture
mimetype - mime <-> file extension map
ping nkabout - about: protocol nkdata - data: protocol nkfile - file: protocol nkftp - ftp: protocol nkkeyword - keyword: protocol nkresrc - resource: protocol cnvts - stream converters stremcnv - stream converter service these libraries will change with time and illustrate the modularity of necko.
SpiderMonkey Build Documentation
developer (debug) build for develo
ping and debugging spidermonkey itself, it is best to have both a debug build (for everyday debugging) and an optimized build (for performance testing), in separate build directories.
GC Rooting Guide
the simplest approach is to use js::persistentrooted (usable on anything with a trace method with the appropriate signature): js::persistentrooted<myowningstruct> immortalstruct; but note that js::persistentrooted in a struct or class is a rather dangerous thing to use -- it will keep a gc thing alive, and most gc things end up kee
ping their global alive, so if your class/struct is reachable in any way from that global, then nothing will ever be cleaned up by the gc.
Getting SpiderMonkey source code
downloading gzipped spidermonkey source code you can download gzipped spidermonkey source code from the following urls: http://ftp.mozilla.org/pub/spidermonkey/releases/ http://ftp.mozilla.org/pub/spidermonkey/prereleases/ here is a command-line example of downloading and unzip
ping spidermonkey source code version 59.0: mkdir mozilla cd mozilla wget http://ftp.mozilla.org/pub/spidermonkey/prereleases/59/pre1/mozjs-59.0a1.0.tar.bz2 tar xvf mozjs-59.0a1.0.tar.bz2 these commands should work on most platforms including windows, as long as on windows you are using the mozillabuild bash shell.
Invariants
the public api for compartment-hop
ping, jsautoentercompartment, and the internal api, js::autocompartment, both make sure the invariant is maintained.
Tracing JIT
the trace monitor maintains some book-kee
ping information, as well as the collection of recorded fragments, held in a hashtable keyed by the interpreter's program counter and global object shape at the time of recording.
JS::CompileOptions
the compiler itself just needs to be able to access a collection of options; it doesn't care who owns them, or what's kee
ping them alive.
JSObject
the javascript engine sometimes uses this relationship to implement lexical sco
ping.
JSObjectOps.lookupProperty
note: a successful return with non-null *propp means the implementation may have locked *objp and added a reference count associated with *propp, so callers should not risk deadlock by nesting or interleaving other lookups or any obj-bearing ops before drop
ping *propp.
JS_Enumerate
but, for example, if an application calls back into javascript while it is loo
ping over the property ids in the jsidarray, the script could delete properties from obj.
JS_GetParent
an object's parent serves two purposes in spidermonkey: for some functions, it is used to implement lexical sco
ping (but this is an implementation detail).
JS_SetDestroyCompartmentCallback
description js_setdestroycompartmentcallback sets callback function which will be called when swee
ping each compartment of the runtime, before deleting the compartment.
JS_SetParent
(for some function objects, the parent chain is also used to implement lexical sco
ping, but this should be considered an implementation detail.) ordinarily an application sets a new object's parent by passing the parent object to js_newobject, and that is the preferred approach.
Shell global objects
if omitted, attach no source map url to the code (although the code may provide one itself, via a //#sourcemap
pingurl comment).
Mozilla Projects
to that end, this document will be revised over time as we find new and better ways of hel
ping developers.
Redis Tips
(press ctrl-c to quit) 1) "subscribe" 2) "message-channel" 3) (integer) 1 in the same way the blpop
ping redis-cli blocked, this redis-cli is not capable of doing anything but listen for messages.
Gecko object attributes
value attributes valuetext a text equivalent to the current value, such as "high" in a slider or "unzip
ping files" in a progress meter.
AT APIs Support
develo
ping a xul window is not that different from develo
ping a web page, but the elements available to add widgets are more powerful and designed to be similar to desktop widgets.
AT Development
this page includes: aria references - w3c specification reflecting aria map
ping into at apis.
Toolkit API
mation about how to package themes multiple-item extension packaging: specific information about multiple-item extension xpis xul application packaging: specific information about how to package xulrunner applications chrome registration printing in xul apps see also the following developer pages contain examples and discussions of particular topics: xul xul overlays develo
ping extensions xulrunner develo
ping themes dom rdf storage ...
XML Extras
edmond woychowsky has also written articles on xml data islands in mozilla: "make xml data islands work in mozilla", "build cross-browser xml paging code" and "implement a flexible shop
ping cart with xml and asp".
Fun With XBL and XPConnect
: <property name="autocompletelistener"> <![cdata[ ({ onautocompleteresult: function(aitem, aoriginalstring, amatch) { if ( aitem ) { anonymouscontent[0].value = amatch; } } }) ]]> </property> as long as the js for the value of autocompletelistener evaluates to an object (and wrap
ping the expression with a set of parens like i did, does this), then the value of autocompletelistener is an object that implements my interface.
XPCOM array guide
it enforces both typesafety and xpcom reference counting by kee
ping an owning reference to each element in the array.
Building the WebLock UI
grou
ping radio elements together creates the toggling ui by requiring that one or another of the elements be selected, but not both.
Using XPCOM Components
this service, which is defined in the basic nsisupports interface and implemented by all xpcom components, allows you to query and switch interfaces on a component as part of the runtime object ty
ping capabilities of xpcom.
Creating XPCOM components
al following along with the examples conventions acknowledgements an overview of xpcom the xpcom solution gecko components interfaces interfaces and encapsulation the nsisupports base interface xpcom identifiers cid contract id factories xpidl and type libraries xpcom services xpcom types method types reference counting status codes variable map
pings common xpcom error codes using xpcom components component examples cookie manager the webbrowserfind component the weblock component component use in mozilla finding mozilla components using xpcom components in your cpp xpconnect: using xpcom components from script component internals creating components in cpp xpcom initialization xpcom registry ma...
Detailed XPCOM hashtable guide
nsdatahashtable/nsinterfacehashtable/nsclasshashtable - high-level c++ wrappers around pldhash; simplifies the common usage pattern map
ping a simple keytype to a simple datatype; client does not need to declare or manage an entry class; nsdatahashtable datatype is a scalar such as pruint32; nsinterfacehashtable datatype is an interface; nsclasshashtable datatype is a class pointer owned by the hashtable.
nsIDOMFileList
gecko 1.9.2 note starting in gecko 1.9.2, this is also used by the datatransfer object to support dragging and drop
ping files into web applications.
nsIDynamicContainer
anewindex); void oncontainernodeclosed(in nsinavhistorycontainerresultnode acontainer); void oncontainernodeopening(in nsinavhistorycontainerresultnode acontainer, in nsinavhistoryqueryoptions aoptions); void oncontainerremoving(in long long aitemid); methods oncontainermoved() this method is called when the given container has just been moved, in case the service needs to do any bookkee
ping.
nsIFeed
1.0 66 introduced gecko 1.8 inherits from: nsifeedcontainer last changed in gecko 1.8 (firefox 1.5 / thunderbird 1.5 / seamonkey 1.0) attributes attribute type description cloud nsiwritablepropertybag2 the cloud element on a feed is used to identify the api endpoint of an rsscloud
ping server, which distributes notifications of changes to this feed.
nsIFrameLoaderOwner
ns_error_not_implemented if the swap
ping logic is not implemented for the either the current frame loader owner or the specified one with which you're trying to swap.
nsIMsgSearchTerm
attribute acstring customid; beginsgrou
ping attribute boolean beginsgrou
ping; endsgrou
ping attribute boolean endsgrou
ping; methods matchrfc822string boolean matchrfc822string(in string astring, in string charset, in boolean charsetoverride); matchrfc2047string boolean matchrfc2047string(in string astring, in string charset, in boolean charsetoverride); matchdate boolean matchdate(in prtime atime); matchstatus boolean matchst...
nsINavBookmarksService
for example, if i bookmark "mozilla.org" by manually ty
ping it in, and follow the bookmark, i will get redirected to "www.mozilla.org".
nsINavHistoryResultNode
title autf8string title of the web page or of the node's grou
ping (day, host, folder, and so on.).
nsINavHistoryVisitResultNode
1.0 66 introduced gecko 1.9 inherits from: nsinavhistoryresultnode last changed in gecko 1.9 (firefox 3) attributes attribute type description sessionid long long the session id of the visit, used for session grou
ping when a tree view is sorted by date.
nsIParserUtils
wrapcol number of characters per line; 0 for no auto-wrap
ping.
nsIRequestObserver
astatuscode reason for stop
ping (ns_ok if completed successfully) see also nsistreamlistener ...
nsISocketProviderService
netwerk/socket/nsisocketproviderservice.idlscriptable provides a map
ping between a socket type and its associated socket provider instance.
nsISocketTransportService
netwerk/base/public/nsisockettransportservice.idlscriptable this interface provides a map
ping between a socket type and its associated socket provider instance.
nsISupports proxies
xpinstall installation scripts are sometimes very complex and can require long execution time due to unzip
ping or native file system actions.
nsITreeView
a value of true will result in the tree pop
ping up a text field when the user tries to inline edit the cell.
nsIZipReader
esca
ping is required for all special characters unless otherwise specified.
nsIZipWriter
+ dirarr[i].leafname + ' path: ' + dirarr[i].path); var direntries = dirarr[i].directoryentries; while (direntries.hasmoreelements()) { var entry = direntries.getnext().queryinterface(ci.nsifile); //entry is instance of nsifile so here https://developer.mozilla.org/docs/xpcom_interface_reference/nsifile if (entry.path == xpi.path) { cu.reporterror('skip
ping entry - will not add this entry to the zip file - as this is the zip itself: "' + xpi.path + '" leafname:"' + xpi.leafname + '"'); continue; } if (entry.isdirectory()) { dirarr.push(entry); } var relpath = entry.path.replace(dirarr[0].path, ''); //need relative because we need to use this for telling addentryfile where in the zip it sho...
Setting HTTP request headers
trap
ping other requests is done with notifications, which are a lot like events or signals found in other languages and frameworks.
Using the Gecko SDK
(<tt>about:buildconfig</tt> can be loaded in mozilla to reveal details about the compiler that was used.) for the remainder of this guide, we'll assume you are develo
ping components under linux.
Weak reference
by now you've probably noticed that this particular weak reference implementation doesn't give you exactly the interface you were ho
ping for.
Xptcall Porting Status
he is ho
ping that others will help test the changes using these two compilers on the various platforms where this same code is used.
pyxpidl
generating c++ headers to generate c++ headers, use the header.py utility: sdkdir/sdk/bin/header.py --cachedir=<path> -o <outputfilename.h> <filename.idl> generating typelibs generating typelib files is done using the typelib.py utility: sdkdir/sdk/bin/typelib.py --cachedir=<path> -o <outputfilename.xpt> <filename.idl> comparing pyxpidl to xpidl this table provides a map
ping of old xpidl options to pyxpidl.
Mozilla technologies
completed, but the long-term goal is to remove webshell and switch over entirely to docshell.embedded dialog apifeed content access apifirefox 2 and thunderbird 2 introduce a series of interfaces that make it easy for extension authors to access rss and atom feeds.life after xul: building firefox interfaces with htmlthis page gathers technical solutions to common problems encountered by teams ship
ping html-based interfaces inside firefox.morkmork is a database file format invented by david mccusker for the mozilla code since the original netscape database information was proprietary and could not be released open source.
Spam filtering
initially, the training.dat file is empty (there was discussion of ship
ping with a default file).
The libmime module
the alternative to that involves ty
ping the literal name of the direct superclass of the class defined in this file, which will be a maintenance headache if the class hierarchy changes.
Creating a Custom Column
getting started in this example we will be develo
ping a small extension that will be adding a column that will display the "reply-to:" field of an email (if it exists, it if often not set).
FAQ
mozillazine's getting started tutorial might provide some useful general pointers regarding develo
ping mozilla extensions.
customDBHeaders Preference
getting started to build upon the reply-to column tutorial, i'll describe the process i went through in develo
ping a custom column to display a 'superfluous' column within thunderbird's main view.
Using the Mozilla symbol server
to use only the mozilla symbol server, add the following entry to your symbol path (note: you can replace c:\symcache\ with any writable directory on your computer, if you'd prefer a different location for downloaded symbols): srv*c:\symcache\*https://symbols.mozilla.org/ set this string as _nt_symbol_path in the environment, using the windbg menus, or by ty
ping the .sympath command.
Add to iPhoto
basic cftype routines handle memory management, dum
ping cftype objects to the console, comparing cftype values, and so forth.
Memory Management
kee
ping objects alive the following js-ctypes objects will hold references to objects, kee
ping them alive.
Plug-in Basics - Plugins
for details about the html elements and their attributes, go on to: using the object element for plug-in display using the embed element for plug-in display plug-in display modes whether you are writing an html page to display a plug-in or develo
ping a plug-in for an html author to include in a page, you need to understand how the display mode affects the way plug-ins appear.
Index - Firefox Developer Tools
found 158 pages: # page tags and summary 1 firefox developer tools develo
ping mozilla, guide, tools, web development, web development:tools, l10n:priority firefox developer tools is a set of web developer tools built into firefox.
All keyboard shortcuts - Firefox Developer Tools
end end end expand currently selected node right arrow right arrow right arrow collapse currently selected node left arrow left arrow left arrow (when a node is selected) move inside the node so you can start step
ping through attributes.
Page inspector 3-pane mode - Firefox Developer Tools
enabling the 3-pane inspector pre-firefox 62 in earlier versions of firefox (since firefox 59/60), you can enable 3 pane mode in release/beta by going to about:config and flip
ping the following prefs to true: devtools.inspector.split-rule-enabled — this switches 3-pane mode on and off.
Page inspector keyboard shortcuts - Firefox Developer Tools
end end end expand currently selected node right arrow right arrow right arrow collapse currently selected node left arrow left arrow left arrow (when a node is selected) move inside the node so you can start step
ping through attributes.
Intensive JavaScript - Firefox Developer Tools
the function calls are interleaved with the pink blocks from the css animation, and each function is short enough that the browser can handle it without the overall frame rate drop
ping.
Settings - Firefox Developer Tools
autoclose brackets determines whether ty
ping an opening character like [ or { will cause the editor to insert the matching closing character ] or } for you.
Shader Editor - Firefox Developer Tools
this is useful for focusing on certain shaders or hiding overlap
ping geometry: if you click the entry, its vertex and fragment shaders are shown in the other two panes, and you can edit them.
Animation.play() - Web APIs
return value undefined example in the growing/shrinking alice game example, clicking or tap
ping the cake causes alice's growing animation (alicechange) to play forward, causing her to get bigger, as well as triggering the cake's animation.
Animation.reverse() - Web APIs
return value undefined example in the growing/shrinking alice game example, clicking or tap
ping the bottle causes alice's growing animation (alicechange) to play backwards, causing her to get smaller.
Animation - Web APIs
animation.reverse() reverses playback direction, stop
ping at the start of the animation.
AudioParamMap - Web APIs
the web audio api interface audioparammap represents a set of multiple audio parameters, each described as a map
ping of a domstring identifying the parameter to the audioparam object representing its value.
AudioTrack.enabled - Web APIs
once those have been found, the values of the two tracks' enabled properties are exchanged, which results in swap
ping which of the two tracks is currently active.
Background Tasks API - Web APIs
window.requestidlecallback() makes it possible to become actively engaged in hel
ping to ensure that the browser's event loop runs smoothly, by allowing the browser to tell your code how much time it can safely use without causing the system to lag.
BaseAudioContext.createDelay() - Web APIs
if you just press the play buttons, the loops will start immediately; if you slide the sliders up to the right, then press the play buttons, a delay will be introduced, so the loo
ping sounds don't start playing for a short amount of time.
BaseAudioContext.createDynamicsCompressor() - Web APIs
it is especially important in games and musical applications where large numbers of individual sounds are played simultaneously, where you want to control the overall signal level and help avoid clip
ping (distorting) of the audio output.
CSS.escape() - Web APIs
--a') // "--a" css.escape(0) // "\30 ", the unicode code point of '0' is 30 css.escape('\0') // "\ufffd", the unicode replacement character in context uses to escape a string for use as part of a selector, the escape() method can be used: var element = document.queryselector('#' + css.escape(id) + ' > img'); the escape() method can also be used for esca
ping strings, although it escapes characters that don't strictly need to be escaped: var element = document.queryselector('a[href="#' + css.escape(fragment) + '"]'); specification specification status comment css object model (cssom)the definition of 'css.escape()' in that specification.
CSS Object Model (CSSOM) - Web APIs
reference animationevent caretposition css csscharsetrule cssconditionrule csscounterstylerule cssfontfacerule cssfontfeaturevaluesmap cssfontfeaturevaluesrule cssgrou
pingrule cssimportrule csskeyframerule csskeyframesrule cssmarginrule cssmediarule cssnamespacerule csspagerule cssrule cssrulelist cssstyledeclaration cssstylesheet cssstylerule csssupportsrule cssvariablesmap cssviewportrule elementcssinlinestyle fontface fontfaceset fontfacesetloadevent geometryutils getstyleutils linkstyle medialist mediaquerylist mediaquerylistevent mediaquerylis...
Basic animations - Web APIs
0, 0)'; ctx.arc(0, 0, 3, 0, math.pi * 2, true); ctx.fill(); ctx.restore(); ctx.beginpath(); ctx.linewidth = 14; ctx.strokestyle = '#325fa2'; ctx.arc(0, 0, 142, 0, math.pi * 2, true); ctx.stroke(); ctx.restore(); window.requestanimationframe(clock); } window.requestanimationframe(clock); <canvas id="canvas" width="150" height="150"></canvas> screenshotlive sample a loo
ping panorama in this example, a panorama is scrolled left-to-right.
Canvas tutorial - Web APIs
in this tutorial basic usage drawing shapes applying styles and colors drawing text using images transformations compositing and clip
ping basic animations advanced animations pixel manipulation hit regions and accessibility optimizing the canvas finale ...
Clipboard - Web APIs
a typical application accesses clipboard functionality by map
ping user input such as keybindings, menu selections, etc.
Credential Management API - Web APIs
these capabilities allow users to sign in without ty
ping passwords, see the federated account they used to sign in to a site, and resume a session without the explicit sign-in flow of an expired session.
DelayNode.delayTime - Web APIs
if you just press the play buttons, the loops will start immediately; if you slide the sliders up to the right, then press the play buttons, a delay will be introduced, so the loo
ping sounds don't start playing for a short amount of time.
DelayNode - Web APIs
if you just press the play buttons, the loops will start immediately; if you slide the sliders up to the right, then press the play buttons, a delay will be introduced, so the loo
ping sounds don't start playing for a short amount of time.
Document.createNSResolver() - Web APIs
to match default elements in a non-null namespace, you either have to refer to a particular element using a form such as *namespace-uri()=http://www.w3.org/1999/xhtml and name()=p[@id='_myid'] (this approach works well for dynamic xpath expressions where the namespaces might not be known) or use prefixed name tests, and create a namespace resolver map
ping the prefix to the namespace.
Document.lastModified - Web APIs
t message when the page changes (see also: javascript cookies api): if (date.parse(document.lastmodified) > parsefloat(document.cookie.replace(/(?:(?:^|.*;)\s*last_modif\s*\=\s*([^;]*).*$)|^.*$/, "$1") || "0")) { document.cookie = "last_modif=" + date.now() + "; expires=fri, 31 dec 9999 23:59:59 gmt; path=" + location.pathname; alert("this page has changed!"); } …the same example, but skip
ping the first visit: var nlastvisit = parsefloat(document.cookie.replace(/(?:(?:^|.*;)\s*last_modif\s*\=\s*([^;]*).*$)|^.*$/, "$1")), nlastmodif = date.parse(document.lastmodified); if (isnan(nlastvisit) || nlastmodif > nlastvisit) { document.cookie = "last_modif=" + date.now() + "; expires=fri, 31 dec 9999 23:59:59 gmt; path=" + location.pathname; if (isfinite(nlastvisit)) { alert("th...
DynamicsCompressorNode() - Web APIs
the dynamicscompressornode() constructor creates a new dynamicscompressornode object which provides a compression effect, which lowers the volume of the loudest parts of the signal, in order to help prevent clip
ping and distortion.
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 clip
ping and distortion that can occur when multiple sounds are played and multiplexed together at once.
EXT_shader_texture_lod - Web APIs
sampler2d sampler, vec2 p, vec2 dpdx, vec2 dpdy) vec4 texture2dprojgradext(sampler2d sampler, vec3 p, vec2 dpdx, vec2 dpdy) vec4 texture2dprojgradext(sampler2d sampler, vec4 p, vec2 dpdx, vec2 dpdy) vec4 texturecubegradext(samplercube sampler, vec3 p, vec3 dpdx, vec3 dpdy) examples enabling the extensions: gl.getextension('ext_shader_texture_lod'); shader code that avoids artifacts when wrap
ping texture coordinates: <script type="x-shader/x-fragment"> #extension gl_ext_shader_texture_lod : enable #extension gl_oes_standard_derivatives : enable uniform sampler2d mytexture; varying vec2 texcoord; void main(){ gl_fragcolor = texture2dgradext(mytexture, mod(texcoord, vec2(0.1, 0.5)), dfdx(texcoord), dfdy(texcoord)); } </script> specifications ...
Element: auxclick event - Web APIs
.backgroundcolor = randomcolor(); }; button.onauxclick = function(e) { e.preventdefault(); button.style.color = randomcolor(); } button.oncontextmenu = function(e) { e.preventdefault(); } notice that in addition to capturing the auxclick event using onauxclick, the contextmenu event is also captured, and preventdefault() called on that event, in order to prevent the context menu from pop
ping up after the color change is applied.
Element.classList - Web APIs
in all polyfilled browsers (ie6-9), an additional element[" uclp"] property is added to element to ensure standards compliant prototy
ping, and a domtokenlist[" ucl"] property is added to each element["classlist"] object to ensure that the domtokenlist is bounded to its own element.
Element.msZoomTo() - Web APIs
example /* zooming in on an element while still kee
ping it centered in the viewport */ var args = { contentx: target.offsetleft + target.offsetwidth/2; contenty: target.offsettop + target.offsetheight/2; scalefactor: 2.0; } zoomer.mszoomto(args); see also microsoft api extensions ...
Event.preventDefault() - Web APIs
<code>preventdefault()</code> won't let you check this!<br>"; event.preventdefault(); }, false); html <p>please click on the checkbox control.</p> <form> <label for="id-checkbox">checkbox:</label> <input type="checkbox" id="id-checkbox"/> </form> <div id="output-box"></div> result stop
ping keystrokes from reaching an edit field the following example demonstrates how invalid text input can be stopped from reaching the input field with preventdefault().
Event - Web APIs
clicking the mouse button or tap
ping keyboard, or generated by apis to represent the progress of an asynchronous task.
EventTarget.addEventListener() - Web APIs
actually, regarding memory consumption, the lack of kee
ping a function reference is not the real issue; rather it is the lack of kee
ping a static function reference.
Using files from web applications - Web APIs
example: showing thumbnails of user-selected images let's say you're develo
ping the next great photo-sharing website and want to use html to display thumbnail previews of images before the user actually uploads them.
FormData.append() - Web APIs
for example (and being compatible with php's naming conventions by adding [] to the name): formdata.append('userpic[]', myfileinput.files[0], 'chris1.jpg'); formdata.append('userpic[]', myfileinput.files[1], 'chris2.jpg'); this technique makes it simpler to process multi-file uploads because the resultant data structure is more conducive to loo
ping.
Guide to the Fullscreen API - Web APIs
other information the document provides some additional information that can be useful when develo
ping fullscreen web applications: documentorshadowroot.fullscreenelement the fullscreenelement property tells you the element that's currently being displayed fullscreen.
Gamepad.id - Web APIs
this information is intended to allow you to find a map
ping for the controls on the device as well as display useful feedback to the user.
Gamepad - Web APIs
gamepad.map
ping read only a string indicating whether the browser has remapped the controls on the device to a known layout.
msAudioCategory - Web APIs
alert loo
ping or longer running alert sounds: alarms ring tones ringing notification sounds that need to attenuate existing audio no backgroundcapablemedia for audio that needs to continue playing in the background.
HTMLButtonElement - Web APIs
htmlbuttonelement.autofocus is a boolean indicating whether or not the control should have input focus when the page loads, unless the user overrides it, for example by ty
ping in a different control.
HTMLInputElement.stepDown() - Web APIs
the stepdown() method will not allow the input to go out of range, in this case stop
ping when it reaches 0 and rounding down and floats that are passed as a parameter.
HTMLInputElement.stepUp() - Web APIs
the stepup will not allow the input to out of range, in this case stop
ping when it reaches 400, and rounding down any floats that are passed as a parameter.
HTMLInputElement - Web APIs
see also readonly autofocus boolean: returns / sets the element's autofocus attribute, which specifies that a form control should have input focus when the page loads, unless the user overrides it, for example by ty
ping in a different control.
HTMLSelectElement - Web APIs
htmlselectelement.autofocus a boolean reflecting the autofocus html attribute, which indicates whether the control should have input focus when the page loads, unless the user overrides it, for example by ty
ping in a different control.
HTMLTextAreaElement - Web APIs
examples autogrowing textarea example make a textarea autogrow while ty
ping: javascript function autogrow (ofield) { if (ofield.scrollheight > ofield.clientheight) { ofield.style.height = ofield.scrollheight + "px"; } } css textarea.noscrollbars { overflow: hidden; width: 300px; height: 100px; } html <form> <fieldset> <legend>your comments</legend> <p><textarea class="noscrollbars" onkeyup="autogrow(this);"></textarea></p> <p><input type...
Drag Operations - Web APIs
bug 460801 see also html drag and drop api (overview) dragging and drop
ping multiple items recommended drag types html5 living standard: drag and drop ...
InputEvent.data - Web APIs
examples in the following simple example we've set up an event listener on the input event so that when any change is made to the contents of the <input> element (either by ty
ping or pasting), the text that was added is retrieved via the inputevent.data property and reported in the paragraph below the input.
MediaSessionActionDetails - Web APIs
a "fast" seek is a seek being performed in a rapid sequence, such as when fast-forwarding or reversing through the media, rapidly skip
ping through it.
MediaStreamTrack.stop() - Web APIs
examples stop
ping a video stream in this example, we see a function which stops a streamed video by calling stop() on every track on a given <video>.
Recording a media element - Web APIs
stop
ping the input stream the stop() function simply stops the input media: function stop(stream) { stream.gettracks().foreach(track => track.stop()); } this works by calling mediastream.gettracks(), using foreach() to call mediastreamtrack.stop() on each track in the stream.
Using the MediaStream Recording API - Web APIs
kee
ping the interface constrained to the viewport, regardless of device height, with calc() the calc() function is one of those useful little utility features that's cropped up in css that doesn't look like much initially, but soon starts to make you think "wow, why didn't we have this before?
MediaStream Recording API - Web APIs
} function download() { var blob = new blob(recordedchunks, { type: "video/webm" }); var url = url.createobjecturl(blob); var a = document.createelement("a"); document.body.appendchild(a); a.style = "display: none"; a.href = url; a.download = "test.webm"; a.click(); window.url.revokeobjecturl(url); } // demo: to download after 9sec settimeout(event => { console.log("stop
ping"); mediarecorder.stop(); }, 9000); examining and controlling the recorder status you can also use the properties of the mediarecorder object to determine the state of the recording process, and its pause() and resume() methods to pause and resume recording of the source media.
MediaTrackConstraints - Web APIs
crop-and-scale means that the user agent can use crop
ping and downscaling on the camera output in order to satisfy other constraints that affect the resolution.
MediaTrackSettings - Web APIs
"crop-and-scale" the track's resolution might be the result of the user agent using crop
ping or downscaling from a higher camera resolution.
MutationObserver.takeRecords() - Web APIs
the most common use case for this is to immediately fetch all pending mutation records immediately prior to disconnecting the observer, so that any pending mutations can be processed when stop
ping down the observer.
Node.nextSibling - Web APIs
element.nextelementsibling may be used to obtain the next element skip
ping any whitespace nodes, other between-element text, or comments.
Using the Notifications API - Web APIs
to avoid duplicating code, we have stored a few bits of housekee
ping code inside the handlepermission() function, which is the first main block inside this snippet.
OES_standard_derivatives - Web APIs
glsl built-in functions the following new functions can be used in glsl shader code, if this extension is enabled: gentype dfdx(gentype) gentype dfdy(gentype) gentype fwidth(gentype) examples enabling the extensions: gl.getextension('oes_standard_derivatives'); gl.getextension('ext_shader_texture_lod'); shader code that avoids artifacts when wrap
ping texture coordinates: <script type="x-shader/x-fragment"> #extension gl_ext_shader_texture_lod : enable #extension gl_oes_standard_derivatives : enable uniform sampler2d mytexture; varying vec2 texcoord; void main(){ gl_fragcolor = texture2dgradext(mytexture, mod(texcoord, vec2(0.1, 0.5)), dfdx(texcoord), dfdy(texcoord)); } </script> specifications ...
ParentNode.replaceChildren() - Web APIs
you simply call it on the parent node without any argument specified: mynode.replacechildren(); transferring nodes between parents replacechildren() enables you to easily transfer nodes between parents, without having to resort to verbose loo
ping code.
PaymentAddress.country - Web APIs
a-2 code identifying the country in which the address is located, or an empty string if no country is available, which frequently can be assumed to mean "same country as the site owner." usage notes if the payment handler validates the address and determines that the value of country is invalid, a call to paymentrequestupdateevent.updatewith() will be made with a details object containing a ship
pingaddresserrors field.
PaymentAddress.organization - Web APIs
this should be the name of the organization that is to receive the shipment for ship
ping addresses, or which is repsonsible for payment for payment addresses.
PaymentCurrencyAmount.value - Web APIs
examples representing prices this example represents the price of $42.95 in us dollars: let itemprice = { currency: "usd", value: "42.95" }; this example specifies a price of £7.77: let ship
pingcost = { currency: "gbp", value: "7.77" } this example specifies a price of 1000¥: let price = { currency: "jpy", value: "1000" } verifying a properly formatted price you can ensure that the value entered as a price is formatted correctly prior to submission by matching it against a simple regular expression: function checkpriceformat(price) { let validregex = /^-?[0-9]+(\.[0-9]+...
PaymentCurrencyAmount - Web APIs
this is used to specify the prices of both line items on a payment, using paymentitem objects, and to provide the cost of a ship
ping option, using paymentship
pingoption.
PaymentDetailsBase - Web APIs
ship
pingoptionsoptional an array of paymentship
pingoption objects, each describing one available ship
ping option from which the user may choose.
PaymentItem - Web APIs
this can be used to show items such as ship
ping or tax amounts that depend upon the selection of ship
ping address, ship
ping option, or so forth.
PaymentRequest: merchantvalidation event - Web APIs
related events payerdetailchange, paymentmethodchange, ship
pingaddresschange, and ship
pingoptionchange specifications specification status comment payment request apithe definition of 'merchantvalidation' in that specification.
PaymentResponse.details - Web APIs
payment.show().then(paymentresponse => { var paymentdata = { // payment method string method: paymentresponse.methodname, // payment details as you requested details: paymentresponse.details, // ship
ping address information address: todict(paymentresponse.ship
pingaddress) }; // send information to the server }); specifications specification status comment payment request api candidate recommendation initial definition.
PaymentResponse.methodName - Web APIs
payment.show().then(paymentresponse => { var paymentdata = { // payment method string method: paymentresponse.methodname, // payment details as you requested details: paymentresponse.details, // ship
ping address information address: todict(paymentresponse.ship
pingaddress) }; // send information to the server }); specifications specification status comment payment request api candidate recommendation initial definition.
PaymentValidationErrors - Web APIs
ship
pingaddress optional an addresserrors object which contains error messages for any of the fields in the ship
ping address that failed validation.
Pbkdf2Params - Web APIs
the general guidance here is to use as many iterations as possible, subject to kee
ping an acceptable level of performance for your application.
PerformanceNavigation.type - Web APIs
possible values are: value constant name meaning 0 type_navigate the page was accessed by following a link, a bookmark, a form submission, a script, or ty
ping the url in the address bar.
PerformanceNavigation - Web APIs
possible values are: type_navigate (0) the page was accessed by following a link, a bookmark, a form submission, or a script, or by ty
ping the url in the address bar.
Performance Timeline - Web APIs
performance observers : as shown in the performanceobserver interface's browser compatibility table, this interface has no ship
ping implementations.
Multi-touch interaction - Web APIs
move_event(ev) { // remove this event from the target's cache var cache = get_cache(ev); for (var i = 0; i < cache.length; i++) { if (cache[i].pointerid == ev.pointerid) { cache.splice(i, 1); break; } } } update background color the background color of the touch areas will change as follows: no active touches is white; one active touch is yellow; two simultaneous touches is
ping and three or more simultaneous touches is lightblue.
Using Pointer Events - Web APIs
this may be a trackpad, a touch screen, or even a virtual map
ping of a user's desk surface (or mousepad) with the physical screen.
RTCIceCandidateStats.priority - Web APIs
1 for rtp, 2 for rtcp) the candidate's priority is computed using the formula (ptype is the priority of the candidate's type and plocal is the priority of the ip address): priority = 224×ptype + 28×plocal + (256 - componentid)priority\quad =\quad { 2 }^{ 24 }\times { p }_{ type }\quad +\quad { 2 }^{ 8 }\times { p }_{ local }\quad +\quad (256\quad -\quad componentid) this is equivalent to map
ping the priorities of teh candidate type, the local ip, and the component id into various bit ranges within the 32-bit priority value.
RTCInboundRtpStreamStats.sliCount - Web APIs
in general, what's usually of interest is that the higher this number is, the more the stream data is becoming corrupted between the sender and the receiver, requiring resends or drop
ping frames.
RTCOutboundRtpStreamStats - Web APIs
qualitylimitationdurations a record map
ping each of the quality limitation reasons in the rtcremoteinboundrtpstreamstats enumeration to a floating-point value indicating the number of seconds the stream has spent with its quality limited for that reason.
RTCPeerConnection.close() - Web APIs
all rtcrtpsender objects are considered to be stopped once this returns (they may still be in the process of stop
ping, but for all intents and purposes, they're stopped).
RTCRtpStreamStats - Web APIs
combined with rtcreceivedrtpstreamstats.framesdecoded or rtcsentrtpstreamstats.framesencoded, you can approximate the average qp over those frames, kee
ping in mind that codecs often vary the quantizer values even within frames.
RTCStatsReport - Web APIs
this statistics report contains a map
ping of statistic category string names to objects containing the corresponding statistics data.
Using the Resource Timing API - Web APIs
load some image to trigger "resource" fetch events var image1 = new image(); image1.src = "https://developer.mozilla.org/static/img/opengraph-logo.png"; var image2 = new image(); image2.src = "http://mozorg.cdn.mozilla.net/media/img/firefox/firefox-256.e2c1fc556816.jpg" // set a callback if the resource buffer becomes filled performance.onresourcetimingbufferfull = buffer_full; } co
ping with cors when cors is in effect, many of the timing properties' values are returned as zero unless the server's access policy permits these values to be shared.
SVGAElement - Web APIs
svgaelement.
ping is a domstring that reflects the
ping attribute, containing a space-separated list of urls to which, when the hyperlink is followed, post requests with the body
ping will be sent by the browser (in the background).
Screen Wake Lock API - Web APIs
there are plenty of use cases for kee
ping a screen on, including reading an ebook, map navigation, following a recipe, presenting to an audience, scanning a qr/barcode or applications that use voice or gesture control, rather than tactile input (the default way to keep a screen awake).
Service Worker API - Web APIs
it provides a master directory of all the named caches that a serviceworker can access, and maintains a map
ping of string names to corresponding cache objects.
Streams API concepts - Web APIs
after the calculation is performed, chunk generation will be slowed down/sped up as appropriate to keep the stream flowing as fast as possible while kee
ping the desired size above zero.
SubmitEvent.submitter - Web APIs
examples in this example, a shop
ping cart may have an assortment of different submit buttons depending on factors such as the user's settings, the shop's settings, and any minimum or maximum shop
ping card totals established by the payment processors.
SubmitEvent - Web APIs
examples in this example, a shop
ping cart may have an assortment of different submit buttons depending on factors such as the user's settings, the shop's settings, and any minimum or maximum shop
ping card totals established by the payment processors.
Text.splitText() - Web APIs
the text.splittext() method breaks the text node into two nodes at the specified offset, kee
ping both nodes in the tree as siblings.
TextTrack.mode - Web APIs
the user agent is kee
ping a list of the active cues (in the track's activecues property) and events are being fired at the corresponding times, even though the text isn't being displayed.
VideoPlaybackQuality.totalVideoFrames - Web APIs
var videoelem = document.getelementbyid("my_vid"); var quality = videoelem.getvideoplaybackquality(); if ((quality.corruptedvideoframes + quality.droppedvideoframes)/quality.totalvideoframes > 0.1) { lostframesthresholdexceeded(); } a similar algorithm might be used to attempt to switch to a lower-resolution video that requires less bandwidth, in order to avoid drop
ping frames.
WEBGL_draw_buffers - Web APIs
amebuffer, fb); gl.framebuffertexture2d(gl.framebuffer, ext.color_attachment0_webgl, gl.texture_2d, tx[0], 0); gl.framebuffertexture2d(gl.framebuffer, ext.color_attachment1_webgl, gl.texture_2d, tx[1], 0); gl.framebuffertexture2d(gl.framebuffer, ext.color_attachment2_webgl, gl.texture_2d, tx[2], 0); gl.framebuffertexture2d(gl.framebuffer, ext.color_attachment3_webgl, gl.texture_2d, tx[3], 0); map
ping the color attachments to draw buffer slots that the fragment shader will write to using gl_fragdata: ext.drawbufferswebgl([ ext.color_attachment0_webgl, // gl_fragdata[0] ext.color_attachment1_webgl, // gl_fragdata[1] ext.color_attachment2_webgl, // gl_fragdata[2] ext.color_attachment3_webgl // gl_fragdata[3] ]); shader code that writes to multiple textures: <script type="x-shader/x-f...
Animating textures in WebGL - Web APIs
= 0; const internalformat = gl.rgba; const width = 1; const height = 1; const border = 0; const srcformat = gl.rgba; const srctype = gl.unsigned_byte; const pixel = new uint8array([0, 0, 255, 255]); // opaque blue gl.teximage2d(gl.texture_2d, level, internalformat, width, height, border, srcformat, srctype, pixel); // turn off mips and set wrap
ping to clamp to edge so it // will work regardless of the dimensions of the video.
WebGL tutorial - Web APIs
animating textures in webgl shows how to animate textures; in this case, by map
ping an ogg video onto the faces of a rotating cube.
Signaling and video calling - Web APIs
ending the call the closevideocall() function, shown below, is responsible for stop
ping the streams, cleaning up, and disposing of the rtcpeerconnection object: function closevideocall() { var remotevideo = document.getelementbyid("received_video"); var localvideo = document.getelementbyid("local_video"); if (mypeerconnection) { mypeerconnection.ontrack = null; mypeerconnection.onremovetrack = null; mypeerconnection.onremovestream = null; mypeerconnection.oni...
Using DTMF with WebRTC - Web APIs
this is done by stop
ping each stream on both the caller and the receiver by iterating over each rtcpeerconnection's track list (as returned by its gettracks() method) and calling each track's stop() method.
WebRTC Statistics API - Web APIs
map
ping of statistic category names to the dictionaries they implement statistic category name (rtcstatstype) description dictionaries implemented candidate-pair statistics describing the change from one rtcicetransport to another, such as during an ice restart.
Using bounded reference spaces - Web APIs
it's difficult (and would probably be fairly confusing) to create a virtual world that's larger than the physical space available to the user if you're map
ping their real-world movement into the virtual environment.
Visualizations with Web Audio API - Web APIs
set up the buffer: analyser.fftsize = 2048; var bufferlength = analyser.frequencybincount; var dataarray = new uint8array(bufferlength); next, we clear the canvas of what had been drawn on it before to get ready for the new visualization display: canvasctx.clearrect(0, 0, width, height); we now define the draw() function: function draw() { in here, we use requestanimationframe() to keep loo
ping 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 dra...
Using Web Workers - Web APIs
chrome workers are a firefox-only type of worker that you can use if you are develo
ping add-ons and want to use workers in extensions and have access to js-ctypes in your worker.
Web Workers API - Web APIs
chrome workers are a firefox-only type of worker that you can use if you are develo
ping add-ons and want to use workers in extensions and have access to js-ctypes in your worker.
Window.captureEvents() - Web APIs
in order for events to "bubble up" in the way that they normally do, you must call window.releaseevents() ( ) on the window to keep it from trap
ping events.
Window.open() - Web APIs
the purpose is to warn users in advance of context changes to minimize confusion on the user's part: changing the current window or pop
ping up new windows can be very disorienting to users (back toolbar button is disabled).
window.postMessage() - Web APIs
web context scripts can use custom events to communicate with content scripts (with randomly generated event names, if needed, to prevent snoo
ping from the guest page).
Window - Web APIs
window.releaseevents() releases the window from trap
ping events of a specific type.
WindowOrWorkerGlobalScope.setTimeout() - Web APIs
the prefs that control this behaviour are: dom.min_tracking_timeout_value: 4 dom.min_tracking_background_timeout_value: 10000 dom.timeout.tracking_throttling_delay: 30000 late timeouts in addition to "clam
ping", the timeout can also fire later when the page (or the os/browser itself) is busy with other tasks.
XMLHttpRequest.getAllResponseHeaders() - Web APIs
the code shows how to obtain the raw header string, as well as how to convert it into an array of individual headers and then how to take that array and create a map
ping of header names to their values.
XRInputSourceEvent() - Web APIs
selectstart sent to an xrsession when an input source begins its primary action, indicating that the user has begun a command-like input, such as pressing a trigger or button, issuing a spoken command, tap
ping on a touchpad, or the like.
XRInputSourceEvent.frame - Web APIs
examples this code shows a handler for the selectstart event which gets the target ray's pose from the frame, map
ping the pose representing the ray (event.inputsource.targetrayspace) to the overall reference space myrefspace.
XRInputSourceEvent - Web APIs
selectstart sent to an xrsession when an input source begins its primary action, indicating that the user has begun a command-like input, such as pressing a trigger or button, issuing a spoken command, tap
ping on a touchpad, or the like.
XRPermissionDescriptor - Web APIs
if the permission request promise is rejected, the error is handled (currently by just dum
ping it to the console using domxref("console.log()")}}).
XRReferenceSpace: reset event - Web APIs
however, if that kind of "teleportation" is being used, you actually want to avoid jum
ping the user's position after tracking recovery, this can introduce additional and potentially jarring jum
ping.
XRSession: select event - Web APIs
examples of comon kinds of primary action are users pressing triggers or buttons, tap
ping a touchpad, speaking a command, or performing a recognizable gesture when using a video tracking system or handheld controller with an accelerometer.
XRSession: selectend event - Web APIs
primary actions include things like users pressing triggers or buttons, tap
ping a touchpad, speaking a command, or performing a recognizable gesture when using a video tracking system or handheld controller with an accelerometer.
XRSession: selectstart event - Web APIs
primary actions include things like users pressing triggers or buttons, tap
ping a touchpad, speaking a command, or performing a recognizable gesture when using a video tracking system or handheld controller with an accelerometer.
XRSession: squeeze event - Web APIs
examples of comon kinds of primary action are users pressing triggers or buttons, tap
ping a touchpad, speaking a command, or performing a recognizable gesture when using a video tracking system or handheld controller with an accelerometer.
XRSession: squeezeend event - Web APIs
primary squeeze actions include things like users pressing triggers or buttons, tap
ping a touchpad, speaking a command, or performing a recognizable gesture when using a video tracking system or handheld controller with an accelerometer.
XRSession: squeezestart event - Web APIs
primary squeeze actions are actions which are meant to represent grip
ping or squeezing using your hands, and may be simulated using triggers on hand controllers.
XRTargetRayMode - Web APIs
targeting may be done by looking at the target using a gaze-tracking system, pointing at the target with a hand controller, glove, or motion-tracking system, or by tap
ping or clicking on the target using a finger on a screen or with a mouse.
XRView - Web APIs
it's possible to have xrview objects which represent overlap
ping regions as well as entirely disparate regions; in a game, you might have views that can be presented to observe a remote site using a security camera or other device, for example.
XRWebGLLayerInit.ignoreDepthValues - Web APIs
the depth buffer is typically used to assist in ordering vertices and, by extension, polygons while compositing, to ensure that the scene is correctly composited, with objects the correct distance away and with clip
ping and other distance-related computations performed as accurately as possible.
Using the aria-labelledby attribute - Accessibility
</div> notes the most common accessibility api map
ping for a label is the accessible name property used by aria roles all elements of the base markup related aria techniques using the aria-label attribute using the aria-describedby attribute compatibility tbd: add support information for common ua and at product combinations additional resources wai-aria specification for aria-labelledby ...
ARIA annotations - Accessibility
this is the job of role="suggestion", which should be set on an element wrap
ping both of them like so: <p>freida’s pet is a <span role="suggestion"><span role="deletion">black cat called luna</span><span role="insertion">purple tyrannosaurus rex called tiny</span></span>.
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="#">ship
ping & 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: row role - Accessibility
if the element with the aria-expanded attribute controls the expansion of another grou
ping container that is not 'owned by' the element, the author should reference the container by using the aria-controls attribute.
ARIA: Suggestion role - Accessibility
this is the job of role="suggestion", which should be set on an element wrap
ping both of them like so: <p>freida’s pet is a <span role="suggestion"> <span role="deletion">black cat called luna</span> <span role="insertion">purple tyrannosaurus rex called tiny</span> </span>.
ARIA: dialog role - Accessibility
in other words, the dialog's label acts like a grou
ping label for the controls inside it (similar to how a <legend> element provides a grou
ping label for the controls inside a <fieldset> element).
ARIA: listbox role - Accessibility
ty
ping one or more letters will navigate the list items (same letter goes to each item starting with that, different letters go to the first item starting with that entire string).
WAI-ARIA Roles - Accessibility
it is intended to mimic the functionality of the html td element for table-style grou
ping of information.aria: heading rolethe heading role defines this element as a heading to a page or section.
Architecture - Accessibility
kee
ping the link name of the interface is unfortunate but necessary for backwards compatibility, without introducing superfluous interfaces.
Keyboard-navigable JavaScript widgets - Accessibility
grou
ping controls for grou
ping widgets such as menus, tablists, grids, or tree views, the parent element should be in the tab order (tabindex="0"), and each descendent choice/tab/cell/row should be removed from the tab order (tabindex="-1").
Operable - Accessibility
2.2.2 pausing, stop
ping, hiding (a) for moving/blinking content that starts automatically, lasts longer than 5 seconds, and is shown alongside other content, controls should be provided to pause, stop, or hide it.
Understandable - Accessibility
guideline 3.3 — input assistance: help users avoid and correct mistakes this guideline centers around hel
ping users enter correct information when required with the minimum of mistakes.
Accessibility
accessibility means develo
ping content to be as accessible as possible no matter an individual's physical and cognitive abilities and no matter how they access the web.
-moz-image-region - CSS: Cascading Style Sheets
it will not work with xul <image src="url" />.inheritedyescomputed valueas specifiedanimation typediscrete formal syntax <shape> | autowhere <shape> = rect(<top>, <right>, <bottom>, <left>) examples clip
ping an image #example-button { /* display only the 4x4 area from the top left of this image */ list-style-image: url("chrome://example/skin/example.png"); -moz-image-region: rect(0px, 4px, 4px, 0px); } #example-button:hover { /* use the 4x4 area to the right of the first for the hovered button */ -moz-image-region: rect(0px, 8px, 4px, 4px); } specifications not part of any standard.
::before (:before) - CSS: Cascading Style Sheets
html <ol> <li>crack eggs into bowl</li> <li>add milk</li> <li>add flour</li> <li aria-current='step'>mix thoroughly into a smooth batter</li> <li>pour a ladleful of batter onto a hot, greased, flat frying pan</li> <li>fry until the top of the pancake loses its gloss</li> <li>flip it over and fry for a couple more minutes</li> <li>serve with your favorite top
ping</li> </ol> css li { padding:0.5em; } li[aria-current='step'] { font-weight:bold; } li[aria-current='step']::after { content: " \21e6"; /* hexadecimal for unicode leftwards white arrow*/ display: inline; } result specifications specification status comment css pseudo-elements level 4the definition of '::before' in that specification.
::slotted() - CSS: Cascading Style Sheets
shazaam</p> <span slot="person-age">immortal</span> <span slot="person-occupation">superhero</span> </person-details> specifications specification status comment css sco
ping module level 1the definition of '::slotted' in that specification.
:focus-within - CSS: Cascading Style Sheets
html <p>try ty
ping into this form.</p> <form> <label for="given_name">given name:</label> <input id="given_name" type="text"> <br> <label for="family_name">family name:</label> <input id="family_name" type="text"> </form> css form { border: 1px solid; color: gray; padding: 4px; } form:focus-within { background: #ff8; color: black; } input { margin: 4px; } result specifications ...
:read-only - CSS: Cascading Style Sheets
input:read-only, textarea:read-only { background-color: #ccc; } p:read-only { background-color: #ccc; } syntax :read-only examples confirming form information in read-only/read-write controls one use of readonly form controls is to allow the user to check and verify information that they may have entered in an earlier form (for example, ship
ping details), while still being able to submit the information along with the rest of the form.
:read-write - CSS: Cascading Style Sheets
input:read-write, textarea:read-write { background-color: #bbf; } p:read-write { background-color: #bbf; } syntax :read-write examples confirming form information in read-only/read-write controls one use of readonly form controls is to allow the user to check and verify information that they may have entered in an earlier form (for example, ship
ping details), while still being able to submit the information along with the rest of the form.
font-stretch - CSS: Cascading Style Sheets
keyword to numeric map
ping the table below shows the map
ping between keyword values and numeric percentages: keyword percentage ultra-condensed 50% extra-condensed 62.5% condensed 75% semi-condensed 87.5% normal 100% semi-expanded 112.5% expanded 125% extra-expanded 150% ultra-expanded 200% v...
CSS Animations tips and tricks - CSS: Cascading Style Sheets
of course, we also need to add an event handler to our "run" button so it'll actually do something: document.queryselector(".runbutton").addeventlistener("click", play, false); result stop
ping an animation simply removing the animation-name applied to an element will make it jump or cut to its next state.
Border-image generator - CSS: Cascading Style Sheets
.54%; } .span_8 { width: 66.08%; } .span_7 { width: 57.62%; } .span_6 { width: 49.16%; } .span_5 { width: 40.7%; } .span_4 { width: 32.24%; } .span_3 { width: 23.78%; } .span_2 { width: 15.32%; } .span_1 { width: 6.86%; } /* sections * ========================================================================== */ .section { clear: both; padding: 0px; margin: 0px; } /* grou
ping * ========================================================================== */ .group:before, .group:after { content: ""; display: table; } .group:after { clear:both; } .group { zoom: 1; /* for ie 6/7 (trigger haslayout) */ } /* grid column setup * ========================================================================== */ .col { display: block; float:left; margin: ...
Border-radius generator - CSS: Cascading Style Sheets
4%; } .span_8 { width: 66.08%; } .span_7 { width: 57.62%; } .span_6 { width: 49.16%; } .span_5 { width: 40.7%; } .span_4 { width: 32.24%; } .span_3 { width: 23.78%; } .span_2 { width: 15.32%; } .span_1 { width: 6.86%; } /* sections * ========================================================================== */ .section { clear: both; padding: 0px; margin: 0px; } /* grou
ping * ========================================================================== */ .group:before, .group:after { content: ""; display: table; } .group:after { clear:both; } .group { zoom: 1; /* for ie 6/7 (trigger haslayout) */ } /* grid column setup * ========================================================================== */ .col { display: block; float:left; margin: ...
Box-shadow generator - CSS: Cascading Style Sheets
.54%; } .span_8 { width: 66.08%; } .span_7 { width: 57.62%; } .span_6 { width: 49.16%; } .span_5 { width: 40.7%; } .span_4 { width: 32.24%; } .span_3 { width: 23.78%; } .span_2 { width: 15.32%; } .span_1 { width: 6.86%; } /* sections * ========================================================================== */ .section { clear: both; padding: 0px; margin: 0px; } /* grou
ping * ========================================================================== */ .group:before, .group:after { content: ""; display: table; } .group:after { clear:both; } .group { zoom: 1; /* for ie 6/7 (trigger haslayout) */ } /* grid column setup * ========================================================================== */ .col { display: block; float:left; margin: ...
CSS Display - CSS: Cascading Style Sheets
cy> 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 wrap
ping 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-based placement grid template areas layout using named grid lines auto-placement in grid layout box alignment in grid layout grids, logical values and ...
Cross-browser Flexbox mixins - CSS: Cascading Style Sheets
this set uses: fallbacks using 2009 'box' syntax (ff and older webkit) and prefixed syntaxes (ie10, webkit browsers without flex wrap
ping) final standards syntax (ff, safari, chrome, ie11+, edge, opera) this was inspired by: http://dev.opera.com/articles/view/advanced-cross-browser-flexbox/ with help from: http://w3.org/tr/css3-flexbox/ http://the-echoplex.net/flexyboxes/ http://msdn.microsoft.com/en-us/library/ie/hh772069(v=vs.85).aspx http://css-tricks.com/using-flexbox/ a complete guide to flexbox | css-tricks visual guide to css3 flexbox: flexbox playground | note: mixins are not currently supported natively in browsers.
Typical use cases of Flexbox - CSS: Cascading Style Sheets
.media .content { flex: 3; padding: 10px; } .image { flex: 1; } flip
ping the media object to switch the display of the media object so that the image is on the right and the content is on the left we can use the flex-direction property set to row-reverse.
Using CSS gradients - CSS: Cascading Style Sheets
90px, rgba(0, 255, 0, 0.5) 120px, rgba(0, 0, 255, 0.5) 150px, rgba(75, 0, 130, 0.5) 180px, rgba(238, 130, 238, 0.5) 210px, rgba(255, 0, 0, 0.5) 230px), repeating-linear-gradient(23deg, red 50px, orange 100px, yellow 150px, green 200px, blue 250px, indigo 300px, violet 350px, red 370px); } plaid gradient to create plaid we include several overlap
ping gradients with transparency.
CSS Images - CSS: Cascading Style Sheets
implementing image sprites in css describes the common technique grou
ping several images in one single document to save download requests and speed up the availability of a page.
Stacking context example 3 - CSS: Cascading Style Sheets
level #1 this problem can be avoided by removing overlap
ping between different level menus, or by using individual (and different) z-index values assigned through the id selector instead of class selector, or by flattening the html hierarchy.
Scaling of SVG backgrounds - CSS: Cascading Style Sheets
contain case background: url(100px-height-3x4-ratio.svg); background-size: contain; the rendered output looks like this: notice how the entire image is rendered, fitting as best as possible into the box without clip
ping any of it away.
clip - CSS: Cascading Style Sheets
formal definition initial valueautoapplies toabsolutely positioned elementsinheritednocomputed valueauto if specified as auto, otherwise a rectangle with four values, each of which is auto if specified as auto or the computed length otherwiseanimation typea rectangle formal syntax <shape> | autowhere <shape> = rect(<top>, <right>, <bottom>, <left>) examples clip
ping an image css .dotted-border { border: dotted; position: relative; width: 536px; height: 350px; } #top-left, #middle, #bottom-right { position: absolute; top: 0; } #top-left { left: 360px; clip: rect(0 175px 113px 0); } #middle { left: 280px; clip: rect(119px 255px 229px 80px); } #bottom-right { left: 200px; clip: rect(235px 335px 345px 160px); } html <p class="dot...
font-stretch - CSS: Cascading Style Sheets
keyword to numeric map
ping the table below shows the map
ping between keyword values and numeric percentages: keyword percentage ultra-condensed 50% extra-condensed 62.5% condensed 75% semi-condensed 87.5% normal 100% semi-expanded 112.5% expanded 125% extra-expanded 150% ultra-expanded 200% ...
font-style - CSS: Cascading Style Sheets
when the specified style is not available, both italic and oblique faces are simulated by artificially slo
ping the glyphs of the regular face (use font-synthesis to control this behavior).
mask-clip - CSS: Cascading Style Sheets
-boxapplies toall elements; in svg, it applies to container elements excluding the defs element and all graphics elementsinheritednocomputed valueas specifiedanimation typediscrete formal syntax [ <geometry-box> | no-clip ]#where <geometry-box> = <shape-box> | fill-box | stroke-box | view-boxwhere <shape-box> = <box> | margin-boxwhere <box> = border-box | padding-box | content-box examples clip
ping a mask to the border box css #masked { width: 100px; height: 100px; background-color: #8cffa0; margin: 20px; border: 20px solid #8ca0ff; padding: 20px; mask-image: url(https://mdn.mozillademos.org/files/12668/mdn.svg); mask-size: 100% 100%; mask-clip: border-box; /* can be changed in the live sample */ } html <div id="masked"> </div> <select id="clipbox"> <option value="...
max-block-size - CSS: Cascading Style Sheets
how writing-mode affects directionality the values of writing-mode affect the map
ping of max-block-size to max-width or max-height as follows: values of writing-mode max-block-size is equivalent to horizontal-tb, lr , lr-tb , rl , rb , rb-rl max-height vertical-rl, vertical-lr, sideways-rl , sideways-lr , tb , tb-rl max-width the writing-mode values sideways-lr and sideways-rl were removed from the css writing modes level...
overflow - CSS: Cascading Style Sheets
in about:config, set layout.css.overflow.moz-scrollbars.enabled to true description overflow options include clip
ping, showing scrollbars, or displaying the content flowing out of its container into the surrounding area.
pointer-events - CSS: Cascading Style Sheets
to help us in deciding how pointer-events should be further extended for html, if you have any particular things that you would like to be able to do with this property, then please add them to the use cases section of this wiki page (don't worry about kee
ping it tidy).
shape-image-threshold - CSS: Cascading Style Sheets
formal definition initial value0.0applies tofloatsinheritednocomputed valuethe same as the specified value after clip
ping the <number> to the range [0.0, 1.0].animation typea number formal syntax <alpha-value>where <alpha-value> = <number> | <percentage> examples aligning text to a gradient this example creates a <div> block with a gradient background image.
<string> - CSS: Cascading Style Sheets
examples /* simple strings */ "this string is demarcated by double quotes." 'this string is demarcated by single quotes.' /* character esca
ping */ "this is a string with \" an escaped double quote." "this string also has \22 an escaped double quote." 'this is a string with \' an escaped single quote.' 'this string also has \27 an escaped single quote.' "this is a string with \\ an escaped backslash." /* new line in a string */ "this string has a \aline break in it." /* string spanning two lines of code (these two strings will have iden...
text-decoration-skip - CSS: Cascading Style Sheets
formal definition initial valueobjectsapplies toall elementsinheritedyescomputed valueas specifiedanimation typediscrete formal syntax none | [ objects | [ spaces | [ leading-spaces | trailing-spaces ] ] | edges | box-decoration ] examples skip
ping edges html <p>hey, grab a cup of <em>coffee!</em></p> css p { margin: 0; font-size: 3em; text-decoration: underline; text-decoration-skip: edges; } result specifications specification status comment css text decoration module level 4the definition of 'text-decoration-skip' in that specification.
transform-box - CSS: Cascading Style Sheets
formal definition initial valueview-boxapplies totransformable elementsinheritednocomputed valueas specifiedanimation typediscrete formal syntax content-box | border-box | fill-box | stroke-box | view-box examples svg transform-origin sco
ping in this example we have an svg: <svg id="svg" xmlns="http://www.w3.org/2000/svg" viewbox="0 0 50 50"> <g> <circle id="center" fill="red" r="1" transform="translate(25 25)" /> <circle id="boxcenter" fill="blue" r=".5" transform="translate(15 15)" /> <rect id="box" x="10" y="10" width="10" height="10" rx="1" ry="1" stroke="black" fill="none" /> </g> </svg> in the css we have an a...
skew() - CSS: Cascading Style Sheets
this transformation is a shear map
ping (transvection) that distorts each point within an element by a certain angle in the horizontal and vertical directions.
user-select - CSS: Cascading Style Sheets
inherit; user-select: initial; user-select: unset; /* mozilla-specific values */ -moz-user-select: none; -moz-user-select: text; -moz-user-select: all; /* webkit-specific values */ -webkit-user-select: none; -webkit-user-select: text; -webkit-user-select: all; /* doesn't work in safari; use only "none" or "text", or else it will allow ty
ping in the <html> container */ /* microsoft-specific values */ -ms-user-select: none; -ms-user-select: text; -ms-user-select: element; note: user-select is not an inherited property, though the initial auto value makes it behave like it is inherited most of the time.
Demos of open web technologies
notifications (source code) web audio api web audio fireworks oscope.js - javascript oscilloscope html5 web audio showcase (source code) html5 audio visualizer (source code) graphical filter editor and visualizer (source code) file api slide my text - presentation from plain text files web workers web worker fractals photo editor coral generator raytracer hotcold touch ty
ping ...
Event reference
canplaythrough the browser estimates it can play the media up to its end without stop
ping for content buffering.
Media buffering, seeking, and time ranges - Developer guides
this will work with <audio> or <video>; for now let's consider a simple audio example: <audio id="my-audio" controls src="music.mp3"> </audio> we can access these attributes like so: var myaudio = document.getelementbyid('my-audio'); var bufferedtimeranges = myaudio.buffered; timeranges object timeranges are a series of non-overlap
ping ranges of time, with start and stop times.
Audio and Video Delivery - Developer guides
other tips for audio/video stop
ping the download of media while stop
ping the playback of media is as easy as calling the element's pause() method, the browser keeps downloading the media until the media element is disposed of through garbage collection.
Media events - Developer guides
playing sent when the media has enough data to start playing, after the play event, but also when recovering from being stalled, when loo
ping media restarts, and after seeked, if it was playing before seeking.
Orientation and motion data explained - Developer guides
beta rotation around the x axis -- that is, tip
ping the device away from or toward the user -- causes the beta rotation angle to change: the beta angle is 0° when the device's top and bottom are the same distance from the earth's surface; it increases toward 180° as the device is tipped forward toward the user, and it decreases toward -180° as the device is tipped backward away from the user.
Content categories - Developer guides
this is a loose grou
ping (it doesn't actually create a relationship among elements of these categories), but they help define and describe the categories' shared behavior and their associated rules, especially when you come upon their intricate details.
HTML5 Parser - Developer guides
the older practice of esca
ping the string </script> by surrounding it with comment markers, while supported by html5, is problematic in cases where the closing comment marker is omitted (see preceding point).
HTML5 - Developer guides
drag and drop the html5 drag and drop api allows support for dragging and drop
ping items within and between web sites.
HTML attribute: min - HTML: Hypertext Markup Language
syntax if any is not explicity set, valid values for the number, date/time input types, and range input types are equal to the basis for step
ping - the min value and increments of the step value, up to the max value, if specified.
<abbr>: The Abbreviation element - HTML: Hypertext 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 hel
ping people understand it, especially if the content is technical or industry jargon.
<area> - HTML: Hypertext Markup Language
ping contains a space-separated list of urls to which, when the hyperlink is followed, post requests with the body
ping will be sent by the browser (in the background).
<img>: The Image Embed element - HTML: Hypertext Markup Language
you can use the object-position property to position the image within the element's box, and the object-fit property to adjust the sizing of the image within the box (for example, whether the image should fit the box or fill it even if clip
ping is required).
<isindex> - HTML: Hypertext Markup Language
kevin replies that he doesn't like the boolean nature of isindex and would prefer a system where everything is searchable and proposes to extend the current www framework with a specific httpd configuration and defined that some uris map
ping create search queries.
<keygen> - HTML: Hypertext Markup Language
autofocus this boolean attribute lets you specify that the control should have input focus when the page loads, unless the user overrides it, for example by ty
ping in a different control.
<p>: The Paragraph element - HTML: Hypertext Markup Language
paragraphs are usually represented in visual media as blocks of text separated from adjacent blocks by blank lines and/or first-line indentation, but html paragraphs can be any structural grou
ping of related content, such as images or form fields.
autocapitalize - HTML: Hypertext Markup Language
lization is applied (all letters default to lowercase) on or sentences: the first letter of each sentence defaults to a capital letter; all other letters default to lowercase words: the first letter of each word defaults to a capital letter; all other letters default to lowercase characters: all letters should default to uppercase the autocapitalize attribute doesn’t affect behavior when ty
ping on a physical keyboard.
Global attributes - HTML: Hypertext Markup Language
it can have the following values: copy, which indicates that drop
ping will create a copy of the element that was dragged move, which indicates that the element that was dragged will be moved to this new location.
Data URLs - HTTP
[convert]::tobase64string([text.encoding]::utf8.getbytes("hello")) # outputs to console: agvsbg8= bash -c "echo -n hello`|base64" # outputs to console: agvsbg8= # the backtick (`) is used to escape the pi
ping (|) character here common problems this section describes problems that commonly occur when creating and using data urls.
Evolution of HTTP - HTTP
developed by tim berners-lee and his team between 1989-1991, http has seen many changes, kee
ping most of the simplicity and further sha
ping its flexibility.
Content Security Policy (CSP) - HTTP
example 4 a web site administrator for an online banking site wants to ensure that all its content is loaded using tls, in order to prevent attackers from eavesdrop
ping on requests.
Compression in HTTP - HTTP
for better performance of a web site, it is ideal to compress as much as possible, while kee
ping an acceptable level of quality.
Cross-Origin Resource Policy (CORP) - HTTP
as this policy is expressed via a response header, the actual request is not prevented—rather, the browser prevents the result from being leaked by strip
ping the response body.
Access-Control-Request-Headers - HTTP
examples access-control-request-headers: x-
pingother, content-type specifications specification status comment fetchthe definition of 'access-control-request-headers' in that specification.
Content-Location - HTTP
then the client could remember that the json version is available at that particular url, skip
ping content negotation the next time it requests that document.
CSP: style-src - HTTP
if 'unsafe-eval' isn't specified with the style-src directive, the following methods are blocked and won't have any effect: cssstylesheet.insertrule() cssgrou
pingrule.insertrule() cssstyledeclaration.csstext specifications specification status comment content security policy level 3the definition of 'style-src' in that specification.
CSP: upgrade-insecure-requests - HTTP
the upgrade-insecure-requests directive will not ensure that users visiting your site via links on third-party sites will be upgraded to https for the top-level navigation and thus does not replace the strict-transport-security (hsts) header, which should still be set with an appropriate max-age to ensure that users are not subject to ssl strip
ping attacks.
Sec-Fetch-Site - HTTP
directly entering a url in the address bar, opening a bookmark, or draging-and-drop
ping a file into the browser window.
Proxy Auto-Configuration (PAC) file - HTTP
in chrome (versions 52 to 73), you can disable this by setting pachttpsurlstrip
pingenabled to false in policy or by launching with the --unsafe-pac-url command-line flag (in chrome 74, only the flag works, and from 75 onward, there is no way to disable path-strip
ping; as of chrome 81, path-strip
ping does not apply to http urls, but there is interest in changing this behavior to match https); in firefox, the preference is network.proxy.autoconfig_url.include_path.
CSS Houdini
css typed om reference css typed om guide css layout api designed to improve the extensibility of css, this api enables developers to write their own layout algorithms, like masonry or line snap
ping.
Equality comparisons and sameness - JavaScript
here's a non-exhaustive list of built-in methods and operators that might cause a distinction between -0 and +0 to manifest itself in your code: - (unary negation) let stop
pingforce = obj.mass * -obj.velocity; if obj.velocity is 0 (or computes to 0), a -0 is introduced at that place and propogates out into stop
pingforce.
Expressions and operators - JavaScript
ues: function validate(obj, lowval, hival) { if ((obj.value < lowval) || (obj.value > hival)) console.log('invalid value!'); } you could call validate in each form element's onchange event handler, using this to pass it to the form element, as in the following example: <p>enter a number between 18 and 99:</p> <input type="text" name="age" size=3 onchange="validate(this, 18, 99);"> grou
ping operator the grou
ping operator ( ) controls the precedence of evaluation in expressions.
Regular expressions - JavaScript
esca
ping if you need to use any of the special characters literally (actually searching for a "*", for instance), you must escape it by putting a backslash in front of it.
JavaScript error reference - JavaScript
peerror: invalid array.prototype.sort argumenttypeerror: invalid argumentstypeerror: invalid assignment to const "x"typeerror: property "x" is non-configurable and can't be deletedtypeerror: setting getter-only property "x"typeerror: variable "x" redeclares argumenturierror: malformed uri sequencewarning: 08/09 is not a legal ecma-262 octal constantwarning: -file- is being assigned a //# sourcemap
pingurl, but already has onewarning: date.prototype.tolocaleformat is deprecatedwarning: javascript 1.6's for-each-in loops are deprecatedwarning: string.x is deprecated; use string.prototype.x insteadwarning: expression closures are deprecatedwarning: unreachable code after return statement ...
Atomics.wait() - JavaScript
examples using wait() given a shared int32array: const sab = new sharedarraybuffer(1024); const int32 = new int32array(sab); a reading thread is slee
ping and waiting on location 0 which is expected to be 0.
Atomics - JavaScript
omics.islockfree(3); // false atomics.islockfree(4); // true atomics.or(ta, 0, 1); atomics.load(ta, 0); // 5 atomics.store(ta, 0, 12); // 12 atomics.sub(ta, 0, 2); atomics.load(ta, 0); // 3 atomics.xor(ta, 0, 1); atomics.load(ta, 0); // 4 waiting and notifiying given a shared int32array: const sab = new sharedarraybuffer(1024); const int32 = new int32array(sab); a reading thread is slee
ping and waiting on location 0 which is expected to be 0.
Function.prototype.apply() - JavaScript
const array = ['a', 'b']; const elements = [0, 1, 2]; array.push.apply(array, elements); console.info(array); // ["a", "b", 0, 1, 2] using apply and built-in functions clever usage of apply allows you to use built-in functions for some tasks that would probably have otherwise been written by loo
ping over the array values.
Intl.NumberFormat() constructor - JavaScript
"long" (e.g., 16 litres) "short" (e.g., 16 l) "narrow" (e.g., 16l) usegrou
ping whether to use grou
ping separators, such as thousands separators or thousand/lakh/crore separators.
Math.min() - JavaScript
examples using math.min() this finds the min of x and y and assigns it to z: var x = 10, y = -20; var z = math.min(x, y); clip
ping a value with math.min() math.min() is often used to clip a value so that it is always less than or equal to a boundary.
Object.create() - JavaScript
for example: a simple common debugging function: // display top-level property name:value pairs of given object function showproperties(obj){ for(var prop in obj){ console.log(prop + ": " + obj[prop] + "\n" ); } } not such simple results: (especially if silent error-trap
ping had hidden the error messages) ob={}; ob.po=oco; ob.pn=ocn; // create a compound object using the test objects from above as property values > showproperties( ob ) // display top-level properties - po: [object object] - error: cannot convert object to primitive value note that only first property gets shown.
Object.entries() - JavaScript
the ordering of the properties is the same as that given by loo
ping over the property values of the object manually.
String.prototype.charAt() - JavaScript
string and // the current iteration and returning an array with the individual character // and 'i' value (only changed if a surrogate pair) console.log(chr) } function getwholecharandi(str, i) { let code = str.charcodeat(i) if (number.isnan(code)) { return '' // position not found } if (code < 0xd800 || code > 0xdfff) { return [str.charat(i), i] // normal character, kee
ping 'i' the same } // high surrogate (could change last hex to 0xdb7f to treat high private // surrogates as single characters) if (0xd800 <= code && code <= 0xdbff) { if (str.length <= (i + 1)) { throw 'high surrogate without following low surrogate' } let next = str.charcodeat(i + 1) if (0xdc00 > next || next > 0xdfff) { throw 'high surrogate without followi...
String.prototype.codePointAt() - JavaScript
operty) { defineproperty(string.prototype, 'codepointat', { 'value': codepointat, 'configurable': true, 'writable': true }); } else { string.prototype.codepointat = codepointat; } }()); } examples using codepointat() 'abc'.codepointat(1) // 66 '\ud800\udc00'.codepointat(0) // 65536 'xyz'.codepointat(42) // undefined loo
ping with codepointat() for (let codepoint of '\ud83d\udc0e\ud83d\udc71\u2764') { console.log(codepoint.codepointat(0).tostring(16)) } // '1f40e', '1f471', '2764' specifications specification ecmascript (ecma-262)the definition of 'string.prototype.codepointat' in that specification.
Symbol.unscopables - JavaScript
property attributes of symbol.unscopables writable no enumerable no configurable no examples sco
ping in with statements the following code works fine in es5 and below.
WeakMap - JavaScript
native weakmaps can be particularly useful constructs when map
ping keys to information about the key that is valuable only if the key has not been garbage collected.
WeakRef - JavaScript
examples using a weakref object this example starts a counter shown in a dom element, stop
ping when the element doesn't exist anymore: class counter { constructor(element) { // remember a weak reference to the dom element this.ref = new weakref(element); this.start(); } start() { if (this.timer) { return; } this.count = 0; const tick = () => { // get the element from the weak reference, if it still exists const element = this.ref.dere...
escape() - JavaScript
note: this function was used mostly for url queries (the part of a url following ?)—not for esca
ping ordinary string literals, which use the format "\xhh".
Iteration protocols - JavaScript
this makes multiple // iterations over the iterable safe for non-trivial cases, // such as use of break or nested loo
ping over the same iterable.
Lexical grammar - JavaScript
*/ console.log('hello world!'); } comment(); you can also use it in the middle of a line, if you wish, although this can make your code harder to read so it should be used with caution: function comment(x) { console.log('hello ' + x /* insert the value of x */ + ' !'); } comment('world'); in addition, you can use it to disable code to prevent it from running, by wrap
ping code in a comment, like this: function comment() { /* console.log('hello world!'); */ } comment(); in this case, the console.log() call is never issued, since it's inside a comment.
async function - JavaScript
return promisevalue the implicit wrap
ping of return values in promise.resolve does not imply that return await promisevalue is functionally equivalent to return promisevalue.
const - JavaScript
my_fav = 20; // my_fav is 7 console.log('my favorite number is: ' + my_fav); // trying to redeclare a constant throws an error // uncaught syntaxerror: identifier 'my_fav' has already been declared const my_fav = 20; // the name my_fav is reserved for constant above, so this will fail too var my_fav = 20; // this throws an error too let my_fav = 20; block sco
ping it's important to note the nature of block sco
ping.
label - JavaScript
break can be used with any labeled statement, and continue can be used with loo
ping labeled statements.
switch - JavaScript
we can easily fix this by wrap
ping our case clauses with brackets: const action = 'say_hello'; switch (action) { case 'say_hello': { // added brackets let message = 'hello'; console.log(message); break; } // added brackets case 'say_hi': { // added brackets let message = 'hi'; console.log(message); break; } // added brackets default: { // added brackets console.log('empty action received.'); ...
Authoring MathML - MathML
in particular, the mozilla mathml team has been develo
ping texzilla, a javascript unicode latex-to-mathml converter that is intended to be used in many scenarios described here.
fill - SVG: Scalable Vector Graphics
ns="http://www.w3.org/2000/svg"> <!-- simple color fill --> <circle cx="50" cy="50" r="40" fill="pink" /> <!-- fill circle with a gradient --> <defs> <radialgradient id="mygradient"> <stop offset="0%" stop-color="pink" /> <stop offset="100%" stop-color="black" /> </radialgradient> </defs> <circle cx="150" cy="50" r="40" fill="url(#mygradient)" /> <!-- kee
ping the final state of an animated circle which is a circle with a radius of 40.
operator - SVG: Scalable Vector Graphics
xor this value indicates that the non-overlap
ping regions of the source graphic defined in the in attribute and the destination graphic defined in the in2 attribute are combined.
overflow - SVG: Scalable Vector Graphics
it has the same parameter values and meaning as the css overflow property, however, the following additional points apply: if it has a value of visible, the attribute has no effect (i.e., a clip
ping rectangle is not created).
stemv - SVG: Scalable Vector Graphics
the measurement is meant for the dominant vertical stem in the font because there might be different grou
pings of vertical stems (e.g., one main one, and one lighter weight one as for an uppercase "m" or "n").
text-anchor - SVG: Scalable Vector Graphics
the text-anchor attribute is used to align (start-, middle- or end-alignment) a string of pre-formatted text or auto-wrapped text where the wrap
ping area is determined from the inline-size property relative to a given point.
textLength - SVG: Scalable Vector Graphics
html the html is also simple, with only two displayed elements contained inside a grou
ping <div>: <div class="controls"> <input type="range" id="widthslider" min="80" max="978"> <span id="widthdisplay"></span> </div> the <input> element, of type "range", is used to create the slider control the user will manipulate to change the width of the text.
visibility - SVG: Scalable Vector Graphics
it may receive pointer events depending on the pointer-events attribute, may receive focus depending on the tabindex attribute, contributes to bounding box calculations and clip
ping paths, and does affect text layout.
SVG Attribute reference - SVG: Scalable Vector Graphics
marker-end marker-mid marker-start markerheight markerunits markerwidth mask maskcontentunits maskunits mathematical max media method min mode n name numoctaves o offset opacity operator order orient orientation origin overflow overline-position overline-thickness p panose-1 paint-order path pathlength patterncontentunits patterntransform patternunits
ping pointer-events points pointsatx pointsaty pointsatz preservealpha preserveaspectratio primitiveunits r r radius referrerpolicy refx refy rel rendering-intent repeatcount repeatdur requiredextensions requiredfeatures restart result rotate rx ry s scale seed shape-rendering slope spacing specularconstant specularexponent speed spreadmethod startoffset stdd...
<a> - SVG: Scalable Vector Graphics
value type: <string> ; default value: none; animatable: yes
ping a space-separated list of urls to which, when the hyperlink is followed, post requests with the body
ping will be sent by the browser (in the background).
<feComposite> - SVG: Scalable Vector Graphics
example svg <svg width="330" height="195" viewbox="0 0 1100 650" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"> <title>example fecomposite - examples of fecomposite operations</title> <desc>four rows of six pairs of overlap
ping triangles depicting the six different fecomposite operators under different opacity values and different clearing of the background.</desc> <defs> <desc>define two sets of six filters for each of the six compositing operators.
mimeTypes.rdf corruption - SVG: Scalable Vector Graphics
for files loaded locally, it first looks in a cache of filename extension to media type map
pings (stored in a mozilla profile file called mimetypes.rdf), and if it doesn't find a media type there, it asks the operating system.
SVG: Scalable Vector Graphics
some real eye-candy svg at svg-wow.org firefox extension (grafox) to add a subset of smil animation support interactive photos manipulation html transformations using svg's foreignobject map
ping, charting, games & 3d experiments while a little svg can go a long way to enhanced web content, here are some examples of heavy svg usage.
Insecure passwords - Web security
the https protocol is designed to protect user data from eavesdrop
ping (confidentiality) and from modification (integrity) on the network.
Web security
typically, it's used to tell if two requests came from the same browser — kee
ping a user logged-in, for example.
number - XPath
notes strings are converted to a number by strip
ping the leading whitespace in the string before the number and ignoring whitespace after the number.
Introduction to using XPath in JavaScript - XPath
to match default elements in a non-null namespace, you either have to refer to a particular element using a form such as ['namespace-uri()='http://www.w3.org/1999/xhtml' and name()='p' and @id='_myid'] (this approach works well for dynamic xpath's where the namespaces might not be known) or use prefixed name tests, and create a namespace resolver map
ping the prefix to the namespace.
Web technology for developers
develo
ping web applications documentation for web application developers; web apps are true write-once, deploy anywhere apps for mobile, desktop, and firefox os.
Compiling an Existing C Module to WebAssembly - WebAssembly
but this is a fair shortuct for kee
ping things simple: int result[2]; emscripten_keepalive void encode(uint8_t* img_in, int width, int height, float quality) { uint8_t* img_out; size_t size; size = webpencodergba(img_in, width, height, width * 4, quality, &img_out); result[0] = (int)img_out; result[1] = size; } emscripten_keepalive void free_result(uint8_t* result) { webpfree(result); } emscripten_keepalive int get_res...