Search completed in 1.75 seconds.
iarc_rating_id - Web app manifests
type string mandatory no the iarc_
rating_id member is a string that represents the international age
rating coalition (iarc) certification code of the web application.
... examples "iarc_
rating_id": "e84b072d-71b3-4d3e-86ae-31a8ce4e53b7" specification specification status comment feedback web app manifestthe definition of 'iarc_
rating_id' in that specification.
Generating GUIDs
warning: if you just want an id for your add-on, gene
rating a guid is almost definitely not what you want to do.
Generating HTML - Web APIs
gene
rating html one common application of xslt in the browser is to transform xml into html on the client.
Index - Web APIs
in most dom methods, you will directly retrieve the attribute as a string (e.g., element.getattribute()), but certain functions (e.g., element.getattributenode()) or means of ite
rating return attr types.
...it contains the following read-only attributes: 531 transformations canvas, graphics, guide, html, html5, intermediate, web before we look at the transformation methods, let's look at two other methods which are indispensable once you start gene
rating ever more complex drawings.
...unlike drawwindow(), this api uses the ope
rating system to snapshot the widget on-screen, rather than reading from gecko's own compositor.
...And 24 more matches
Index
in order to support multiple ope
rating systems (os), it is based on a cross platform portability layer, called the netscape portable runtime (nspr), which provides cross platform application programming interfaces (apis) for os specific apis like file system access, memory management, network communication, and multithreaded programming.
...when creating the network socket for data exchange, note that you must use the ope
rating system independent apis provided by nspr and nss.
... when using hashing, encryption, and decryption functions, it is possible to stream data (as opposed to ope
rating on a large buffer).
...And 17 more matches
Index - Archive of obsolete content
found 3833 pages: # page tags and summary 1 archive of obsolete content archive, landing here at mdn, we try to avoid outright deleting content that might be useful to people targeting legacy platforms, ope
rating systems, and browsers.
... 252 mig
rating from internal linkage to frozen linkage xpcom extension code using internal linkage will need to migrate to use frozen linkage because internal linkage will not be available in firefox 3.
... 253 mig
rating raw components to add-ons historically, firefox has allowed third party contributions to be added to the application's components/ directory, but beginning with firefox 3.6, this is no longer permitted.
...And 14 more matches
nss tech note5
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* symkey = pk11_importsymkey(slot, ciphermech, pk11_originunwrap, cka_encrypt, &keyitem, null); if gene
rating the key - see section generate a symmetric key <big>prepare the parameter for crypto context.
... you can also look at a sample program illust
rating encryption hash / digest 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(".") <big>create digest context</big>.
... the data</big> <big>secstatus s = pk11_digestbegin(digestcontext); s = pk11_digestop(digestcontext, data, sizeof data); s = pk11_digestfinal(digestcontext, digest, &len, sizeof digest); /* now, digest contains the 'digest', and len contains the length of the digest */</big> clean up pk11_destroycontext(digestcontext, pr_true); you can also look at a sample program illust
rating this hash / digest with secret key included 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 digest mechanism.
...And 9 more matches
Strategies for carrying out testing - Learn web development
for example, you can find out what browsers and ope
rating systems your users are using by selecting audience > technology > browser & os from the left hand menu.
... virtual machines virtual machines are applications that run on your desktop computer and allow you to run emulations of entire ope
rating systems, each compartmentalized in its own virtual hard drive (often represented by a single large file existing on the host machine's hard drive).
... note: you need a lot of hard disk space available to run virtual machine emulations; each ope
rating system you emulate can take up a lot of memory.
...And 8 more matches
Index - MDN Web Docs Glossary: Definitions of Web-related terms
145 firefox os b2g, boot2gecko, firefox os, glossary, infrastructure, intro firefox os is mozilla's mobile ope
rating system, based on linux and firefox's powerful gecko rendering engine.
... 171 git collabo
rating, glossary git is a free, open-source, distributed source code management (scm) system.
... 176 gonk boot2gecko, firefox os, glossary, gonk, infrastructure, intro gonk is the lower-level ope
rating system of firefox os and consists of a linux kernel (based on the android open source project (aosp)) and userspace hardware abstraction layer (hal).
...And 7 more matches
certutil
the key and certificate management process generally begins with creating keys in the key database, then gene
rating and managing certificates in the certificate database.
... -g keysize set a key size to use when gene
rating new public and private key pairs.
... -q pqgfile read an alternate pqg value from the specified file when gene
rating dsa key pairs.
...And 5 more matches
Property cache
shape native objects have a shape, a 24-bit unsigned integer such that: basic layout guarantee — if at time t0 the object x has shape s and at time t1 the object y has shape s, and no shape-regene
rating gc occurred, then y at t1 has the same jsclass, jsobjectops, prototype, and property specs as x had at t0.
...jects with the same shape have the same prototype, class, and layout.) prototype chain shadowing guarantee — if at t0 the object x has shape s and a property x.p of x is found along the prototype chain on object x' of shape s', where x !== x', and the lookup called no resolve hooks or non-native lookup ops, and at t1 the object x has shape s, the object x' has shape s', and no shape-regene
rating gc occurred, then at t1 the lookup for x.p still finds the same property on x'.
... s and a name lookup for p starting at scope chain head x finds p on an object x' of shape s', where x !== x'; and the lookup called no resolve hooks or non-native lookup ops; and each object examined along the parent chain, except possibly the one along whose prototype chain x' was found, had no prototype or was a block object; and at time t1 x has shape s and x' has shape s'; and no shape-regene
rating gc occurred; then at t1 the lookup for p in x still finds the same property on x'.
...And 5 more matches
Index
8 gene
rating guids add-ons, developing mozilla, developing_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.
... 470 nsidomchromewindow dom, interfaces, interfaces:scriptable, xpcom, xpcom api reference, xpcom interface reference on some ope
rating systems, we must allow the window manager to handle window dragging.
...it includes methods for adding resources to and removing resources from the cache, as well as for enume
rating the dynamically managed resource list.
...And 5 more matches
Reference Manual
here is a sample demonst
rating the various positions these `annotations' can appear in, using dont_addref // controlling assignment into an |nscomptr|...
...prefer destruction to assignment prefer do_queryinterface to calling queryinterface ite
rating there is a very common idiom for ite
rating over data-structures with normal pointers, e.g., // ite
rating with pointers to non-xpcom objects...
... // ite
rating with raw xpcom interface pointers...
...And 5 more matches
Command line crash course - Learn web development
since then, the terminal has remained a constant feature of all ope
rating systems — from desktop machines, to servers tucked away in the cloud (it’s not really a cloud), to microcomputers like the raspberry pi zero, and even to mobile phones.
... windows as with some other programming tools, using the terminal (or command line) on windows has traditionally not been as simple or easy as on other ope
rating systems.
... better programs exist for providing a terminal experience on windows, such as powershell (see here to find installers), and gitbash (which comes as part of the git for windows toolset) however, the best option for windows in the modern day is the windows subsystem for linux (wsl) — a compatibility layer for running linux ope
rating systems directly from inside windows 10, allowing you to run a “true terminal” directly on windows, without needing a virtual machine.
...And 4 more matches
Mozilla’s UAAG evaluation report
checkpoint information (same scaled used on w3c's uaag implementation reports pages)
rating scale c: complete implementation vg: very good implementation, almost all requirements satisfied g: good implementation, most important requirements satisfied p: poor implementation, some requirements satisfied and/or difficult for user to access feature ni: not implemented nr: not rated na: not applicable document under construction guideline 1.
...(p1) vg can use keyboard api to control mozilla, by gene
rating keystrokes programmatically when in-process, can use dom to generate events uses active accessibility to provide program access to controls do not support all active accessibility features for programmatic operation (put_accname, put_accvalue not yet supported) 6.5 programmatic alert of changes.
...
rating scale c: complete implementation vg: very good implementation, almost all requirements satisfied g: good implementation, most important requirements satisfied p: poor implementation, some requirements satisfied and/or difficult for user to access feature ni: not implemented nr: not rated na: not applicable guideline 7.
...And 4 more matches
About NSPR
netscape portable runtime (nspr) provides platform independence for non-gui ope
rating system facilities.
... how it works nspr's goal is to provide uniform service over a wide range of ope
rating system environments.
... it strives to not export the lowest common denominator, but to exploit the best features of each ope
rating system on which it runs, and still provide a uniform service across a wide range of host offerings.
...And 4 more matches
ARIA Test Cases - Accessibility
screen magnifier should show the focused button or emulate any other standard behavior found in notification dialogs in windows or respective ope
rating systems.
... markup used: aria-grab aria-dropeffect notes: (mz) there is no equivalent place in any of the known ope
rating systems where draggable items are denoted and targets being indicated as such.
... all drag and drop operations screen readers traditionally perform within the ope
rating system are hit and miss games that are performed on pixel locations.
...And 4 more matches
Accessibility: What users can do to browse more safely - Accessibility
this article discusses making web content accessible for those with vestibular disorders, and those who support them, by taking advantage of personalization and accessibility settings built into the ope
rating systems.
...they can be addressed by the design and speed of the display and computer" hardware and ope
rating systems on many computers offer control that is not afforded to developers.
... the user can do much to protect himself by learning his ope
rating system, its personalization and accessibility settings.
...And 4 more matches
for...of - JavaScript
the for...of statement creates a loop ite
rating over iterable objects, including: built-in string, array, array-like objects (e.g., arguments or nodelist), typedarray, map, set, and user-defined iterables.
... examples ite
rating over an array const iterable = [10, 20, 30]; for (const value of iterable) { console.log(value); } // 10 // 20 // 30 you can use let instead of const too, if you reassign the variable inside the block.
... const iterable = [10, 20, 30]; for (let value of iterable) { value += 1; console.log(value); } // 11 // 21 // 31 ite
rating over a string const iterable = 'boo'; for (const value of iterable) { console.log(value); } // "b" // "o" // "o" ite
rating over a typedarray const iterable = new uint8array([0x00, 0xff]); for (const value of iterable) { console.log(value); } // 0 // 255 ite
rating over a map const iterable = new map([['a', 1], ['b', 2], ['c', 3]]); for (const entry of iterable) { console.log(entry); } // ['a', 1] // ['b', 2] // ['c', 3] for (const [key, value] of iterable) { console.log(value); } // 1 // 2 // 3 ite
rating over a set const iterable = new set([1, 1, 2, 2, 3, 3]); for (const value of iterable) { console.log(value); } // 1 // 2 // 3 ite
rating ov...
...And 4 more matches
Media container formats (file types) - Web media technologies
[2] available only if available on the underlying ope
rating system's media framework.
... [2] firefox support for h.264 relies upon the ope
rating system's media infrastructure, so it is available as long as the os supports it.
... [2] firefox support for aac relies upon the ope
rating system's media infrastructure, so it is available as long as the os supports it.
...And 4 more matches
The Business Benefits of Web Standards - Archive of obsolete content
site wide consistent look and feel by sepa
rating structure (or content) from presentation, web designers have a lot to gain.
...sepa
rating presentation from content increases the information/markup ratio, making css-based documents more pertinent with regard to the search terms, which makes them rank higher in search results.
... extensibility using strict html and sepa
rating structure from content paves the way to xhtml, an xml-compatible version of html.
...And 3 more matches
Introduction to NSPR
nspr threads are scheduled in two separate domains: local threads are scheduled within a process only and are handled entirely by nspr, either by completely emulating threads on each host ope
rating system (os) that doesn't support threads, or by using the threading facilities of each host os that does support threads to emulate a relatively large number of local threads by using a relatively small number of native threads.
... priorities for nspr threads are based loosely on hints provided by the client and sometimes constrained by the underlying ope
rating system.
... setting thread priorities the host ope
rating systems supported by nspr differ widely in the mechanisms they use to support thread priorities.
...And 3 more matches
NSS API Guidelines
copy the linked list: instead of ope
rating on the global list, you can copy the list.
...for instance gene
rating a new key would change from pk11_keygen() to pk11_createsymkey().
...so here are some guidelines to make them more manageable: all callback ope
rating search functions should be in the low level of the api, if exposed at all.
...And 3 more matches
NSS tools : certutil
-g keysize set a key size to use when gene
rating new public and private key pairs.
... -q pqgfile or curve-name read an alternate pqg value from the specified file when gene
rating dsa key pairs.
... -y exp set an alternate exponent value to use in gene
rating a new rsa public key for the database, instead of the default value of 65537.
...And 3 more matches
font-variant - CSS: Cascading Style Sheets
ndroid full support 41safari ios full support 9.3samsung internet android full support 6.0greek accented characterschrome no support nonotes no support nonotes notes some ope
rating systems may correctly omit accents in all-uppercase greek text.edge no support nonotes no support nonotes notes some ope
rating systems may correctly omit accents in all-uppercase greek text.firefox no support nonotes no support ...
... nonotes notes some ope
rating systems may correctly omit accents in all-uppercase greek text.ie no support noopera no support nonotes no support nonotes notes some ope
rating systems may correctly omit accents in all-uppercase greek text.safari no support nowebview android no support nonotes no support nonotes notes some ope
rating systems may correctly omit accents in all-uppercase greek.chrome android no support nonotes no support ...
... nonotes notes some ope
rating systems may correctly omit accents in all-uppercase greek text.firefox android no support nonotes no support nonotes notes some ope
rating systems may correctly omit accents in all-uppercase greek text.opera android no support nonotes no support nonotes notes some ope
rating systems may correctly omit accents in all-uppercase greek text.safari ios no support nosamsung internet android no support nonotes no support nonotes notes some ope
rating systems may ...
...And 3 more matches
Handling Preferences - Archive of obsolete content
if you need to refer to the term "preference" in any of your locale files, you must change the string depending on the ope
rating system.
... tip: you can use window.navigator.platform in your chrome code to figure out the ope
rating system firefox is running on.
...button enabled in your extension you need to add the following line to install.rdf: <em:optionsurl>chrome://xulschoolhello/content/preferenceswindow.xul</em:optionsurl> if you want to open this window from a different place in the ui, such as a menu item or a button in a toolbar, you need to take into account that the opening behavior of a preferences window is different depending on the ope
rating system.
...And 2 more matches
Signing an XPI - Archive of obsolete content
gene
rating signed//meta-inf/manifest.mf file..
... --> chrome/fsb.jar --> chrome.manifest --> install.rdf gene
rating zigbert.sf file..
...gene
rating test/meta-inf/manifest.mf file..
...And 2 more matches
In-Depth - Archive of obsolete content
system colours css2 defines colours which are the same as your ope
rating systems theme.
... a list of the different ope
rating system colours can be found on the w3c's web site.
...other sites which list mozilla specific css properties xulplanet.com [dead link, 26.03.13] mozilla-prefixed properties on the standard track 26.03.13 -moz-appearance makes a widget look like it's from your ope
rating system.
...And 2 more matches
Index - Archive of obsolete content
each statement is placed as a direct child of the <query> element within the template.</query> 936 recursive generation xul, xul_template_guide after gene
rating content, the template builder always repeats the generation for inner levels as far as it can go.
...after gene
rating a result's content, the builder starts again using a new parent and starting point.
...here is the content that was generated after one iteration:</vbox> 937 result generation xul, xul_template_guide in this section, we'll look at gene
rating template output using rdf datasources.
...And 2 more matches
What software do I need to build a website? - Learn web development
you'll need tools to: create and edit webpages upload files to your web server view your website nearly all ope
rating systems by default include a text editor and a browser, which you can use to view websites.
... all desktop ope
rating systems come with a basic text editor.
...here is a short list of editors: ope
rating system built-in editor third-party editor windows notepad notepad++ visual studio code web storm brackets shiftedit sublime text mac os textedit textwrangler visual studio code brackets shiftedit sublime text linux vi (all unix) gedit (gnome) kate ...
...And 2 more matches
Mozilla's Section 508 Compliance
applications also shall not disrupt or disable activated features of any ope
rating system that are identified as accessibility features where the application programming interface for those accessibility features has been documented by the manufacturer of the ope
rating system and is available to the product developer.
... requirement windows linux/unix mac os (f) textual information shall be provided through ope
rating system functions for displaying text.
...the default theme, classic, uses the ope
rating system's font and color contrast settings.
...And 2 more matches
OS.File for the main thread
on most ope
rating systems, this operation is handled directly by the ope
rating system itself, which makes it as fast as possible.
... note that the ope
rating system limits the number of files that can be opened simultaneously by one process, so do not forget to close that file once you have finished it, to ensure that you are not blocking the rest of the process.
...if true, before writing, force the ope
rating system to write its internal disk buffers to the disk.
...And 2 more matches
NSS Tools certutil
the key and certificate management process generally begins with creating keys in the key database, then gene
rating and managing certificates in the certificate database.
... -g keysize set a key size to use when gene
rating new public and private key pairs.
... -q pqgfile read an alternate pqg value from the specified file when gene
rating dsa key pairs.
...And 2 more matches
NSS tools : signtool
for more information about the use of the -g option, see "gene
rating test object-signing certificates""gene
rating test object-signing certificates" on page 1241.
... signtool -k mysigncert -z testjar.jar signdir using key "mysigncert" using certificate directory: /u/jsmith/.netscape gene
rating signdir/meta-inf/manifest.mf file..
... --> test.f adding signdir/test.f to testjar.jar gene
rating signtool.sf file..
...And 2 more matches
WebReplayRoadmap
media elements (bug 1304146) web audio (bug 1304147) webrtc (bug 1304149) webassembly (bug 1481007) webgl (bug 1506467) support more ope
rating systems (not yet implemented) only macos is supported right now.
... web replay's architecture should allow it to work on any ope
rating system: the os features needed are not specific to macos or to posix systems.
... cloud integration (partially implemented) storing recordings in the cloud and interacting with them via the debugger could streamline several features described above: difficulties when recording and replaying on different machines with incompatible firefox builds or ope
rating systems will be smoothed out.
...And 2 more matches
nsIParentalControlsService
toolkit/components/parentalcontrols/public/nsiparentalcontrolsservice.idlscriptable this interface provides access to the ope
rating system's parental controls feature, allowing code to detect whether such a service is enabled and to request overrides to bypass the feature.
... this method may block while the ope
rating system presents user interface to handle the override request (such as an "enter an administrator's password" dialog box).
... awindowcontext optional the window gene
rating the event.
...And 2 more matches
nsIZipReader
example demonst
rating this function: list contents of xpi and read file contents extract() extracts a zip entry into a local file specified by outfile.
... example demonst
rating this function: list contents of xpi and read file contents getentry() returns a nsizipentry describing a specified zip entry.
... example demonst
rating this function: list contents of xpi and read file contents getinputstream() returns an input stream containing the contents of the specified zip entry.
...And 2 more matches
<details>: The Details disclosure element - HTML: Hypertext Markup Language
<details> <p>requires a computer running an ope
rating system.
...here's what your browser does with it: providing a summary this example adds a summary to the above example by using the <summary> element inside <details>, like this: <details> <summary>system requirements</summary> <p>requires a computer running an ope
rating system.
... an input device as well as some form of output device is recommended.</p> </details> the result from this html is this: creating an open disclosure box to start the <details> box in its open state, add the boolean open attribute: <details open> <summary>system requirements</summary> <p>requires a computer running an ope
rating system.
...And 2 more matches
Map - JavaScript
thus, when ite
rating over it, a map object returns keys in order of insertion.
...in javascript engines that comply with the ecmascript 2015 spec, ite
rating over an object with only string keys will yield the keys in order of insertion.
... ite
rating over an object requires obtaining its keys in some fashion and ite
rating over them.
...And 2 more matches
for await...of - JavaScript
the for await...of statement creates a loop ite
rating over async iterable objects as well as on sync iterables, including: built-in string, array, array-like objects (e.g., arguments or nodelist), typedarray, map, set, and user-defined async/sync iterables.
... examples ite
rating over async iterables you can also iterate over an object that explicitly implements async iterable protocol: const asynciterable = { [symbol.asynciterator]() { return { i: 0, next() { if (this.i < 3) { return promise.resolve({ value: this.i++, done: false }); } return promise.resolve({ done: true }); } }; } }; (async function() {...
... for await (let num of asynciterable) { console.log(num); } })(); // 0 // 1 // 2 ite
rating over async generators since the return values of async generators conform to the async iterable protocol, they can be looped using for await...of.
...And 2 more matches
for...in - JavaScript
because the order of iteration is implementation-dependent, ite
rating over an array may not visit elements in a consistent order.
... therefore, it is better to use a for loop with a numeric index (or array.prototype.foreach() or the for...of loop) when ite
rating over arrays where the order of access is important.
... ite
rating over own properties only if you only want to consider properties attached to the object itself, and not its prototypes, use getownpropertynames() or perform a hasownproperty() check (propertyisenumerable() can also be used).
...And 2 more matches
List of Mozilla-Based Applications - Archive of obsolete content
anagement tool uses gecko chatzilla irc client standalone version (xulrunner) chromium and google chrome web browser uses mozilla nss and npapi libraries chromeless browser with html-based interface classilla mozilla browser for mac os 9 clines a clone of color lines (game) standalone version cloud web ope
rating 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 scraping and for web clipping cometbird another firefox mod modified version of firefox ...
...testing and deployment environment uses mozilla rhino geckofx embeddable gecko gjs javascript bindings for gnome globalmojo browser that raises money for your favorite causes gluescript a javascript engine which can be used as a general purpose language uses mozilla spidermonkey and formerly called wxjavascript gnome ope
rating system gnome 3 will use spidermonkey through gjs google adwords editor editor google gadgets for linux google’s desktop widget engine uses xulrunner according to the build instructions grani grain sizing assessment tool according to this wiki page grani is based on xul and xpcom daim gwt-mosaic-xul xul builder for google web tools ...
...otes / sametime groupware the latest version of ibm lotus notes and sametime can embed xul applications lucidor e-book reader lx-office accounting tool looks like it makes at least some use of xul maavis simple ui & communications for accessibility framework designed for elderly people with dementia but other applications mac os x ope
rating system makes use of some mpl files such as libsecurity_asn1 maemo browser browser for maemo internet tablet development name is microb magooclient business process management tool uses mozilla rhino mantra security tool mccoy secure update tool for add-ons xulrunner application mediacoder media converter transcoder for...
...y used in the gui snapstick internet on tv article that talks about snapstick using firefox sogo groupware front-end uses thunderbird code songbird music xulrunner application spicebird collaboration suite spiderape embedding tool uses mozilla spidermonkey splashtop web browser browser part of instant-on ope
rating system sqlite-manager database manager standalone version of add-on stealthsurfer secure internet tools on usb key uses firefox and thunderbird streambase complex event processing platform seems to use xulrunner stylizer css editor css editor css editor with built-in firebug-like diagnostics and gecko 1.8 preview sun java enterp...
MCD, Mission Control Desktop, AKA AutoConfig - Archive of obsolete content
call file this file calls a cgi on a web server, the cgi gene
rating the javascript code that will set preferences.
...perhaps there's a way in javascript to detect ope
rating system and hence use either user or username, but i'm not that fluent in javascript, let me know if you know how...// windows call file $ cat mci-mozilla-web-win.js lockpref("general.config.vendor", "mci-mozilla-web-win"); lockpref("autoadmin.global_config_url","http://corbeau.int-evry.fr/cgi-bin/mci-mozilla-glob-prefs-win.cgi"); windows autoconf.js file to be encoded by moz-byteshift.pl as ...
...by mig
rating from university of washington imap server to cyrus imap we also inherited some interesting features like quotas, share folders, acl, mail only account (no need for /etc/passwd entry!) much better performances, etc...
...we set the netscape.cfg file just once while imaging computers with the ope
rating system, then any changes happen in ldap or on the web server javascript preference file (central configuration).
Anonymous Content - Archive of obsolete content
the binding responsible for the generation is referred to as the primary gene
rating binding.
... whenever the primary gene
rating binding changes on a bound element, all anonymous nodes in the scope of the bound element are destroyed.
...explicit insertion points are only used if they are found on the primary gene
rating binding.
...for the primary gene
rating binding only, this attribute is checked to see if any author sheets at outer levels of scoping should be applied to the anonymous content generated by the bindings attached to the bound element.
Mozilla release FAQ - Archive of obsolete content
how about a mozilla ope
rating system?
...however, it makes very little sense to try to make mozilla into an ope
rating sense, almost as little sense as it would to make a word processor or a mp3 player into one.
... beyond technical reasons, the ope
rating system market is currently glutted, and a new entry would be unlikely to attract enough users to ensure the writing of drivers for a new system, a critical mass point.
... people who want to work on an ope
rating system no doubt would be welcomed by the bsd teams, the linux team, the freedows team, or any of the many other open source ope
rating system groups out there.
Browser Detection and Cross Browser Support - Archive of obsolete content
unlike other browsers, gecko is truly cross platform and provides consistent behavior across all supported ope
rating systems.
...mozilla/version followed by a comment token which gave additional information regarding the ope
rating system being used, etc.
... there are legitimate reasons to use the user agent string (or the navigator object) to determine exactly what vendor, version or ope
rating system is being used.
... // gecko requires the unit when ope
rating in standards // mode.
-moz-os-version - Archive of obsolete content
this can be useful for adapting application skins and other chrome code depending on the user's ope
rating system version.
... syntax values windows-win7 the user is on the windows 7 ope
rating system.
... windows-win8 the user is on the windows 8 ope
rating system.
... windows-win10 the user is on the windows 10 ope
rating system.
Choosing Standards Compliance Over Proprietary Practices - Archive of obsolete content
the engineers developed star on a proprietary development ope
rating system known as pilot.
...xerox was bound to a unique hardware platform and to a closed development ope
rating system.
...by integ
rating and supporting the accessibility guidelines, an organization can offer their product lines or services to a larger and more diverse user base.
... for example, if a development engineer writes an application following the ansi standard of c and c++, and writes that code on a particular platform, that code can be compiled on any other platform and ope
rating system that supports ansi standards.
WAI-ARIA basics - Learn web development
html5 provides special input types to render such controls: <input type="date"> <input type="range"> these are not well-supported across browsers, and it is also difficult to style them, making them not very useful for integ
rating with website designs.
... there are many combinations of ope
rating system, browser, and screenreader to consider.
... this last point is key — to use a screenreader in the first place, your ope
rating system needs to run browsers that have the necessary accessibility apis in place to expose the information screenreaders need to do their job.
...the paciello group has a fairly up-to-date post that provides data for this — see rough guide: browsers, ope
rating systems and screen reader support updated.
What is accessibility? - Learn web development
most browsers and ope
rating systems these days have zoom capabilities.
... some are built into the ope
rating system, like voiceover (macos, ipados, ios), narrator (microsoft windows), chromevox (on chrome os), and talkback (android).
... accessibility apis web browsers make use of special accessibility apis (provided by the underlying ope
rating system) that expose information useful for assistive technologies (ats) — ats mostly tend to make use of semantic information, so this information doesn't include things like styling information, or javascript.
... different ope
rating systems have different accessibility apis available : windows: msaa/iaccessible, uiaexpress, iaccessible2 mac os x: nsaccessibility linux: at-spi android: accessibility framework ios: uiaccessibility where the native semantic information provided by the html elements in your web apps falls down, you can supplement it with features from the wai-aria specification, which add semantic information to the accessibility tree to improve accessibility.
Fundamental text and font styling - Learn web development
there is no way to know this in every case, but the web safe fonts are known to be available on nearly all instances of the most used ope
rating systems (windows, macos, the most common linux distributions, android, and ios).
... the list of actual web safe fonts will change as ope
rating systems evolve, but it's reasonable to consider the following fonts web safe, at least for now (many of them have been popularized thanks to the microsoft core fonts for the web initiative in the late 90s and early 2000s): name generic type notes arial sans-serif it's often considered best practice to also add helvetica as a preferred alternative to arial as, although their font faces are almost identical, helvetica is considered to have a nicer shape, even if arial is more broadly available.
... verdana sans-serif note: among various resources, the cssfontstack.com website maintains a list of web safe fonts available on windows and macos ope
rating systems, which can help you make your decision about what you consider safe for your usage.
...those are very generic and the exact font face used when using those generic names is up to each browser and can vary for each ope
rating system they are running on.
Software accessibility: Where are we today?
these ope
rating systems were not designed with the needs of people with disabilities in mind.
... many, including those who were blind or physically disabled, were unable to use applications which were written for microsoft ope
rating systems.
... the optacon provides access to printed words, graphics and on-screen information by means of an array vib
rating pins the size of an index finger.
... the user uses one hand to read the vib
rating pins, and the other hand moves a mini-camera over the material to be read.
Application Translation with Mercurial
gaia-* denotes branches of firefox os, the ope
rating system for mobile devices.
... fennec and fennec-* denote branches of firefox for mobile, the firefox browser for the android ope
rating system.
...in general, the labels in the applications should have the same style like the ope
rating system, e.g.
... use the same order of subject, verb and objects; decline verbs or not like the ope
rating system does.
nsIClipboardDragDropHooks
return value true indicates to the ope
rating system that if a drop does happen on this browser, it will be accepted.
... otherwise, false to indicates to the ope
rating system that drop is not allowed.
...otherwise, false to show the drag is canceled (does not go to ope
rating system).
...otherwise, false to indicate that the copy/drag is canceled, does not go to ope
rating system.
Standard OS Libraries
they are already available on the ope
rating system for you.
...this comes shipped by default with all installations of windows ope
rating systems since win98.
... unix unix based ope
rating systems are linux, *bsd, solaris, etc.
... // placeholder - example soon to come x11 x11 runs primarily on unix® and unix-like ope
rating systems like linux, all of the bsd variants, sun solaris both native 32 and 64 bit support, solaris x86, mac os x (via darwin) as well as other platforms like os/2 and cygwin.
Vibration API - Web APIs
vibration patterns an array of values describes alternating periods in which the device is vib
rating and not vib
rating.
... each value in the array is converted to an integer, then interpreted alternately as the number of milliseconds the device should vibrate and the number of milliseconds it should not be vib
rating.
... for example: window.navigator.vibrate([200, 100, 200]); this vibrates the device for 200 ms, then pauses for 100 ms before vib
rating the device again for another 200 ms.
... continued vibrations some basic setinterval and clearinterval action will allow you to create persistent vibration: var vibrateinterval; // starts vibration at passed in level function startvibrate(duration) { navigator.vibrate(duration); } // stops vibration function stopvibrate() { // clear interval and stop persistent vib
rating if(vibrateinterval) clearinterval(vibrateinterval); navigator.vibrate(0); } // start persistent vibration at given duration and interval // assumes a number value is given function startpersistentvibrate(duration, interval) { vibrateinterval = setinterval(function() { startvibrate(duration); }, interval); } of course, the snippet above doesn't take into account the array...
XUL Migration Guide - Archive of obsolete content
next, we'll look at some of the main tasks involved in mig
rating: working with content scripts using the sdk's supported apis how to go beyond the supported apis when necessary, by: using third party modules using the sdk's low-level apis getting direct access to xpcom finally, we'll walk through a simple example.
... if your add-on needs a lot of help from third party packages, low-level apis, or xpcom, then the cost of mig
rating is high, and may not be worth it at this point.
... if your add-on only needs a little help from those techniques, and can accomplish most of what it needs using the supported apis, then it might still be worth mig
rating: we'll add more supported apis in future releases to meet important use cases.
system - Archive of obsolete content
usage querying your environment using the system module you can access environment variables (such as path), find out which ope
rating system your add-on is running on and get information about the host application (for example, firefox or fennec), such as its version.
... var system = require("sdk/system"); // path environment variable console.log(system.env.path); // ope
rating system console.log("platform = " + system.platform); // processor architecture console.log("architecture = " + system.architecture); // compiler used to build host application console.log("compiler = " + system.compiler); // host application build identifier console.log("build = " + system.build); // host application uuid console.log("id = " + system.id); // host application name console.log("name = " + system.name); // host application version console.log("version = " + system.version); // host application vendor console.log("vendor = " + system.vendor); // host application profile directory console.log("profile directory = " + system.pathfor("profd")); quit the host application to qu...
... platform the type of ope
rating system you're running on.
File I/O - Archive of obsolete content
tmpd d the ope
rating system's temporary files directory (for example, /tmp on mac os x and linux).
... enume
rating drives on windows while you can use initwithpath("/") on unix-like systems (linux, mac) to get the root of the file system, there's no such root on windows.
... enume
rating files in given directory the snippet below makes an array of nsifiles corresponding to sub-directories/"sub-files" of the given directory.
Source code directories overview - Archive of obsolete content
tools contains scripts for automatically gene
rating certain source code and other special tools for building this module.
... photon contains source code for photon, a microkernel windowing system used in several real-time ope
rating systems from qnx software systems ltd.
... profile contains c interfaces, c code, xul and javascript scripts for creating new user profiles, managing existing user profiles, mig
rating profiles from mozilla classic and using default profiles for popular isps (e.g.
Prism - Archive of obsolete content
an ssb also offers tighter integration with the ope
rating system and desktop than a typical web application running through a web browser.
...we can also benefit from ope
rating system tools that lets us view the memory/cpu consumption of a specific application.
... ope
rating-system integration: binary components provided access to os-specific features like shortcut creation and dock/tray icons.
Learn XPI Installer Scripting by Example - Archive of obsolete content
registering the software registering software is sometimes a requirement of both the ope
rating system and of the netscape 6 platform.
... for registering software with the win32 ope
rating system, the xpinstall api provides two special install objects, winprofile and winreg.
...the browser.xpi install script does not demonstrate the use of these objects, but see the xpinstall api reference for more information about registering software with the win32 ope
rating systems and other ope
rating systems.
Containment Properties - Archive of obsolete content
<vbox datasources="template-guide-ex1.rdf" ref="http://www.xulplanet.com/rdf/a" containment="http://www.xulplanet.com/rdf/relateditem"> <template> <rule> <label uri="rdf:*" value="rdf:*"/> </rule> </template> </vbox> instead of ite
rating over a container, this example iterates over a specific predicate.
...you can specify multiple predicates in the containment attribute by sepa
rating them with spaces.
...that is, in addition to ite
rating over the children, it will iterate over the predicates listed in the containment attribute.
Filtering - Archive of obsolete content
next, we'll look at also gene
rating this list using a template.
... gene
rating a filter menu templates may be used to generate any type of content.
...we'll use this method here since we've already seen examples of gene
rating results from a container.
Simple Query Syntax - Archive of obsolete content
« previousnext » when ite
rating over the children of an rdf container, there is a simpler query syntax which may used.
... it may also be used when ite
rating over only one predicate.
...you can also combine two in one attribute by sepa
rating them with a space or a caret (^) just as you can with the full syntax.
Code Samples - Archive of obsolete content
you can launch an executable file or some other file that your ope
rating system knows how to open.
... note: on ope
rating systems that use backslash characters, double each backslash character.
... on ope
rating systems that use forward-slash characters, specify the file in the normal way.
Windows Media in Netscape - Archive of obsolete content
this article deals uniquely with netscape 7.1 running on the windows ope
rating system.
...for example if (window.activexobject) { // internet explorer only script } server-side detection using user-agent strings netscape 7.1's user agent string on windows has the general pattern: mozilla/5.0 (windows; u; <em>ope
rating system version</em>; <em>language</em>; rv:1.4) gecko/20030624 netscape/7.1 (ax<em>[;optional comments]</em>) the "vendor comment" (ax) following the "vendor version" netscape/7.1 is an indicator that the browser supports the windows media player activex control.
...for example: mozilla/5.0 (windows; u; windows nt 5.1; en-us; rv:1.4) gecko/20030624 netscape/7.1 (ax; promostring) although geckoactivexobject is currently available only in netscape 7.1 on windows, it may be the case in the future that it will be available in other gecko-based browsers on other ope
rating systems.
HTML forms in legacy browsers - Learn web development
form controls appearance is browser and ope
rating system specific.
... for example, the input of color type looks different in safari, chrome and firefox browser, but the color picker widget is the same in all browsers on a device as it opens up the ope
rating system's native color picker.
... conclusion as you can see, considering browser and ope
rating system default form control appearance is important.
Index - Learn web development
apis are programming features for manipulating different aspects of the browser and ope
rating system the site is running on, or manipulating data from other web sites or services.
...you should also appreciate that objects are very useful as structures for storing related data and functionality — if you tried to keep track of all the properties and methods in our person object as separate variables and functions, it would be inefficient and frust
rating, and we'd run the risk of clashing with other variables and functions that have the same names.
...in addition, we have started to look at different ways of gene
rating object instances.
JavaScript object basics - Learn web development
overview: objects next in this article, we'll look at fundamental javascript object syntax, and revisit some javascript features that we've already seen earlier in the course, reite
rating the fact that many of the features you've already dealt with are objects.
...as we said earlier, this is equal to the object the code is inside — this isn't hugely useful when you are writing out object literals by hand, but it really comes into its own when you are dynamically gene
rating objects (for example using constructors).
...you should also appreciate that objects are very useful as structures for storing related data and functionality — if you tried to keep track of all the properties and methods in our person object as separate variables and functions, it would be inefficient and frust
rating, and we'd run the risk of clashing with other variables and functions that have the same names.
Introduction to the server side - Learn web development
they run inside different ope
rating system environments.
... client-side code is written using html, css, and javascript — it is run inside a web browser and has little or no access to the underlying ope
rating system (including limited access to the file system).
...the server-side code has full access to the server ope
rating system and the developer can choose what programming language (and specific version) they wish to use.
Dynamic behavior in Svelte: working with variables and props - Learn web development
objective: learn and put into practice some basic svelte concepts, like creating components, passing data using props, render javascript expressions into our markup, modify the components state and ite
rating over lists.
... dynamically gene
rating the todos from the data at the moment, our displayed todo items are all static.
... ite
rating over lists using the {#each} directive.
Handling common HTML and CSS problems - Learn web development
in the worst cases, javascript is used to generate the entire web page content and style, which makes your pages inaccessible, and less performant (gene
rating dom elements is expensive).
...or you might find that html generated by some kind of third party api (gene
rating ad banners, for example) includes a class name or id that you are already using for a different purpose.
...this might be frust
rating for you and your users if such a mistake slips through to production code, but at least it means the whole site doesn't come crashing down because of one error, and if used cleverly you can use it to your advantage.
Setting up your own test automation environment - Learn web development
you can feel free to change the references to some of the other browsers we added, remove them, etc., depending on what browsers you have available to test on your ope
rating system.
... note: sauce labs' platform configurator is a useful tool for gene
rating capability objects to feed to your driver instances, based on what browser/os you want to test on.
... integ
rating selenium with ci tools as another point, it is also possible to integrate selenium and related tools like lambdatest, and sauce labs with continuous integration (ci) tools — this is useful, as it means you can run your tests via a ci tool, and only commit new changes to your code repository if the tests pass.
Chrome registration
this can be useful for sepa
rating component and chrome registration instructions, or separate platform-specific registration data.
...for example: content packagename chrome/path/ content packagename chrome/path/ contentaccessible=yes os extensions (or themes) may offer different features depending on the ope
rating system on which firefox is running.
... osversion an extension or theme may need to operate differently depending on which version of an ope
rating system is running.
Release phase
the merge date for mig
rating from one product release channel to the next is rapidly approaching.
... must be approved prior to mig
rating your revision from one release channel to the next (e.g., aurora to beta).
...this is done by gene
rating a diff between the new release revision being considered and the previously approved release revision.
Localization technical reviews
the merge date for mig
rating from one product release channel to the next (e.g., aurora to beta, or beta to release) is rapidly approaching.
... must be approved prior to mig
rating your revision from aurora to beta.
... after you've finished celeb
rating your first approved release, it's time to start planning for the next one!
An overview of NSS Internals
in order to support multiple ope
rating systems (os), it is based on a cross platform portability layer, called the netscape portable runtime (nspr), which provides cross platform application programming interfaces (apis) for os specific apis like file system access, memory management, network communication, and multithreaded programming.
...when creating the network socket for data exchange, note that you must use the ope
rating system independent apis provided by nspr and nss.
... when using hashing, encryption, and decryption functions, it is possible to stream data (as opposed to ope
rating on a large buffer).
Enc Dec MAC Output Public Key as CSR
fine sec_error_base (-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 gene
rating rsa keypair for wrapping\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 "); fpri...
... secupwdata *pwdata) { ck_mechanism_type mechanism; secoidtag algtag; pk11rsagenparams rsaparams; void *params; seckeyprivatekey *privkey = null; secstatus rv; unsigned char randbuf[blocksize + 1]; rv = generaterandom(randbuf, blocksize); if (rv != secsuccess) { fprintf(stderr, "error while gene
rating the random numbers : %s\n", port_errortostring(rv)); goto cleanup; } pk11_randomupdate(randbuf, blocksize); switch (keytype) { case rsakey: rsaparams.keysizeinbits = size; rsaparams.pe = publicexponent; mechanism = ckm_rsa_pkcs_key_pair_gen; algtag = sec_oid_pkcs1_...
...md5_with_rsa_encryption; params = &rsaparams; break; default: goto cleanup; } fprintf(stderr, "\n\n"); fprintf(stderr, "gene
rating key.
Enc Dec MAC Using Key Wrap CertReq PKCS10 CSR
| ", "-n <nickname> -b <headerfilename> | ", "-b <headerfilename> -i <ipfilename> -e <encryptfilename> | ", "-b <headerfilename> -i <ipfilename> | ", "-b <headerfilename> -i <ipfilename> | ", "-b <headerfilename> -e <encryptfilename> -o <opfilename> \n"); fprintf(stderr, "commands:\n\n"); fprintf(stderr, "%s %s\n --for gene
rating cert request (for ca also)\n\n", progname, "-g -s <subject> -r <csr>"); fprintf(stderr, "%s %s\n --to input and store cert (for ca also)\n\n", progname, "-a -n <nickname> -t <trust> -c <cert> [ -r <csr> -u <issuernickname> [-x <\"\">] -m <serialnumber> ]"); fprintf(stderr, "%s %s\n --to put cert in header\n\n", progname, "-h -n <nickname> -b <he...
... secupwdata *pwdata) { ck_mechanism_type mechanism; secoidtag algtag; pk11rsagenparams rsaparams; void *params; seckeyprivatekey *privkey = null; secstatus rv; unsigned char randbuf[blocksize + 1]; rv = generaterandom(randbuf, blocksize); if (rv != secsuccess) { fprintf(stderr, "error while gene
rating the random numbers : %s\n", port_errortostring(rv)); goto cleanup; } pk11_randomupdate(randbuf, blocksize); switch (keytype) { case rsakey: rsaparams.keysizeinbits = size; rsaparams.pe = publicexponent; mechanism = ckm_rsa_pkcs_key_pair_gen; algtag = sec_...
...oid_pkcs1_md5_with_rsa_encryption; params = &rsaparams; break; default: goto cleanup; } fprintf(stderr, "\n\n"); fprintf(stderr, "gene
rating key.
Python binding for NSS
nss is built upon nspr because nspr provides an abstraction of common ope
rating system services, particularly in the areas of networking and process management.
... python also provides an abstraction of common ope
rating system services but because nss and nspr are tightly bound python-nss exposes elements of nspr.
... python-nss tries to be flexible when gene
rating a print representation of complex objects.
sslfnc.html
this page is part of the ssl reference that we are mig
rating into the format described in the mdn style guide.
... keep the following in mind when deciding on the ope
rating parameters you want to use with a particular socket: enabling the ssl_require_certificate option is not recommended.
... description keep the following in mind when deciding on the ope
rating parameters you want to use with a particular socket: turning on ssl_require_certificate will have no effect unless ssl_request_certificate is also turned on.
Accessing the Windows Registry Using XPCOM
you can read the interface documentation for a full explanation, but we will show only the three most commonly used modes here: access_read — for reading values, enume
rating keys, and receiving notifications access_write — for setting values and creating sub keys access_all — access for all operations in addition to open() and create(), there are the openchild() and createchild() methods.
... .createinstance(components.interfaces.nsiwindowsregkey); wrk.open(wrk.root_key_local_machine, "software\\microsoft", wrk.access_read); if (wrk.haschild("windows")) { var subkey = wrk.openchild("windows\\currentversion", wrk.access_read); var id; if (subkey.hasvalue("productid")) id = subkey.readstringvalue("productid"); subkey.close(); } wrk.close(); enume
rating registry keys and values in some situations, you may want to enumerate a number of keys or values whose names you do not know.
... the nsiwindowsregkey interface provides the childcount, getchildname(), valuecount, and getvaluename() properties and methods for enume
rating keys and values respectively.
XPCOM array guide
for example, you should not delete elements of an array during the enumeration as this will often confuse the loop which is enume
rating the array.
...the callback mechanism can be useful when integ
rating with existing callback-style code however.
... nsisimpleenumerator nsisimpleenumerator is a generic enumerator for enume
rating a list of any xpcom object.
nsIExternalURLHandlerService
1.0 66 introduced gecko 2.0 inherits from: nsisupports last changed in gecko 2.0 (firefox 4 / thunderbird 3.3 / seamonkey 2.1) method overview nsihandlerinfo geturlhandlerinfofromos(in nsiuri aurl, out boolean afound); methods geturlhandlerinfofromos() given a url, looks up the handler info from the ope
rating system.
... this should be overridden by each ope
rating systems implementation.
...afound was an ope
rating system default handler for this url found?
nsILocaleService
astring getlocalecomponentforuseragent(); nsilocale getlocalefromacceptlanguage(in string acceptlanguage); nsilocale getsystemlocale(); nsilocale newlocale(in astring alocale); nsilocale newlocaleobject(in nsilocaledefinition localedefinition); obsolete since gecko 1.9 methods getapplicationlocale() gets the user preference for locale from the ope
rating system.
...getlocalecomponentforuseragent() gets the user preference for locale from the ope
rating system.
...getsystemlocale() gets the user preference for locale from the ope
rating system.
nsIMemoryReporterManager
registerreporter(in nsimemoryreporter reporter); void unregistermultireporter(in nsimemorymultireporter reporter); void unregisterreporter(in nsimemoryreporter reporter); attributes attribute type description explicit print64 gets the total size of explicit memory allocations, both at the ope
rating system level (for example, via mmap, virtualalloc) and at the heap level (for example, via malloc(), calloc(), operator new).
... note: it covers all heap allocations, but will miss any ope
rating system level ones not covered by memory reporters.
...return value an nsisimpleenumerator for enume
rating installed memory reporters.
FileSystemDirectoryEntry.removeRecursively() - Web APIs
the filesystemdirectoryentry interface's method removerecursively() removes the directory as well as all of its content, hierarchically ite
rating over its entire subtree of descendant files and directories.
... fileerror.not_readable_err the directory is not accessible; perhaps it's in use by another application or is locked at the ope
rating system level.
... other security concerns as raised by the user agent or the ope
rating system.
IDBCursor - Web APIs
the idbcursor interface of the indexeddb api represents a cursor for traversing or ite
rating over multiple records in a database.
... the cursor has a source that indicates which index or object store it is ite
rating over.
... idbcursor.source read only returns the idbobjectstore or idbindex that the cursor is ite
rating.
Using IndexedDB - Web APIs
so for example, don't use 2.4 as a version number: var request = indexeddb.open("mytestdatabase", 2.4); // don't do this, as the version will be rounded to 2 gene
rating handlers the first thing you'll want to do with almost all of the requests you generate is to add success and error handlers: request.onerror = function(event) { // do something with request.errorcode!
...however, if such a property already exists, the value of that property is used as key rather than gene
rating a new key.
...in the above example, we're ite
rating over all objects in ascending order.
Navigator.oscpu - Web APIs
the navigator.oscpu property returns a string that identifies the current ope
rating system.
... syntax oscpuinfo = navigator.oscpu value a domstring providing a string which identifies the ope
rating system on which the browser is running.
... ope
rating system oscpuinfo string format os/2 os/2 warp x (either 3, 4 or 4.5) windows ce windowsce x.y1 windows 64-bit (64-bit build) windows nt x.y; win64; x64 windows 64-bit (32-bit build) windows nt x.y; wow64 windows 32-bit windows nt x.y mac os x (ppc build) powerpc mac os x version x.y mac os x (i386/x64 build) intel mac os x or macos version x.y linux 64-bit (32-bit build) output of uname -s plus "i686 on x86_64" linux output of uname -sm x.y refers to the version of the ope
rating system example function osinfo() { alert(window.navigator.oscpu); } osinfo(); // alerts "windows nt 6.0" for example usage notes unless your code is privileged (chrome or a...
Implementing a Microsoft Active Accessibility (MSAA) Server - Accessibility
msaa is the microsoft active accessibility (msaa) api, used on windows ope
rating systems to support assistive technologies for users with disabilities.
...even if you are visibly showing window focus on the correct window, you must also tell the ope
rating system to focus this window before any other accessibility events get fired in it.
... gene
rating msaa events first, keep in mind that most msaa events aren't utilized by accessibility aids.
Perceivable - Accessibility
1.3.3 sensory characteristics (a) instructions for ope
rating controls or understanding content do not rely on a single sense.
... guideline 1.4: make it easier for users to see and hear content including sepa
rating foreground from background this guideline relates to making sure core content is easy to discern from backgrounds and other decoration.
... dismissable (can be closed/removed) hoverable (the additional content does not disappear when the pointer is over it) persistent (the additional content does not disappear without user action) understanding content on hover or focus note: also see the wcag description for guideline 1.4: distinguishable: make it easier for users to see and hear content including sepa
rating foreground from background..
Value definition syntax - CSS: Cascading Style Sheets
bold <length> , thin this example matches the following values: bold 1em, thin bold 0, thin bold 2.5cm, thin bold 3vh, thin but not: thin 1em, bold, as the entities must be in the expressed order bold 1em thin, as the entities are mandatory; the comma, a literal, must be present bold 0.5ms, thin, as the ms values are not <length> double ampersand sepa
rating two or more components, by a double ampersand, &&, means that all these entities are mandatory but may appear in any order.
... double bar sepa
rating two or more components by a double bar, ||, means that all entities are options: at least one of them must be present, and they may appear in any order.
... single bar sepa
rating two or more entities by a single bar, |, means that all entities are exclusive options: exactly one of these options must be present.
A hybrid approach - Developer guides
we can also address some of the performance problems with responsive design by incorpo
rating server-side techniques.
... we’ve talked about incorpo
rating server-side techniques into a responsive design, but there are even ways to use the hybrid approach if your use cases for mobile and desktop are very different.
... you could, for example, increase the flexibility of your separate site designs by incorpo
rating media queries and a flexible layout.
itemscope - HTML: Hypertext Markup Language
the itemtypes, recipe, aggregate
rating, and nutritioninformation in the following example are part of the schema.org structured data for a recipe, as specified by the first itemtype, http://schema.org/recipe.
...i like to add a dash of nutmeg.</span> <br> <span itemprop="aggregate
rating" itemscope itemtype="http://schema.org/aggregate
rating"> <span itemprop="
ratingvalue">4.0</span> stars based on <span itemprop="reviewcount">35</span> reviews </span> <br> prep time: <time datetime="pt30m" itemprop="preptime">30 min</time><br> cook time: <time datetime="pt1h" itemprop="cooktime">1 hou</time>r<br> total time: <time datetime="pt1h30m" itemprop="totaltime">1 hour 30 mi...
... itemprop author [person] itemprop name carol smith itemscope itemprop[itemtype] aggregate
rating [aggregate
rating] itemprop
ratingvalue 4.0 itemprop reviewcount 35 itemscope itemprop[itemtype] nutrition [nutritioninformation] itemprop servingsize 1 medium slice itemprop calories 250 cal itemprop fatcontent 12 g note: a handy tool for extracting microdata structures from html is google's structur...
Microdata - HTML: Hypertext Markup Language
commonly used vocabularies: creative works: creativework, book, movie, musicrecording, recipe, tvseries embedded non-text objects: audioobject, imageobject, videoobject event health and medical types: notes on the health and medical types under medicalentity organization person place, localbusiness, restaurant product, offer, aggregateoffer review, aggregate
rating action thing intangible major search engine operators like google, microsoft, and yahoo!
... example html <div itemscope itemtype="http://schema.org/softwareapplication"> <span itemprop="name">angry birds</span> - requires <span itemprop="ope
ratingsystem">android</span><br> <link itemprop="applicationcategory" href="http://schema.org/gameapplication"/> <div itemprop="aggregate
rating" itemscope itemtype="http://schema.org/aggregate
rating">
rating: <span itemprop="
ratingvalue">4.6</span> ( <span itemprop="
ratingcount">8864</span>
ratings ) </div> <div itemprop="offers" itemscope itemtype="http://schema.org/offer"> pr...
...ice: $<span itemprop="price">1.00</span> <meta itemprop="pricecurrency" content="usd" /> </div> </div> structured data itemscope itemtype softwareapplication (http://schema.org/softwareapplication) itemprop name angry birds itemprop ope
ratingsystem android itemprop applicationcategory gameapplication (http://schema.org/gameapplication) itemscope itemprop[itemtype] aggregate
rating [aggregate
rating] itemprop
ratingvalue 4.6 itemprop
ratingcount 8864 itemscope itemprop[itemtype] offers [offer] itemprop price 1.00 itemprop pricecurrency usd result note: a handy tool for extracting microdata structures from html is google's ...
A re-introduction to JavaScript (JS tutorial) - JavaScript
t common host environment is the browser, but javascript interpreters can also be found in a huge list of other places, including adobe acrobat, adobe photoshop, svg images, yahoo's widget engine, server-side environments such as node.js, nosql databases like the open source apache couchdb, embedded computers, complete desktop environments like gnome (one of the most popular guis for gnu/linux ope
rating systems), and others.
... another way of ite
rating over an array that was added with ecmascript 5 is foreach(): ['dog', 'cat', 'hen'].foreach(function(currentvalue, index, array) { // do something with currentvalue or array[index] }); if you want to append an item to an array simply do it like this: a.push(item); arrays come with a number of methods.
...there is no mechanism for ite
rating over the properties of the current scope object, for example.
Indexed collections - JavaScript
writing 0 empties it entirely: let cats = ['dusty', 'misty', 'twiggy'] console.log(cats.length) // 3 cats.length = 2 console.log(cats) // logs "dusty, misty" - twiggy has been removed cats.length = 0 console.log(cats) // logs []; the cats array is empty cats.length = 3 console.log(cats) // logs [ <3 empty items> ] ite
rating over arrays a common operation is to iterate over the values of an array, processing each one in some way.
... the foreach() method provides another way of ite
rating over an array: let colors = ['red', 'green', 'blue'] colors.foreach(function(color) { console.log(color) }) // red // green // blue alternatively, you can shorten the code for the foreach parameter with es2015 arrow functions: let colors = ['red', 'green', 'blue'] colors.foreach(color => console.log(color)) // red // green // blue the function passed to foreach is executed once for every ...
... note that the elements of an array that are omitted when the array is defined are not listed when ite
rating by foreach, but are listed when undefined has been manually assigned to the element: let array = ['first', 'second', , 'fourth'] array.foreach(function(element) { console.log(element) }) // first // second // fourth if (array[2] === undefined) { console.log('array[2] is undefined') // true } array = ['first', 'second', undefined, 'fourth'] array.foreach(function(element) { console.log(element) }) // first // second // undefined // fourth since javascript elements are saved as standard object properties, it is not advisable to iterate through ja...
TypeError: 'x' is not iterable - JavaScript
examples ite
rating over object properties in javascript, objects are not iterable unless they implement the iterable protocol.
... use case might be to use a map: var map = new map; map.set('france', 'paris'); map.set('england', 'london'); // iterate over the property names: for (let country of map.keys()) { let capital = map[country]; console.log(country, capital); } for (let capital of map.values()) console.log(capital); for (const [country, capital] of map.entries()) console.log(country, capital); ite
rating over a generator generators are functions you call to produce an iterable object.
... function* generate(a, b) { yield a; yield b; } for (let x of generate(1,2)) console.log(x); ite
rating over a custom iterable custom iterables can be created by implementing the symbol.iterator method.
mimeTypes.rdf corruption - SVG: Scalable Vector Graphics
for files loaded locally, it first looks in a cache of filename extension to media type mappings (stored in a mozilla profile file called mimetypes.rdf), and if it doesn't find a media type there, it asks the ope
rating system.
... possible solutions how you solve this problem depends on whether it's your ope
rating system or your mozilla profile (mimetypes.rdf) that are corrupt.
...if they still don't work, then you ope
rating system is the likely culprit.
remote/parent - Archive of obsolete content
this is a shortcut for enume
rating existing processes and then listening for attach events.
...this is a shortcut for enume
rating existing frames and then listening for attach events.
Miscellaneous - Archive of obsolete content
system info ope
rating system detection // returns "winnt" on windows vista, xp, 2000, and nt systems; // "linux" on gnu/linux; and "darwin" on mac os x.
... gene
rating random bytes useful snippet for gene
rating random bytes that can, for example be used as a good source for cryptographic entropy.
Install Manifests - Archive of obsolete content
%item_status% comma separated list of the add-ons ope
rating status in the application.
... %app_id% the id of the current application %app_version% the version of the application to check for updates for %current_app_version% the version of the current application %app_os% the value of os_target from the firefox build system, identifying the ope
rating system being used.
Adding Toolbars and Toolbar Buttons - Archive of obsolete content
it is not too hard to come up with some graphics for the buttons, but it can be hard to make them blend in with firefox on all ope
rating systems.
... you can have a different skin directory for each ope
rating system using manifest flags in the chrome.manifest file: skin xulschoolhello classic/1.0 skin/unix/ skin xulschoolhello classic/1.0 skin/win/ os=winnt skin xulschoolhello classic/1.0 skin/mac/ os=darwin the osversion flag can be used in case we wanted to have different icons for mac os x lion and above, and others for older systems.
An Interview With Douglas Bowman of Wired News - Archive of obsolete content
our writers and editors must get used to some new rules when gene
rating the day's stories.
... as many times as i heard the message that design of content should be addressable separately from the content itself, i don't think i realized the full benefits of doing so until we actually went through the process of sepa
rating them.
List of Former Mozilla-Based Applications - Archive of obsolete content
browser in version 8.5 blam feed reader switched to webkit in version 1.8.6 boxee media center software switched to webkit in version 1.0 epiphany browser switched from gecko to webkit flock social browsing flock switched from being firefox-based to chromium-based when it released a new beta on june 16, 2010 jolicloud web ope
rating system as of march 2010, rw/w reports jolicloud is on chrome/chrome os joost tv over internet switched from xulrunner-based client to a web application liferea news aggregator switched to webkit in version 1.6 manyone browser browser originally mozilla-based but now i believe the have a web-based tool (need reference for that) miro (formerl...
...czilla sgml/xml/html browser last release on site from july 2005 fabula language learning application inactive galeon browser last news item on site from september 2006 gencatrss rss reader domain switched over to domain parking service ghostzilla browser archived version of ghostzilla site from 2005 homebase desktop ope
rating environment for internet computers no longer available hp printer assistant printer utility hall of fame page mentions that this used an embedded version of mozilla at some point but i can't find reference to current status (may still be using mozilla code?) icebrowser java browser sdk uses mozilla rhino --eol'ed in 2009 (jin'sync) office app launcher ...
Structure of an installable bundle - Archive of obsolete content
the platform string is defined during the toolkit build process to a value unique for the combination of ope
rating system, processor architecture and compiler.
...ibmyplugin.so /platform/winnt_x86-msvc/plugins/myplugin.dll /platform/darwin_ppc-gcc3/plugins/libmyplugin.dylib because xpt files are not platform-specific, any associated xpt files would go in the generic components directory: /components/myplugin.xpt if an extension has non-binary platform-specific code (such as code which uses the windows registry from script), it can also use just the ope
rating system identifier as a platform-subdirectory: /platform/winnt/components/registerdoctype.js when platform-specific jar files are used, each platform directory should have its own chrome.manifest file: chrome.manifest chrome/mytheme-base.jar platform/darwin/chrome.manifest platform/darwin/chrome/mytheme-mac.jar platform/winnt/chrome.manifest platform/winnt/chrome/mytheme-win.jar the app/exte...
Creating a Microsummary - Archive of obsolete content
this mechanism is powerful, because it lets you traverse the node tree of a document, recursively gene
rating output based on the contents of the document.
... but for the purposes of gene
rating a microsummary for the spread firefox page, we only need to use a single <template> element that matches the root node of the document and is processed once: <?xml version="1.0" encoding="utf-8"?> <generator xmlns="http://www.mozilla.org/microsummaries/0.1" name="firefox download count"> <template> <transform xmlns="http://www.w3.org/1999/xsl/transform" version="1.0"> <output method="text"/> <template match="/"> </template> </transform> </template> </generator> including the download count to include the download count in the output of the xslt transform sheet, we need to add an xslt <value-of> element to the template whose select attribute contains an xpath expression that points to the node containing the count.
JavaScript crypto - Archive of obsolete content
services are provided to enable: smart card events, gene
rating certificate requests, importing user certs, gene
rating random numbers, logging out of your tokens, and signing text.
... gene
rating keys and issuing user certificates there are several crypto object methods used in gene
rating keys for certificates: generatecrmfrequest(), importusercertificates().
Mac OS X Build Prerequisites/fink - Archive of obsolete content
you may download the most recent version of fink that is compatible with your ope
rating system release.
...if you perform a major ope
rating system upgrade on your computer, such as an upgrade from tiger to leopard, you should remove the /sw directory and re-install fink and the packages below.
Makefile.mozextension.2 - Archive of obsolete content
#################################### ###### define chrome_manifest content $(project) content/ overlay chrome://browser/content/browser.xul chrome://$(project)/content/overlay.xul locale $(project) en-us locale/ skin $(project) classic/1.0 skin/ style chrome://global/content/customizetoolbar.xul chrome://$(project)/skin/overlay.css endef export chrome_manifest chrome.manifest: @echo gene
rating $(project)/chrome.manifest @echo "$$chrome_manifest" > $(project)/chrome.manifest ###### #firefox {ec8030f7-c20a-464f-9b0e-13a3a9e97384} #thunderbird {3550f703-e582-4d05-9a08-453d09bdfdc6} #nvu {136c295a-4a5a-41cf-bf24-5cee526720d5} #mozilla suite {86c18b42-e466-45a9-ae7a-9b95ba6f5640} #seamonkey {92650c4d-4b8e-4d2a-b7eb-24ecf4f6b63a} #sunbird {718e30fb-e89b-41dd-9da7-e25a45638b28} #nets...
...conurl>chrome://$(project)/skin/mainicon.png</iconurl> <updateurl>http://$(project).mozdev.org/update.rdf</updateurl> <type>2</type> <targetapplication> <description> <id>{ec8030f7-c20a-464f-9b0e-13a3a9e97384}</id> <minversion>2.0</minversion> <maxversion>9.0</maxversion> </description> </targetapplication> </description> </rdf> endef export install_rdf install.rdf: @echo gene
rating $(project)/install.rdf @echo "$$install_rdf" > $(project)/install.rdf ###### define overlay_xul <overlay id="$(project)-overlay" xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"><script src="overlay.js"/></overlay> ...
Mozilla Application Framework in Detail - Archive of obsolete content
you can create applications using our framework that either have a native look and feel for each os, or one which is identical on macs, pc's or unix ope
rating systems.
...ll basic shapes, beziers, stroking and filling with opacity, and much of the dom; mathml rendering; an ecma-262 edition 3-compliant javascript engine; java integration with a bridge to xpcom, a java dom api, the open jvm integration (oji) facility, a java webclient api, and java plug-ins; nspr, a runtime engine that provides platform-independence (across over a dozen platforms) for non-gui ope
rating system facilities with support for threads, thread synchronization, normal file and network i/o, interval timing and calendar time, basic memory management (malloc and free) and shared library linking; psm, a set of libraries that perform cryptographic operations including setting up an ssl connection, object signing and signature verification, certificate management (including issuance and revo...
File object - Archive of obsolete content
pipe to programs gene
rating output on stdout) begin with the pipe symbol; writeable pipelines end with the pipe symbol.
... file.flush() flushes the ope
rating system's write buffers for the file and blocks until any pending data has been committed to disk.
URIs and URLs - Archive of obsolete content
these schemes support a hierarchical naming system, where the hierarchy of the name is denoted by a "/" delimiter sepa
rating the components in the path.
...normally, the only time escape encodings can safely be made is when the uri is being created from its component parts; each component may have its own set of characters that are reserved, so only the mechanism responsible for gene
rating or interpreting that component can determine whether or not escaping a character will change its semantics.
gestalt - Archive of obsolete content
gestalt (macintosh only) retrieves information about the ope
rating environment.
...for information on that function, see inside macintosh: ope
rating system utilities.
RDF Modifications - Archive of obsolete content
instead of regene
rating the content for a result, the builder just looks for attribute values that involve the ?name variable.
...as when gene
rating the results initially, only the highest matching query needs to be applied.
Recursive Generation - Archive of obsolete content
after gene
rating content, the template builder always repeats the generation for inner levels as far as it can go.
...after gene
rating a result's content, the builder starts again using a new parent and starting point.
The Joy of XUL - Archive of obsolete content
platform portability like html, xul is designed to be platform-neutral, making applications easily portable to all of the ope
rating systems on which mozilla runs.
... together, xpcom and xpconnect enable developers to create xul applications that require the raw processing power of compiled languages (c/c++) or access to the underlying ope
rating system.
Templates - Archive of obsolete content
to use your own datasource, specify the url of an rdf file for the datasources attribute, as indicated in the example below: <box datasources="chrome://zoo/content/animals.rdf" ref="http://www.some-fictitious-zoo.com/all-animals"> you can even specify multiple datasources at a time by sepa
rating them with a space in the attribute value.
... you can also specify mutliple resource values in the same attribute by sepa
rating them with a space, as in the example below.
XUL element attributes - Archive of obsolete content
multiple classes may be specified by sepa
rating them with spaces.
...when gene
rating content from a template this is used to determine which resources from the datasource are containers and thus can have child nodes and which ones are not containers.
XUL accessibility guidelines - Archive of obsolete content
the column picker and column headers in xul trees are not keyboard accessible, consistent with the standard tree behavior on most contemporary ope
rating systems.
...by default, xul menus, labels, and other widgets get their font, size, and color settings from the user settings specified in the ope
rating system.
Dialogs in XULRunner - Archive of obsolete content
this time i'll look at dialogs, including both custom dialogs and standard ope
rating system dialogs.
...here is the code needed to open a dialog: function opendialog() { window.opendialog("chrome://basicapp/content/dialog.xul", "newdlg", "modal"); } the resulting dialog looks like this on windows 2000, and will look similar on other ope
rating systems: the first thing that caught my eye about dialog is the button-related attributes on the element.
Archived Mozilla and build documentation - Archive of obsolete content
mozprocess mozprocess provides python process management via an ope
rating system and platform transparent interface to mozilla platforms of interest.
...an ssb also offers tighter integration with the ope
rating system and desktop than a typical web application running through a web browser.
Vulnerabilities - Archive of obsolete content
examples of settings are an ope
rating system offering access to control lists that set the privileges that users have for files, and an application offering a setting to enable or disable the encryption of sensitive data stored by the application.
...setting this to 1 would be the most secure setting against password guessing attacks, but it would also cause legitimate users to be locked out after mistyping a password once, and it would also permit attackers to perform denial-of-service attacks against users more easily by gene
rating a single failed login attempt for each user account.
Iterator - Archive of obsolete content
examples ite
rating over properties of an object var a = { x: 10, y: 20, }; var iter = iterator(a); console.log(iter.next()); // ["x", 10] console.log(iter.next()); // ["y", 20] console.log(iter.next()); // throws stopiteration ite
rating over properties of an object with legacy destructuring for-in statement var a = { x: 10, y: 20, }; for (var [name, value] in iterator(a)) { console.log(name, value); ...
... // x 10 // y 20 } ite
rating with for-of var a = { x: 10, y: 20, }; for (var [name, value] of iterator(a)) { // @@iterator is used console.log(name, value); // x 10 // y 20 } iterates over property name var a = { x: 10, y: 20, }; for (var name in iterator(a, true)) { console.log(name); // x // y } passing generator instance function* f() { yield 'a'; yield 'b'; } var g = f(); console.log(g == iterator(g)); // true for (var v in iterator(g)) { console.log(v); // a // b } passing iterator instance var a = { x: 10, y: 20, }; var i = iterator(a); console.log(i == iterator(i)); // true specifications non-standard.
Back to the Server: Server-Side JavaScript On The Rise - Archive of obsolete content
managing context to take advantage of all the ope
rating contexts of jaxer, you'll need to specify how your scripts should behave using the runat attribute of the script tag (or by setting a runat property on a javascript function object).
...r, callable from the browser return "exposed to the browser"; } exposed.proxy = true; // tell jaxer this function is ok to be called from the browser </script> <script runat="client" type="text/javascript"> alert( exposed() ); //works like a charm alert( notexposed() ); //produces an object not found error since it server-side only </script> understanding the concept of ope
rating context in jaxer is central to moving forward with the example application which is what we'll examine next.
Archive of obsolete content
here at mdn, we try to avoid outright deleting content that might be useful to people targeting legacy platforms, ope
rating systems, and browsers.
...this article deals uniquely with netscape 7.1 running on the windows ope
rating system.
Game distribution - Game development
marketplaces — distribution platforms let's see what the available options are regarding the marketplaces/stores available for different platforms and ope
rating systems.
...to do the desktop thing properly you should support all three ope
rating systems: windows, mac os and linux.
2D collision detection - Game development
sepa
rating axis theorem this is a collision algorithm that can detect a collision between any two *convex* polygons.
... implementing sat is out of scope for this page so see the recommended tutorials below: sepa
rating axis theorem (sat) explanation collision detection and response collision detection using the sepa
rating axis theorem sat (sepa
rating axis theorem) sepa
rating axis theorem collision performance while some of these algorithms for collision detection are simple enough to calculate, it can be a waste of cycles to test *every* entity with every other entity.
Gonk - MDN Web Docs Glossary: Definitions of Web-related terms
gonk is the lower-level ope
rating system of firefox os and consists of a linux kernel (based on the android open source project (aosp)) and userspace hardware abstraction layer (hal).
...since firefox os has full control over gonk, we can expose interfaces to gecko that aren't accessible on other ope
rating systems, for example the full telephony stack and display frame buffer.
Mobile accessibility - Learn web development
android talkback the talkback screen reader is built into the android ope
rating system.
... ios voiceover a mobile version of voiceover is built into the ios ope
rating system.
Debugging CSS - Learn web development
take a step back from the problem any coding problem can be frust
rating, especially css problems because you often don't get an error message to search for online to help with finding a solution.
...if you have something more specific overriding what you are trying to do, you can enter into a very frust
rating game of trying to work out what.
Images, media, and form elements - Learn web development
the default styling of these elements will differ however based on the ope
rating system and browser that your user visits the site with.
... as explained in the lessons on form styling in the html part of this course, many of the more complex input types are rendered by the ope
rating system and are inaccessible to styling.
Aprender y obtener ayuda - Learn web development
focused thinking is great for concent
rating hard on specific subjects, getting into deep problem solving, and improving your mastery of the techniques required — strengthening the neural pathways in your brain where that information is stored.
... note: online code editors are also really useful for sharing code you've written, for example, if you are collabo
rating on learning with someone else who isn't in the same location, or are sending it someone to ask for help with it.
Server-side web frameworks - Learn web development
the template system also provides support for expressions (with syntax: {% expression %}), which allow templates to perform simple operations like ite
rating list values passed into the template.
...like django it provides standard mechanisms for routing urls, accessing data from a database, gene
rating html from templates and formatting data as json or xml.
Website security - Learn web development
command injection attacks allow a malicious user to execute arbitrary system commands on the host ope
rating system.
...whatever else you do to improve the security of your website, you should sanitize all user-originating data before it is displayed in the browser, used in sql queries, or passed to an ope
rating system or file system call.
TypeScript support in Svelte - Learn web development
in each case it should end up like this: import { selectonfocus } from '../actions' mig
rating the stores to typescript now we have to migrate the stores.js and localstore.js files to typescript.
...if you want to also check the .ts files you can run npm run validate && npx tsc --noemit, which tells the typescript compiler to check for errors without gene
rating the .js output files.
Getting started with Svelte - Learn web development
being a compiler, svelte can extend html, css, and javascript, gene
rating optimal javascript code without any runtime overhead.
...if you want to share an idea, ask for help, or report an issue, it's always extremely useful to create a repl instance demomst
rating the issue.
Handling common accessibility problems - Learn web development
some are built into the ope
rating system, like voiceover (mac os x and ios), chromevox (on chromebooks), and talkback (android).
... generally, screen readers are separate apps that run on the host ope
rating system and can read not only web pages, but text in other apps as well.
Introduction to cross browser testing - Learn web development
next, you should try expanding your list of test browsers to a full list of target audience browsers and start concent
rating on weeding out cross browser issues (see the next article for more information on determining your target browsers).
... if you haven't got the means to test all those different browser, ope
rating system, and device combinations on physical hardware, you can also make use of emulators (emulate a device using software on your desktop computer) and virtual machines (software that allows you to emulate multiple ope
rating system/software combinations on your desktop computer).
Multiprocess on Windows
we will now further detail each of these items: gene
rating typelibs for all com interfaces you first need to include a library statement in your idl.
... integ
rating interceptors into the a11y tree now that we have solved the apartment problem, and know how to wrap a com interface with an interceptor, we need to discuss how these things fit into the a11y tree.
Accessible Toolkit Checklist
provide theme compatibility with the ope
rating system, at least as an option.
...since the individual widgets predominately come from the ope
rating system, they already implement standard keyboard commands and follow the ope
rating system's visual theme.
What to do and what not to do in Bugzilla
you should not resolve a bug as wfm if: the bug reporter uses a different hardware/ope
rating system (e.g.
...if a bug is windows-only, change the field to the oldest affected ope
rating system.
Makefile - variables
module module_name no_dist_install inhibit gene
rating and copying exports/install targets into $(moz_objdir)/dist/install.
... xpidl_module module name to use when gene
rating .xpt files, default to module.
Multiple Firefox profiles
then follow the instructions below, applicable to your ope
rating system.
... creating a profile creating a profile through the profile manager these instructions should be the same for all ope
rating systems.
How Mozilla determines MIME Types
externalhelperappservice (located at uriloader/exthandler/nsexternalhelperappservice.cpp) the file->mime type mapping works like this: on beos, the ope
rating 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 than asking the os or looking in preferences...
...firstly, the ope
rating system is asked for a mime type.
Addon
isplatformcompatible read only boolean true or false depending on whether the add-on is compatible with the current ope
rating system.
... fulldescription read only string developercomments read only string eula read only string icon64url read only string supporturl read only string contributionurl read only string contributionamount read only string average
rating read only number reviewcount read only integer reviewurl read only string totaldownloads read only integer weeklydownloads read only integer dailyusers read only integer repositorystatus read only integer callbacks datadirectorycallback() a callback which is passed a direc...
Download
promise resolves to undefined when the instruction to launch the file has been successfully given to the ope
rating system.
... promise resolves to undefined when the instruction to open the containing folder has been successfully given to the ope
rating system.
JavaScript OS.Constants
javascript module os.constants contains ope
rating system-specific constants.
... name the name of the ope
rating system (e.g.
JavaScript OS
platform and add-ons) to interact with the host ope
rating system.
...os.shared utilities for defining functions that interact with the ope
rating system.
OS.File.Info
due to differences between ope
rating systems, the information available depends on the platform.
...note that the definition of last access may depend on the underlying ope
rating system and file system.
Localization sign-off reviews
the merge date for mig
rating from one product release channel to the next is rapidly approaching.
...this is done by gene
rating a diff between the new release revision being considered and the previously approved release revision.
Fonts for Mozilla 2.0's MathML engine
these fonts are opentype postscript fonts, which are supported by most modern ope
rating systems.
... however some ope
rating systems may not support these fonts.
JS::PerfMeasurement
note: at present, js::perfmeasurement is only functional on linux, but it is planned to add support for windows (bug 583322) and osx (bug 583323) as well, and we welcome patches for other ope
rating systems.
... (at time of writing, linux allows all the above events to be measured, and we don't have back ends for any other ope
rating system.
Power profiling overview
for this reason, integ
rating power measurements into the gecko profiler is unlikely to be useful, and other power profiling tools typically use much lower sampling rates (e.g.
...p0 is the state where the processor is ope
rating at maximum frequency and voltage, and higher-numbered p-states operate at a lower frequency and voltage to reduce power consumption.
I/O Functions
two new functions, pr_transmitfile and pr_acceptread, can exploit the new system calls of some ope
rating systems for higher performance.
...pollable events are implemented using a pipe or a pair of tcp sockets connected via the loopback address, therefore setting and/or waiting for pollable events are expensive ope
rating system calls.
NSPR Error Handling
pr_protocol_not_supported_error the host ope
rating system does not support the protocol requested.
... pr_name_too_long_error filename is longer than allowed by the host ope
rating system.
sample2
> -c <cert> [ -r <csr> -u <issuernickname> [-x <\"\">] -m <serialnumber> ] | ", "-n <nickname> -b <headerfilename> | ", "-b <headerfilename> -i <ipfilename> -e <encryptfilename> | ", "-b <headerfilename> -i <ipfilename> | ", "-b <headerfilename> -i <ipfilename> | ", "-b <headerfilename> -e <encryptfilename> -o <opfilename> \n"); fprintf(stderr, "commands:\n\n"); fprintf(stderr, "%s %s\n --for gene
rating cert request (for ca also)\n\n", progname, "-g -s <subject> -r <csr>"); fprintf(stderr, "%s %s\n --to input and store cert (for ca also)\n\n", progname, "-a -n <nickname> -t <trust> -c <cert> [ -r <csr> -u <issuernickname> [-x <\"\">] -m <serialnumber> ]"); fprintf(stderr, "%s %s\n --to put cert in header\n\n", progname, "-h -n <nickname> -b <headerfilename> [-v <\"\">]"); fprintf(stderr, "%s %s\...
... *slot, int size, int publicexponent, const char *noise, seckeypublickey **pubkeyp, const char *pqgfile, secupwdata *pwdata) { ck_mechanism_type mechanism; secoidtag algtag; pk11rsagenparams rsaparams; void *params; seckeyprivatekey *privkey = null; secstatus rv; unsigned char randbuf[blocksize + 1]; rv = generaterandom(randbuf, blocksize); if (rv != secsuccess) { fprintf(stderr, "error while gene
rating the random numbers : %s\n", port_errortostring(rv)); goto cleanup; } pk11_randomupdate(randbuf, blocksize); switch (keytype) { case rsakey: rsaparams.keysizeinbits = size; rsaparams.pe = publicexponent; mechanism = ckm_rsa_pkcs_key_pair_gen; algtag = sec_oid_pkcs1_md5_with_rsa_encryption; params = &rsaparams; break; default: goto cleanup; } fprintf(stderr, "\n\n"); fprintf(stderr, "gene
rating key...
PKCS11 FAQ
when ope
rating in fips mode, moving keys is significantly harder.
...this is the same method used for gene
rating software keys and certificates and is used by certificate authorities like verisign and thawte.
PKCS11 Implement
it uses a single session for all single-part rsa operations such as logging in, logging out, signing, verifying, gene
rating keys, wrapping keys, and so on.
...typically, nss uses c_createobject for creating a new private key if pkcs #12 is ope
rating or if your writable token doesn't support c_generatekeypair.
SpiderMonkey Build Documentation
for a list of other available build options, type (assuming the current working directory is one of the above-created build directories): /bin/sh ../configure.in --help gene
rating a compilation database some tools (like ides, static analyzers and refactoring tools) consume a file called compile_commands.json which contains a description of all the pieces required to build a piece of software so that tools don't have to also understand a build system.
...this configure option builds the in-tree version of nspr which is probably what you want; because spidermonkey uses newer nspr symbols, the nspr that ships with your ope
rating system probably does not work.
SpiderMonkey 1.8.7
mig
rating to spidermonkey 1.8.7 this covers mig
rating from version 1.8.5.
... see the 1.8.5 release notes for information on mig
rating from earlier versions.
SpiderMonkey 1.8
mig
rating to spidermonkey 1.8 spidermonkey 1.8 is not binary-compatible with previous releases.
... there is a new set of apis for integ
rating spidermonkey's garbage collector with other memory management systems.
Exploitable crashes
put a security severity
rating in the bug's keywords.
... if you're not sure what
rating to give, err on the higher side so the bug will get more attention.
XPCOM glue
extension and application authors currently using internal linkage should read the guide on mig
rating from internal linkage to frozen linkage.
... see also using the gecko sdk mig
rating from internal linkage to frozen linkage ...
How to build an XPCOM component in JavaScript
see gene
rating guids for more information.
...the imported library contains functions for gene
rating the module, factory, and the nsgetmodule and queryinterface functions for you.
Creating the Component Code
gene
rating cids to generate a cid for your component, you can use the uuidgen tool that comes with most unix distributions and with microsoft visual c++.
...this cid can be created via the tool uuidgen on most ope
rating systems, as in the many faces of the xpcom component manager above.
Starting WebLock
on the macintosh platform, for example, files are represented as a triplet - two numbers and one string - so using a string on the macintosh does not adequately identify files on that ope
rating system.
...as a layer of abstraction above the ope
rating system, the nspr allows gecko applications to be platform independent by providing the following system-level facilities: threads thread synchronization file and network i/o timing and intervals memory management shared library linking the nspr is included in the gecko sdk.
nsIDOMChromeWindow
methods beginwindowmove() on some ope
rating systems, we must allow the window manager to handle window dragging.
...void beginwindowmove( in nsidomevent mousedownevent ); parameters mousedownevent exceptions thrown ns_error_not_implemented if the ope
rating system does not support this method.
nsIDOMSimpleGestureEvent
(xxx not implemented on mac) default behavior: some ope
rating systems support default behaviors for gesture events when they are not handled by the application.
... note: on mac os x, the units used for magnification gestures by the underlying ope
rating system api are not documented at this time; typical values appear to be in the range 0.0 to 100.0, but currently you can only rely on the value being either positive or negative.
nsIINIParser
e, section, prop) { var inifact = components.manager.getclassobjectbycontractid( "@mozilla.org/xpcom/ini-parser-factory;1", components.interfaces.nsiiniparserfactory ); var iniparser = inifact.createiniparser(inifile); try { return iniparser.getstring(section,prop); } catch(e) { return undefined; } } // usage: var lang = getinivalue(file,"setting","language"); enume
rating sections this example gets a list of all the sections in the ini file.
... // get all sections in the ini file var sectenum = iniparser.getsections(); // save the sections in an array var sections = []; while (sectenum && sectenum.hasmore()) { var section = sectenum.getnext(); // add an array entry for each section sections.push(section); } enume
rating keys this example shows how to fetch the values for all the keys in the section named "setting".
nsILocalFile
launch() requests that the ope
rating system attempt to open this file.
... } if (n < 0) rv = ns_error_unexpected; pr_close(fd); return rv; } reveal() ask the ope
rating system to open the folder which contains this file or folder.
nsIPropertyBag
examples get user agent information (ope
rating system specifics.
... mozpay:null mozpermissionsettings:null mozphonenumberservice:phonenumberservice mozpower:mozpowermanager moztcpsocket:null online:true oscpu:"windows nt 5.1" platform:"win32" plugins:pluginarray product:"gecko" productsub:"20100101" useragent:"mozilla/5.0 (windows nt 5.1; rv:30.0) gecko/20100101 firefox/30.0" vendor:"" vendorsub:"" __proto__:navigatorprototype from here we can easily see the ope
rating system version.
nsIServerSocket
this parameter may be silently limited by the ope
rating system.
...this parameter may be silently limited by the ope
rating system.
nsITaskbarWindowPreview
note that even while the preview is hidden, its thumbnails and/or previews may still be requested by other parts of the ope
rating system through the nsitaskbarwindowpreview's controller.
...if false, the ope
rating system draws these for you.
nsIWindowMediator
inherits from: nsisupports last changed in gecko 8.0 (firefox 8.0 / thunderbird 8.0 / seamonkey 2.5) the two most common uses of nsiwindowmediator are, enume
rating all windows of a given type and getting the most recent / any window of a given type.
... win.queryinterface(components.interfaces.nsiinterfacerequestor) .getinterface(components.interfaces.nsiwebnavigation) .queryinterface(components.interfaces.nsidocshelltreeitem).treeowner .queryinterface(components.interfaces.nsiinterfacerequestor) .getinterface(components.interfaces.nsixulwindow) enume
rating windows the following code can be used if you need to do something for each open window of a particular type.
nsIXULRuntime
os autf8string a string tag identifying the current ope
rating system.
... example display the user's ope
rating system in an alert box: var xulruntime = components.classes["@mozilla.org/xre/app-info;1"] .getservice(components.interfaces.nsixulruntime); alert(xulruntime.os); see also nsixulappinfo - a related interface providing information about the host application, it's also implemented by xre/app-info.
nsIXULTemplateQueryProcessor
the reference point is important when gene
rating output recursively, as the query will be the same for each iteration, however, the reference point will differ.
...this is used as the reference point by the template builder when gene
rating the first level of content.
pyxpidl
gene
rating c++ headers to generate c++ headers, use the header.py utility: sdkdir/sdk/bin/header.py --cachedir=<path> -o <outputfilename.h> <filename.idl> gene
rating typelibs gene
rating 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 mapping of old xpidl options to...
...e extension; for example -o /tmp/nsifoo.idl) -e specify an explicit output file name (-e /tmp/nsifoo.idl for example) n/a (this is subsumed by -o now) -d write dependencies (requires -e) -d (unchanged) -m specify output mode n/a (feature removed; use header.py or typelib.py specifically) it's worth noting that the old output mode options for gene
rating documentation and java interfaces (-m doc and -m java) have no equivalents in pyxpidl.
XPIDL
for instructions on how to generate an uuid see gene
rating guids.
... resources (mostly outdated) some unsorted notes including a keyword list xpidl is a tool for gene
rating c++ headers, java interfaces, xpconnect typelibs, and html documentation from xpidl files gene
rating xpt files on windows a google groups post with instructions on how to use variable-length argument lists using xpidl.
Working with ArrayBuffers
types.open('libc.so'); break; case 'linux': lib = ctypes.open('libc.so.6'); break; case 'gnu/kfreebsd': lib = ctypes.open('libc.so.0.1'); break; default: //assume unix try { lib = ctypes.open(ctypes.libraryname('c')); } catch (ex) { throw new error('i dont know where to memcpy is defined on your ope
rating system, "' + os.constants.sys.name + '"'); lib.close(); } } try { var memcpy = lib.declare('memcpy', os.constants.sys.name.tolowercase().indexof('win') == 0 ?
... ctypes.winapi_abi : ctypes.default_abi, ctypes.void_t, // return ctypes.void_t.ptr, // *dest ctypes.void_t.ptr, // *src ctypes.size_t // count ); } catch (ex) { throw new error('i dont know where to memcpy is defined on your ope
rating system, "' + os.constants.sys.name + '"'); lib.close() } memcpy(myimgdat.data, pixelbuffer, myimgdat.data.length); // myimgdat.data.length is imgwidth * imgheight *4 because per pixel there is r, g, b, a numbers lib.close(); see also type conversion ...
ABI
os specific win32 and os2 callbacks in js-ctypes under these ope
rating systems use a different abi than regular function declarations.
... other all other ope
rating systems use ctypes.default_abi as their calling convention for all function declarations.
Edit fonts - Firefox Developer Tools
warning: in order to use variable fonts, you need to make sure that your ope
rating system is up to date.
...if your ope
rating system is not up to date, you will not be able to use variable fonts in web pages or the firefox developer tools.
Firefox Developer Tools
mig
rating from firebug firebug has come to the end of its lifespan (see firebug lives on in firefox devtools for details of why), and we appreciate that some people will find mig
rating to another less familiar set of devtools to be challenging.
... to ease a transition from firebug to the firefox developer tools, we have written a handy guide — mig
rating from firebug.
IDBCursor.source - Web APIs
the source read-only property of the idbcursor interface returns the idbobjectstore or idbindex that the cursor is ite
rating over.
... syntax var source = cursor.source; value the idbobjectstore or idbindex that the cursor is ite
rating over.
IDBCursorWithValue - Web APIs
the idbcursorwithvalue interface of the indexeddb api represents a cursor for traversing or ite
rating over multiple records in a database.
... the cursor has a source that indicates which index or object store it is ite
rating over.
IDBObjectStore - Web APIs
used for ite
rating through an object store by primary key with a cursor.
...used for ite
rating through an object store with a key.
Basic concepts - Web APIs
cursor a mechanism for ite
rating over multiple records with a key range.
... the cursor has a source that indicates which index or object store it is ite
rating.
Keyboard API - Web APIs
keyboard locking enables a web page to capture keys that are normally reserved by the user agent or the underlying ope
rating system.
...those keys and key combinations are typically captured by the user agent or the underlying ope
rating system, as illustrated in the following example.
MediaDevices.getUserMedia() - Web APIs
possible errors are: aborterror although the user and ope
rating system both granted access to the hardware device, and no hardware issues occurred that would cause a notreadableerror, some problem occurred which prevented the device from being used.
... notreadableerror although the user granted permission to use the matching devices, a hardware error occurred at the ope
rating system, browser, or web page level which prevented access to the device.
MouseEvent - Web APIs
mouseevent.mozpressure read only the amount of pressure applied to a touch or tablet device when gene
rating the event; this value ranges between 0.0 (minimum pressure) and 1.0 (maximum pressure).
... example this example demonstrates simulating a click (that is programmatically gene
rating a click event) on a checkbox using dom methods.
Using the Notifications API - Web APIs
typically, system notifications refer to the ope
rating system's standard notification mechanism: think for example of how a typical desktop system or mobile device broadcasts notifications.
...the dismissal may also happen at the ope
rating system level and users should remain in control of this.
RTCIdentityErrorEvent.idp - Web APIs
the read-only property rtcidentityerrorevent.idp returns the domstring describing the domain name of the identity provider (idp) gene
rating the error response event.
... syntax var idp = event.idp; event.idp = "developer.mozilla.org"; example pc.onidpassertionerror = function( ev ) { alert("the idp named '" + ev.idp + "' encountered an error " + "while gene
rating an assertion."); } ...
RTCIdentityErrorEvent - Web APIs
rtcidentityerrorevent.idp read only is a domstring describing the domain name of the identity provider (idp) gene
rating the error response.
... examples pc.onidpassertionerror = function( ev ) { alert("the idp named '" + ev.idp + "' encountered an error " + "while gene
rating an assertion."); } ...
Using readable streams - Web APIs
ent('li'); listitem.textcontent = string; list1.appendchild(listitem); }, 1000); button.addeventlistener('click', function() { clearinterval(interval); readstream(); controller.close(); }) }, pull(controller) { // we don't really need a pull in this example }, cancel() { // this is called if the reader cancels, // so we should stop gene
rating strings clearinterval(interval); } }); in the readstream() function itself, we lock a reader to the stream using readablestream.getreader(), then follow the same kind of pattern we saw earlier — reading each chunk with read(), checking whether done is true and then ending the process if so, and reading the next chunk and processing it if not, before running the read() method again.
...this example works much the same way as our simple random stream, except that when the button is pressed to stop gene
rating random strings, the custom stream is taken and teed, and both resulting streams are then read: function teestream() { const teedoff = stream.tee(); readstream(teedoff[0], list2); readstream(teedoff[1], list3); } pipe chains one very experimental feature of streams is the ability to pipe streams into one another (called a pipe chain).
WebGLRenderingContext.hint() - Web APIs
possible values: gl.generate_mipmap_hint: quality of filtering when gene
rating mipmap images with webglrenderingcontext.generatemipmap().
... examples the following example hints that the quality of filtering when gene
rating mipmap images should be most efficient instead of best quality.
WebGL best practices - Web APIs
general topics address and eliminate webgl errors your application should run without gene
rating any webgl errors (as returned by geterror).
...after too many errors (32 in firefox), webgl stops gene
rating descriptive messages, which really hinders debugging.
Using DTMF with WebRTC - Web APIs
note that this example is "cheating" by gene
rating both peers in one code stream, rather than having each be a truly separate entity.</p> <audio id="audio" autoplay controls></audio><br/> <button name="dial" id="dial">dial</button> <div class="log"></div> javascript let's take a look at the javascript code next.
...this is done by stopping each stream on both the caller and the receiver by ite
rating over each rtcpeerconnection's track list (as returned by its gettracks() method) and calling each track's stop() method.
Inputs and input sources - Web APIs
enume
rating input sources the webxr session represented by the xrsession object has an inputsources property which is a live list of the webxr input devices currently connected to the xr system.
... incorpo
rating input from non-webxr sources sometimes, you need to have a way to let the user provide input using controllers which are external to webxr.
Example and tutorial: Simple synth keyboard - Web APIs
for now, we will have two controls: one to set the master volume and another to select what periodic waveform to use when gene
rating notes.
... sineterms and cosineterms will be used to store the data for gene
rating the waveform; each will contain an array that's generated when the user chooses "custom".
Web Authentication API - Web APIs
- the server is connected by https or is the localhost), and will not be available for use if the browser is not ope
rating in a secure context.
...the authenticator may be embedded into an ope
rating system, such as windows hello, or may be a physical token, such as a usb or bluetooth security key.
Window.open() - Web APIs
left or screenx specifies the distance the new window is placed from the left side of the work area for applications of the user's ope
rating system to the leftmost border (resizing handle) of the browser window.
... top or screeny specifies the distance the new window is placed from the top side of the work area for applications of the user's ope
rating system to the topmost border (resizing handle) of the browser window.
Using the alert role - Accessibility
possible effects on user agents and assistive technology when the alert role is added to an element, or such an element becomes visible, the user agent should do the following: expose the element as having an alert role in the ope
rating system's accessibility api.
... fire an accessible alert event using the ope
rating system's accessibility api if it supports it.
Using the alertdialog role - Accessibility
possible effects on user agents and assistive technology when the alertdialog role is used, the user agent should do the following: expose the element as a dialog in the ope
rating system's accessibility api.
... fire an accessible alert event using the ope
rating system's accessibility api if it supports it.
Using the group role - Accessibility
possible effects on user agents and assistive technology when the group role is added to an element, or such an element becomes visible, the user agent should do the following: expose the element as having a group role in the ope
rating system's accessibility api.
... fire an accessible group event using the ope
rating system's accessibility api if it supports it.
Using the link role - Accessibility
possible effects on user agents and assistive technology when the link role is added to an element, or such an element becomes visible, the user agent should do the following: expose the element as having a link role in the ope
rating system's accessibility api.
... fire an accessible link event using the ope
rating system's accessibility api if it supports it.
Using the log role - Accessibility
possible effects on user agents and assistive technology when the log role is added to an element, or such an element becomes visible, the user agent should do the following: expose the element as having a log role in the ope
rating system's accessibility api.
... fire an accessible log event using the ope
rating system's accessibility api if it supports it.
Using the status role - Accessibility
possible effects on user agents and assistive technology when the status role is added to an element, or such an element becomes visible, the user agent should do the following: expose the element as having a status role in the ope
rating system's accessibility api.
... fire an accessible status event using the ope
rating system's accessibility api if it supports it.
ARIA: dialog role - Accessibility
" aria-labelledby="dialog1title" aria-describedby="dialog1desc"> <h2 id="dialog1title">your personal details were successfully updated</h2> <p id="dialog1desc">you can change your details at any time in the user account section.</p> <button>close</button> </div> keep in mind that a dialog's title and description text do not have to be focusable in order to be perceived by screen readers ope
rating in a non-virtual mode.
... possible effects on user agents and assistive technology when the dialog role is used, the user agent should do the following: expose the element as a dialog in the ope
rating system's accessibility api.
ARIA: textbox role - Accessibility
possible effects on user agents and assistive technology when the textbox role is added to an element, or such an element becomes visible, the user agent should do the following: expose the element as having a textbox role in the ope
rating system's accessibility api.
... fire an accessible textbox event using the ope
rating system's accessibility api if it supports it.
ARIA - Accessibility
support is based on the ope
rating system and browser being used, as well as the kind of assistive technology interfacing with it.
... in addition, the version of the ope
rating system, browser, and assistive technology are contributing factors.
Color contrast - Accessibility
when designing readable interfaces for different vision capabilities, the wcag guidelines recommend the following contrast ratios: type of content minimum ratio (aa
rating) enhanced ratio (aaa
rating) body text 4.5 : 1 7 : 1 large-scale text (120-150% larger than body text) 3 : 1 4.5 : 1 active user interface components and graphical objects such as icons and graphs 3 : 1 not defined these ratios do not apply to "incidental" text, such as inactive controls, logotypes, or purely decorative text.
...make the color contrast as good as it can be within your design constraints — ideally go for the aaa
rating (see 1.4.6 below), but at least meet the aa
rating (see 1.4.3 below).
Variable fonts guide - CSS: Cascading Style Sheets
warning: in order to use variable fonts on your ope
rating system, you need to make sure that it is up to date.
...if your ope
rating system is not up to date, you will not be able to use variable fonts in web pages or the firefox developer tools.
appearance (-moz-appearance, -webkit-appearance) - CSS: Cascading Style Sheets
the appearance css property is used to display an element using platform-native styling, based on the ope
rating system's theme.
...ar-vertical; } <div>lorem</div> firefox range div { color: black; -moz-appearance: range; -webkit-appearance: range; } range <div>lorem</div> firefox range-thumb div { color: black; -moz-appearance: range-thumb; -webkit-appearance: range-thumb; } <div>lorem</div> firefox
rating-level-indicator div{ color: black; -moz-appearance:
rating-level-indicator; -webkit-appearance:
rating-level-indicator; } <div>lorem</div> safari relevancy-level-indicator div{ color: black; -moz-appearance: relevancy-level-indicator; -webkit-appearance: relevancy-level-indicator; } <div>lorem</div> safari ...
cursor - CSS: Cascading Style Sheets
often rendered as arrows pointing left and right with a vertical bar sepa
rating them.
...often rendered as arrows pointing up and down with a horizontal bar sepa
rating them.
font-variation-settings - CSS: Cascading Style Sheets
in order to use variable fonts on your ope
rating system, you need to make sure that it is up to date.
...if your ope
rating system is not up to date, you will not be able to use variable fonts in web pages or the firefox developer tools.
gap (grid-gap) - CSS: Cascading Style Sheets
values <length> is the width of the gutter sepa
rating the grid lines.
... <percentage> is the width of the gutter sepa
rating the grid lines, relative to the dimension of the element.
text-decoration-skip - CSS: Cascading Style Sheets
edges the start and end of the text decoration is inset slightly (e.g., by half of the line thickness) from the content edge of the deco
rating box.
...this only has an effect on decorations imposed by an ancestor; a deco
rating box never draws over its own box decoration.
HTML attribute: accept - HTML: Hypertext Markup Language
most ope
rating systems lighten the files that don't match the criteria and aren't selectable.
... regardless of the user's device or ope
rating system, the file input provides a button that opens up a file picker dialog that allows the user to choose a file.
<a>: The Anchor element - HTML: Hypertext Markup Language
most ope
rating systems have programs that can make calls, like skype or facetime.
... understanding success criterion 2.5.5: target size target size and 2.5.5 quick test: large touch targets proximity interactive elements, like links, placed in close visual proximity should have space sepa
rating them.
<input type="file"> - HTML: Hypertext Markup Language
regardless of the user's device or ope
rating system, the file input provides a button that opens up a file picker dialog that allows the user to choose a file.
... it may look similar, but if you try selecting a file with this input, you'll see that the file picker only lets you select the file types specified in the accept value (the exact nature differs across browsers and ope
rating systems).
accesskey - HTML: Hypertext Markup Language
the accesskey global attribute provides a hint for gene
rating a keyboard shortcut for the current element.
...what may work for one combination of ope
rating system, assistive technology, and browser may not work with other combinations.
itemtype - HTML: Hypertext Markup Language
<br> </span> product #: <span itemprop="mpn">925872<br></span> <span itemprop="aggregate
rating" itemscope itemtype="http://schema.org/aggregate
rating">
rating: <span itemprop="
ratingvalue">4.4</span> stars, based on <span itemprop="reviewcount">89 </span> reviews </span><p> <span itemprop="offers" itemscope itemtype="http://schema.org/offer"> regular price: $179.99<br> <meta itemprop="pricecurrency" content="usd" /> <span itemprop="price">sale price: $119.99<br></s...
... itemprop mpn 925872 itemprop brand [thing] itemprop name acme itemscope itemprop[itemtype] aggregate
rating[aggregate
rating] itemprop
ratingvalue 4.4 itemprop reviewcount 89 itemprop offers [offer] http://schema.org/offer itemprop pricecurrency usd itemprop price 119.99 itemprop pricevaliduntil 2020-11-05 itemprop itemcondition http://schema.org/usedcondition itemprop availability ...
HTML documentation index - HTML: Hypertext Markup Language
8 accesskey global attributes, html, reference, accesskey the accesskey global attribute provides a hint for gene
rating a keyboard shortcut for the current element.
...the exact appearance depends upon the ope
rating system configuration under which the browser is running.
Browser detection using the user agent - HTTP
it's worth re-ite
rating: it's very rarely a good idea to use user agent sniffing.
... os the ope
rating system is given in most user agent strings (although not web-focused platforms like firefox os), but the format varies a lot.
CSP: script-src - HTTP
when gene
rating the hash, don't include the <script> or <style> tags and note that capitalization and whitespace matter, including leading or trailing whitespace.
... content-security-policy: script-src 'sha256-b2yphkaxnvfwtrchibabymubfzdvfkkxhbwtwiddvf8=' when gene
rating the hash, don't include the <script> tags and note that capitalization and whitespace matter, including leading or trailing whitespace.
CSP: style-src - HTTP
when gene
rating the hash, don't include the <script> or <style> tags and note that capitalization and whitespace matter, including leading or trailing whitespace.
... content-security-policy: style-src 'sha256-a330698cbe9dc4ef1fb12e2ee9fc06d5d14300262fa4dc5878103ab7347e158f' when gene
rating the hash, don't include the <style> tags and note that capitalization and whitespace matter, including leading or trailing whitespace.
Firefox user agent string reference - HTTP
this way, your code will work if/when firefox ships on other phone/tablet ope
rating systems or android is used for laptops.
... firefox os devices identify themselves without any ope
rating system indication; for example: "mozilla/5.0 (mobile; rv:15.0) gecko/15.0 firefox/15.0".
HTTP Index - HTTP
24 reason: cors header 'access-control-allow-origin' missing cors, corsmissingalloworigin, cross-origin, error, http, https, messages, reasons, security, console, troubleshooting the response to the cors request is missing the required access-control-allow-origin header, which is used to determine whether or not the resource can be accessed by content ope
rating within the current origin.
... 191 user-agent http, http header, reference, user-agent the user-agent request header contains a characteristic string that allows the network protocol peers to identify the application type, ope
rating system, software vendor or software version of the requesting software user agent.
An overview of HTTP - HTTP
a server appears as only a single machine virtually: this is because it may actually be a collection of servers, sharing the load (load balancing) or a complex piece of software interrogating other computers (like cache, a db server, or e-commerce servers), totally or partially gene
rating the document on demand.
...those ope
rating at the application layers are generally called proxies.
Iterators and generators - JavaScript
javascript provides a number of ways of ite
rating over a collection, from simple for loops to map() and filter().
...ite
rating over an iterator is said to consume the iterator, because it is generally only possible to do once.
Loops and iteration - JavaScript
therefore, it is better to use a traditional for loop with a numeric index when ite
rating over arrays, because the for...in statement iterates over user-defined properties in addition to the array elements, if you modify the array object (such as adding custom properties or methods).
... for...of statement the for...of statement creates a loop ite
rating over iterable objects (including array, map, set, arguments object and so on), invoking a custom iteration hook with statements to be executed for the value of each distinct property.
Warning: JavaScript 1.6's for-each-in loops are deprecated - JavaScript
var array = [10, 20, 30]; for (var x of array) { console.log(x); // 10 // 20 // 30 } ite
rating over a null-able array for each...in does nothing if the specified value is null or undefined, but for...of will throw an exception in these cases.
... function func(array) { if (array) { for (var x of array) { console.log(x); } } } func([10, 20]); // 10 // 20 func(null); // prints nothing func(undefined); // prints nothing ite
rating over an object's key-value pair deprecated syntax there's a deprecated idiom to iterate over the specified object's key-value pairs using for each...in and the deprecated iterator object.
Array.prototype.forEach() - JavaScript
example code let
ratings = [5, 4, 5]; let sum = 0; let sumfunction = async function (a, b) { return a + b }
ratings.foreach(async function(
rating) { sum = await sumfunction(sum,
rating) }) console.log(sum) // naively expected output: 14 // actual output: 0 examples no operation for uninitialized values (sparse arrays) const arraysparse = [1,3,,7] let numcallbackruns = 0 arraysparse.foreach((element) => { ...
... foreach() does not make a copy of the array before ite
rating.
Object.prototype.hasOwnProperty() - JavaScript
inherited properties the following example differentiates between direct properties and properties inherited through the prototype chain: o = new object(); o.prop = 'exists'; o.hasownproperty('prop'); // returns true o.hasownproperty('tostring'); // returns false o.hasownproperty('hasownproperty'); // returns false ite
rating over the properties of an object the following example shows how to iterate over the properties of an object without executing on inherited properties.
... note that the for...in loop is already only ite
rating enumerable items, so one should not assume based on the lack of non-enumerable properties shown in the loop that hasownproperty itself is confined strictly to enumerable items (as with object.getownpropertynames()).
Spread syntax (...) - JavaScript
only for iterables objects themselves are not iterable, but they become iterable when used in an array, or with ite
rating functions such as map(), reduce(), and assign().
... when merging 2 objects together with the spread operator, it is assumed another ite
rating function is used when the merging occurs.
instanceof - JavaScript
examples demonst
rating that string and date are of type object and exceptional cases the following code uses instanceof to demonstrate that string and date objects are also of type object (they are derived from object).
...every object literal has object.prototype as prototype ({}) instanceof object // returns true, same case as above mynonobj instanceof object // returns false, prototype is end of prototype chain (null) mystring instanceof date // returns false mydate instanceof date // returns true mydate instanceof object // returns true mydate instanceof string // returns false demonst
rating that mycar is of type car and type object the following code creates an object type car and an instance of that object type, mycar.
Web audio codec guide - Web media technologies
for example, firefox only supports aac if support is provided by the ope
rating system or an external library.
...however, if your target is primarily macos and ios users, it may be worth considering, as the ope
rating systems have integrated support for alac.
Performance fundamentals - Web Performance
this is done by avoiding intermediate surfaces where they would create overhead (such as per-application "back buffers" in many other ope
rating systems), and by using special memory for graphics buffers that can be directly accessed by the compositor hardware.
...another benefit to this api is that animations won't run while your app isn't visible on the screen (such as if it's in the background and some other task is ope
rating).
Introduction to progressive web apps - Progressive web apps (PWAs)
on the other hand, native apps are better integrated with the ope
rating system and therefore offer a more seamless experience for the users.
...modern web apps can now do this too, using new technologies such as service workers for controlling pages, the web push api for sending updates straight from server to app via a service worker, and the notifications api for gene
rating system notifications to help engage users when they're not actively using their web browser.
How to make PWAs re-engageable using Notifications and Push - Progressive web apps (PWAs)
though, best practice dictates that we should show the popup when the user requests it by clicking on a button: var button = document.getelementbyid("notifications"); button.addeventlistener('click', function(e) { notification.requestpermission().then(function(result) { if(result === 'granted') { randomnotification(); } }); }); this shows a popup using the ope
rating system’s own notifications service: when the user confirms to receive notifications, the app can then show them.
...(for a real app, the notifications should be much less frequent, and more useful.) the advantage of the notifications api is that it uses the ope
rating system's notification functionality.
Mobile first - Progressive web apps (PWAs)
first things first — mobile as a default you may think that concent
rating on the mobile experience first sounds pointless, as we are more used to dealing with desktop sites, and we surely need to consider the full gamut of features for the overall experience across desktop, mobile, etc., before then paring it down to a mobile experience that is simpler, more streamlined, or whatever.
...of course, your users will be concent
rating on what they're doing, but they are likely to be in a car with bad lighting, or in a noisy bar with the sport on tv in the background!
WebAssembly Concepts - WebAssembly
since javascript has complete control over how webassembly code is downloaded, compiled and run, javascript developers could even think of webassembly as just a javascript feature for efficiently gene
rating high-performance functions.
... writing or gene
rating webassembly directly at the assembly level.
panel - Archive of obsolete content
de a <script> tag: <html> <head> <style type="text/css" media="all"> textarea { margin: 10px; } body { background-color: gray; } </style> </head> <body> <textarea rows="13" cols="33" id="edit-box"></textarea> <script src="get-text.js"></script> </body> </html> styling panel content the panel's default style is different for each ope
rating system: this helps to ensure that the panel's style is consistent with the dialogs displayed by firefox and other applications, but means you need to take care when applying your own styles.
selection - Archive of obsolete content
selection.removelistener('select', mylistener); ite
rating over discontiguous selections discontiguous selections can be accessed by ite
rating over the selection module itself.
Finding window handles - Archive of obsolete content
recall that nsibasewindow -> nativehandle returns the following in the different ope
rating systems: windows - hwnd mac os x - nswindow* linux - gdkwindow* (it will be gdkwindow* no matter what desktop/window manager) is in use, for explanation why see the article: standard os libraries - unix section) windows components.utils.import('resource://gre/modules/services.jsm'); var browserwindow = services.wm.getmostrecentwindow('navigator:browser'); if (!browserwindow) { throw n...
Local Storage - Archive of obsolete content
in general this is the only directory flag you'll need, but sometimes you'll need access to other system directories, and you don't want to have to worry about which ope
rating system or system language your extension is running on.
The Box Model - Archive of obsolete content
it is important to know how it works in order to make interfaces that are easy to localize, skin and use in different types of ope
rating systems, screen sizes and resolutions.
Index of archived content - Archive of obsolete content
tab addons developer guide code snippets creating a user interface firefox hub walkthrough initialization and cleanup prerequisites walkthrough webextensions for firefox for android listening to events in firefox extensions mig
rating from internal linkage to frozen linkage mig
rating raw components to add-ons 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 ...
MMgc - Archive of obsolete content
threading the gc routines are not currently thread safe, we're ope
rating under the assumption that none of the player spawned threads create gc'd things.
Making a Mozilla installation modifiable - Archive of obsolete content
on unix-like ope
rating systems with bash-like shells, you can run the following command within that directory to accomplish this task: for file in *.jar; do unzip $file; done on ope
rating systems with dos-like shells, the following command accomplishes this task: for %file in (*.jar); do unzip %file note that there are platform-specific files — en-mac.jar, en-unix.jar, and en-win.jar — in that directory.
Introducing the Audio API extension - Archive of obsolete content
ay var samples = [0.242, 0.127, 0.0, -0.058, -0.242, ...]; var numbersampleswritten = audiooutput.mozwriteaudio(samples); // write samples using a typed array var samples = new float32array([0.242, 0.127, 0.0, -0.058, -0.242, ...]); var numbersampleswritten = audiooutput.mozwriteaudio(samples); in the following example, we create an audio pulse: <!doctype html> <html> <head> <title>gene
rating audio in real time</title> <script type="text/javascript"> function playtone() { var output = new audio(); output.mozsetup(1, 44100); var samples = new float32array(22050); for (var i = 0; i < samples.length ; i++) { samples[i] = math.sin( i / 20 ); } output.mozwriteaudio(samples); } </script> </head> <body> <p>this dem...
Message Summary Database - Archive of obsolete content
mdb is a schema-less db interface, so it's trivial to add new attributes without regene
rating the db, and it's trivial for older code to read newer databases, because the code can ignore but maintain the attributes it doesn't know about.
Monitoring downloads - Archive of obsolete content
if you're learning to use the download manager or storage apis, they're things you might look into doing for practice: add code to update the download log window on the fly, instead of gene
rating a static list when it's first opened.
Plug-n-Hack - Archive of obsolete content
o use an intercepting proxy that can handle https traffic, the user must typically: configure their browser to proxy via the tool configure the tool to proxy via their corporate proxy import the tool’s ssl certificate into their browser if any of these steps are carried out incorrectly then the browser will typically fail to connect to any website – debugging such problems can be frust
rating and time-consuming.
containment - Archive of obsolete content
when gene
rating content from a template this is used to determine which resources from the datasource are containers and thus can have child nodes and which ones are not containers.
IO - Archive of obsolete content
specifically, to create a directory, see creating directories and to retrieve a list of files or subdirectories within a directory, see ite
rating over the files in a directory.
MoveResize - Archive of obsolete content
for instance, the following example will move a popup to the upper left corner of the screen: popup.moveto(0, 0); the position may be shifted so as not to cover user interface elements provided by the ope
rating system, such as the menu bar or the task bar.
Using Remote XUL - Archive of obsolete content
e many more enhancements we could add, including: hierarchical menus for more comprehensive navigation; (since additional menus and menu items don't take up any more space on the page, we could add links to many more parts of the site without harming usability.) embedding the menu bar into the pages; (we can use xbl to embed xul into html pages to get around the limitations of iframes.) integ
rating the search function into the menu bar so you don't have to go to a separate page to use it; hiding the html-based navigation for users who can see the xul-based navigation; storing the menu structure and items in a remote rdf datasource to make them easier to update and reuse.
How to enable locale switching in a XULRunner application - Archive of obsolete content
var xulchromereg = chromeregservice.queryinterface(components.interfaces.nsixulchromeregistry); var toolkitchromereg = chromeregservice.queryinterface(components.interfaces.nsitoolkitchromeregistry); var selectedlocale = xulchromereg.getselectedlocale("localeswitchdemo"); var availablelocales = toolkitchromereg.getlocalesforpackage("localeswitchdemo"); // render locale menulist by ite
rating through the query result from getlocalesforpackage() const xul_ns = "http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"; var localelistbox = document.getelementbyid("locale-listbox"); var selecteditem = null; while(availablelocales.hasmore()) { var locale = availablelocales.getnext(); var listitem = document.createelementns(xul_ns, "listitem"); listitem.setat...
2006-11-10 - Archive of obsolete content
applying site- and page-specific settings during layout discussion on the best possible solution for integ
rating firefox 3 with the ability to apply site- and page-specific user settings during layout.
Element - Archive of obsolete content
ment) h <height> (rss height element) <hour> (rss hour element) i <image> (rss image element) <item> (rss item element) j k l <language> (rss language element) <lastbuilddate> (rss last build date element) <link> (rss link element) m <managingeditor> (rss managing editor element) n <name> (rss name element) o p <pubdate> (rss published date element) q r <
rating> (rss
rating element) <rss> (rss's root "rss" element) s <skipdays> (rss skip days element) <skiphours> (rss skip hours element) <source> (rss source element) t <textinput> (rss text input element) <title> (rss title element) <ttl> (rss ttl element) u <url> (rss url element) v w <webmaster> (rss web master element) <width> (rss width element) x y z ...
Threats - Archive of obsolete content
many threats against data and resources are possible because of mistakes—either bugs in ope
rating system and applications that create exploitable vulnerabilities, or errors made by end users and administrators.
Tamarin Tracing Build Documentation - Archive of obsolete content
for instructions on tamarin central, please see tamarin build documentation supported platforms ope
rating system processor status windows xp x86 supported, acceptance and performance tests automated in buildbot mac os x 10.4 x86 supported, acceptance and performance tests automated in buildbot linux - ubuntu 8.0.4 x86 supported, acceptance and performance tests automated in buildbot windows mobile (pocket pc 5.0) armv4t supported, acceptance and performance tests automated in buildbot raw image (no os) armv5 supported, acceptance and performance tests not done linux (nokia n810) armv5 supported, acceptance and performance tests not done current build status...
Building a Theme - Archive of obsolete content
the location differs by ope
rating system: linux: /usr/lib/mozillafirefox/chrome/classic.ja or /usr/lib/firefox-*.*.*/omni.ja windows: \program files\mozilla firefox\omni.ja mac os x: /applications/firefox.app/contents/macos/omni.ja now, open (or unzip) this file into the directory you created.
Browser Feature Detection - Archive of obsolete content
this test takes that idea to the extreme and tests a large number of properties and methods to determine the level of support a browser has for particular standards and reports a
rating as the percentage of names the browser defines.
Displaying notifications (deprecated) - Archive of obsolete content
e read: using web notifications mobile only in gecko 2.0 available only in firefox mobile as of gecko 2.0 (firefox 4 / thunderbird 3.3 / seamonkey 2.1) firefox offers support for "desktop notifications"; these are notifications that are displayed to the user outside the context of the web content, using the standard notification system provided by the ope
rating system.
E4X for templating - Archive of obsolete content
onvenient to store such e4x in separate file templates (to be eval()d at a later time, taking into account security considerations, such as escaping 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(); ite
rating functions such as the following foreach (which can work with arrays, objects, or e4x objects) are quite convenient in ite
rating over complex structures such as e4x would not normally allow.
Generator comprehensions - Archive of obsolete content
argument to a function, the parentheses used for the function call means that the outer parentheses can be omitted: var result = dosomething(for (i in it) i * 2); the significant difference between the two examples being that by using the generator comprehension, you would only have to loop over the 'obj' structure once, total, as opposed to once when comprehending the array, and again when ite
rating through it.
@cc_on - Archive of obsolete content
/*@cc_on @*/ /*@ document.write("javascript version: " + @_jscript_version + "."); document.write("<br />"); @if (@_win32) document.write("running on the 32-bit version of windows."); @elif (@_win16) document.write("running on the 16-bit version of windows."); @else document.write("running on a different ope
rating system."); @end @*/ requirements supported in all versions of internet explorer, but not in windows 8.x store apps.
@if - Archive of obsolete content
/*@cc_on @*/ /*@ document.write("javascript version: " + @_jscript_version + "."); document.write("<br />"); @if (@_win32) document.write("running on a 32-bit version of windows."); @elif (@_win16) document.write("running on a 16-bit version of windows."); @else document.write("running on a different ope
rating system."); @end @*/ requirements supported in all versions of internet explorer, but not in windows 8.x store apps.
Mozilla XForms Specials - Archive of obsolete content
instead of using digest('abc', 'sha-1') explicitly use the third parameter (the results are equal): digest('abc', 'sha-1', 'base64') (limitation tracked in bug 477857) extensions enume
rating instances the standardized nsixformsmodelelement does not allow one to enumerate over all possible instances, but only to retrieve instances by their name.
Archived open Web documentation - Archive of obsolete content
an experimental approach to discovering degree of support for standards css obsolete css features displaying notifications (deprecated) firefox offers support for "desktop notifications"; these are notifications that are displayed to the user outside the context of the web content, using the standard notification system provided by the ope
rating system.
Index - Game development
53 physics 2d, beginner, canvas, games, javascript, phaser, tutorial, physics for proper collision detection between objects in our game we will need to have physics; this article introduces you to what's available in phaser, as well as demonst
rating a typical simple setup.
Square tilemaps implementation: Static maps - Game development
s: 8, rows: 8, tsize: 64, tiles: [ 1, 3, 3, 3, 1, 1, 3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 0, 0, 1, 1, 1 ], gettile: function(col, row) { return this.tiles[row * map.cols + col] } }; rendering the map we can render the map by ite
rating over its columns and rows.
Physics - Game development
for proper collision detection between objects in our game we will need to have physics; this article introduces you to what's available in phaser, as well as demonst
rating a typical simple setup.
Tutorials - Game development
2d maze game with device orientation this tutorial shows how to create a 2d maze game using html5, incorpo
rating fundamentals such as collision detection and sprite placement on a <canvas>.
Safe - MDN Web Docs Glossary: Definitions of Web-related terms
safe methods don't need to serve static files only; a server can generate an answer to a safe method on-the-fly, as long as the gene
rating script guarantees safety: it should not trigger external effects, like triggering an order in an e-commerce web site.
Advanced styling effects - Learn web development
multiple box shadows you can also specify multiple box shadows in a single box-shadow declaration, by sepa
rating them with commas: <article class="multiple"> <p><strong>warning</strong>: the thermostat on the cosmic transcender has reached a critical level.</p> </article> p { margin: 0; } article { max-width: 500px; padding: 10px; background-color: red; background-image: linear-gradient(to bottom, rgba(0,0,0,0), rgba(0,0,0,0.25)); } .multiple { box-shadow: 1px 1px 1px black, ...
Backgrounds and borders - Learn web development
multiple background images it is also possible to have multiple background images — you specify multiple background-image values in a single property value, sepa
rating each one with a comma.
Pseudo-classes and pseudo-elements - Learn web development
article p:first-child::first-line { font-size: 120%; font-weight: bold; } gene
rating content with ::before and ::after there are a couple of special pseudo-elements, which are used along with the content property to insert content into your document using css.
CSS values and units - Learn web development
which style you use is up to you, but sepa
rating out non-transparent and transparent color definitions to use the different functions gives (very) slightly better browser support and can act as a visual indicator of where transparent colors are being defined in your code.
Legacy layout methods - Learn web development
l">9</div> <div class="col">10</div> <div class="col">11</div> <div class="col">12</div> </div> <div class="row"> <div class="col span1">13</div> <div class="col span6">14</div> <div class="col span3">15</div> <div class="col span2">16</div> </div> </div> the aim is to turn this into a demonstration grid of two rows on a twelve column grid — the top row demonst
rating the size of the individual columns, the second row some different sized areas on the grid.
Responsive design - Learn web development
as mobile devices became more powerful and able to display full websites, this was frust
rating to mobile users who found themselves trapped in the site's mobile version and unable to access information they knew was on the full-featured desktop version of the site.
Advanced form styling - Learn web development
appearance: controlling os-level styling in the previous article we said that historically, styling of web form controls was largely taken from the underlying ope
rating system, which is part of the problem with customizing the look of these controls.
The HTML5 input types - Learn web development
a color control can be created using the <input> element with its type attribute set to the value color: <input type="color" name="color" id="color"> when supported, clicking a color control will tend to display the ope
rating system's default color picking functionality for you to actually make your choice with.
Other form controls - Learn web development
by adding the multiple attribute to the <select> element, you can allow users to select several values, by using the default mechanism provided by the ope
rating system (e.g.
JavaScript basics - Learn web development
these include: browser application programming interfaces (apis) built into web browsers, providing functionality such as dynamically creating html and setting css styles; collecting and manipulating a video stream from a user's webcam, or gene
rating 3d graphics and audio samples.
From object to iframe — other embedding technologies - Learn web development
this is great for incorpo
rating third-party content into your website that you might not have direct control over and don't want to have to implement your own version of — such as video from online video providers, commenting systems like disqus, maps from online map providers, advertising banners, etc.
General asynchronous programming concepts - Learn web development
this cursor is how the ope
rating system says "the current program you're using has had to stop and wait for something to finish up, and it's taking so long that i was worried you'd wonder what was going on." this is a frust
rating experience and isn't a good use of computer processing power — especially in an era in which computers have multiple processor cores available.
Build your own function - Learn web development
closebtn.onclick = function() { panel.parentnode.removechild(panel); } basically, this whole block of code is gene
rating a block of html that looks like so, and inserting it into the page: <div class="msgbox"> <p>this is a message box</p> <button>x</button> </div> that was a lot of code to work through — don't worry too much if you don't remember exactly how every bit of it works right now!
Introduction to events - Learn web development
buttons on the page no matter how many there were, using something like this: const buttons = document.queryselectorall('button'); for (let i = 0; i < buttons.length; i++) { buttons[i].onclick = bgchange; } note that another option here would be to use the foreach() built-in method available on nodelist objects: buttons.foreach(function(button) { button.onclick = bgchange; }); note: sepa
rating your programming logic from your content also makes your site more friendly to search engines.
Client-side web APIs - Learn web development
apis are programming features for manipulating different aspects of the browser and ope
rating system the site is running on, or manipulating data from other web sites or services.
What is JavaScript? - Learn web development
dynamic versus static code the word dynamic is used to describe both client-side javascript, and server-side languages — it refers to the ability to update the display of a web page/app to show different things in different circumstances, gene
rating new content as required.
Introducing JavaScript objects - Learn web development
guides object basics in the first article looking at javascript objects, we'll look at fundamental javascript object syntax, and revisit some javascript features we've already looked at earlier on in the course, reite
rating the fact that many of the features you've already dealt with are in fact objects.
JavaScript — Dynamic client-side scripting - Learn web development
client-side web apis when writing client-side javascript for web sites or applications, you won't go very far before you start to use apis — interfaces for manipulating different aspects of the browser and ope
rating system the site is running on, or even data from other web sites or services.
Client-Server Overview - Learn web development
you always have a question mark (?) sepa
rating the rest of the url from the url parameters, an equals sign (=) sepa
rating each name from its associated value, and an ampersand (&) sepa
rating each pair.
Deploying our app - Learn web development
here's just a few things to consider for this particular project: gene
rating a production build: ensuring files are minimised, chunked, have tree-shaking applied, and that versions are "cache busted".
Learn web development
server-side website programming even if you are concent
rating on client-side web development, it is still useful to know how servers and server-side code features work.
Accessibility Features in Firefox
moving back and forward by web page (alt+left and alt+right) occurs near-instantaneously the download manager provides keyboard access to all of your recent downloads ope
rating system "look and feel" support: mozilla's default skin will match the colors and sizes currently being used in your desktop.
Mozilla accessibility architecture
accessibility apis on each ope
rating system have built-in assumptions about what is the most important information, and how an accessibility server like mozilla should use the api's programmatic interfaces to expose this information to an accessibility client (the assistive technology).
Embedding API for Accessibility
for other i18n charsets, change the name as explained above for font face*/ setcharpref("font.default","serif"); /* or "sans-serif" */ setintpref("browser.use_document_fonts", whichfonts); /* whichfonts: 0=no, 1=yes */ moz 0.8 fonts from ope
rating system?
Gecko info for Windows accessibility vendors
here is an algorithm for ite
rating through the nodes, looking for an item of a particular 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 ...
Continuous Integration
taskcluster generate binary builds for firefox and firefox for android across a variety of ope
rating sytems.
HTTP logging
note that this approach winds up logging the whole browser history, so files can get rather large (they compress well :) setting environment variables differs by ope
rating system.
How Mozilla's build system works
config.status contains 2 parts: data structures representing the output of configure and a command-line interface for preparing, configuring, or gene
rating an appropriate build backend.
Old Thunderbird build
build prerequisites depending on your ope
rating system you will need to carry out a different process to prepare your machine.
Simple Instantbird build
setup: depending on your ope
rating system you will need to carry out a different process to prepare your machine.
Simple Thunderbird build
build prerequisites depending on your ope
rating system you will need to carry out a different process to prepare your machine.
pymake
on other ope
rating systems (linux, os x, etc), pymake itself only requires python 2.6 or higher (but not python 3).
Interface Compatibility
you should strongly consider mig
rating existing code to use js-ctypes instead of binary components.
Contributing to the Mozilla code base
we'll be integ
rating some information from these pages soon, but until then you may find them interesting in their current form: a guide to learning the mozilla codebase a beginner's guide to spidermonkey, mozilla's javascript engine mozilla platform development cheatsheet (archive.org) ...
Developer guide
callgraph a tool to help perform static analysis of the mozilla code by gene
rating callgraphs automatically.
Experimental features in Firefox
this feature lets you test your code without having to change settings in your browser (or ope
rating system, if the browser follows a system-wide color scheme setting).
Limitations of chrome scripts
however, these shims are not a substitute for mig
rating extensions: they are only a temporary measure, and will be removed eventually they can have a bad effect on responsiveness there are likely to be edge cases in which they don't work properly you can see all the places where your add-on uses compatibility shims by setting the dom.ipc.shims.enabledwarnings preference and watching the browser console as you use the add-on.
MozBeforePaint
this is intentional, because modern ope
rating systems and hardware won't let the browser display more frames than that anyway.
How to get a stacktrace for a bug report
accessing crash report ids outside of firefox if you cannot load firefox at all you can find the crash report files at this location depending on your ope
rating system: windows : %appdata%\mozilla\firefox\crash reports\submitted\ os x : ~/library/application support/firefox/crash reports/submitted/ linux : ~/.mozilla/firefox/crash reports/submitted/ each file in this folder contains one submitted crash report id.
Extending a Protocol
visually, it's going to look something like this (except for the ope
rating system bit, which we are not actually going to do - just to illustrate what we could do): let's start by implementing the webidl above.
Integrated Authentication
this entails support for the the simple and protected gss-api negotiation mechanism (spnego) internet standard (rfc 2478) to negotiate either kerberos, ntlm, or other authentication protocols supported by the ope
rating system.
PerfMeasurement.jsm
note: at present, perfmeasurement.jsm is only functional on linux, but it is planned to add support for windows (bug 583322) and osx (bug 583323) as well, and we welcome patches for other ope
rating systems.
Sqlite.jsm
bound parameters here are some examples demonst
rating bound parameters.
Task.jsm
this comes in handy when ite
rating over function lists where some items have been converted to tasks and some not.
XPCOMUtils.jsm
exceptions thrown this method throws an exception with the message "in generateci, don't use a component for gene
rating classinfo" if classinfo parameter is an xpcom component.
Bootstrapping a new locale
installing mercurial depending on your ope
rating system, you will need to install the correct version of hg on your machine.
Localizing with Mercurial
your config file is called either ~/.hgrc (unix systems) or mercurial.ini (windows), depending on your ope
rating system.
Localizing with Mozilla Translator
mig
rating contents when the directory structure changes overall, if you are a ''good'' mt user and you do things like: checking "keep original" flags for strings not needing translation, instead of just leaving the translation empty struggling to get empty lists when running "untranslated strings" and "view fuzzy" if you are up to date in localization regularly running qa checks and trying to minim...
GC and CC logs
gene
rating logs from within firefox to manually generate gc and cc logs, navigate to about:memory and use the buttons under "save gc & cc logs." "save concise" will generate a smaller cc log, "save verbose" will provide a more detailed cc log.
Intel Power Gadget
frequency: shows ope
rating frequency measurements for the cores ("ia") and the gpu ("gt").
Measuring performance using the PerfMeasurement.jsm code module
you give the constructor a bit-mask of events you're interested in; see note: at present, perfmeasurement.jsm is only functional on linux, but it is planned to add support for windows (bug 583322) and osx (bug 583323) as well, and we welcome patches for other ope
rating systems.
about:memory
don't click "measure..." repeatedly, because that will cause the memory usage of about:memory itself to rise, due to it discarding and regene
rating large numbers of dom nodes.
Performance
benchmarking tips on gene
rating valid performance metrics.
Patches and pushes
review, commit, & land address any review comments made by the reviewers and update the patch until it receives an r+
rating.
MailNews automated testing
enhanced logging: supports gene
rating rich json streams to disk or over the network for consumption by logsploder or other tools.
McCoy
mccoy is provided in the standard package for your ope
rating system, just extract it where you like and run it.
Atomic Operations
since not all ope
rating environments provide access to such functions, their performance may vary considerably.
NSPR LOG MODULES
this ensures that all log messages are flushed to the ope
rating system as they are written, but may slow the program down.
Named Shared Memory
the nspr shared memory api provides a cross-platform named shared-memory interface that is modeled on similar constructs in the unix and windows ope
rating systems.
PLHashEnumerator
syntax #include <plhash.h> typedef printn (pr_callback *plhashenumerator)(plhashentry *he, printn index, void *arg); /* return value */ #define ht_enumerate_next 0 /* continue enume
rating entries */ #define ht_enumerate_stop 1 /* stop enume
rating entries */ #define ht_enumerate_remove 2 /* remove and free the current entry */ #define ht_enumerate_unhash 4 /* just unhash the current entry */ description plhashenumerator is a function type used in the enume
rating a hash table.
PR_NewMonitor
if unsuccessful (for example, if some ope
rating system resource is unavailable), null.
PR_Seek64
description this is the idiom for obtaining the current location (expressed as a 64-bit integer) of the file pointer for the file descriptor fd: pr_seek64(fd, 0, pr_seek_cur) if the ope
rating system can handle only a 32-bit file offset, pr_seek64 may fail with the error code pr_file_too_big_error if the offset parameter is out of the range of a 32-bit integer.
PR_SetConcurrency
since global threads are scheduled by the host ope
rating system, this model is particularly applicable to multiprocessor architectures, where true parallelism is possible.
PR_StringToNetAddr
ipv6 addresses are indicated as strings using ":" characters sepa
rating octets, with numerous caveats for shortcutting (see rfc #1884).
Running NSPR tests
since none of our ope
rating systems is a real-time os, such test programs may fail when the test machine is heavily loaded.
NSS 3.12.6 release notes
bug 542538: nss: add function for recording ocsp stapled replies bug 544191: use system zlib on mac os x bug 544584: segmentation fault when enume
rating the nss database bug 544586: various nss-sys-init patches from fedora bug 545273: remove unused function sec_init bug 546389: nsssysinit binary built inside source tree documentation for a list of the primary nss documentation pages on mozilla.org, see nss documentation.
NSS 3.14.3 release notes
however, unlike pk11_sign, which uses a seckeyprivatekey, pk11_signwithsymkey performs the signature using a symmetric key, such as commonly used for gene
rating macs.
NSS 3.18 release notes
on mac os x, by default the softokn shared library will link with the sqlite library installed by the ope
rating system, if it is version 3.5 or newer.
NSS 3.36.1 release notes
that change had caused an interoperability regression with ope
rating systems that are limited to 600 k iterations.
NSS Sample Code Sample1
this is an example program that demonstrates how to do key generation and transport between coope
rating servers.
nss tech note6
if you still decide to make unsupported changes, you can allow the softoken to come up in fips 140 mode of operation by regene
rating the .chk files yourself.
New NSS Samples
to download the samples: hg clone https://hg.mozilla.org/projects/nss; cd nss; hg update samples_branch samples list: sample code 1: hashing sample code 2: init nss database sample code 3: encrypt/decrypt and mac using token sample code 4: encrypt/decrypt and mac using session objects sample code 5: encrypt/decrypt/mac output public key as a csr sample code 6: encrypt/decrypt/mac gene
rating a pkcs#11 csr common code used by these samples: sample code 0: utilities thanks are due to shailendra jain, mozilla community member, who is the principal author of these samples.
NSS environment variables
3.12.8 nsdistmode string on ope
rating systems other than windows, this controls whether copies, absolute symlinks, or relative symlinks of the output files should be published to mozilla/dist.
NSS tools : crlutil
the key and certificate management process generally begins with creating keys in the key database, then gene
rating and managing certificates in the certificate database(see certutil tool) and continues with certificates expiration or revocation.
NSS reference
initial notes we are mig
rating the ssl reference into the format described in the mdn style guide.
OLD SSL Reference
old ssl reference we are mig
rating this ssl reference into the format described in the mdn style guide.
gtstd.html
this page is part of the ssl reference that we are mig
rating into the format described in the mdn style guide.
pkfnc.html
this page is part of the ssl reference that we are mig
rating into the format described in the mdn style guide.
sslcrt.html
this page is part of the ssl reference that we are mig
rating into the format described in the mdn style guide.
sslerr.html
this page is part of the ssl reference that we are mig
rating into the format described in the mdn style guide.
sslintro.html
this page is part of the ssl reference that we are mig
rating into the format described in the mdn style guide.
sslkey.html
this page is part of the ssl reference that we are mig
rating into the format described in the mdn style guide.
ssltyp.html
this page is part of the ssl reference that we are mig
rating into the format described in the mdn style guide.
TLS Cipher Suite Discovery
the table and the number of entries are declared in "ssl.h", as follows: /* constant table enume
rating all implemented ssl 2 and 3 cipher suites.
NSS Tools crlutil
the key and certificate management process generally begins with creating keys in the key database, then gene
rating and managing certificates in the certificate database(see certutil tool) and continues with certificates expiration or revocation.
NSS tools : crlutil
the key and certificate management process generally begins with creating keys in the key database, then gene
rating and managing certificates in the certificate database(see certutil tool) and continues with certificates expiration or revocation.
Installing Pork
-f gcc${gcc_maj_ver}${gcc_min_ver}_predef_std.h; then - echo " gene
rating g*.h header files" - ${cc} -e -xc -dm /dev/null | sort | grep ' *#define *_' \ + echo " gene
rating g*.h header files: ${cppflags}" + ${cc} ${cppflags} -e -xc -dm /dev/null | sort | grep ' *#define *_' \ > gcc${gcc_maj_ver}${gcc_min_ver}_predef_std.h - ${cc} -e -xc -dm /dev/null | sort | grep -e ' *#define *[a-za-z]+' \ + ${cc} ${cppflags} -e -xc -dm /de...
Rhino history
first, compilation time was long since gene
rating java bytecodes and loading the generated classes was a heavyweight process.
Performance Hints
with using the with statement prevents the compiler from gene
rating code for fast access to local variables.
The JavaScript Runtime
when scripts are compiled in interpretive mode, an internal representation of the compiled form is created and stored rather than gene
rating a java class.
Shumway
bugzilla is intended for problems with integ
rating shumway into firefox.
Index
in a few cases the javascript engine will pretend the wrapper isn't there, instead ope
rating on the object it wraps.
64-bit Compatibility
if you make a mistake, there's an extremely good chance the sanityfilter in nanojit will catch it while gene
rating code.
Bytecode Descriptions
format: jof_atom, jof_prop, jof_propset, jof_checkstrict setelemsuper stack: receiver, key, obj, val ⇒ val assign val to receiver[key], st
rating the search for an existing property at obj.
Tracing JIT
it is important to keep in mind that this pass runs backwards from the last lins in the input lir code to the first, gene
rating native code in reverse.
JSAPI User Guide
here is example code demonst
rating the technique—but note that this case is not really complex enough to warrant the use of js_newscriptobject.
JSClass
enumerate jsenumerateop method for enume
rating object properties.
JSExtendedClass.wrappedObject
in a few cases the javascript engine will pretend the wrapper isn't there, instead ope
rating on the object it wraps.
JSObjectOps.dropProperty
in a js_threadsafe build, any consistency observed by multiple threads ope
rating on the same data is provided solely by the property locking scheme described above.
JS_InitClass
these include native c functions for instance finalization, adding and deleting properties, getting and setting property values, and enume
rating, converting, and resolving properties.
JSAPI reference
jsapi 37 js_lookuppropertywithflags obsolete since jsapi 31 js_lookuppropertywithflagsbyid obsolete since jsapi 31 js_newpropertyiterator obsolete since jsapi 36 js_nextproperty obsolete since jsapi 36 js_setpropertyattributes obsolete since jsapi 26 js_setucpropertyattributes obsolete since jsapi 26 the following functions behave like js_getproperty and js_getpropertybyid except when ope
rating on e4x xml objects.
SpiderMonkey 1.8.5
mig
rating to spidermonkey 1.8 the following features in earlier versions of spidermonkey have been dropped.
SpiderMonkey 1.8.8
mig
rating to spidermonkey 1.8.8 the following features in earlier versions of spidermonkey have been dropped.
SpiderMonkey 17
mig
rating to spidermonkey 17 the following features in earlier versions of spidermonkey have been dropped.
SpiderMonkey 24
mig
rating to spidermonkey 24 spidermonkey now provides a fully c++ interface, so embedders relying on embeddability in c projects will have to convert to c++, or implement their own adapter code.
SpiderMonkey 31
mig
rating to spidermonkey 31 the first change most embedders will notice is that spidermonkey must now be initialized before it can be used, using the newly-repurposed js_init method.
SpiderMonkey 45
mig
rating to spidermonkey 45 spidermonkey 45 is not binary-compatible with previous releases, nor is it source-code compatible.
SpiderMonkey 52
platform support mig
rating to spidermonkey 52 new javascript language features new c++ apis deleted apis api changes known issues ...
Web Replay
this requires using the same build of firefox and a reasonably similar version of the ope
rating system; otherwise the tab will probably crash.
Mozinfo
the various checks needed lead to a lot of copy+pasting, leaving the reader to wonder....is this specific check necessary for (e.g.) an ope
rating system?
Mozilla Projects
the various checks needed lead to a lot of copy+pasting, leaving the reader to wonder....is this specific check necessary for (e.g.) an ope
rating system?
Secure Development Guidelines
**argv, char **envp) { int fd = open("/etc/shadow", o_rdwr); setreuid(getuid(), getuid()); excve("/bin/sh", argv, envp); } suid root applications file i/o: file descriptors and handles potential overflows when using select fd_set struct, static length, holds a bitmask of fds manipulated with fd_set, fd_isset, fd_clr and fd_zero macros fd_set’s size depends on the ope
rating system if the os allows opening more fds, then fd_set can hold could overflow fd_set file i/o: file descriptors and handles good solution: dynamically allocate fd_set structs int main(void) { int i, fd; fd_set fdset; for( i = 0; i < 2000; i++) { fd = open("/dev/null", o_rdwr); } fd_set(fd, &fdset); } file i/o: race conditions ope
rating on files can oft...
XUL Accessibility
at api general rules this section holds some rules applied to gene
rating accessible name and description.
Places
documentation places migration guide mig
rating existing code to use the places api.
Bundling multiple binary components
the stub component is an xpcom component itself and when registered by xpcom, the code would sniff the runtime version and ope
rating system then the stub load the appropriate "real" xpcom component for the current configuration.
Creating a Python XPCOM component
gene
rating implementation templates the module xpcom.xpt is used internally to process type information, but it has a nice feature - it can spit out a template for a python implementation of any interface.
Packaging WebLock
since mozilla and other gecko-based applications are cross-platform, this database is abstracted above the ope
rating system or any particular platform's registry.
Setting up the Gecko SDK
the sdk is available for windows, linux, and mac ope
rating systems, and versions for other ope
rating systems are being developed, and can be retrieved from as a single archive from the following platform-specific locations (need correction for last version (now 1.9.2.8).
XPCshell Test Manifest Expressions
os - the ope
rating system on which the test is being run one of: 'win', 'mac', 'linux', 'android' os_version - the version of the ope
rating system on which the test is being run toolkit - the graphics toolkit used by this build one of: 'windows', 'cocoa', 'gtk2', 'android' processor - the cpu which the code is compiled for one of: 'x86', 'x86_64', 'arm' bits - the pointer size ...
mozIStorageService
if cache contention is expected, for instance when ope
rating on a database from multiple threads, using unshared connections may be a performance win.
nsIClipboardDragDropHookList
it provides basic operations such as adding, removing and enume
rating clipboard hooks for the nsiclipboarddragdrophooks interface.
nsIDNSService
note: the ope
rating system may still have its own cache of dns records, which would be unaffected by this method.
nsIDOMMozTouchEvent
ong screenxarg, in long screenyarg, in long clientxarg, in long clientyarg, in boolean ctrlkeyarg, in boolean altkeyarg, in boolean shiftkeyarg, in boolean metakeyarg, in unsigned short buttonarg, in nsidomeventtarget relatedtargetarg, in unsigned long streamidarg ); parameters streamidarg the value to assign to the streamid attribute; this uniquely identifies the finger gene
rating the touch events.
nsIDOMOfflineResourceList
it includes methods for adding resources to and removing resources from the cache, as well as for enume
rating the dynamically managed resource list.
nsIDirectoryEnumerator
xpcom/io/nsidirectoryenumerator.idlscriptable this interface provides a means for enume
rating the contents of a directory.
nsIFilePicker
filter); void appendfilters(in long filtermask); void init(in nsidomwindow parent, in astring title, in short mode); void open(in nsifilepickershowncallback afilepickershowncallback); short show(); obsolete since gecko 57.0 attributes attribute type description addtorecentdocs boolean if true, the file is added to the ope
rating system's "recent documents" list (if the ope
rating system has one; nothing happens if there is no such concept on the user's platform).
nsIFileProtocolHandler
it also provides access to internet shortcuts stored on the host ope
rating system's file system.
nsIJumpListBuilder
exceptions thrown ns_error_not_available on all calls if taskbar functionality is not supported by the ope
rating system.
nsILoginManagerStorage
1.0 66 introduced gecko 1.9 inherits from: nsisupports last changed in gecko 2.0 (firefox 4 / thunderbird 3.3 / seamonkey 2.1) for example, if you wish to provide ope
rating system integration with a native password manager system, implementing and registering a storage module for the login manager is how you do it.
nsIMsgThread
getfirstunreadchild() nsimsgdbhdr getfirstunreadchild(); enumeratemessages() nsisimpleenumerator enumeratemessages(in nsmsgkey parent); parameters parent a key representing the message to start enume
rating with.
Component; nsIPrefBranch
(it is not void in javascript) void getchildlist( in string astartingat, out unsigned long acount, [array, size_is(acount), retval] out string achildarray ); parameters astartingat the point on the branch at which to start enume
rating the child preferences.
nsISound
void playsystemsound( in astring soundalias ); parameters soundalias two different types of names are supported: you can specify the name of a system sound provided by the host ope
rating system; for example, if you specify "systemexclamation", you can play the windows alert sound, but it's played only on windows.
nsITelemetry
toolkit/components/telemetry/nsitelemetry.idlscriptable a service to gather performance data that can be tracked over time to allow gene
rating histograms.
nsIThread
this interface provides a high-level abstraction for an ope
rating system thread.
nsITransferable
kfilepromisemime application/x-moz-file-promise a dataless flavor used to interact with the ope
rating system during file drags.
nsIUUIDGenerator
exceptions thrown ns_error_failure if a uuid cannot be generated (for example if an underlying source of randomness is not available) example gene
rating a uuid var uuidgenerator = components.classes["@mozilla.org/uuid-generator;1"] .getservice(components.interfaces.nsiuuidgenerator); var uuid = uuidgenerator.generateuuid(); var uuidstring = uuid.tostring(); ...
nsIWebNavigation
this stream must contain a \r\n sequence sepa
rating any http headers from the http request body.
nsIWinAppHelper
returns true only if all the following conditions are all true at once: the ope
rating system is at least windows vista user account control is enabled the user is an administrator the application is not already running with elevated permissions otherwise it returns false.
nsIWinTaskbar
bpreview createtaskbartabpreview(in nsidocshell shell, in nsitaskbarpreviewcontroller controller); nsitaskbarprogress gettaskbarprogress(in nsidocshell shell); nsitaskbarwindowpreview gettaskbarwindowpreview(in nsidocshell shell); void setgroupidforwindow(in nsidomwindow aparent, in astring aidentifier); attributes attribute type description available boolean returns true if the ope
rating system supports windows 7 or later taskbar features; you can use this instead of in-place ope
rating system version checking.
nsIWindowWatcher
void registernotification( in nsiobserver aobserver ); parameters note: be careful about gene
rating open/close window events inside nsiobserver.observe().
The Thread Manager
nsithread the nsithread interface encapsulates an ope
rating system thread, providing easy cross-platform access to multithreading in your code.
Using nsISimpleEnumerator
ng nsisimpleenumerator <stringbundle>.strings var enumerator = document.getelementbyid('astringbundleid').strings; var s = ""; while (enumerator.hasmoreelements()) { var property = enumerator.getnext().queryinterface(components.interfaces.nsipropertyelement); s += property.key + ' = ' + property.value + ';\n'; } alert(s); example using javascript 1.7 features // creates a generator ite
rating over enum's values function generatorfromsimpleenumerator(enum, interface) { while (enum.hasmoreelements()) { yield enum.getnext().queryinterface(interface); } } var b = document.getelementbyid("stringbundleset").firstchild var props = generatorfromenumerator(b.strings, components.interfaces.nsipropertyelement); var s = ""; for (let property in props) { s += property.key + ' = ' + prope...
XPCOM ABI
if the application doesn't have an xpcom abi string (due to the fact that either its cpu architecture or c++ compiler are unknown, as described in the abi naming section), you should use the ope
rating system's name (without appending the xpcom abi) as the platform name in the install manifest etc.
xptcall FAQ
the xptcall approach was chosen over an approach that would have required gene
rating stub code for calling and implementing all interfaces.
XPCOM
here is how to make the same component in python using pyxpcom.fun with xbl and xpconnectgene
rating guidsguids 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.
xpidl
xpidl is a tool for gene
rating xpcom interface information, based on xpidl interface description files.
Address Book examples
click here for a addon demonst
rating autocomplete with ldap and addrbook working with both thunderbird 2 and thunderbird 3.
Add to iPhoto
carbon the carbon api is the core ope
rating system api derived from the classic mac ope
rating system.
Using COM from js-ctypes
the windows api mostly concerns itself with the interaction between the ope
rating system and an application.
Mozilla
integrated authentication this entails support for the the simple and protected gss-api negotiation mechanism (spnego) internet standard (rfc 2478) to negotiate either kerberos, ntlm, or other authentication protocols supported by the ope
rating system.
Plug-in Basics - Plugins
because plug-ins are platform-specific, you must port them to every ope
rating system and processor platform upon which you want to deploy your plug-in.
Index - Firefox Developer Tools
45 mig
rating from firebug firebug, migration when mig
rating from firebug to the firefox developer tools, you may wonder where the features you loved in firebug are available in the developer tools.
AesKeyGenParams - Web APIs
the aeskeygenparams dictionary of the web crypto api represents the object that should be passed as the algorithm parameter into subtlecrypto.generatekey(), when gene
rating an aes key: that is, when the algorithm is identified as any of aes-cbc, aes-ctr, aes-gcm, or aes-kw.
Attr - Web APIs
in most dom methods, you will directly retrieve the attribute as a string (e.g., element.getattribute()), but certain functions (e.g., element.getattributenode()) or means of ite
rating return attr types.
AudioContext.createJavaScriptNode() - Web APIs
naudioprocess = function(e) { that.process(e) }; } sinewave.prototype.process = function(e) { var data = e.outputbuffer.getchanneldata(0); for (var i = 0; i < data.length; ++i) { data[i] = math.sin(this.x++); } } sinewave.prototype.play = function() { this.node.connect(this.context.destination); } sinewave.prototype.pause = function() { this.node.disconnect(); } see also gene
rating tones with the web audio api exploring the html5 web audio: visualizing sound ...
AudioWorkletProcessor.process - Web APIs
returning true forces the web audio api to keep the node alive, while returning false allows the browser to terminate the node if it is neither gene
rating new audio data nor receiving data through its inputs that it is processing.
Background Tasks API - Web APIs
in addition, the event loop handles interactions with the ope
rating system, updates to the browser's own user interface, and so forth.
CanvasRenderingContext2D.lineJoin - Web APIs
html <canvas id="canvas"></canvas> javascript const canvas = document.getelementbyid('canvas'); const ctx = canvas.getcontext('2d'); ctx.linewidth = 20; ctx.linejoin = 'round'; ctx.beginpath(); ctx.moveto(20, 20); ctx.lineto(190, 100); ctx.lineto(280, 20); ctx.lineto(280, 150); ctx.stroke(); result comparison of line joins the example below draws three different paths, demonst
rating each of the three linejoin options.
Transformations - Web APIs
saving and restoring state before we look at the transformation methods, let's look at two other methods which are indispensable once you start gene
rating ever more complex drawings.
Clipboard - Web APIs
due to both potential security concerns and technical complexities, the process of integ
rating this api is happening gradually in most browsers.
Crypto.getRandomValues() - Web APIs
user agents are instead urged to provide the best entropy they can when gene
rating random numbers, using a well-defined, efficient pseudorandom number generator built into the user agent itself, but seeded with values taken from an external source of pseudorandom numbers, such as a platform-specific random number function, the unix /dev/urandom device, or other source of random or pseudorandom data.
DOMHighResTimeStamp - Web APIs
further, if the device or ope
rating system the user agent is running on doesn't have a clock accurate to the microsecond level, they may only be accurate to the millisecond.
Document.querySelector() - Web APIs
note: the matching is done using depth-first pre-order traversal of the document's nodes starting with the first element in the document's markup and ite
rating through sequential nodes by order of the number of child nodes.
Document.styleSheetSets - Web APIs
with the names of all the available style sheet sets with code like this: let list = document.getelementbyid('sheetlist'); let sheets = document.stylesheetsets; list.innerhtml = ''; for (let i = 0; i < sheets.length; i++) { let item = document.createelement('li'); item.innerhtml = sheets[i]; list.appendchild(item); } notes the list of available style sheet sets is constructed by enume
rating all the style sheets available for the document, in the order in which they're listed in the document.stylesheets attribute, adding the title of each style sheet that has a title to the list.
EcKeyGenParams - Web APIs
the eckeygenparams dictionary of the web crypto api represents the object that should be passed as the algorithm parameter into subtlecrypto.generatekey(), when gene
rating any elliptic-curve-based key pair: that is, when the algorithm is identified as either of ecdsa or ecdh.
EcKeyImportParams - Web APIs
the eckeyimportparams dictionary of the web crypto api represents the object that should be passed as the algorithm parameter into subtlecrypto.importkey() or subtlecrypto.unwrapkey(), when gene
rating any elliptic-curve-based key pair: that is, when the algorithm is identified as either of ecdsa or ecdh.
EffectTiming.fill - Web APIs
"none" the animation's effects are only visible while the animation is ite
rating or its playhead is positioned over an iteration.
Element.attributes - Web APIs
syntax var attr = element.attributes; example basic examples // get the first <p> element in the document var para = document.getelementsbytagname("p")[0]; var atts = para.attributes; enume
rating elements attributes numerical indexing is useful for going through all of an element's attributes.
EventSource: message event - Web APIs
bubbles no cancelable no interface messageevent event handler property eventsource.onmessage examples in this basic example, an eventsource is created to receive events from the server; a page with the name sse.php is responsible for gene
rating the events.
EventSource - Web APIs
examples in this basic example, an eventsource is created to receive unnamed events from the server; a page with the name sse.php is responsible for gene
rating the events.
Geolocation API - Web APIs
the user's ope
rating system will prompt the user to allow location access the first time it is requested.
HTMLImageElement.srcset - Web APIs
space characters, other than the whitespace sepa
rating the url and the corresponding condition descriptor, are ignored; this includes both leading and trailing space, as well as space before or after each comma.
HTMLMediaElement.play() - Web APIs
possible errors include: notallowederror the user agent (browser) or ope
rating system doesn't allow playback of media in the current context or situation.
Recommended Drag Types - Web APIs
dragging files to an ope
rating system folder you may want to add a file to an existing drag event session, and you may also want to write the file to disk when the drop operation happens over a folder in the ope
rating system when your code receives notification of the target folder's location.
Ajax navigation example - Web APIs
to see how it works, please create the following files (or git clone https://github.com/giabao/mdn-ajax-nav-example.git ): note: for fully integ
rating the <form> elements within this mechanism, please take a look at the paragraph submitting forms and uploading files.
HmacImportParams - Web APIs
the hmacimportparams dictionary of the web crypto api represents the object that should be passed as the algorithm parameter into subtlecrypto.importkey() or subtlecrypto.unwrapkey(), when gene
rating a key for the hmac algorithm.
HmacKeyGenParams - Web APIs
the hmackeygenparams dictionary of the web crypto api represents the object that should be passed as the algorithm parameter into subtlecrypto.generatekey(), when gene
rating a key for the hmac algorithm.
IDBCursorSync - Web APIs
the idbcursorsync interface of the indexeddb api represents a cursor for ite
rating over multiple records in a database.
IDBFactory.cmp() - Web APIs
the cmp() method of the idbfactory interface compares two values as keys to determine equality and ordering for indexeddb operations, such as storing and ite
rating.
IDBKeyRange.bound() - Web APIs
"f"); var transaction = db.transaction(['fthings'], 'readonly'); var objectstore = transaction.objectstore('fthings'); objectstore.opencursor(keyrangevalue).onsuccess = function(event) { var cursor = event.target.result; if(cursor) { var listitem = document.createelement('li'); listitem.innerhtml = '<strong>' + cursor.value.fthing + '</strong>, ' + cursor.value.f
rating; list.appendchild(listitem); cursor.continue(); } else { console.log('entries all displayed.'); } }; }; specification specification status comment indexed database api 2.0the definition of 'bound()' in that specification.
IDBKeyRange.lower - Web APIs
ower); var transaction = db.transaction(['fthings'], 'readonly'); var objectstore = transaction.objectstore('fthings'); objectstore.opencursor(keyrangevalue).onsuccess = function(event) { var cursor = event.target.result; if(cursor) { var listitem = document.createelement('li'); listitem.innerhtml = '<strong>' + cursor.value.fthing + '</strong>, ' + cursor.value.f
rating; list.appendchild(listitem); cursor.continue(); } else { console.log('entries all displayed.'); } }; }; specification specification status comment indexed database api 2.0the definition of 'lower' in that specification.
IDBKeyRange.lowerBound() - Web APIs
("f"); var transaction = db.transaction(['fthings'], 'readonly'); var objectstore = transaction.objectstore('fthings'); objectstore.opencursor(keyrangevalue).onsuccess = function(event) { var cursor = event.target.result; if(cursor) { var listitem = document.createelement('li'); listitem.innerhtml = '<strong>' + cursor.value.fthing + '</strong>, ' + cursor.value.f
rating; list.appendchild(listitem); cursor.continue(); } else { console.log('entries all displayed.'); } }; }; specification specification status comment indexed database api 2.0the definition of 'lowerbound()' in that specification.
IDBKeyRange.lowerOpen - Web APIs
open); var transaction = db.transaction(['fthings'], 'readonly'); var objectstore = transaction.objectstore('fthings'); objectstore.opencursor(keyrangevalue).onsuccess = function(event) { var cursor = event.target.result; if(cursor) { var listitem = document.createelement('li'); listitem.innerhtml = '<strong>' + cursor.value.fthing + '</strong>, ' + cursor.value.f
rating; list.appendchild(listitem); cursor.continue(); } else { console.log('entries all displayed.'); } }; }; specification specification status comment indexed database api 2.0the definition of 'loweropen' in that specification.
IDBKeyRange.only() - Web APIs
("a"); var transaction = db.transaction(['fthings'], 'readonly'); var objectstore = transaction.objectstore('fthings'); objectstore.opencursor(keyrangevalue).onsuccess = function(event) { var cursor = event.target.result; if(cursor) { var listitem = document.createelement('li'); listitem.innerhtml = '<strong>' + cursor.value.fthing + '</strong>, ' + cursor.value.f
rating; list.appendchild(listitem); cursor.continue(); } else { console.log('entries all displayed.'); } }; }; specification specification status comment indexed database api 2.0the definition of 'only' in that specification.
IDBKeyRange.upper - Web APIs
pper); var transaction = db.transaction(['fthings'], 'readonly'); var objectstore = transaction.objectstore('fthings'); objectstore.opencursor(keyrangevalue).onsuccess = function(event) { var cursor = event.target.result; if(cursor) { var listitem = document.createelement('li'); listitem.innerhtml = '<strong>' + cursor.value.fthing + '</strong>, ' + cursor.value.f
rating; list.appendchild(listitem); cursor.continue(); } else { console.log('entries all displayed.'); } }; }; specification specification status comment indexed database api 2.0the definition of 'upper' in that specification.
IDBKeyRange.upperBound() - Web APIs
("f"); var transaction = db.transaction(['fthings'], 'readonly'); var objectstore = transaction.objectstore('fthings'); objectstore.opencursor(keyrangevalue).onsuccess = function(event) { var cursor = event.target.result; if(cursor) { var listitem = document.createelement('li'); listitem.innerhtml = '<strong>' + cursor.value.fthing + '</strong>, ' + cursor.value.f
rating; list.appendchild(listitem); cursor.continue(); } else { console.log('entries all displayed.'); } }; }; specification specification status comment indexed database api 2.0the definition of 'upperbound()' in that specification.
IDBKeyRange.upperOpen - Web APIs
open); var transaction = db.transaction(['fthings'], 'readonly'); var objectstore = transaction.objectstore('fthings'); objectstore.opencursor(keyrangevalue).onsuccess = function(event) { var cursor = event.target.result; if(cursor) { var listitem = document.createelement('li'); listitem.innerhtml = '<strong>' + cursor.value.fthing + '</strong>, ' + cursor.value.f
rating; list.appendchild(listitem); cursor.continue(); } else { console.log('entries all displayed.'); } }; }; specification specification status comment indexed database api 2.0the definition of 'upperopen' in that specification.
IDBKeyRange - Web APIs
d("a", "f"); var transaction = db.transaction(['fthings'], 'readonly'); var objectstore = transaction.objectstore('fthings'); objectstore.opencursor(keyrangevalue).onsuccess = function(event) { var cursor = event.target.result; if(cursor) { var listitem = document.createelement('li'); listitem.innerhtml = '<strong>' + cursor.value.fthing + '</strong>, ' + cursor.value.f
rating; list.appendchild(listitem); cursor.continue(); } else { console.log('entries all displayed.'); } }; } specifications specification status comment indexed database api 2.0the definition of 'idbkeyrange' in that specification.
InputDeviceCapabilities - Web APIs
the inputdevicecapabilities() constructor creates a new inputdevicecapabilities object provides information about the physical device responsible for gene
rating a touch event.
InputDeviceCapabilities - Web APIs
the inputdevicecapabilities interface of the input device capabilities api provides information about the physical device or a group of related devices responsible for gene
rating input events.
Key Values - Web APIs
used to allow gene
rating function key (f1–f15, for instance) characters on keyboards without a dedicated function key area.
KeyframeEffect.setKeyframes() - Web APIs
element.animate({ opacity: [ 0, 0.9, 1 ], offset: [ 0, 0.8 ], // shorthand for [ 0, 0.8, 1 ] easing: [ 'ease-in', 'ease-out' ], }, 2000); after gene
rating a suitable set of keyframes from the property value lists, each supplied offset is applied to the corresponding keyframe.
MediaDevices.getDisplayMedia() - Web APIs
notreadableerror the user selected a screen, window, tab, or other source of screen data, but a hardware or ope
rating system level error or lockout occurred, preventing the sharing of the selected source.
generateRequest() - Web APIs
the mediakeysession.generaterequest() method returns a promise after gene
rating a media request based on initialization data.
MediaKeySession - Web APIs
mediakeysession.generaterequest() returns a promise after gene
rating a media request based on initialization data.
MediaSession - Web APIs
the mediasession interface of the media session api allows a web page to provide custom behaviors for standard media playback interactions, and to report metadata that can be sent by the user agent to the device or ope
rating system for presentation in standardized user interface elements.
MouseEvent.metaKey - Web APIs
be aware that many ope
rating systems bind special functionality to the meta key, so this property may be false even when the key is actually pressed.
Navigator.mediaSession - Web APIs
this information may, in turn, be shared with the device and/or ope
rating system in order to a device's standard media control user experience to describe and control the playback of the media.
NavigatorPlugins.plugins - Web APIs
applications that must check for the presence of a browser plugin should query navigator.plugins or navigator.mimetypes by exact name instead of enume
rating the navigator.plugins array and comparing every plugin's name.
PaymentRequest.PaymentRequest() - Web APIs
the paymentrequest() constructor creates a new paymentrequest object which will be used to handle the process of gene
rating, validating, and submitting a payment request.
RTCDataChannel.bufferedAmount - Web APIs
this only includes data buffered by the user agent itself; it doesn't include any framing overhead or buffering done by the ope
rating system or network hardware.
RTCIceCandidatePairStats.selected - Web APIs
example the function shown in this example identifies the currently-selected candidate pair from a statistics report by first ite
rating over each report, looking for a transport report; when one is found, that transport's selectedcandidatepairid is used to get the rtcicecandidatepair describing the connection.
RTCIceCandidatePairStats - Web APIs
transportid optional a domstring that uniquely identifies the rtcicetransport that was inspected to obtain the transport-related statistics (as found in rtctransportstats) used in gene
rating this object.
RTCIceTransport.state - Web APIs
the read-only rtcicetransport property state returns the current state of the ice transport, so you can determine the state of ice gathering in which the ice agent currently is ope
rating.
RTCOfferOptions.iceRestart - Web APIs
fundamentally, this renegotiation is triggered by gene
rating and using new values for the ice username fragment ("ufrag")}} example this example shows a handler for the iceconnectionstatechange event.
RTCPeerConnection.addStream() - Web APIs
navigator.mediadevices.getusermedia({video:true, audio:true}, function(stream) { var pc = new rtcpeerconnection(); pc.addstream(stream); }); mig
rating to addtrack() compatibility allowing, you should update your code to instead use the addtrack() method: navigator.getusermedia({video:true, audio:true}, function(stream) { var pc = new rtcpeerconnection(); stream.gettracks().foreach(function(track) { pc.addtrack(track, stream); }); }); the newer addtrack() api avoids confusion over whether later changes to the track-makeup of a strea...
RTCPeerConnection.addTrack() - Web APIs
this is done by adding each track in the stream by ite
rating over the list returned by mediastream.gettracks() and passing them to addtrack() along with the stream which they're a component of.
RTCPeerConnection.getStats() - Web APIs
example this example creates a periodic function using setinterval() that collects statistics for an rtcpeerconnection every second, gene
rating an html-formatted report and inserting it into a specific element in the dom.
RTCPeerConnection - Web APIs
such an event is sent when the associated identity provider (idp) encounters an error while gene
rating an identity assertion.onidpvalidationerror the rtcpeerconnection.onidpvalidationerror event handler is a property containing the code to execute whent the idpvalidationerror event, of type rtcidentityerrorevent, is received by this rtcpeerconnection.
RTCStats.timestamp - Web APIs
this should be accurate to within a few milliseconds but may not be entirely pricise, either because of hardware or ope
rating system limitations or because of fingerprinting protection in the form of reduced clock precision or accuracy.
ReadableStream.ReadableStream() - Web APIs
t('li'); listitem.textcontent = string; list1.appendchild(listitem); }, 1000); button.addeventlistener('click', function() { clearinterval(interval); fetchstream(); controller.close(); }) }, pull(controller) { // we don't really need a pull in this example }, cancel() { // this is called if the reader cancels, // so we should stop gene
rating strings clearinterval(interval); } }); specifications specification status comment streamsthe definition of 'readablestream()' in that specification.
ReadableStreamDefaultController.close() - Web APIs
t('li'); listitem.textcontent = string; list1.appendchild(listitem); }, 1000); button.addeventlistener('click', function() { clearinterval(interval); fetchstream(); controller.close(); }) }, pull(controller) { // we don't really need a pull in this example }, cancel() { // this is called if the reader cancels, // so we should stop gene
rating strings clearinterval(interval); } }); specifications specification status comment streamsthe definition of 'close()' in that specification.
ReadableStreamDefaultController.enqueue() - Web APIs
t('li'); listitem.textcontent = string; list1.appendchild(listitem); }, 1000); button.addeventlistener('click', function() { clearinterval(interval); fetchstream(); controller.close(); }) }, pull(controller) { // we don't really need a pull in this example }, cancel() { // this is called if the reader cancels, // so we should stop gene
rating strings clearinterval(interval); } }); specifications specification status comment streamsthe definition of 'enqueue()' in that specification.
ReadableStreamDefaultController - Web APIs
t('li'); listitem.textcontent = string; list1.appendchild(listitem); }, 1000); button.addeventlistener('click', function() { clearinterval(interval); fetchstream(); controller.close(); }) }, pull(controller) { // we don't really need a pull in this example }, cancel() { // this is called if the reader cancels, // so we should stop gene
rating strings clearinterval(interval); } }); specifications specification status comment streamsthe definition of 'readablestreamdefaultcontroller' in that specification.
RsaHashedKeyGenParams - Web APIs
the rsahashedkeygenparams dictionary of the web crypto api represents the object that should be passed as the algorithm parameter into subtlecrypto.generatekey(), when gene
rating any rsa-based key pair: that is, when the algorithm is identified as any of rsassa-pkcs1-v1_5, rsa-pss, or rsa-oaep.
Screen - Web APIs
screen.availheight specifies the height of the screen, in pixels, minus permanent or semipermanent user interface features displayed by the ope
rating system, such as the taskbar on windows.
ServiceWorkerGlobalScope: pushsubscriptionchange event - Web APIs
bubbles no cancelable no interface pushsubscriptionchangeevent event handler property onpushsubscriptionchange usage notes although examples demonst
rating how to share subscription related information with the application server tend to use fetch(), this is not necessarily the best choice for real-world use, since it will not work if the app is offline, for example.
SubtleCrypto - Web APIs
gene
rating and deriving keys the generatekey() and derivekey() functions both create a new cryptokey object.
UIEvent() - Web APIs
sourcecapabilities: an instance of the inputdevicecapabilities interface which provides information about the physical device responsible for gene
rating a touch event.
sourceCapabilities - Web APIs
the uievent.sourcecapabilities read-only property returns an instance of the inputdevicecapabilities interface which provides information about the physical device responsible for gene
rating a touch event.
UIEvent - Web APIs
uievent.sourcecapabilities read only returns an instance of the inputdevicecapabilities interface, which provides information about the physical device responsible for gene
rating a touch event.
URLSearchParams.set() - Web APIs
params.set('baz', 3); params.tostring(); // "foo=1&bar=2&baz=3" below is a real-life example demonst
rating how to create a url and set some search parameters.
URL API - Web APIs
note the call to urlsearchparams.sort() to sort the parameter list before gene
rating the table.
USBAlternateInterface - Web APIs
an interface includes one or more alternate settings which can configure a set of endpoints based on the ope
rating mode of the device.
WebGL constants - Web APIs
generate_mipmap_hint 0x8192 hint for the quality of filtering when gene
rating mipmap images with webglrenderingcontext.generatemipmap().
WebGL model view projection - Web APIs
when dividing by w, this can effectively increase the precision of very large numbers by ope
rating on two potentially smaller, less error-prone numbers.
High-level guides - Web APIs
webrtc (web real-time communications) is a broad, multi-component system for setting up and ope
rating complex audio, video, and data channels across networks among two or more peers on the web.
Establishing a connection: The WebRTC perfect negotiation pattern - Web APIs
negotiation is an inherently asymmetric operation: one side needs to serve as the "caller" while the other peer is the "callee." the perfect negotiation pattern smooths this difference away by sepa
rating that difference out into independent negotiation logic, so that your application doesn't need to care which end of the connection it is.
Lighting a WebXR setting - Web APIs
when performing real-time rendering—as is the case with any virtual or augmented reality application—spherical harmonic lighting is used to simplify and accelerate the process of gene
rating highly realistic shadows and shading.
Rendering and the WebXR frame animation callback - Web APIs
when the loop that's ite
rating over the views ends, every image required to represent the scene to the viewer has been rendered, and upon return, the framebuffer makes its way through the gpu and eventually to the xr device's display or displays.
Starting up and shutting down a WebXR session - Web APIs
important session maintenance events over the course of your webxr session, you may receive any of a number of events which indicate changes to the state of the session, or which let you know about things you need to do to keep the session ope
rating properly.
Keyframe Formats - Web APIs
element.animate({ opacity: [ 0, 0.9, 1 ], offset: [ 0, 0.8 ], // shorthand for [ 0, 0.8, 1 ] easing: [ 'ease-in', 'ease-out' ], }, 2000); after gene
rating a suitable set of keyframes from the property value lists, each supplied offset is applied to the corresponding keyframe.
Web Audio API - Web APIs
this example makes use of the following web api interfaces: audiocontext, oscillatornode, periodicwave, and gainnode.mig
rating from webkitaudiocontextin this article, we cover the differences in web audio api since it was first implemented in webkit and how to update your code to use the modern web audio api.
Attestation and Assertion - Web APIs
android key attestation - one of the features added in android o was android key attestation, which enables the android ope
rating system to attest to keys.
Window.openDialog() - Web APIs
if the features parameter is a zero-length string, or contains only one or more of the behavior features (chrome, dependent, dialog and modal) the chrome features are assumed "os' choice." that is, window creation code is not given specific instructions, but is instead allowed to select the chrome that best fits a dialog on that ope
rating system.
Window - Web APIs
this object enables functionality such as storing assets for offline use, and gene
rating custom responses to requests.
WorkerGlobalScope - Web APIs
this object enables functionality such as storing assets for offline use, and gene
rating custom responses to requests.
Worklet - Web APIs
instead, you can use one of the following classes: name description location specification paintworklet for programmatically gene
rating an image where a css property expects a file.
XRInputSource.targetRayMode - Web APIs
syntax let raymode = xrinputsource.targetraymode; value a domstring taken from the xrtargetraymode enumerated type, indicating which method to use when gene
rating and presenting the target ray to the user.
XRSession.onsqueeze - Web APIs
xrsession.onsqueeze = event => { if (event.inputsource.handedness != user.handedness) { handleoffhandsqueeze(event.inputsource, event.frame); } }; finishing an ongoing squeeze action this example exapnds somewhat on the previous example by demonst
rating a way to implement the ability for the user to drop an object that was previously picked up by the user..
XRView - Web APIs
examples preparing to render every view for a pose to draw eerything the user sees each frame requires ite
rating over the list of views returned by the xrviewerpose object's views list: for (let view of pose.views) { let viewport = gllayer.getviewport(view); gl.viewport(viewport.x, viewport.y, viewport.width, viewport.height); // draw the scene; the eye being drawn is identified // by view.eye.
ARIA: timer role - Accessibility
aria-describedby used to indicate the idref of an element that contains additional instructions for navigating or ope
rating this element.
ARIA: img role - Accessibility
an aria-label attribute keyboard interactions required javascript features examples star
rating role="img" example specifications specification status accessible rich internet applications (wai-aria) 1.1the definition of 'img' in that specification.
ARIA: checkbox role - Accessibility
ttribute('aria-checked')) { case "true": item.setattribute('aria-checked', "false"); break; case "false": item.setattribute('aria-checked', "true"); break; } } accessibility concerns when the checkbox role is added to an element, the user agent should do the following: expose the element as having a checkbox role in the ope
rating system's accessibility api.
overview - Accessibility
authoring practices guide checkbox aria toggle button and tri-state checkbox examples (from "the paciello group blog") aria example checkbox widgets from the university of illinois menu using wai-aria roles and states with the yui menu control slider from the paciello group blog: aria slider, part one, part two, part threet (example) creating an accessible, internationalized dojo
rating widget tabs enhancing tabview accessibility with wai-aria roles and states, from the yui blog enhancing the jquery ui tabs accordingly to wcag 2.0 and aria tab panel example here on codetalks lightbox wcag 2.0 and aria-conformant lightbox application http://majx-js.digissime.net/js/popin/ form validation wcag 2.0 and aria-conformant live form validation tables german tutori...
Cognitive accessibility - Accessibility
for people with cognitive impairments includes: delivering content in more than one way, such as by text-to-speech or by video; providing easily-understood content, such as text written using plain-language standards; focusing attention on important content; minimizing distractions, such as unnecessary content or advertisements; providing consistent web page layout and navigation; incorpo
rating familiar elements, such as underlined links that are blue when not visited and purple when visited; dividing processes into logical, essential steps with progress indicators; making website authentication as easy as possible without compromising security; and making forms easy to complete, such as with clear error messages and simple error recovery.
Accessibility documentation index - Accessibility
: what users can do to browse more safely color, epilepsy, photosensitivity, prefers-reduced-motion, reflex epilepsy, saturation, seizure disorders, seizures, user settings, web animation this article discusses making web content accessible for those with vestibular disorders, and those who support them, by taking advantage of personalization and accessibility settings built into the ope
rating systems.
Keyboard - Accessibility
this includes users of screen readers, but can also include users who have trouble ope
rating a pointing device such as a mouse or trackball, or whose mouse is not working at the moment, or who simply prefer to use a keyboard for input whenever possible.
:-moz-focusring - CSS: Cascading Style Sheets
whether the user agent has focus ring drawing enabled can depend on ope
rating system settings and other factors, so the precise behavior of this pseudo-class will vary from platform to platform.
forced-colors - CSS: Cascading Style Sheets
user preferences currently no user agent implements this feature, although various ope
rating systems do support such preferences and if this media query is ever implemented user agents will likely rely on the settings provided by the ope
rating system in use.
prefers-reduced-data - CSS: Cascading Style Sheets
user preferences currently no user agent implements this feature, although various ope
rating systems do support such preferences and if this media query is ever implemented user agents will likely rely on the settings provided by the ope
rating system.
prefers-reduced-transparency - CSS: Cascading Style Sheets
user preferences currently no user agent implements this feature, although various ope
rating systems do support such preferences and if this media query is ever implemented user agents will likely rely on the settings provided by the ope
rating systems.
@viewport - CSS: Cascading Style Sheets
this may be either the full screen or the full screen area minus areas controlled by the ope
rating system (such as a taskbar) or the application-available screen area (either the full screen or the screen minus any areas owned by the ope
rating system or other applications).
Mastering margin collapsing - CSS: Cascading Style Sheets
no content sepa
rating parent and descendants if there is no border, padding, inline part, block formatting context created, or clearance to separate the margin-top of a block from the margin-top of one or more of its descendant blocks; or no border, padding, inline content, height, min-height, or max-height to separate the margin-bottom of a block from the margin-bottom of one or more of its descendant blocks, then t...
Color picker tool - CSS: Cascading Style Sheets
tchangeblue.bind(this)); this.createpreviewbox(); this.createchangemodebutton(); this.newinputcomponent('alpha', 'alpha', this.inputchangealpha.bind(this)); this.newinputcomponent('hexa', 'hexa', this.inputchangehexa.bind(this)); this.setcolor(this.color); pickers[topic] = this; } /*************************************************************************/ // function for gene
rating the color-picker /*************************************************************************/ colorpicker.prototype.createpickingarea = function createpickingarea() { var area = document.createelement('div'); var picker = document.createelement('div'); area.classname = 'picking-area'; picker.classname = 'picker'; this.picking_area = area; this.color_picker = picker; setmousetrac...
Linear-gradient Generator - CSS: Cascading Style Sheets
tchangeblue.bind(this)); this.createpreviewbox(); this.createchangemodebutton(); this.newinputcomponent('alpha', 'alpha', this.inputchangealpha.bind(this)); this.newinputcomponent('hexa', 'hexa', this.inputchangehexa.bind(this)); this.setcolor(this.color); pickers[topic] = this; } /*************************************************************************/ // function for gene
rating the color-picker /*************************************************************************/ colorpicker.prototype.createpickingarea = function createpickingarea() { var area = document.createelement('div'); var picker = document.createelement('div'); area.classname = 'picking-area'; picker.classname = 'picker'; this.picking_area = area; this.color_picker = picker; setmousetrac...
border-bottom-style - CSS: Cascading Style Sheets
it also applies to ::first-letter.inheritednocomputed valueas specifiedanimation typediscrete formal syntax <line-style>where <line-style> = none | hidden | dotted | dashed | solid | double | groove | ridge | inset | outset examples demonst
rating all border styles html <table> <tr> <td class="b1">none</td> <td class="b2">hidden</td> <td class="b3">dotted</td> <td class="b4">dashed</td> </tr> <tr> <td class="b5">solid</td> <td class="b6">double</td> <td class="b7">groove</td> <td class="b8">ridge</td> </tr> <tr> <td class="b9">inset</td> <td class="b10">outset</td> </tr> </table> css ...
display - CSS: Cascading Style Sheets
valid <display-outside> values: block the element generates a block element box, gene
rating line breaks both before and after the element when in the normal flow.
row-gap (grid-row-gap) - CSS: Cascading Style Sheets
syntax /* <length> values */ row-gap: 20px; row-gap: 1em; row-gap: 3vmin; row-gap: 0.5cm; /* <percentage> value */ row-gap: 10%; /* global values */ row-gap: inherit; row-gap: initial; row-gap: unset; values <length-percentage> is the width of the gutter sepa
rating the rows.
Audio and video manipulation - Developer guides
use this web audio node type an audio track from an html <audio> or <video> element mediaelementaudiosourcenode a plain raw audio data buffer in memory audiobuffersourcenode an oscillator gene
rating a sine wave or other computed waveform oscillatornode an audio track from webrtc (such as the microphone input you can get using getusermedia().
Creating and triggering events - Developer guides
ch/trigger an event on the fly // note: optionally, we've also leveraged the "function expression" (instead of the "arrow function expression") so "this" will represent the element this.dispatchevent(new customevent('awesome', { bubbles: true, detail: { text: () => textarea.value } })) }); triggering built-in events this example demonstrates simulating a click (that is programmatically gene
rating a click event) on a checkbox using dom methods.
DOM onevent handlers - Developer guides
html given this html document: <p>demonst
rating quirks of <code>on<em>event</em></code> html attributes on <a onclick="log('click!')">these three words</a>.
Date and time formats used in HTML - HTML: Hypertext Markup Language
mples of valid time strings time string time 00:00:30.75 12:00:30.75 am (30.75 seconds after midnight) 12:15 12:15 pm 13:44:25 1:44:25 pm (25 seconds after 1:44 pm) local date and time strings a valid datetime-local string consists of a date string and a time string concatenated together with either the letter "t" or a space character sepa
rating them.
<button>: The Button element - HTML: Hypertext Markup Language
understanding success criterion 2.5.5: target size | w3c understanding wcag 2.1 target size and 2.5.5 | adrian roselli quick test: large touch targets - the a11y project proximity large amounts of interactive content — including buttons — placed in close visual proximity to each other should have space sepa
rating them.
<input type="color"> - HTML: Hypertext Markup Language
<p>an example demonst
rating the use of the <code><input type="color"></code> control.</p> <label for="colorwell">color:</label> <input type="color" value="#ff0000" id="colorwell"> <p>watch the paragraph colors change when you adjust the color picker.
<input type="datetime-local"> - HTML: Hypertext Markup Language
date and time inside the value attribute, like so: <label for="party">enter a date and time for your party booking:</label> <input id="party" type="datetime-local" name="partydate" value="2017-06-01t08:30"> one thing to note is that the displayed date and time formats differ from the actual value; the displayed date and time are formatted according to the user's locale as reported by their ope
rating system, whereas the date/time value is always formatted yyyy-mm-ddthh:mm.
<input type="month"> - HTML: Hypertext Markup Language
including a month and year inside the value attribute, like so: <label for="bday-month">what month were you born in?</label> <input id="bday-month" type="month" name="bday-month" value="2017-06"> one thing to note is that the displayed date format differs from the actual value; most user agents display the month and year in a locale-appropriate form, based on the set locale of the user's ope
rating system, whereas the date value is always formatted yyyy-mm.
<input type="password"> - HTML: Hypertext Markup Language
the minlength and maxlength attributes are set to 9 and 12, respectively, to require that the value be at least nine and no more than 12 characters (the former without sepa
rating characters between the groups of digits and the latter with them).
<input type="time"> - HTML: Hypertext Markup Language
appearance chrome and opera in chrome/opera the time control is simple, with slots to enter hours and minutes in 12 or 24-hour format depending on ope
rating system locale, and up and down arrows to increment and decrement the currently selected component.
<select>: The HTML Select element - HTML: Hypertext Markup Language
usage notes selecting multiple options on a desktop computer, there are a number of ways to select multiple options in a <select> element with a multiple attribute: mouse users can hold the ctrl, command, or shift keys (depending on what makes sense for your ope
rating system) and then click multiple options to select/deselect them.
itemprop - HTML: Hypertext Markup Language
a meter element <div itemscope itemtype="http://schema.org/product"> <span itemprop="name">panasonic white 60l refrigerator</span> <img src="panasonic-fridge-60l-white.jpg" alt=""> <div itemprop="aggregate
rating" itemscope itemtype="http://schema.org/aggregate
rating"> <meter itemprop="
ratingvalue" min=0 value=3.5 max=5>rated 3.5/5</meter> (based on <span itemprop="reviewcount">11</span> customer reviews) </div> </div> similarly, for date- and time-related data, the time element and its datetime attribute can be used.
Evolution of HTTP - HTTP
this evolution of http proves its extensibility and simplicity, libe
rating creation of many applications and compelling the adoption of the protocol.
Basics of HTTP - HTTP
sepa
rating identity and location of a resource: the alt-svc http header most of the time the identity and location of a web resource are shared, this can be changed with the alt-svc header.
CSP: base-uri - HTTP
when gene
rating the hash, don't include the <script> or <style> tags and note that capitalization and whitespace matter, including leading or trailing whitespace.
CSP: child-src - HTTP
when gene
rating the hash, don't include the <script> or <style> tags and note that capitalization and whitespace matter, including leading or trailing whitespace.
CSP: connect-src - HTTP
when gene
rating the hash, don't include the <script> or <style> tags and note that capitalization and whitespace matter, including leading or trailing whitespace.
CSP: default-src - HTTP
when gene
rating the hash, don't include the <script> or <style> tags and note that capitalization and whitespace matter, including leading or trailing whitespace.
CSP: font-src - HTTP
when gene
rating the hash, don't include the <script> or <style> tags and note that capitalization and whitespace matter, including leading or trailing whitespace.
CSP: form-action - HTTP
when gene
rating the hash, don't include the <script> or <style> tags and note that capitalization and whitespace matter, including leading or trailing whitespace.
CSP: frame-src - HTTP
when gene
rating the hash, don't include the <script> or <style> tags and note that capitalization and whitespace matter, including leading or trailing whitespace.
CSP: img-src - HTTP
when gene
rating the hash, don't include the <script> or <style> tags and note that capitalization and whitespace matter, including leading or trailing whitespace.
CSP: manifest-src - HTTP
when gene
rating the hash, don't include the <script> or <style> tags and note that capitalization and whitespace matter, including leading or trailing whitespace.
CSP: media-src - HTTP
when gene
rating the hash, don't include the <script> or <style> tags and note that capitalization and whitespace matter, including leading or trailing whitespace.
CSP: navigate-to - HTTP
when gene
rating the hash, don't include the <script> or <style> tags and note that capitalization and whitespace matter, including leading or trailing whitespace.
CSP: object-src - HTTP
when gene
rating the hash, don't include the <script> or <style> tags and note that capitalization and whitespace matter, including leading or trailing whitespace.
CSP: prefetch-src - HTTP
when gene
rating the hash, don't include the <script> or <style> tags and note that capitalization and whitespace matter, including leading or trailing whitespace.
CSP: script-src-attr - HTTP
when gene
rating the hash, don't include the <script> or <style> tags and note that capitalization and whitespace matter, including leading or trailing whitespace.
CSP: script-src-elem - HTTP
when gene
rating the hash, don't include the <script> or <style> tags and note that capitalization and whitespace matter, including leading or trailing whitespace.
CSP: style-src-attr - HTTP
when gene
rating the hash, don't include the <script> or <style> tags and note that capitalization and whitespace matter, including leading or trailing whitespace.
CSP: style-src-elem - HTTP
when gene
rating the hash, don't include the <script> or <style> tags and note that capitalization and whitespace matter, including leading or trailing whitespace.
CSP: worker-src - HTTP
when gene
rating the hash, don't include the <script> or <style> tags and note that capitalization and whitespace matter, including leading or trailing whitespace.
Forwarded - HTTP
this header is used for debugging, statistics, and gene
rating location-dependent content and by design it exposes privacy sensitive information, such as the ip address of the client.
If-None-Match - HTTP
note that the server gene
rating a 304 response must generate any of the following header fields that would have been sent in a 200 (ok) response to the same request: cache-control, content-location, date, etag, expires, and vary.
Index - HTTP
110 user-agent http, reference, header the user-agent request header contains a characteristic string that allows the network protocol peers to identify the application type, ope
rating system, software vendor or software version of the requesting software user agent.
Transfer-Encoding - HTTP
for example, when gene
rating a large html table resulting from a database query or when transmitting large images.
User-Agent - HTTP
the user-agent request header is a characteristic string that lets servers and network peers identify the application, ope
rating system, vendor, and/or version of the requesting user agent.
X-Forwarded-For - HTTP
this header is used for debugging, statistics, and gene
rating location-dependent content and by design it exposes privacy sensitive information, such as the ip address of the client.
X-Forwarded-Host - HTTP
this header is used for debugging, statistics, and gene
rating location-dependent content and by design it exposes privacy sensitive information, such as the ip address of the client.
HTTP headers - HTTP
user-agent contains a characteristic string that allows the network protocol peers to identify the application type, ope
rating system, software vendor or software version of the requesting software user agent.
Link prefetching FAQ - HTTP
this is a problem that we hope to address in the future by leveraging ope
rating system services to monitor network idle time.
HTTP Messages - HTTP
for example, get indicates that a resource should be fetched or post means that data is pushed to the server (creating or modifying a resource, or gene
rating a temporary document to send back).
POST - HTTP
non-alphanumeric characters in both keys and values are percent encoded: this is the reason why this type is not suitable to use with binary data (use multipart/form-data instead) multipart/form-data: each value is sent as a block of data ("body part"), with a user agent-defined delimiter ("boundary") sepa
rating each part.
HTTP response status codes - HTTP
208 already reported (webdav) used inside a <dav:propstat> response element to avoid repeatedly enume
rating the internal members of multiple bindings to the same collection.
JavaScript modules - JavaScript
because .mjs is a non-standard file extension, some ope
rating systems might not recognise it, or try to replace it with something else.
Using Promises - JavaScript
here's some code that uses createaudiofileasync(): function successcallback(result) { console.log("audio file ready at url: " + result); } function failurecallback(error) { console.error("error gene
rating audio file: " + error); } createaudiofileasync(audiosettings, successcallback, failurecallback); modern functions return a promise that you can attach your callbacks to instead: if createaudiofileasync() were rewritten to return a promise, using it could be as simple as this: createaudiofileasync(audiosettings).then(successcallback, failurecallback); that's shorthand for: const promise = c...
Array.prototype.entries() - JavaScript
examples ite
rating with index and element const a = ['a', 'b', 'c']; for (const [index, element] of a.entries()) console.log(index, element); // 0 'a' // 1 'b' // 2 'c' using a for…of loop var a = ['a', 'b', 'c']; var iterator = a.entries(); for (let e of iterator) { console.log(e); } // [0, 'a'] // [1, 'b'] // [2, 'c'] specifications specification ecmascript (ecma-262)the definiti...
Date.prototype.toGMTString() - JavaScript
examples simple example in this example, the togmtstring() method converts the date to gmt (utc) using the ope
rating system's time-zone offset and returns a string value that is similar to the following form.
Intl.RelativeTimeFormat.prototype.formatToParts() - JavaScript
description the intl.relativetimeformat.prototype.formattoparts method is a version of the format method which it returns an array of objects which represent "parts" of the object, sepa
rating the formatted number into its consituent parts and sepa
rating it from other surrounding text.
Object.entries() - JavaScript
with object.entries, you can easily convert from object to map: const obj = { foo: 'bar', baz: 42 }; const map = new map(object.entries(obj)); console.log(map); // map { foo: "bar", baz: 42 } ite
rating through an object using array destructuring, you can iterate through objects easily.
RegExp - JavaScript
regexp.prototype[@@split]() splits given string into an array by sepa
rating the string into substrings.
Set - JavaScript
// true myset.has('some text'.tolowercase()) // true myset.has(o) // true myset.size // 5 myset.delete(5) // removes 5 from the set myset.has(5) // false, 5 has been removed myset.size // 4, since we just removed one value console.log(myset) // logs set(4) [ 1, "some text", {…}, {…} ] in firefox // logs set(4) { 1, "some text", {…}, {…} } in chrome ite
rating sets // iterate over items in set // logs the items in the order: 1, "some text", {"a": 1, "b": 2}, {"a": 1, "b": 2} for (let item of myset) console.log(item) // logs the items in the order: 1, "some text", {"a": 1, "b": 2}, {"a": 1, "b": 2} for (let item of myset.keys()) console.log(item) // logs the items in the order: 1, "some text", {"a": 1, "b": 2}, {"a": 1, "b": 2} for (let item of myset...
WeakMap - JavaScript
getting values from the map would involve ite
rating through all keys to find a match, then using the index of this match to retrieve the corresponding value from the array of values.
export - JavaScript
in other words, one can create a single module concent
rating various exports from various modules.
Trailing commas - JavaScript
when ite
rating arrays for example with array.prototype.foreach() or array.prototype.map(), array holes are skipped.
JavaScript
plunker plunker is an online community for creating, collabo
rating on and sharing your web development ideas.
shortcuts - Web app manifests
a user agent can use these values to assemble a context menu to be displayed by the ope
rating system when a user engages with the web app's icon.
Web app manifests
click each one for more information about it: background_colorcategoriesdescriptiondirdisplayiarc_
rating_idiconslangnameorientationprefer_related_applicationsrelated_applicationsscopescreenshotsserviceworkershort_nameshortcutsstart_urltheme_color example manifest { "name": "hackerweb", "short_name": "hackerweb", "start_url": ".", "display": "standalone", "background_color": "#fff", "description": "a simply readable hacker news app.", "icons": [{ "src": "images/touch/homescreen48.
Optimizing startup performance - Web Performance
a desktop application doesn't need to be written in an asynchronous fashion because usually the ope
rating system handles that for you, or the app is the only thing that matters which is currently running, depending on the ope
rating environment.
Web API reference - Web technology reference
these can be accessed using javascript code, and let you do anything from making minor adjustments to any window or element, to gene
rating intricate graphical and audio effects using apis such as webgl and web audio.
<feComposite> - SVG: Scalable Vector Graphics
ate(775,25)" xlink:href="#twobluetriangles"/> <use transform="translate(900,25)" xlink:href="#twobluetriangles"/> </g> </defs> <rect fill="none" stroke="blue" x="1" y="1" width="1098" height="648"/> <g font-family="verdana" font-size="40" shape-rendering="crispedges"> <desc>render the examples using the filters that draw on top of an opaque white surface, thus oblite
rating the background.</desc> <g enable-background="new"> <text x="15" y="75">opacity 1.0</text> <text x="15" y="115" font-size="27">(with feflood)</text> <text x="15" y="200">opacity 0.5</text> <text x="15" y="240" font-size="27">(with feflood)</text> <use xlink:href="#bluetriangles"/> <g transform="translate(275,25)"> <use xlink:href="#red100" filter="ur...
Certificate Transparency - Web security
in the context of certificate transparency, the data hashed by the leaf nodes are the certificates that have been issued by the various different cas ope
rating today.
Subresource Integrity - Web security
tools for gene
rating sri hashes you can generate sri hashes from the command-line with openssl using a command invocation such as this: cat filename.js | openssl dgst -sha384 -binary | openssl base64 -a or with shasum using a command invocation such as this: shasum -b -a 384 filename.js | awk '{ print $1 }' | xxd -r -p | base64 notes: the pipe-through-xxd step takes the hexadecimal output from shasum and co...
Types of attacks - Web security
session fixation should primarily be mitigated by regene
rating session cookie values when the user authenticates (even if a cookie already exists) and by tieing any csrf token to the user.
Tutorials
client-side web apis when writing client-side javascript for websites or applications, you won't go very far before you start to use apis — interfaces for manipulating different aspects of the browser and ope
rating system the site is running on, or even data from other websites or services.