Search completed in 1.37 seconds.
568 results for "Porting":
Your results are loading. Please wait...
Reporting API - Web APIs
the reporting api provides a generic reporting mechanism for web applications to use to make reports available based on various platform features (for example content security policy, feature-policy, or feature deprecation reports) in a consistent manner.
... the reporting api's purpose is to provide a consistent reporting mechanism that can be used to make such information available to developers in the form of reports represented by javascript objects.
... reporting observers reports can also be obtained via reportingobserver objects created via javascript inside the website you are aiming to get reports on.
...And 8 more matches
ReportingObserver - Web APIs
the reportingobserver interface of the reporting api allows you to collect and access reports.
... constructor reportingobserver() creates a new reportingobserver object instance, which can be used to collect and access reports.
... methods reportingobserver.disconnect() stops a reporting observer that had previously started observing from collecting reports.
...And 6 more matches
ReportingObserver() - Web APIs
the reportingobserver() constructor of the reporting api creates a new reportingobserver object instance, which can be used to collect and access reports.
... syntax new reportingobserver(callback[, options]); parameters callback a callback function that runs when the observer starts to collect reports (i.e.
... via reportingobserver.observe()).
...And 4 more matches
Environment variables affecting crash reporting - Archive of obsolete content
the breakpad crash reporting used in mozilla projects supports some environment variables, primarily for testing purposes.
... the following environment variables affect crash reporting: moz_crashreporter_url sets the url that the crash reporter will submit reports to.
... moz_crashreporter_no_report save the minidump file but don't launch the crash reporting ui or send the report to the server.
...And 3 more matches
Supporting older browsers - Learn web development
at the bottom of this page is a table, which lists major browsers along with the version they began supporting this property.
...supporting everyone means serving a version of your content that is designed defensively, so that it will look great on modern browsers, but will still be usable at a basic level for users of older browsers.
...however, unless you have a very high number of visitors in older ie versions, you may find it better to focus on creating a fallback that works for all non-supporting browsers.
...And 3 more matches
Porting NSPR to Unix Platforms - Archive of obsolete content
therefore i write this article to document the more mechanical part of the unix porting task.
... porting instructions you can use different threading packages to implement nspr threads.
...i use the netbsd port i recently received as an example to illustrate the mechanical part of the porting process.
...<strike>henry sobotka of the os/2 mozilla porting project has a web page at http://www.axess.com/users/sobotka/n.../warpztjs.html with good documentation of the nspr unit tests</strike>.
Xptcall Porting Status
this is a status page for the multiplatform porting of xptcall.
... xptcall has a faq and a porting guide.
... <font color="black">partially working</font> netbsd/arm32 mike pumford <mpumford@black-star.demon.co.uk> mike writes: i have started porting to the platform based on the code for linux arm.
...i am doing the porting work with egcs-1.1.2 on netbsd 1.4p (netbsd-current snapshot from a couple of days ago).
ReportingObserver.disconnect() - Web APIs
the disconnect() method of the reportingobserver interface stops a reporting observer that had previously started observing from collecting reports.
... after calling disconnect(), neither reportingobserver.takerecords() nor the records parameter of the reportingobserver() callback will return any reports.
... syntax reportingobserverinstance.disconnect() examples let options = { types: ['deprecation'], buffered: true } let observer = new reportingobserver(function(reports, observer) { reportbtn.onclick = () => displayreports(reports); }, options); observer.observe() ...
... observer.disconnect() specifications specification status comment reporting apithe definition of 'reportingobserver.disconnect()' in that specification.
ReportingObserver.takeRecords() - Web APIs
the takerecords() method of the reportingobserver interface returns the current list of reports contained in the observer's report queue, and empties the queue.
... syntax reportingobserverinstance.takerecords() return value an array of report objects.
... examples let options = { types: ['deprecation'], buffered: true } let observer = new reportingobserver(function(reports, observer) { reportbtn.onclick = () => displayreports(reports); }, options); observer.observe() // ...
... let records = observer.takerecords(); console.log(records); specifications specification status comment reporting apithe definition of 'reportingobserver.takerecords()' in that specification.
Script-supporting element - MDN Web Docs Glossary: Definitions of Web-related terms
in an html document, script-supporting elements are those elements that don't directly contribute to the appearance or layout of the page; instead, they're either scripts or contain information that's only used by scripts.
... there are only two script-supporting elements: <script> and <template>.
... technical reference to learn more, see script-supporting elements in kinds of html content.
Memory reporting
the cost of reporting isn't incurred unless the memory reporter is queried.
...that said, note that for some classes these methods may be virtual.) mfbt/memoryreporting.h defines mozilla::mallocsizeof as follows: typedef size_t (*mallocsizeof)(const void* p); functions with this signature measure the size of p by asking the heap allocator how big it is (via moz_malloc_usable_size).
...on supporting compilers it gets expanded to the override keyword.
Crash reporting
firefox ships with an open-source crash reporting system.
... this system is combination of projects: google breakpad client and server libraries mozilla-specific crash reporting user interface and bootstrap code socorro collection and reporting server where did my crash get submitted?
... see also understanding crash reports a guide to searching crash reports crash-stats crash pings (telemetry) and crash reports (socorro/crash stats) building firefox with debug symbols environment variables affecting crash reporting in-code documentation crash reporter crash manager crash ping ...
Porting the Library Detector - Archive of obsolete content
this example walks through the process of porting a xul-based add-on to the sdk.
... it's a very simple add-on and a good candidate for porting because there are suitable sdk apis for all its features.
Supporting private browsing mode - Archive of obsolete content
this interface is deprecated since firefox 20, and will probably be completely removed in firefox 21.see supporting per-window private browsing for details.
... see supporting private browsing in plugins for details.
Using Crash Reporting in a XULRunner Application - Archive of obsolete content
xulrunner application authors who wish to use crash reporting must run a crash reporting server.
... to enable crash reporting on the client, set the following items in application.ini: [crash reporter] enabled=true serverurl=https://your.server.url/submit note: because crash reports can contain private data including passwords, in production environments they should only be sent via https.
Reporting directive - MDN Web Docs Glossary: Definitions of Web-related terms
csp reporting directives are used in a content-security-policy header and control the reporting process of csp violations.
... see reporting directives for a complete list.
ReportingObserver.observe() - Web APIs
the observe() method of the reportingobserver interface instructs a reporting observer to start collecting reports in its report queue.
... syntax reportingobserverinstance.observe() examples let options = { types: ['deprecation'], buffered: true } let observer = new reportingobserver(function(reports, observer) { reportbtn.onclick = () => displayreports(reports); }, options); observer.observe() specifications specification status comment reporting apithe definition of 'reportingobserver.observe()' in that specification.
ReportingObserverOptions - Web APIs
the reportingobserveroptions dictionary of the reporting api allows options to be set in the constructor when creating a reportingobserver.
... examples let options = { types: ['deprecation'], buffered: true } let observer = new reportingobserver(function(reports, observer) { reportbtn.onclick = () => displayreports(reports); }, options); specifications specification status comment reporting apithe definition of 'reportingobserveroptions' in that specification.
Supporting search suggestions in search plugins - Archive of obsolete content
(this means that a suggestion-supporting engine plugin will have two <url> elements, the other one being the main text/html search url.) for example, the yahoo search plugin has this <url> entry: <url type="application/x-suggestions+json" template="http://ff.search.yahoo.com/gossip?output=fxjson&command={searchterms}"/> if the user types "fir" into the search bar, then pauses, firefox inserts "fir" in place of {searchterms} and quer...
Reporting a Performance Problem
this article will guide you in reporting a performance problem using the built-in gecko profiler tool.
Xptcall Porting Guide
porting status original author: john bandhauer, 31 may 1999.
Index - Web APIs
WebAPIIndex
532 using images advanced, canvas, graphics, html, tutorial importing images into a canvas is basically a two step process: 533 manipulating video using canvas api, canvas, chroma-key, editing, guide, manipulating, video, effects 534 canvascapturemediastreamtrack canvascapturemediastreamtrack, experimental, frame capture, interface, media, media capture, reference, web the canvascapturemediastreamtrack interface represents...
... 678 crashreportbody api, crashreportbody, experimental, interface, reference, reporting api the crashreportbody interface of the reporting api represents the body of a crash report (the return value of its report.body property).
... 825 deprecationreportbody api, deprecationreportbody, experimental, interface, reference, reporting api the deprecationreportbody interface of the reporting api represents the body of a deprecation report (the return value of its report.body property).
...And 18 more matches
Index - Archive of obsolete content
unfortunately, javascript does not yet have native support for modules: it has to rely on the host application to provide it with functionality such as loading subscripts, and exporting/ importing names.
... 32 porting the library detector add-on sdk, add-ons, example, extensions, sample code, tutorial no summary!
... 301 supporting search suggestions in search plugins add-ons, opensearch, search, search plugins firefox supports search suggestions in opensearch plugins; as the user types in the search bar, firefox queries the url specified by the search plugin to fetch live search suggestions.
...And 8 more matches
TypeScript support in Svelte - Learn web development
note that our application is fully functional and porting it to typescript is completely optional.
... typescript's main advantages are: early spotted bugs: the compiler checks types at compile time and provides error reporting.
...that's what we will do to start porting our application to typescript.
...And 8 more matches
<input>: The Input (Form Input) element - HTML: Hypertext Markup Language
WebHTMLElementinput
<input type="checkbox" name="checkbox"/> color a control for specifying a color; opening a color picker when active in supporting browsers.
...opens a date picker or numeric wheels for year, month, day when active in supporting browsers.
...opens a date picker or numeric wheels for date- and time-components when active in supporting browsers.
...And 7 more matches
Web video codec guide - Web media technologies
ort yes browser compatibility feature chrome edge firefox internet explorer opera safari av1 support 70 75 67 no 57 no container support isobmff[1], mpeg-ts, mp4, webm rtp / webrtc compatible yes supporting/maintaining organization alliance for open media specification https://aomediacodec.github.io/av1-spec/av1-spec.pdf licensing royalty-free, open standard [1] iso base media file format [2] see the av1 specification's tables of levels, which describe the maximum resolutions and rates at each level.
...fr) support yes browser compatibility feature chrome edge firefox internet explorer opera safari avc/h.264 support 4 12 35[1] 9 25 3.2 container support 3gp, mp4, webm rtp / webrtc compatible yes supporting/maintaining organization mpeg / itu specification https://mpeg.chiariglione.org/standards/mpeg-4/advanced-video-coding https://www.itu.int/rec/t-rec-h.264 licensing proprietary with numerous patents.
...fr) support no browser compatibility feature chrome edge firefox internet explorer opera safari h.263 support no no no[1] no no no container support 3gp, mp4, quicktime rtp / webrtc compatible no supporting/maintaining organization itu specification https://www.itu.int/rec/t-rec-h.263/ licensing proprietary; appropriate license or licenses are required.
...And 7 more matches
Index
nss prefers the binary presentation, but is often capable to use base64 or ascii presentations, especially when importing data from files.
...you should assign a good nickname to a certificate when importing it, making it easier for you to refer to it later.
...nss 3.53 will be a long-term support release, supporting firefox 78 esr.
...And 6 more matches
Handling common HTML and CSS problems - Learn web development
linters can generally be customized to be stricter or more relaxed in their error/warning reporting.
... older browsers not supporting modern features this is a common problem, especially when you need to support old browsers (such as old ie versions) or you are using features that are implemented using css prefixes.
...you can add fallback content in between the opening and closing tags, and non-supporting browsers will effectively ignore the outer element and run the nested content.
...And 5 more matches
CSS Grid Layout and Progressive Enhancement - CSS: Cascading Style Sheets
however, while evergreen browsers mean that many of us are going to see the majority of users having grid layout support very quickly, there are also old or non-supporting browsers to contend with.
... the supporting browsers other than in internet explorer, css grid layout is unprefixed in safari, chrome, opera, firefox and edge.
...as these properties are vendor prefixed, they will not effect any browser supporting the up to date and unprefixed specification.
...And 5 more matches
<input type="week"> - HTML: Hypertext Markup Language
WebHTMLElementinputweek
the control's user interface varies from browser to browser; cross-browser support is currently a bit limited, with only chrome/opera and microsoft edge supporting it at this time.
... in non-supporting browsers, the control degrades gracefully to function identically to <input type="text">.
... using the step attribute you should be able to use the step attribute to vary the number of weeks jumped whenever they are incremented or decremented, however it doesn't seem to have any effect on supporting browsers.
...And 5 more matches
Index of archived content - Archive of obsolete content
self contributor's guide classes and inheritance content processes getting started modules private properties firefox compatibility module structure of the sdk porting the library detector program id sdk api lifecycle sdk and xul comparison testing the add-on sdk two types of scripts working with events xul migration guide high-level apis addon-page base64 c...
...otifications and alerts xpcom objects performance best practices in extensions search extension tutorial (draft) security best practices in extensions session store api setting up an extension development environment signing an xpi signing an extension supporting search suggestions in search plugins tabbed browser techniques promises updating addons broken by private browsing changes using dependent libraries in extension components using the stylesheet service bookmarks.export() bookmarks.import() add...
... lir new security model for web services new skin notes overview of how downloads work plug-n-hack plug-n-hack get involved plug-n-hack phase1 plug-n-hack phase2 plug-n-hack tools supported plugin architecture porting nspr to unix platforms priority content prism blogposts build bundlelibrary bundles configuration extensions faq hostwindow installer scripting styling proxy ui pydom rdf...
...And 4 more matches
The Joy of XUL - Archive of obsolete content
the key features and benefits of xul will be explored followed by an examination of supporting mozilla technologies.
... in fact, many developers invest a significant amount of effort to achieve these results in their dhtml web applications but at the cost of complexity and performance and without any supporting standards.
...the user interface for all of mozilla's core applications (browser, messenger, address book, etc.) is written in xul with one single code base supporting all mozilla platforms.
...And 4 more matches
import - JavaScript
import {foo, bar} from '/modules/my-module.js'; import an export with a more convenient alias you can rename an export when importing it.
... import { reallyreallylongmoduleexportname as shortname, anotherlongmodulename as short } from '/modules/my-module.js'; import a module for its side effects only import an entire module for side effects only, without importing anything.
... importing defaults it is possible to have a default export (whether it is an object, a function, a class, etc.).
...And 4 more matches
Browser Detection and Cross Browser Support - Archive of obsolete content
note that some other browsers such as safari are reporting (like gecko) in their user agent strings and can confuse simple tests.
... we are still faced with the question of how to develop standards based content while supporting the differing implementations of modern browsers while at the same time supporting (to a lesser degree) older and less capable browsers.
...the reasons are that the capabilities of such browsers are far too limited compared to more modern browsers, the added development and quality assurance requirements add too much to the development cost of web sites and the market share of such browsers does not justify the expense of supporting them.
...And 3 more matches
Report - Web APIs
WebAPIReport
the report interface of the reporting api represents a single report.
... reports can be accessed in a number of ways: via the reportingobserver.takerecords() method — this returns all reports in an observer's report queue, and then empties the queue.
... via the reports parameter of the callback function passed into the reportingobserver() constructor upon creation of a new observer instance.
...And 3 more matches
Network Error Logging - HTTP
this experimental header allows web sites and applications to opt-in to receive reports about failed (and, if desired, successful) network fetches from supporting browsers.
... reports are sent to a reporting group defined within a report-to header.
... the following object keys can be specified in the nel header: report_to the reporting api group to send network error reports to (see below).
...And 3 more matches
sslerr.html
ssl_error_close_notify_alert -12230 "ssl peer has closed this connection." the local socket received an ssl3 alert record from the remote peer, reporting that the remote peer has chosen to end the connection.
...error_rx_unknown_handshake -12232 "ssl received a handshake message with an unknown message type." ssl_error_rx_unknown_alert -12231 "ssl received an alert record with an unknown alert description." received an alert report: all the error codes in the following block indicate that the local socket received an ssl3 or tls alert record from the remote peer, reporting some issue that it had with an ssl record or handshake message it received.
... sec_error_exporting_certificates -8116 error attempting to export certificates.
...And 2 more matches
JS_SetErrorReporter
get or specify the error reporting mechanism for an application.
... er jserrorreporter the user-defined error reporting function to use in your application, described below.
... description js_seterrorreporter enables you to define and use your own error reporting mechanism in your applications.
...And 2 more matches
Index
MozillaTechXPCOMIndex
827 nsiplacesimportexportservice bookmarks, interfaces, interfaces:scriptable, places, xpcom interface reference in the past, this interface also offered methods for importing places data, but those methods are now part of the bookmarkhtmlutils.jsm javascript code module.
... 1270 xptcall porting guide original author: john bandhauer, 31 may 1999.
... 1271 xptcall porting status this is a status page for the multiplatform porting of xptcall.
...And 2 more matches
nsICrashReporter
xpcom/system/nsicrashreporter.idlscriptable provides access to crash reporting functionality.
... exceptions thrown ns_error_not_initialized if crash reporting is not initialized.
...ns_error_not_initialized if crash reporting is not initialized.
...And 2 more matches
DeprecationReportBody - Web APIs
the deprecationreportbody interface of the reporting api represents the body of a deprecation report (the return value of its report.body property).
...a deprecated api method) is used on a document being observed by a reportingobserver.
... examples in our deprecation_report.html example, we create a simple reporting observer to observe usage of deprecated features on our web page: let options = { types: ['deprecation'], buffered: true } let observer = new reportingobserver(function(reports, observer) { reportbtn.onclick = () => displayreports(reports); }, options); we then tell it to start observing reports using reportingobserver.observe(); this tells the observer to start collecting reports in its...
...And 2 more matches
<input type="date"> - HTML: Hypertext Markup Language
WebHTMLElementinputdate
if you use min and max to restrict the available dates (see setting maximum and minimum dates), supporting browsers will display an error if you try to submit a date that is out of bounds.
...try playing with the example now: here's a screenshot for those of you who aren't using a supporting browser: here's the css used in the above example.
...as an example, the date picker on firefox for android looks like this: unsupporting browsers gracefully degrade to a text input, but this creates problems in consistency of user interface (the presented controls are different) and data handling.
...And 2 more matches
<input type="datetime-local"> - HTML: Hypertext Markup Language
for those of you not using a supporting browser, the chrome/opera datetime-local control looks like the below screenshot.
...as a result, supporting browsers will display an error if you try to submit a date that is outside the set bounds, or an empty date field.
...try playing with the example now: here's a screenshot for those of you who aren't using a supporting browser: here's the css used in the above example.
...And 2 more matches
JavaScript modules - JavaScript
exporting module features the first thing you do to get access to module features is export them.
... a more convenient way of exporting all the items you want to export is to use a single export statement at the end of your module file, followed by a comma-separated list of the features you want to export wrapped in curly braces.
... for example: export { name, draw, reportarea, reportperimeter }; importing features into your script once you've exported some features out of your module, you need to import them into your script to be able to use them.
...And 2 more matches
Index - MDN Web Docs Glossary: Definitions of Web-related terms
adobe flash can run from supporting web browsers via a browser plug-in.
... 371 reporting directive csp, http, policy, reporting, security, violation csp reporting directives are used in a content-security-policy header and control the reporting process of csp violations.
... 402 script-supporting element glossary, html, html content categories, scripts in an html document, script-supporting elements are those elements that don't directly contribute to the appearance or layout of the page; instead, they're either scripts or contain information that's only used by scripts.
...beacons are often included within third party scripts for collecting user data, performance metrics and error reporting.
Handling common JavaScript problems - Learn web development
such incompatibility problems persisted well into the early 2000s, as old browsers were still being used and still needed supporting.
... things have improved significantly since then; modern browsers do a good job of supporting "classic javascript features", and the requirement to use such code has diminished as the requirement to support older browsers has lessened (although bear in mind that they have not gone away altogether).
... linters as with html and css, you can ensure better quality, less error-prone javascript code using a linter, which points out errors and can also flag up warnings about bad practices, etc., and be customized to be stricter or more relaxed in their error/warning reporting.
...it is not so important now we have modern features like document.queryselector()/document.queryselectorall()/node methods available across browsers, but it can still be useful when older browsers need supporting.
Strategies for carrying out testing - Learn web development
your site should now be ready to start reporting analytics data.
... studying analytics data now you should be able to go back to the analytics web homepage, and start looking at the data you've collected about your site (you need to leave a little bit of time for some data to actually be collected, of course.) by default, you should see the reporting tab, like so: there is a huge amount of data you could look at using google analytics — customized reports in different categories, etc.
...getting started with analytics provides some useful guidance on reporting (and more) for beginners.
..."we have no firefox mobile users" might lead you to not bother supporting firefox mobile.
Setting up your own test automation environment - Learn web development
in addition, we should mention test results/reporting — we've been reporting results in our above examples using simple console.log() statements, but this is all done in javascript, so you can use whatever test running and reporting system you want, be it mocha, chai, or some other tool.
... if you wish to extract these results for reporting purpose from lambdatest platform then you can do so by using lambdatest restful api.
...this shows the importance of including some kind of result reporting mechanism!
...this shows the importance of including some kind of result reporting mechanism!
About NSPR
history a good portion of the library's purpose, and perhaps the primary purpose in the gromit environment, was to provide the underpinnings of the java vm, more or less mapping the sys layer that sun defined for the porting of the java vm to various platforms.
...it is not a goal to provide a platform for the porting into netscape of externally developed code.
...the first generation of nspr was originally conceived just to satisfy the requirements of porting java to various host environments.
...today nspr may still be appropriate as the platform dependent layer under java, but its primary application is supporting clients written entirely in c or c++.
NSS Tools crlutil
kname [-d keydir] [-p dbprefix] crlutil -e [-d keydir] [-p dbprefix] crlutil -i -i crl [-t crltype] [-u url] [-d keydir] [-p dbprefix] [-b] creating or modifying a crl: listing all crls or a named crl: deleting crl from db: erasing crls from db: import crl from file: examples creating a new crl listing crls in a database deleting crl from a database importing crl into a database modifiying crl in a database creating a new crl this example creates a new crl and importing it in to a database in the specified directory: crlutil -g -d certdir -n cert-nickname -c crl-script-file or crlutil -g -d certdir -n cert-nickname <<eof update=20050204153000z addcert 34-40 20050104153000z eof where cert-nickname is the name the new crl will be signe...
... this update: wed feb 23 12:08:38 2005 entry (1): serial number: 40 (0x28) revocation date: wed feb 23 12:08:10 2005 entry (2): serial number: 42 (0x2a) revocation date: wed feb 23 12:08:40 2005 deleting crl from a database this example deletes crl from a database in the specified directory: crlutil -d -n nickname -d certdir importing crl into a database this example imports crl into a database: crlutil -i -i crl-file -d certdir file should has binary format of asn.1 encoded crl data.
... modifying crl in a database this example modifies a new crl and importing it in to a database in the specified directory: crlutil -g -d certdir -n cert-nickname -c crl-script-file or crlutil -m -d certdir -n cert-nickname <<eof update=20050204153000z addcert 40-60 20050105153000z eof the crl management tool extracts existing crl from a database, will modify and sign with certificate cert-nickname and will store it in database.
... to modify while importing crl from file user should supply -i import-crl-file option.
Handling Mozilla Security Bugs
however, this is offset by the fact that the person reporting a bug has visibility into the activities (if any) being taken to address the bug, and has the power to open the bug report for public scrutiny.
... thus someone reporting a security bug essentially becomes a member of the overall group of people working to investigate and fix that particular vulnerability, and anyone else may be easily invited to assist as well, if and when it makes sense.
...we believe that investing this power in the bug reporter simply acknowledges reality, as nothing prevents the person reporting a security bug from publicizing information about the bug by posting it to channels outside the context of the mozilla project.
... however, we will ask all individuals and organizations reporting security bugs through bugzilla to follow the voluntary guidelines below: before making a security bug world-readable, please provide a few days notice to the mozilla security bug group by sending an email to the private security bug group mailing list.
nsIPlacesImportExportService
toolkit/components/places/nsiplacesimportexportservice.idlscriptable provides methods for exporting places data.
... 1.0 66 introduced gecko 1.9 inherits from: nsisupports last changed in gecko 14.0 (firefox 14.0 / thunderbird 14.0 / seamonkey 2.11) in the past, this interface also offered methods for importing places data, but those methods are now part of the bookmarkhtmlutils.jsm javascript code module.
..."bookmarks-restore-failed" is fired right after a failure occurs when importing the bookmarks.
..."bookmarks-restore-failed" is fired right after a failure occurs when importing the bookmarks.
Using feature queries - CSS: Cascading Style Sheets
you do however need to structure your css in a certain way, writing css for non-supporting browsers and overwriting it with the css inside the feature query.
...once a floated item becomes a grid item, the float is removed — something you can read more about in supporting older browsers.
...as you can wrap up the css for supporting browsers, you do not run the risk of styles used for the fallback display leaking through, as shown in our grid example above.
... see also the @supports rule learn layout: supporting older browsers css grid layout and progressive enhancement using feature queries in css ...
Cross-browser audio basics - Developer guides
a cross-browser html5 audio player with all the associated attributes, properties, and events explained a guide to custom controls created using the media api basic audio example the code below is an example of a basic audio implementation using html5: <audio controls> <source src="audiofile.mp3" type="audio/mpeg"> <source src="audiofile.ogg" type="audio/ogg"> <!-- fallback for non supporting browsers goes here --> <p>your browser does not support html5 audio, but you can still <a href="audiofile.mp3">download the music</a>.</p> </audio> note: you can also use an mp4 file instead of mp3.
... for example, mediaelement.js includes flash fallbacks, which are used something like this: <audio controls> <source src="audiofile.mp3" type="audio/mpeg"> <source src="audiofile.ogg" type="audio/ogg"> <!-- fallback for non supporting browsers goes here --> <a href="audiofile.mp3">download audio</a> <object width="320" height="30" type="application/x-shockwave-flash" data="mediaelement-flash-video.swf"> <param name="movie" value="mediaelement-flash-video.swf" /> <param name="flashvars" value="controls=true&isvideo=false&file=audiofile.mp3" /> </object> </audio> note: you should be aware that flash and silverlig...
...first, we'll set up the audio in the html, without the controls attribute, since we are creating our own controls: <audio id="my-audio"> <source src="audiofile.mp3" type="audio/mpeg"> <source src="audiofile.ogg" type="audio/ogg"> <!-- place fallback here as <audio> supporting browsers will ignore it --> <p>download<a href="audiofile.mp3">audiofile.mp3</a></p> </audio> <!-- custom play and pause buttons --> <button id="play">play</button> <button id="pause">pause</button> next, we attach some functionality to the player using javascript: window.onload = function(){ var myaudio = document.getelementbyid('my-audio'); var play = document.getelementbyid('play'); ...
... an audio player with feedback consider this snippet of html: <audio id="my-audio"> <source src="https://udn.realityripple.com/samples/6c/d385042de2.mp3" type="audio/mpeg"> <source src="https://udn.realityripple.com/samples/28/191a7bd2a5.ogg" type="audio/ogg"> <!-- place fallback here as <audio> supporting browsers will ignore it --> <a href="audiofile.mp3">audiofile.mp3</a> </audio> <div id="controls"> <span id="loading">loading</span> <button id="play" style="display:none">play</button> <button id="pause" style="display:none" >pause</button> </div> <div id="progress"> <div id="bar"></div> </div> styled like so: #controls { width: 80px; float: left; } #progress { margin-left...
<input type="time"> - HTML: Hypertext Markup Language
WebHTMLElementinputtime
using time inputs although among the date and time input types time has the widest browser support, it is not yet approaching universal, so it is likely that you'll need to provide an alternative method for entering the date and time, so that safari users (and users of other non-supporting browsers) can still easily enter time values.
...as a result, supporting browsers will display an error if you try to submit a time that is outside the set bounds, or an empty time field.
... <label for="appt-time">choose an appointment time (opening hours 12:00 to 18:00): </label> <input id="appt-time" type="time" name="appt-time" min="12:00" max="18:00" required pattern="[0-9]{2}:[0-9]{2}"> <span class="validity"></span> </div> <div> <input type="submit" value="submit form"> </div> </form> if you try submitting it, you'll see that non-supporting browsers now display an error message (and highlight the input as invalid) if your entry doesn't match the pattern nn:nn, where n is a number from 0 to 9.
...; content: '✖'; padding-left: 5px; } input:valid+span:after { position: absolute; content: '✓'; padding-left: 5px; } the other part of the code that may be of interest is the feature detection code — to detect whether the browser supports <input type="time">, we create a new <input> element, try setting its type to time, then immediately check what its type is set to — non-supporting browsers will return text, because the time type falls back to type text.
HTML documentation index - HTML: Hypertext Markup Language
WebHTMLIndex
187 <script>: the script element element, html, html scripting, html:flow content, html:metadata content, html:phrasing content, html:script-supporting element, reference, script, web, tag the html <script> element is used to embed executable code or data; this is typically used to embed or refer to javascript code.
... 205 <template>: the content template element element, html, html web components, html:flow content, html:metadata content, html:phrasing content, html:script-supporting element, reference, template, web, web components the html content template (<template>) element is a mechanism for holding html that is not to be rendered immediately when a page is loaded but may be instantiated subsequently during runtime using javascript.
...microdata uses a supporting vocabulary to describe an item and name-value pairs to assign values to its properties.
...microformats use supporting vocabularies to describe objects and name-value pairs to assign values to their properties.
HTTP Index - HTTP
WebHTTPIndex
30 reason: credential is not supported if the cors header ‘access-control-allow-origin’ is ‘*’ cors, corsnotsupportingcredentials, cross-origin, error, http, https, messages, reasons, security, console, troubleshooting the cors request was attempted with the credentials flag set, but the server is configured using the wildcard ("*") as the value of access-control-allow-origin, which doesn't allow the use of credentials.
... 94 csp: report-to csp, content security policy, content-security-policy, http, reporting, security, report-to the content-security-policy report-to http response header field instructs the user agent to store reporting endpoints for an origin.
... 120 expect-ct http, reference, header the expect-ct header allows sites to opt in to reporting and/or enforcement of certificate transparency requirements, which prevents the use of misissued certificates for that site from going unnoticed.
...this policy controls whether navigator.xr.requestsession() can return xrsession that requires spatial tracking and whether user agent can indicate support for sessions supporting spatial tracking via navigator.xr.issessionsupported() and devicechange event on navigator.xr object.
export - JavaScript
bindings that are exported can still be modified locally; when imported, although they can only be read by the importing module the value updates whenever it is updated by the exporting module.
... syntax there are two types of exports: named exports (zero or more exports per module) default exports (one per module) // exporting individual features export let name1, name2, …, namen; // also var, const export let name1 = …, name2 = …, …, namen; // also var, const export function functionname(){...} export class classname {...} // export list export { name1, name2, …, namen }; // renaming exports export { variable1 as name1, variable2 as name2, …, namen }; // exporting destructured assignments with renaming export const { name1, name2: bar } = o; // default exports export default expression; export default function (…) { … } // als...
...ted with any name for example: // file test.js let k; export default k = 12; // some other file import m from './test'; // note that we have the freedom to use import m instead of import k, because k was default export console.log(m); // will log 12 you can also rename named exports to avoid naming conflicts: export { myfunction as function1, myvariable as variable }; re-exporting / aggregating it is also possible to "import/export" from different modules in a parent module so that they are available to import from that module.
...ave a fallback value for your module, you could use a default export: // module "my-module.js" export default function cube(x) { return x * x * x; } then, in another script, it is straightforward to import the default export: import cube from './my-module.js'; console.log(cube(3)); // 27 using export from let's take an example where we have the following hierarchy: childmodule1.js: exporting myfunction and myvariable childmodule2.js: exporting myclass parentmodule.js: acting as an aggregator (and doing nothing else) top level module: consuming the exports of parentmodule.js this is what it would look like using code snippets: // in childmodule1.js let myfunction = ...; // assign something useful to myfunction let myvariable = ...; // assign something useful to myvariable export...
Modules - Archive of obsolete content
unfortunately, javascript does not yet have native support for modules: it has to rely on the host application to provide it with functionality such as loading subscripts, and exporting/ importing names.
...any property defined on the global object will be accessible from both scripts: // index.js: loadscript("www.foo.com/a.js"); foo; // => 3 // a.js: foo = 3; exporting names the script loader we obtained from the components object allows us load scripts from other locations, but its api is rather limited.
...using this new version of loadscript, we can now rewrite our earlier example as follows: // index.js: let a = loadscript("www.foo.com/a.js"); let b = loadscript("www.foo.com/b.js"); a.foo // => 3 b.foo; // => 5 // a.js: foo = 3; // b.js: foo = 5; importing names in addition to exporting properties from the script being loaded to the loading script, we can also import properties from the loading script to the script being loaded: function loadscript(url, imports) { let global = { imports: imports, exports: {} }; loader.loadsubscript(url, global); return global.exports; } among other things, this allows us to import...
package.json - Archive of obsolete content
see supporting updates for self-hosted add-ons.
... see supporting updates for self-hosted add-ons.
... see supporting updates for self-hosted add-ons.
Source code directories overview - Archive of obsolete content
intl contains c interfaces and code for supporting localization.
...it includes all the code for managing mail, reading newsgroup messages, importing other mail formats, composing new messages and so on.
....png, .gif), allowing drop-in java virtual machines (called oji, for "open java interface"), supporting plug-ins and reading various compression formats (e.g.
Archived Mozilla and build documentation - Archive of obsolete content
error console the error console is a tool available in most mozilla-based applications that is used for reporting errors in the application chrome and in web pages user opens.
... porting nspr to unix platforms last modified 16 july 1998 priority content update: i've removed documents from this list that have been migrated into the wiki.
... supporting private browsing mode firefox 3.5 introduced private browsing mode, in which potentially private information is not recorded.
WAI-ARIA basics - Learn web development
dynamic content updates: screenreaders tend to have difficulty with reporting constantly changing content; with aria we can use aria-live to inform screenreader users when an area of content is updated, e.g.
... enhancing keyboard accessibility: there are built-in html elements that have native keyboard accessibility; when other elements are used along with javascript to simulate similar interactions, keyboard accessibility and screenreader reporting suffers as a result.
...ge here is that we've removed the links that were originally present in the example, and just used the list items as the tabs — this was done because it makes things less confusing for screenreader users (the links don't really take you anywhere; they just change the view), and it allows the setsize/position in set features to work better — when these were put on the links, the browser kept reporting "1 of 1" all the time, not "1 of 3", "2 of 3", etc.
Images in HTML - Learn web development
image titles as with links, you can also add title attributes to images, to provide further supporting information if needed.
... it is better to include such supporting information in the main article text, rather than attached to the image.
... provides essential information supporting the main text.
Making asynchronous programming easier with async and await - Learn web development
} each one ends by recording a start time, seeing how long the timetest() promise takes to fulfill, then recording an end time and reporting how long the operation took in total: let starttime = date.now(); timetest().then(() => { let finishtime = date.now(); let timetaken = finishtime - starttime; alert("time taken in milliseconds: " + timetaken); }) it is the timetest() function that differs in each case.
...each subsequent one is forced to wait until the last one finished — if you run the first example, you'll see the alert box reporting a total run time of around 9 seconds.
... next, we await their results — because the promises all started processing at essentially the same time, the promises will all fulfill at the same time; when you run the second example, you'll see the alert box reporting a total run time of just over 3 seconds!
Getting started with Svelte - Learn web development
this file is the entry point for our app, and it initially looks like this: import app from './app.svelte'; const app = new app({ target: document.body, props: { name: 'world' } }); export default app; main.js starts by importing the svelte component that we are going to use.
...this is useful when reporting issues related to a specific version of svelte.
... svelte components can be used just by importing the corresponding .svelte file.
Introduction to cross browser testing - Learn web development
get as much information as you can from the person reporting the bug — what platform(s), device(s), browser version(s), etc.
...if it is not fixed, then you may want to file a bug (see reporting bugs, below).
... reporting bugs just to reiterate on what was said above, if you discover bugs in browsers, you should report them: firefox bugzilla edgehtml issue tracker safari chrome opera summary this article should have given you a high-level understanding of the most important concepts you need to know about cross browser testing.
Testopia
it is designed to be a generic tool for tracking test cases, allowing for testing organizations to integrate bug reporting with their test case run results.
...this decision allows us to focus our time more on releasing new features often and early rather than back porting.
... links faq wiki docs bugs (please read the bug reporting guide) official testopia blog irc: #testopia or #bugzilla user help support-webtools@lists.mozilla.org developers dev-apps-webtools@lists.mozilla.org downloads download 2.5 (bugzilla 4.2) download 2.4 (bugzilla 3.6 and 4.0) archived versions developers greg hendricks vance baarda (former developer) ed fuentetaja (former developer) ...
Creating localizable web applications
bad: <p><?=_("if you are interested in supporting the approval process by becoming an approver, please email <a href=\"mailto:personas@mozilla.com\">personas@mozilla.com</a>.")?></p> snippet 4.
... good: <p><?= printf(_("if you are interested in supporting the approval process by becoming an approver, please email <a href=\"mailto:%s\">%s</a>."), 'personas@mozilla.com', 'personas@mozilla.com')?> </p> snippet 5.
... also good: <p><?= printf(_("if you are interested in supporting the approval process by becoming an approver, please email <a href=\"mailto:%1$s\">%1$s</a>."), 'personas@mozilla.com')?> </p> the same goes for variables that are unknown until the code is interpreted.
Performance
documentation reporting a performance problem a user friendly guide to reporting a performance problem.
...about:memory is built on top of firefox's memory reporting infrastructure.
... adding a new telemetry probe information on how to add a new measurement to the telemetry performance-reporting system profiling javascript with shark (obsolete - replaced by instruments) how to use the mac os x shark profiler to profile javascript code in firefox 3.5 or later.
NSS Certificate Download Specification
importing certificate chains several of the formats described above can contain several certificates.
... importing certificates into mozilla browsers mozilla browsers import certificates found in http protocol responses.
... importing certificates into nss-based servers consult your server's administration guide for the most accurate information.
NSS tools : pk12util
-v enable debug logging when importing.
...version version 3 to version 2 error o 21 - cert db conversion version 7 to version 5 error o 22 - cert and key dbs patch error o 23 - get default cert db error o 24 - find cert by nickname error o 25 - create export context error o 26 - pkcs12 add password itegrity error o 27 - cert and key safes creation error o 28 - pkcs12 add cert and key error o 29 - pkcs12 encode error examples importing keys and certificates the most basic usage of pk12util for importing a certificate or key is the pkcs#12 input file (-i) and some way to specify the security database being accessed (either -d for a directory or -h for a token).
... enter new password: re-enter password: enter password for pkcs12 file: pk12util: pkcs12 import successful exporting keys and certificates using the pk12util command to export certificates and keys requires both the name of the certificate to extract from the database (-n) and the pkcs#12-formatted output file to write to.
NSS tools : pk12util
-v enable debug logging when importing.
...- cert db conversion version 7 to version 5 error o 22 - cert and key dbs patch error o 23 - get default cert db error o 24 - find cert by nickname error o 25 - create export context error o 26 - pkcs12 add password itegrity error o 27 - cert and key safes creation error o 28 - pkcs12 add cert and key error o 29 - pkcs12 encode error examples importing keys and certificates the most basic usage of pk12util for importing a certificate or key is the pkcs#12 input file (-i) and some way to specify the security database being accessed (either -d for a directory or -h for a token).
... enter new password: re-enter password: enter password for pkcs12 file: pk12util: pkcs12 import successful exporting keys and certificates using the pk12util command to export certificates and keys requires both the name of the certificate to extract from the database (-n) and the pkcs#12-formatted output file to write to.
JSAPI User Guide
error reporting is also per-context and is enabled using js_seterrorreporter.
...it is a fine-grained api, supporting many different combinations of the parts, and giving applications precise control over how spidermonkey behaves.
... on failure, a jsnative calls an error-reporting function, in this case js_reporterror, and returns false.
Component Internals
so far this book has been focusing on "native components," shared libraries exporting a nsgetmodule symbol.
...this loader is responsible for initialization, loading, unloading, and supporting the nsimodule interface on behalf of each component.
...whatever it does, this object is at the core of the xpcom component, and the other layers are supporting it, plugging it into the xpcom system.
xptcall FAQ
porting this code is required in order to make mozilla run on any given platform.
... the growing list: porting status where can i find other resources?
... the code is at: xpcom/reflect/xptcall a new porting guide is at: https://developer.mozilla.org/en/xptcall_porting_guide pre-implementation proposals are here and here.
Debugger.Object - Firefox Developer Tools
setobjectwatchpoint(handler)(future plan) set a watchpoint on all the referent's own properties, reporting events by callinghandler's methods.
...the watchpoint consultshandler's properties each time an event occurs, so adding methods to or removing methods fromhandler after setting the watchpoint enables or disables reporting of the corresponding events.
... setpropertywatchpoint(name,handler)(future plan) set a watchpoint on the referent's property namedname, reporting events by callinghandler's methods.
CrashReportBody - Web APIs
the crashreportbody interface of the reporting api represents the body of a crash report (the return value of its report.body property).
...it is difficult to retrieve a crash report via a reportingobserver, as by that point the page would have crashed!
... specifications specification status comment reporting apithe definition of 'crashreportbody' in that specification.
The HTML DOM API - Web APIs
the html dom api is made up of the interfaces that define the functionality of each of the elements in html, as well as any supporting types and interfaces they rely upon.
... access to the browser navigation history supporting and connective interfaces for other apis such as web components, web storage, web workers, websocket, and server-sent events.
... customelementregistry miscellaneous and supporting interfaces these supporting object types are used in a variety of ways in the html dom api.
Intersection Observer API - Web APIs
reporting of visibility of advertisements in order to calculate ad revenues.
...h(entry => { // each entry describes an intersection change for one observed // target element: // entry.boundingclientrect // entry.intersectionratio // entry.intersectionrect // entry.isintersecting // entry.rootbounds // entry.target // entry.time }); }; the list of entries received by the callback includes one entry for each target which reporting a change in its intersection status.
... thresholds rather than reporting every infinitesimal change in how much a target element is visible, the intersection observer api uses thresholds.
InterventionReportBody - Web APIs
the interventionreportbody interface of the reporting api represents the body of an intervention report (the return value of its report.body property).
... examples let options = { types: ['intervention'], buffered: true } let observer = new reportingobserver(function(reports, observer) { let firstreport = reports[0]; console.log(firstreport.type); // intervention console.log(firstreport.body.id); console.log(firstreport.body.message); console.log(firstreport.body.sourcefile); console.log(firstreport.body.linenumber); console.log(firstreport.body.columnnumber); }, options); specifications specification status com...
...ment reporting apithe definition of 'interventionreportbody' in that specification.
Inputs and input sources - Web APIs
see supporting advanced controllers and gamepads in webxr applications for more detailed information.
...see advanced controllers using the gamepad object below for further details on supporting these extra controls and buttons.
... for details on the gamepad mapping as well as the other differences how the use of the gamepad object and its children differs from its use in the gamepad api, see the article supporting advanced controllers and gamepads in webxr applications.
Using the Web Speech API - Web APIs
to run the demo, you can clone (or directly download) the github repo it is part of, open the html index file in a supporting desktop browser, or navigate to the live demo url in a supporting mobile browser like chrome.
... to run the demo, you can clone (or directly download) the github repo it is part of, open the html index file in a supporting desktop browser, or navigate to the live demo url in a supporting mobile browser like chrome, or firefox os.
...when speechsynthesis.pause() is invoked, this returns a message reporting the character number and name that the speech was paused at.
Implementing a Microsoft Active Accessibility (MSAA) Server - Accessibility
might be useful for supporting custom interfaces, need to research] objid_menu objid_queryclassnameidx objid_sizegrip objid_sound objid_sysmenu objid_titlebar objid_vscroll objid_window [important, but implemented automatically by microsoft windows.
... solution: this may be because you are reporting that the events in a different window from the current system focus.
...implement only what's needed -- supporting everything would take too long for zero results.
<input type="month"> - HTML: Hypertext Markup Language
WebHTMLElementinputmonth
as a result, supporting browsers will display an error if you try to submit a date that is outside the set bounds, or an empty date field.
...try playing with the example now: here's a screenshot for those of you who aren't using a supporting browser: here's the css used in the above example.
...as an example, the month picker on chrome for android looks like this: non-supporting browsers gracefully degrade to a text input, but this creates problems both in terms of consistency of user interface (the presented control will be different), and data handling.
Expect-CT - HTTP
the expect-ct header lets sites opt in to reporting and/or enforcement of certificate transparency requirements, to prevent the use of misissued certificates for that site from going unnoticed.
... ct requirements can be satisfied via any one of the following mechanisms: x.509v3 certificate extension to allow embedding of signed certificate timestamps issued by individual logs a tls extension of type signed_certificate_timestamp sent during the handshake supporting ocsp stapling (that is, the status_request tls extension) and providing a signedcertificatetimestamplist when a site enables the expect-ct header, they are requesting that the browser check that any certificate for that site appears in public ct logs.
... enforce optional signals to the user agent that compliance with the certificate transparency policy should be enforced (rather than only reporting compliance) and that the user agent should refuse future connections that violate its certificate transparency policy.
Optimizing startup performance - Web Performance
this article offers tips and suggestions to help you achieve that goal, both when writing a new app and when porting an app from another platform to the web.
... on the other hand, however, it can get tricky when you're porting an existing app to the web.
... porting issues once the initial loading is done and the app's main code starts to run, it's possible your app may necessarily be single-threaded,especially if it's a port.
WebAssembly Concepts - WebAssembly
(note that webassembly has the high-level goal of supporting languages with garbage-collected memory models in the future.) with the advent of webassembly appearing in browsers, the virtual machine that we talked about earlier will now load and run two types of code — javascript and webassembly.
...right now, there are four main entry points: porting a c/c++ application with emscripten.
... let’s talk about these options: porting from c/c++ two of the many options for creating wasm code are an online wasm assembler or emscripten.
2015 MDN Fellowship Program - Archive of obsolete content
fellows are responsible for obtaining their own visas if any are required (mozilla will provide reasonable supporting documentation).
...the fellow is responsible for any related visas (mozilla can provide any necessary supporting documentation).
Module structure of the SDK - Archive of obsolete content
to import a local module, specify a path relative to the importing module.
... to import external modules, treat them like local modules: copy them somewhere under your add-ons "lib" directory and reference them with a path relative to the importing module.
XUL Migration Guide - Archive of obsolete content
example: porting the library detector porting the library detector walks through the process of porting a xul-based add-on to the sdk.
... it's a very simple add-on and a good candidate for porting because there are suitable sdk apis for all its features.
Add-on SDK - Archive of obsolete content
xul migration a guide to porting xul add-ons to the sdk.
... this guide includes a comparison of the two toolsets and a working example of porting a xul add-on.
How to convert an overlay extension to restartless - Archive of obsolete content
this tutorial was originally written by dave garrett from his experience porting the flagfox extension.
... another real-world example of porting overlay-based extension into restartless (git diff).
Inner-browsing extending the browser navigation paradigm - Archive of obsolete content
html and web standards have evolved and now offer flexible and fine-grained control to layout as well supporting dhtml, powerful programming languages like javascript, and additional media through embeddable third-party resources like flash, java, vrml, etc.
... additionally, server-side technologies have also evolved, supporting and connecting different resources to different browsers.
No Proxy For configuration - Archive of obsolete content
pac is written in js, so there are potential problems with feature consistency and porting.
...the pac in c++ has not been tested in mozilla, so porting pac in c++ forward would not be a panacea.
Mozilla Application Framework in Detail - Archive of obsolete content
imagine not having to re-write your application 3 times, or not supporting a less popular platform simply because you do not have the resources for parallel development!
...supporting gecko technologies provide a complete set of resources for efficient development, including full support of web standards, a cross-platform/cross-device user interface language, an extensible architecture and embedding technologies.
Skinning XUL Files by Hand - Archive of obsolete content
to keep your xul looking consistent and to avoid breaking skins altogether (when your styles have some dependency on a part of the global skin that changes, such as an image), use the style rules in the global skin by importing it into your stylesheet with the following instruction: @import url("chrome://global/skin/"); refer to the document writing skinnable xul and css for guidelines on how to make your skins friendly to the global skin, to xul, and to mozilla.
...in the next few sections, you will be importing this style information into a custom stylesheet and extending it with new style rules for your xul.
Writing Skinnable XUL and CSS - Archive of obsolete content
skin files that don't import any other skin files, but that are only intended to be used in the context of another component's skin are also considered derived skin files, since they are implicitly importing information from the other component's skin.
...for example, all xul files that describe windows in the navigator package should contain a line explicitly importing navigator.css.
Using IO Timeout And Interrupt On NT - Archive of obsolete content
so we can't go this route as long as we are supporting nt 3.51.
...when we stop supporting nt 3.51, we can look into using nt 4's <tt>cancelio()</tt> function to cancel outstanding overlapped io requests when we get io timeout or interrupt errors.
Gecko FAQ - Gecko Redirect 1
oems and contributors from the net participating in mozilla.org are porting gecko to other platforms.
... such porting efforts are underway for solaris, hp/ux, aix, irix, os/2, openvms, beos, and amiga, among others.
MDN Web Docs Glossary: Definitions of Web-related terms
ocode public-key cryptography python q quality values quaternion quic r rail random number generator raster image rdf real user monitoring (rum) recursion reference reflow regular expression rendering engine repo reporting directive request header resource timing response header responsive web design rest rgb ril robots.txt round trip time (rtt) routers rss rtcp (rtp control protocol) rtf rtl (right to left) rtp (real-time transport protocol) and srtp (secure rtp) rtsp: rea...
...l-time streaming protocol ruby s safe same-origin policy scm scope screen reader script-supporting element scroll container scrollport sctp sdp search engine second-level domain secure sockets layer (ssl) selector (css) self-executing anonymous function semantics seo serialization server server timing session hijacking sgml shadow tree shim signature signature (functions) signature (security) simd simple header simple response header sisd site site map sld sloppy...
Flexbox - Learn web development
not supporting flexbox features however will probably break a layout completely, making it unusable.
... previous overview: css layout next in this module introduction to css layout normal flow flexbox grid floats positioning multiple-column layout responsive design beginner's guide to media queries legacy layout methods supporting older browsers fundamental layout comprehension assessment ...
Floats - Learn web development
assuming you have a supporting browser, the box will clear.
... previous overview: css layout next in this module introduction to css layout normal flow flexbox grid floats positioning multiple-column layout responsive design beginner's guide to media queries legacy layout methods supporting older browsers fundamental layout comprehension assessment ...
Web fonts - Learn web development
if you are importing multiple weights of the same font, you can specify what their weight/style is and then use different values of font-weight/font-style to choose between them, rather than having to call all the different members of the font family different names.
...in newer browsers, you can also specify a unicode-range value, which is a specific range of characters you want to use out of the web font — in supporting browsers, only the specified characters will be downloaded, saving unnecessary downloading.
What do common web layouts contain? - Learn web development
because the image on the top-right is l-shaped, because b1 looks like a column supporting the shifted main content, and because the "m" and "i" of the mica logo create a vertical line of force.
... this is a good example of a classic layout supporting some design creativity.
The HTML5 input types - Learn web development
here's a live example that falls back to <select> elements in non-supporting browsers: let's look at the different available types in brief.
... the reference pages linked to above provide suggestions on how to program fallbacks for non-supporting browsers; another option is to consider using a javascript library to provide a date picker.
Other form controls - Learn web development
" name="myfruit" id="myfruit" list="mysuggestion"> <datalist id="mysuggestion"> <option>apple</option> <option>banana</option> <option>blackberry</option> <option>blueberry</option> <option>lemon</option> <option>lychee</option> <option>peach</option> <option>pear</option> </datalist> datalist support and fallbacks almost all browsers support datalist, but if you are still supporting older browsers such as ie versions below 10, there is a trick to provide a fallback: <label for="myfruit">what is your favorite fruit?
... <progress max="100" value="75">75/100</progress> this is for implementing anything requiring progress reporting, such as the percentage of total files downloaded, or the number of questions filled in on a questionnaire.
Responsive images - Learn web development
at this point, if a supporting browser with a viewport width of 480px loads the page, the (max-width: 600px) media condition will be true, and so the browser chooses the 480px slot.
... resolution switching: same size, different resolutions if you're supporting multiple display resolutions, but everyone sees your image at the same real-world size on the screen, you can allow the browser to choose an appropriate resolution image by using srcset with x-descriptors and without sizes — a somewhat easier syntax!
Getting started with React - Learn web development
we don't write a path or extension when importing the react module — this is not a local file; instead, it is listed as a dependency in our package.json file.
...// learn more about service workers: https://bit.ly/cra-pwa serviceworker.unregister(); as with app.js, the file starts by importing all the js modules and other assets it needs to run.
Mozilla accessibility architecture
we will not rule out the possibility of supporting some of the rich atk interfaces on windows.
...on windows, we solve this by supporting an additional interface beyond msaa's iaccesible, for every dom node.
Accessible Toolkit Checklist
for example, a unique child id would be required for each tree item supporting the most important basic iaccessible events get_accparent: get the parent of an iaccessible.
... supporting the basic msaa states on every item: unavailable, focused, readonly, offscreen, focusable to avoid extra work, utilize implementing an msaa server mnemonics ability to define in xml for any widget with a text label (via attribute or a preceding char in label) automatically define mnemonics for all standard common dialogs (like yes/no confirmations and retry/exit e...
Adding phishing protection data providers
optional preferences browser.safebrowsing.provider.idnum.reporturl an url used for reporting when users visit phishing pages and whether or not they decided to heed the warning or to ignore it.
... browser.safebrowsing.provider.idnum.reportgenericurl not currently used; intended for use in reporting other issues with the phishing protection service.
The Firefox codebase: CSS Guidelines
when importing your stylesheets, it's best to import the content css before the theme css, that way the theme values get to override the content values (which is probably what you want), and you're going to want them both after the global values, so your imports will look like this: <?xml-stylesheet href="chrome://global/skin/global.css" type="text/css"?> <?xml-stylesheet href="chrome://browser/content/path/mo...
... hdpi support it's recommended to use svg since it keeps the css clean when supporting multiple resolutions.
How to get a stacktrace for a bug report
seamonkey and thunderbird also support crash reporting.
... if breakpad successfully sends the crash report to the reporting server then, by default, the files added to the 'pending' subdirectory for the crash are removed, and a .txt file is placed in the 'submitted' directory containing the crash id created by the reporting server.
How to Report a Hung Firefox
if that's not you, or you just want to fix a firefox hang without reporting it, see firefox hangs or is not responding - how to fix.
... (if you're experiencing high cpu usage and firefox eventually recovers from a hang, you should try the instructions at reporting a performance problem instead.) is the rest of your system busy (high cpu or memory usage, or high disk activity)?
Using JavaScript code modules
any javascript item named in exported_symbols will be exported from the module and injected into the importing scope.
... importing commonjs modules the javascript code modules described here are not the same thing as commonjs modules, but you can import commonjs modules into any scope where you can use components.utils.import.
JavaScript code modules
assert.jsm implements the commonjs unit testing specification version 1.1, which provides a basic standardized interface for performing in-code logical assertions with optional, customizable error reporting.
... bookmarkhtmlutils.jsm provides utility functions for importing and exporting bookmarks from the old-school "bookmarks.html" style bookmark files.
Application Translation with Mercurial
exporting the changes as patch a patch is a file containing recorded changes to a repository.
...if you find that changes have to be done, edit the real aboutprivatebrowsing.dtd file from the localization repository, save it and follow the steps from exporting the changes as patch (see above).
DMD
64 x 37,925; 48 x 78,392; 32 x 136,199; 16 x 31,001; 8 x 4,706 3.78% of the heap (10.24% cumulative) 21.24% of unreported (57.53% cumulative) allocated at { #01: (no stack trace recorded due to --stacks=partial) } } in contrast, stack traces are always recorded when a block is reported, which means you can end up with records like this where the allocation point is unknown but the reporting point is known: once-reported { 104,491 blocks in heap block record 13 of 4,689 10,392,000 bytes (10,392,000 requested / 0 slop) individual block sizes: 512 x 124; 256 x 242; 192 x 813; 128 x 54,664; 64 x 48,648 1.35% of the heap (48.65% cumulative) 1.64% of once-reported (59.18% cumulative) allocated at { #01: (no stack trace recorded due to --stacks=partial) } reported at {...
...see performance/memory_reporting for more details about how memory reporters are written.
Profiling with the Firefox Profiler
reporting a performance problem has a step-by-step guide for obtaining a profile when requested by firefox developers.
... a profile reporting that a large portion is spent in "unknown" code indicates that the area being executed doesn't have any sample labels.
Dynamic Library Linking
dynamic library search path exporting symbols from the main executable program dynamic library search path the dynamic library search path is the list of directories in which to look for a dynamic library.
... exporting symbols from the main executable program on some systems, symbols defined in the main executable program are not exported by default.
Introduction to NSPR
nspr does not provide a platform for porting existing code.
...this puts them at some risk in supporting arbitrary code, even if the code is interpreted (java).
An overview of NSS Internals
nss prefers the binary presentation, but is often capable to use base64 or ascii presentations, especially when importing data from files.
...you should assign a good nickname to a certificate when importing it, making it easier for you to refer to it later.
NSS 3.12.4 release notes
nss bug 483653: unable to build certutil.exe for fennec/wince bug 485145: miscellaneous crashes in signtool on windows bug 485155: nss_enable_pkix_verify=1 causes sec_error_unknown_issuer errors bug 485527: rename the _x86_ macro in lib/freebl bug 485658: vfychain -p reports revoked cert bug 485745: modify fipstest.c to support cavs 7.1 drbg testing bug 486304: cert7.db/cert8.db corruption when importing a large certificate (>64k) bug 486405: allocator mismatches in pk12util.c bug 486537: disable execstack in freebl x86_64 builds on linux bug 486698: facilitate the building of major components independently and in a chain manner by downstream distributions bug 486999: calling ssl_setsockpeerid a second time leaks the previous value bug 487007: make lib/jar conform to nss coding style bug 487162: ...
...bug 488550: crash in certutil or pp when printing cert with empty subject name bug 488992: fix lib/freebl/win_rand.c warnings bug 489010: stop exporting mktemp and dbopen (again) bug 489287: resolve a few remaining issues with nss's new revocation flags bug 489710: byteswap optimize for msvc++ bug 490154: cryptokey framework requires module to implement generatekey when they support keypairgeneration bug 491044: remove support for vms (a.k.a., openvms) from nss bug 491174: cert_pkixverifycert reports wrong error code when ee cert is expired bug 4...
NSS 3.16.2.2 release notes
this fixes a regression introduced in nss 3.16.2 that prevented nss from importing some rsa private keys (such as in pkcs #12 files) generated by other crypto libraries.
... bugs fixed in nss 3.16.2.2 bug 1049435 - importing an rsa private key fails if p < q compatibility nss 3.16.2.2 shared libraries are backward compatible with all older nss 3.x shared libraries.
NSS 3.16.6 release notes
this fixes a regression introduced in nss 3.16.2 that prevented nss from importing some rsa private keys (such as in pkcs #12 files) generated by other crypto libraries.
... bugs fixed in nss 3.16.6 bug 1049435 - importing an rsa private key fails if p < q compatibility nss 3.16.6 shared libraries are backward compatible with all older nss 3.x shared libraries.
Python binding for NSS
nss provides cryptography services supporting ssl, tls, pki, pkix, x509, pkcs*, etc.
...importing into a nss database would sometimes fail or segfault.
NSPR functions
nss uses nspr internally as the porting layer.
... pr_cleanup error reporting nss uses nspr's thread-specific error code to report errors.
NSS environment variables
nss_shared_db 3.12 nss_disable_arena_free_list string (any non-empty value) define this variable to get accurate leak allocation stacks when using leak reporting software.
...necessary on some platforms to get correct function names when using leak reporting software.
sslfnc.html
however, these settings control the behavior of pr_connect and pr_accept only; if you don't call one of those functions after importing a non-ssl socket with ssl_import (as in the case of an already established tcp connection), ssl still needs to know whether the application is functioning as a client or server.
...however, these settings control the behavior of pr_connect and pr_accept only; if you don't call one of those functions after importing a non-ssl socket with ssl_import (as in the case of an already established tcp connection), ssl still needs to know whether the application is functioning as a client or server.
NSS_3.12.3_release_notes.html
nstructions for bignum are not implemented on windows 32-bit bug 441321: tolerate incorrect encoding of dsa signatures in ssl 3.0 handshakes bug 444404: libpkix reports unknown issuer for nearly all certificate errors bug 452391: certutil -k incorrectly reports ec private key as an orphan bug 453234: support for seed cipher suites to tls rfc4010 bug 453364: improve pk11_cipherop error reporting (was: pk11_createcontextbysymkey returns null bug 456406: slot list leaks in symkeyutil bug 461085: rfe: export function cert_comparecerts bug 462293: crash on fork after softoken is dlclose'd on some unix platforms in nss 3.12 bug 463342: move some headers to freebl/softoken bug 463452: sql db creation does not set files protections to 0600 bug 463678: need to add rpath to 64-bit lib...
... bug 466736: incorrect use of nss_use_64 in lib/libpkix/pkix_pl_nss/system/pkix_pl_object.c bug 466745: random number generator fails on windows ce bug 467298: sql db code uses local cache on local file system bug 468279: softoken crash importing email cert into newly upgraded db bug 468532: trusted ca trust flags not being honored in cert_verifycert bug 469583: coverity: uninitialized variable used in sec_pkcs5createalgorithmid bug 469944: when built with microsoft compilers bug 470351: crlutil build fails on windows because it calls undeclared isatty bug 471539: stop honoring digital signatures in certificates and crls based o...
NSS Tools certutil-tasks
nss security tools: certutil tasks newsgroup: mozilla.dev.tech.crypto task list better error reporting.
... support importing keys from a file.
Index
433 js_reporterror jsapi reference, spidermonkey js_reporterror is the simplest jsapi function for reporting errors.
... 455 js_seterrorreporter jsapi reference, spidermonkey js_seterrorreporter enables you to define and use your own error reporting mechanism in your applications.
JS_GetInstancePrivate
args js::callargs * optional argument, used for error reporting.
... added in spidermonkey 32 argv jsval * optional argument vector, used for error reporting.
JS_ReportError
create a formatted error or warning message to pass to a user-defined error reporting function.
... description js_reporterror is the simplest jsapi function for reporting errors.
WebReplayRoadmap
new features are possible with time travel, though, which would be nice to support: supporting the debugger's event breakpoints would allow searching the recording for places where particular dom events occur, and -- in the same manner as logpoints -- logging them to the console and allowing them to be seeked to later.
... still, porting it to other posix systems (linux, android) will be easier than windows, due to the overlap with macos.
Places Developer Guide
importing: importhtmlfromfile (nsilocalfile afile, boolean aisinitialimport) - this imports all the bookmarks in the specified file into the current bookmarks collection.
...exporting: exporthtmltofile (nsilocalfile afile) - this exports all bookmarks in the toolbar, menu and unfiled bookmarks folders into the specified file.
Components.utils.exportFunction
to understand what happens if the functions you export accept arguments, see exporting functions that take arguments below.
... exporting functions that take arguments until firefox 34, any arguments that the function takes are structured-cloned across the security boundary unless they are native objects such as dom nodes.
Components.utils.import
example components.utils.import("resource://gre/modules/xpcomutils.jsm", this); difference from mozijssubscriptloader the differences from mozijssubscriptloader: the behavior when importing/loading the same code from different locations: the subscript loader evaluates the specified code each time it is invoked, with the caller's global object.
... additional resources components.utils bug 238324 the documentation in xpccomponents.idl the tests in js/xpconnect/tests/unit/ importing sdk/commonjs modules into other code ...
Components.utils.importGlobalProperties
each string is the name of an object to import, and will be defined on the importing scope's global.
...knowing that, we can just get a valid blob by importing a known module that has the objects, such as services.jsm const {blob, file, services} = cu.import("resource://gre/modules/services.jsm", {}); reference: stackoverflow :: use blob on firefox add-on hiddendomwindow the hidden domwindow has all of these objects automatically imported.
nsIChromeFrameMessageManager
removedelayedframescript() removes a script from the list of scripts supporting delayed load.
... void removedelayedframescript( in astring aurl ); parameters aurl the url of the script to remove from the list of scripts supporting delayed load.
nsIDOMWindow
when setting this attribute, an ns_error_not_implemented error may be returned by implementations not supporting zoom.
... this attribute should always return 1.0 for implementations not supporting text zoom.
nsIDocShell
when setting this attribute, a ns_error_not_implemented error may be returned by implementations not supporting zoom.
... implementations not supporting zoom should return 1.0 all the time for the get operation.
XPCOM
porting this code is required in order to make mozilla run on any given platform.xptcall porting guideoriginal author: john bandhauer, 31 may 1999.xptcall porting statusthis is a status page for the multiplatform porting of xptcall.
... xptcall has a faq and a porting guide.
Working with windows in chrome code
the importing scope will have access to the objects and data in the code module.
... the scope is shared between modules and the importing scope, so you have to worry about name collisions.
RTCIceCandidatePairStats - Web APIs
in addition, it adds the following new properties: availableincomingbitrate optional provides an informative value representing the available inbound capacity of the network by reporting the total number of bits per second available for all of the candidate pair's incoming rtp streams.
... availableoutgoingbitrate optional provides an informative value representing the available outbound capacity of the network by reporting the total number of bits per second available for all of the candidate pair's outoing rtp streams.
Report.body - Web APIs
WebAPIReportbody
examples let options = { types: ['deprecation'], buffered: true } let observer = new reportingobserver(function(reports, observer) { let firstreport = reports[0]; // log the first report's report body, i.e.
... a deprecationreportbody object console.log(firstreport.body); }, options); specifications specification status comment reporting apithe definition of 'report.body' in that specification.
Report.type - Web APIs
WebAPIReporttype
examples let options = { types: ['deprecation'], buffered: true } let observer = new reportingobserver(function(reports, observer) { let firstreport = reports[0]; // log the first report's report type, i.e.
... "deprecation" console.log(firstreport.type); }, options); specifications specification status comment reporting apithe definition of 'report.body' in that specification.
Report.url - Web APIs
WebAPIReporturl
examples let options = { types: ['deprecation'], buffered: true } let observer = new reportingobserver(function(reports, observer) { let firstreport = reports[0]; // log the url of the document that generated the first report // e.g.
... "https://www.example.com/cats.html" console.log(firstreport.url); }, options); specifications specification status comment reporting apithe definition of 'report.url' in that specification.
WebRTC API - Web APIs
adapter.js uses shims and polyfills to smooth over the differences among the webrtc implementations across the environments supporting it.
... resources protocols webrtc-proper protocols application layer protocol negotiation for web real-time communications webrtc audio codec and processing requirements rtcweb data channels rtcweb data channel protocol web real-time communication (webrtc): media transport and use of rtp webrtc security architecture transports for rtcweb related supporting protocols interactive connectivity establishment (ice): a protocol for network address translator (nat) traversal for offer/answer protocol session traversal utilities for nat (stun) uri scheme for the session traversal utilities for nat (stun) protocol traversal using relays around nat (turn) uniform resource identifiers an offer/answer model with session description protocol (sdp) sessi...
ARIA: listbox role - Accessibility
supporting this key is strongly recommended for lists with more than five options.
...supporting this key is strongly recommended for lists with more than five options.
Accessibility documentation index - Accessibility
the intention is to strike a balance between providing useful guidance on how to use the markup's intended meaning while supporting live regions as an area for screen readers to innovate and compete.
... 43 aria: complementary role aria, aria role, reference, role-complementary the complementary landmark role is used to designate a supporting section that relates to the main content, yet can stand alone when separated.
Using multi-column layouts - CSS: Cascading Style Sheets
excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum </div> css #column_gap { column-count: 5; column-gap: 2em; } result graceful degradation the column properties will just be ignored by non-columns-supporting browsers.
... therefore it's relatively easy to create a layout that will display in a single column in those browsers and use multiple columns in supporting browsers.
Backwards Compatibility of Flexbox - CSS: Cascading Style Sheets
feature queries and flexbox you can use feature queries to detect flexbox support: @supports (display: flex) { // code for supporting browsers } note that internet explorer 11 does not support feature queries yet does support flexbox.
...the following feature query would include uc browser, which supports feature queries and old flexbox syntax, prefixed: @supports (display: flex) or (display: -webkit-box) { // code for supporting browsers } for more information about using feature queries see using feature queries in css on the mozilla hacks blog.
repeating-radial-gradient() - CSS: Cascading Style Sheets
browsers supporting multi position color stops will display a red and green striped ellipse.
... browsers not supporting the syntax yet will see a gradient that goes from red to black and then from blue to green.
Writing Web Audio API code that works in every browser - Developer guides
if you're porting moderately "old" code (say, a year old) it's possible that it uses some methods that audiocontext-monkeypatch doesn't alias, because it helps you to write code in the new style.
...you can also check this article on porting which covers more cases and has many code samples.
Audio and Video Delivery - Developer guides
<audio controls> <source src="audiofile.mp3" type="audio/mpeg"> <source src="audiofile.ogg" type="audio/ogg"> <!-- fallback for non supporting browsers goes here --> <a href="audiofile.mp3">download audio</a> <object width="320" height="30" type="application/x-shockwave-flash" data="flashmediaelement.swf"> <param name="movie" value="flashmediaelement.swf" /> <param name="flashvars" value="controls=true&isvideo=false&file=audiofile.mp3" /> </object> </audio> the process is very similar with video — just remember to set i...
...license/key exchange is controlled by the application, facilitating the development of robust playback applications supporting a range of content decryption and protection technologies.
Content categories - Developer guides
script-supporting elements script-supporting elements are elements which don't directly contribute to the rendered output of a document.
... the script-supporting elements are: <script> <template> transparent content model if an element has a transparent content model, then its contents must be structured such that they would be valid html 5, even if the transparent element were removed and replaced by the child elements.
HTML5 Parser - Developer guides
WebGuideHTMLHTML5HTML5 Parser
in other words, in supporting html5, gecko, webkit, and internet explorer (ie) will behave more consistently with each other.
...in addition, supporting reparsing led to unnecessarily complex parsing code.
Introduction to HTML5 - Developer guides
however, gecko, and by extension, firefox, has very good support for html5, and work continues toward supporting more of its features.
... gecko began supporting some html5 features in version 1.8.1.
disabled - HTML: Hypertext Markup Language
when a supporting element has the disabled attribute applied, the :disabled pseudo-class also applies to it.
... if present on a supporting elements, the :disabled pseudo class will match.
<template>: The Content Template element - HTML: Hypertext Markup Language
WebHTMLElementtemplate
content categories metadata content, flow content, phrasing content, script-supporting element permitted content no restrictions tag omission none, both the starting and ending tag are mandatory.
... permitted parents any element that accepts metadata content, phrasing content, or script-supporting elements.
Content Security Policy (CSP) - HTTP
WebHTTPCSP
enabling reporting by default, violation reports aren't sent.
... to enable violation reporting, you need to specify the report-uri policy directive, providing at least one uri to which to deliver the reports: content-security-policy: default-src 'self'; report-uri http://reportcollector.example.com/collector.cgi then you need to set up your server to receive the reports; it can store or process them in whatever manner you determine is appropriate.
CSP: report-to - HTTP
the content-security-policy report-to http response header field instructs the user agent to store reporting endpoints for an origin.
... csp version 1 directive type reporting directive this directive is not supported in the <meta> element.
Index - HTTP
WebHTTPHeadersIndex
51 report-to csp, http, report-to the report-to http response header field instructs the user agent to store reporting endpoints for an origin.
... 61 expect-ct http, reference, header the expect-ct header allows sites to opt in to reporting and/or enforcement of certificate transparency requirements, which prevents the use of misissued certificates for that site from going unnoticed.
X-Frame-Options - HTTP
note: the content-security-policy http header has a frame-ancestors directive which obsoletes this header for supporting browsers.
...in supporting legacy browsers, a page can be displayed in a frame only on the specified origin uri.
X-XSS-Protection - HTTP
header type response header forbidden header name no syntax x-xss-protection: 0 x-xss-protection: 1 x-xss-protection: 1; mode=block x-xss-protection: 1; report=<reporting-uri> 0 disables xss filtering.
... 1; report=<reporting-uri> (chromium only) enables xss filtering.
HTTP headers - HTTP
WebHTTPHeaders
expect-ct allows sites to opt in to reporting and/or enforcement of certificate transparency requirements, which prevents the use of misissued certificates for that site from going unnoticed.
... nel defines a mechanism that enables developers to declare a network error reporting policy.
String.prototype.replace() - JavaScript
only available in browser versions supporting named capturing groups.
... groups in browser versions supporting named capturing groups, will be an object whose keys are the used group names, and whose values are the matched portions (undefined if not matched).
The "codecs" parameter in common media types - Web media technologies
both video and audio tracks can be described using the codecs parameter with the following mime types: base mime types supporting the iso bmff codecs parameter mime type description audio/3gpp 3gp audio (rfc 3839: mime type registrations for 3rd generation partnership project (3gp) multimedia files) video/3gpp 3gp video (rfc 3839: mime type registrations for 3rd generation partnership project (3gp) multimedia files) audio/3gp2 3gp2 audio (rfc 4393: mime type registrations f...
...the table below provides a basic list of the audio object types and in the case of the more common object ypes provides a list of the profiles supporting it, but you should refer to the specification for details if you need to know more about the inner workings of any given mpeg-4 audio type.
OpenSearch description format
for details on how to implement search suggestion support on a server, see supporting search suggestions in search plugins.
... supporting automatic updates for opensearch plugins opensearch plugins can automatically update.
<xsl:import> - XSLT: Extensible Stylesheet Language Transformations
WebXSLTElementimport
generally speaking, the contents of the imported stylesheet have a lower import precedence than that of the importing stylesheet.
... type top-level, must appear before any other child of <xsl:stylesheet> or <xsl:transform> in the importing stylesheet.
Index - XSLT: Extensible Stylesheet Language Transformations
WebXSLTIndex
9 introduction gecko, intro, javascript, xslt with modern browsers supporting xslt, developers can now use javascript to access the power that xslt provides.
...generally speaking, the contents of the imported stylesheet have a lower import precedence than that of the importing stylesheet.
Contributor's Guide - Archive of obsolete content
unfortunately, javascript does not yet have native support for modules: it has to rely on the host application to provide it with functionality such as loading subscripts, and exporting/ importing names.
Working with Events - Archive of obsolete content
for example, the following add-on registers a listener with the tabs module to listen for the ready event, and logs a string to the console reporting the event: var tabs = require("sdk/tabs"); tabs.on("ready", function () { console.log("tab loaded"); }); it is not possible to enumerate the set of listeners for a given event.
Guides - Archive of obsolete content
porting example a walkthrough of porting a relatively simple xul-based add-on to the sdk.
simple-prefs - Archive of obsolete content
sometimes you might need to use a different branch, especially if you are porting an add-on to the sdk.
widget - Archive of obsolete content
parameters options : object required options: name type label string a string description of the widget used for accessibility, title bars, and error reporting.
loader/sandbox - Archive of obsolete content
evaluate code module provides evaluate function that lets you execute code in the given sandbox: evaluate(scope, 'var a = 5;'); evaluate(scope, 'a + 2;'); //=> 7 more details about evaluated script may be passed via optional arguments that may improve exception reporting: // evaluate code as if it was loaded from 'http://foo.com/bar.js' and // start from 2nd line.
cfx to jpm - Archive of obsolete content
in jpm, we've removed support for some of these fields, and are still working on supporting some others.
jpm - Archive of obsolete content
supporting updates for self-hosted add-ons this feature is only supported from jpm 1.0.3 onwards.
Chrome Authority - Archive of obsolete content
for example, none of the following code will be matched by the manifest scanner, leading to exceptions at runtime, when the require() call is prohibited from importing the named modules: // all of these will fail!
Creating Event Targets - Archive of obsolete content
however: we're now importing from four modules: event/core gives us emit(): note that we don't need on, once, or off, since we will use eventtarget for adding and removing listeners event/target gives us eventtarget, which implements the interface for adding and removing listeners core/heritage gives us class(), which we can use to inherit from eventtarget util/object gives us merge(), which just simplifies se...
Getting started (cfx) - Archive of obsolete content
to build an xpi, just execute the command cfx xpi from the add-on's directory: cfx xpi you should see a message like: exporting extension to my-addon.xpi.
Modules - Archive of obsolete content
some simple code to turn a javascript module into non-mozilla-specific code (e.g., if porting to the browser).
View Source for XUL Applications - Archive of obsolete content
importing gviewsourceutils xul applications wanting to show the source code for documents should import the viewsourceutils.js script instead of attempting to open the viewsource.xul window themselves: <script type="application/javascript" src="chrome://global/content/viewsourceutils.js"/> viewsourceutils.js exposes a gviewsourceutils global into the scope of the window that imports that script.
Adding Toolbars and Toolbar Buttons - Archive of obsolete content
the way icons are handled in firefox changed considerably after firefox 4, so supporting older versions is not mentioned here (you can check this document's change history for older revisions, though).
JavaScript Object Management - Archive of obsolete content
we only need to define them when we're making windows of our own, or when we're working with code outside of the chrome (or porting your code to seamonkey, which doesn't have those constants declared in the main window).
Session store API - Archive of obsolete content
one key scenario in which supporting this feature can be crucial for an extension: firefox 2 lets users undo the closing of tabs.
Setting up an extension development environment - Archive of obsolete content
useful for testing debug symbols and the crash reporting system (firefox and thunderbird) javascript object examiner displays javascript object methods and properties for any available scope developer profile and devprefs sets up the development environment described above when installed (firefox and fennec) firefox extension proxy file extension files are normally installed in the user profile.
Updating addons broken by private browsing changes - Archive of obsolete content
the supporting per-window private browsing article explains further about the equivalent notifications, which are all backwards compatible through to firefox 12 (and are sent side-by-side with the global private browsing notifications in older versions).
MMgc - Archive of obsolete content
this approach was not chosen for the following reasons: coordinating the marking thread and the main thread will require locking and may suffer due to lock overhead/contention supporting mac classic's cooperative threads makes this approach harder flash's frame based architecture gives us a very natural place to do this work we have better control over how much time is spent marking without threads when smp systems become more prevalent it may be worth investigating this approach because true parallelism may afford better performance.
Images, Tables, and Mysterious Gaps - Archive of obsolete content
should this property be adopted, then any browser supporting it could emulate traditional "shrinkwrap" behavior without risking other layout upset with the following rule: td {line-box-contain: font replaced;} /* proposed for css3 */ there are other possible fixes contained within the current css3 working drafts, such as line-height-policy.
Source Navigator - Archive of obsolete content
one can check whether the installation is complete by executing: $ which snavigator /usr/bin/snavigator importing the source execute the following: snavigator.
Working with BFCache - Archive of obsolete content
q: when a user clicks a link that replaces the view in the current tab with a new page, what is the fate of the nsidomwindow supporting the view they click on?
Structure of an installable bundle - Archive of obsolete content
chrome.manifest, components, defaults) in bootstrapped extensions are not processed by a supporting application.
Error Console - Archive of obsolete content
the error console is a tool available in most mozilla-based applications that is used for reporting errors in the application chrome and in web pages user opens.
Exception logging in JavaScript - Archive of obsolete content
exception reporting in firefox 3 firefox 3 improves reporting of unhandled exceptions by establishing a set of rules that determines whether or not an exception is worth reporting: any methods on interfaces annotated with the [function] attribute in idl (see, for example, nsidomeventlistener) that throw exceptions always report those exceptions into the error console.
External CVS snapshots in mozilla-central - Archive of obsolete content
such changes will get overwritten without warning on importing the next updated version.
Building Firefox with Rust code - Archive of obsolete content
if your crate has optional features that aren't normally turned on, you are strongly encouraged to remove dependencies for those features when importing code so the build system doesn't require that (unused) code to live in-tree.
Document Loading - From Load Start to Finding a Handler - Archive of obsolete content
supporting roles necko this is the mozilla networking library.
Downloading Nightly or Trunk Builds - Archive of obsolete content
the same machines produce about every 24 hours a "nightly" build which can be downloaded by anyone if you know where to get it: these are the nightly builds, and testers all over the world download them and test them, reporting as they go along on any bugs that hit them.
Layout System Overview - Archive of obsolete content
the idea of supporting a non-visual presentation is interesting.
JavaScript crypto - Archive of obsolete content
services are provided to enable: smart card events, generating certificate requests, importing user certs, generating random numbers, logging out of your tokens, and signing text.
Twitter - Archive of obsolete content
list methods, spam reporting methods, and oauth are not currently supported.
Mozilla Crypto FAQ - Archive of obsolete content
for information on notification requirements related to the export of open source encryption source code, see the export administration regulations, in particular part 740, sections 740.13(e), "unrestricted encryption source code", and 740.17(g), "reporting requirements".
Plug-n-Hack - Archive of obsolete content
plug-n-hack topics phase 1 this provides simplified integration and allows tools to advertize their capabilities to browsers phase 2 this will allow browsers to advertize their capabilities to security tools tools supporting pnh the browsers and tools known to support or be working on support for pnh get involved how to implement pnh in your tool or get involved with pnh development ...
Extensions - Archive of obsolete content
see the prism main window xul file for the actual structure: webrunner.xulporting an existing extension since there aren't many extensions designed explicitly for prism, you may need to port your favorite extensions.
Tamarin build documentation - Archive of obsolete content
importing the project into eclipse file >> import >> general >> existing projects into workspace click next the root directory should be the full path to your top-level tamarin-redux directory ensure the 'avmshell-project' project is checked in the 'projects' list uncheck 'copy projects into workspace' click finish building in eclipse 8 build configurations are included for macos with the gcc 4.
Using XPInstall to Install Plugins - Archive of obsolete content
porting smartupdate deployments to xpinstall is trivial after gaining some familiarity with the new xpinstall api.
registerChrome - Archive of obsolete content
in this case, registerchrome is supporting the old format of installation archives, in which the manifest.rdf file was always located at the highest level of the installation archive.
Learn XPI Installer Scripting by Example - Archive of obsolete content
"program" represents the directory where software itself is installed (e.g., c:\program files\ on win32 systems), as opposed to supporting directories like "components", "chrome", or "temporary" (see getfolder in the xpinstall api reference for a list of keywords).
A XUL Bestiary - Archive of obsolete content
in general, chrome refers to a xul interface and all of its supporting files; chrome means the xul content and structure, plus the css skin, plus whatever localization and platform-specific files are part of that xul interface.
Index - Archive of obsolete content
ArchiveMozillaXULIndex
it is used when supporting temporary popup displays for selecting or entering data.
Namespaces - Archive of obsolete content
it holds and allows disambiguation of items having the same name." if you are familiar with c++ namespaces, java packages, perl packages, or python module importing, you are already familiar with the namespace concept.
Panels - Archive of obsolete content
it is used when supporting temporary popup displays for selecting or entering data.
Adding Style Sheets - Archive of obsolete content
importing style sheets we've already seen how to import style sheets for use.
XUL Application Packaging - Archive of obsolete content
example: enableprofilemigrator=1 the [crash reporting] section using crash reporting in a xulrunner application ...
Gecko Compatibility Handbook - Archive of obsolete content
using the appropriate doctype in an html document allows a web page author to continue to support the older, less compliant browsers while also supporting the newer, more compliant browsers by specifiying special quirks mode layout via the doctype.
Mozilla release FAQ - Archive of obsolete content
you could tackle: porting mozilla to the os you use work on moving #ifdef platform to #ifdef feature/bug if you're on unix, port mozilla to the toolkit you prefer modularize/clean up apis fix bugs work on the expermental features (mail/news, aurora, nglayout) add new things: make opendoc and ole nglayout controls write new skins (see themes.org) add preference interfaces for the hidden f...
2006-11-03 - Archive of obsolete content
announcements a change in tp2's numbers on october 31st adam guthrie announced that: rob helmer will be adding his patch to fix tp2's reporting of average pre-load times.
2006-10-13 - Archive of obsolete content
test importing and exporting sunbird calendars to/from other calendar applications.
2006-10-20 - Archive of obsolete content
problem with creating / updating / exporting events how to add/update events in "home" calendar meetings planning the next calendar release meet regarding the views of next calendar release.
2006-10-27 - Archive of obsolete content
discussions importing outlook address files a discussion was started to attempt the export of outlook datae from ms outlook.
Plugins - Archive of obsolete content
supporting private browsing in plugins firefox 3.5 introduced support for private browsing; learn how to make your plugin respect the user's privacy wishes.
Introduction to Public-Key Cryptography - Archive of obsolete content
certificates are one way of supporting authentication.
TCP/IP Security - Archive of obsolete content
this layer provides connection-oriented or connectionless services for transporting application layer services between networks.
Common Firefox theme issues and solutions - Archive of obsolete content
change the style rules: .playbutton[paused] {...} .mutebutton[muted] {...} to: .playbutton[paused="true"] {...} .mutebutton[muted="true"] {...} error console warnings unknown namespace for videocontrols.css the error console is reporting the following issue: warning: unknown namespace prefix 'html'.
Theme changes in Firefox 3.5 - Archive of obsolete content
supporting 3.5 features video/audio player: controlbar has to be styled (chrome://global/skin/media/videocontrols.css) shadow effect for disabled text using text-shadow.
-moz-text-blink - Archive of obsolete content
firefox, which was the only major browser supporting it, dropped support for this property in firefox 26.
Namespaces - Archive of obsolete content
qname is a global constructor available in javascript implementations supporting e4x.
XForms - Archive of obsolete content
this extension, while supporting a significant subset of the xforms 1.0 and 1.1 candidate recommendations, is not actively maintained any more since about 2010.
Choosing Standards Compliance Over Proprietary Practices - Archive of obsolete content
by integrating and supporting the accessibility guidelines, an organization can offer their product lines or services to a larger and more diverse user base.
The Business Benefits of Web Standards - Archive of obsolete content
comporting with the relevant legislation in the jurisdiction is an important driver particularly for developers who wish to access public funds, or who work with charities and other socially responsible organisations.
XUL Booster - Archive of obsolete content
it supports exporting xpi files or registering a file system based project.
Index - Game development
28 efficient animation for web games animation, games, javascript this article covers techniques and advice for creating efficient animation for web games, with a slant towards supporting lower end devices such as mobile phones.
Game distribution - Game development
tizen is also putting a high value on supporting apps written in javascript.
3D games on the Web - Game development
the main browsers are all supporting webgl and all you need to focus on is optimizing the performance on the devices you use.
Implementing controls using the Gamepad API - Game development
opera supports the api in version 22+ (not surprising given that they now use chrome's blink engine.) and microsoft implemented support for the api in edge recently, which means four main browsers now supporting the gamepad api.
Efficient animation for web games - Game development
this article covers techniques and advice for creating efficient animation for web games, with a slant towards supporting lower end devices such as mobile phones.
Techniques for game development - Game development
efficient animation for web games this article covers techniques and advice for creating efficient animation for web games, with a slant towards supporting lower end devices such as mobile phones.
Tools for game development - Game development
this is a great tool for porting applications to the web!
Adobe Flash - MDN Web Docs Glossary: Definitions of Web-related terms
adobe flash can run from supporting web browsers via a browser plug-in.
Apple Safari - MDN Web Docs Glossary: Definitions of Web-related terms
learn more general knowledge safari on wikipedia safari on apple.com technical information the webkit project webkit nightly build reporting a bug for safari ...
Effective connection type - MDN Web Docs Glossary: Definitions of Web-related terms
to see your effective connection type, open the console of the developer tools of a supporting browser and enter the following: navigator.connection.effectivetype; see also: network information api networkinformation networkinformation.effectivetype ...
FTU - MDN Web Docs Glossary: Definitions of Web-related terms
timezone, wifi details, default language, importing contacts), or take the "phone tour" to find out more about your device.
Gecko - MDN Web Docs Glossary: Definitions of Web-related terms
this means that gecko includes, among other things, a networking stack, graphics stack, layout engine, a javascript virtual machine, and porting layers.
Gonk - MDN Web Docs Glossary: Definitions of Web-related terms
gonk is a porting target of gecko (just as gecko has been ported to os x, windows, and android).
Navigation directive - MDN Web Docs Glossary: Definitions of Web-related terms
learn more https://www.w3.org/tr/csp/#directives-navigation other kinds of directives: fetch directive document directive reporting directive block-all-mixed-content upgrade-insecure-requests require-sri-for trusted-types content-security-policy ...
SMTP - MDN Web Docs Glossary: Definitions of Web-related terms
primary complications include supporting various authentication mechanisms (gssapi, cram-md5, ntlm, msn, auth login, auth plain, etc.), handling error responses, and falling back when authentication mechanisms fail (e.g., the server claims to support a mechanism, but doesn't).
Synthetic monitoring - MDN Web Docs Glossary: Definitions of Web-related terms
synthetic monitoring involves deploying scripts to simulate the path an end-user might take through a web application, reporting back the performance of the simulator experiences.
XLink - MDN Web Docs Glossary: Definitions of Web-related terms
specification xlink 1.0 xlink 1.1 (currently a working draft) see also xml in mozilla code snippets:getattributens - a wrapper for dealing with some browsers not supporting this dom method code snippets:xml:base function - a rough attempt to find a full xlink-based on an xlink:href attribute (or <xi:include href=>) and its or an ancestor's xml:base.
beacon - MDN Web Docs Glossary: Definitions of Web-related terms
beacons are often included within third party scripts for collecting user data, performance metrics and error reporting.
About Scriptable Interfaces - Interfaces
when we label an interface as scriptable, we're saying that components exporting this interface can be referenced (through this interface) from scripts (e.g javascript), and that we can write new components implementing the interface using script languages.
CSS and JavaScript accessibility best practices - Learn web development
the client-side validation is still really useful for reporting errors — users can know about mistakes they make instantly, rather than having to wait for a round trip to the server and a page reload.
Test Your Skills: Fundamental layout comprehension - Learn web development
in this module introduction to css layout normal flow flexbox grid floats positioning multiple-column layout responsive design beginner's guide to media queries legacy layout methods supporting older browsers fundamental layout comprehension assessment ...
Grids - Learn web development
see also css grid guides css grid inspector: examine grid layouts previous overview: css layout next in this module introduction to css layout normal flow flexbox grid floats positioning multiple-column layout responsive design beginner's guide to media queries legacy layout methods supporting older browsers fundamental layout comprehension assessment ...
Introduction to CSS layout - Learn web development
overview: css layout next in this module introduction to css layout normal flow flexbox grid floats positioning multiple-column layout responsive design beginner's guide to media queries legacy layout methods supporting older browsers fundamental layout comprehension assessment ...
Legacy layout methods - Learn web development
previous overview: css layout next in this module introduction to css layout normal flow flexbox grid floats positioning multiple-column layout responsive design beginner's guide to media queries legacy layout methods supporting older browsers fundamental layout comprehension assessment ...
Beginner's guide to media queries - Learn web development
previous overview: css layout next in this module introduction to css layout normal flow flexbox grid floats positioning multiple-column layout responsive design beginner's guide to media queries legacy layout methods supporting older browsers fundamental layout comprehension assessment ...
Normal Flow - Learn web development
previous overview: css layout next in this module introduction to css layout normal flow flexbox grid floats positioning multiple-column layout responsive design beginner's guide to media queries legacy layout methods supporting older browsers fundamental layout comprehension assessment ...
Positioning - Learn web development
when we add position: sticky to the <dt> element, along with a top value of 0, supporting browsers will stick the headings to the top of the viewport as they reach that position.
Practical positioning examples - Learn web development
in this module introduction to css layout normal flow flexbox grid floats positioning multiple-column layout responsive design beginner's guide to media queries legacy layout methods supporting older browsers fundamental layout comprehension assessment ...
Responsive design - Learn web development
previous overview: css layout next in this module introduction to css layout normal flow flexbox grid floats positioning multiple-column layout responsive design beginner's guide to media queries legacy layout methods supporting older browsers fundamental layout comprehension assessment ...
CSS layout - Learn web development
supporting older browsers in this module we recommend using flexbox and grid as the main layout methods for your designs.
What is the difference between webpage, website, web server, and search engine? - Learn web development
"hosting" means that all the web pages and their supporting files are available on that computer.
Advanced form styling - Learn web development
in supporting browsers, they tend to just give you a block of solid color with a small border.
Client-side form validation - Learn web development
the message is shown to the user when reporting the problem.
HTML forms in legacy browsers - Learn web development
graceful degradation is web developer's best friend graceful degradation and progressive enhancement are development patterns that allow you to build great stuff by supporting a wide range of browsers at the same time.
How to structure a web form - Learn web development
the last one is an <input> element of type date, for entering the expiration date of the card; this one will come up with a date picker widget in supporting browsers, and fall back to a normal text input in non-supporting browsers.
Creating hyperlinks - Learn web development
adding supporting information with the title attribute another attribute you may want to add to your links is title.
Adding vector graphics to the Web - Learn web development
this being the case, only supporting browsers will load the svg — older browsers will load the png instead: <img src="equilateral.png" alt="triangle with equal sides" srcset="equilateral.svg"> you can also use svgs as css background images, as shown below.
From object to iframe — other embedding technologies - Learn web development
note: due to its inherent issues and the lack of support for flash, adobe announced that they would stop supporting it at the end of 2020.
Index - Learn web development
152 supporting older browsers beginner, css, guide, layout, learn, feature queries, flexbox, float, grid, legacy you now have the knowledge to confidently use techniques such as grid and flexbox, create fallbacks for older browsers, and make use of any new techniques that might come along in the future.
Video and Audio APIs - Learn web development
just for fun, we are providing two reporting mechanisms — a <span> containing the elapsed time in minutes and seconds, and an extra <div> that we will use to create a horizontal indicator bar that gets longer as the time elapses.
Inheritance in JavaScript - Learn web development
note: this modern way of writing classes is supported in all modern browsers, but it is still worth knowing about the underlying prototypal inheritance in case you work on a project that requires supporting a browser that doesn't support this syntax (most notably internet explorer).
Measuring performance - Learn web development
general performance reporting tools tools like pagespeed insights can measure a website’s performance.
Perceived performance - Learn web development
fonts can also harm user experience, especially if the fonts used need to be imported, and if the importing is not optimal, or if comic sans is used (kidding).
Properly configuring server MIME types - Learn web development
mime type guessing has led to security exploits in internet explorer which were based upon a malicious author incorrectly reporting a mime type of a dangerous file as a safe type.
Server-side web frameworks - Learn web development
they provide tools and libraries that simplify common web development tasks, including routing urls to appropriate handlers, interacting with databases, supporting sessions and user authorization, formatting output (e.g.
Ember interactivity: Events, classes and state - Learn web development
lass headercomponent extends component { @action onkeydown({ target, key }) { let text = target.value.trim(); let hasvalue = boolean(text); if (key === 'enter' && hasvalue) { alert(text); target.value = '' } } } the @action decorator is the only ember-specific code here (aside from extending from the component superclass, and the ember-specific items we are importing using javascript module syntax) — the rest of the file is vanilla javascript, and would work in any application.
Componentizing our React app - Learn web development
importing all our components let's make use of our new components.
Deployment and next steps - Learn web development
note that our application is fully functional and porting it to typescript is completely optional.
Working with Svelte stores - Learn web development
writing to our store writing to our store is just a matter of importing it and executing $store = 'new value'.
Using Vue computed properties - Learn web development
the list summary method will get the number of finished todoitems, and return a string reporting this.
Introduction to automated testing - Learn web development
pinch/zoom, two fingers to scroll) on the touchpads of supporting devices (e.g.
Implementing feature detection - Learn web development
the problem here is browser support — @supports is not supported at all in ie, and only supported in very recent versions of safari/ios webkit (9+/9.2+), whereas the javascript version should work in much older browsers (probably back to ie8 or 9, although older versions of ie will have additional problems, such as not supporting document.queryselector, and having a messed up box model).
Git and GitHub - Learn web development
git is an example of a vcs, and github is a web site + infrastructure that provides a git server plus a number of really useful tools for working with git repositories individually or in teams, such as reporting issues with the code, reviewing tools, project management features such as assigning tasks and task statuses, and more.
Chrome Worker Modules
start by importing the module loader.
Accessibility API cross-reference
command a supporting section of the document, designed to be complementary to the main content at a similar level in the dom hierarchy, but remains meaningful when separated from the main content.
Accessibility/LiveRegionDevGuide
the text offsets associated with a text changed event are used when supporting this property.
CSUN Firefox Materials
websites such as online magazines with sophisticated audiences are now reporting upwards of 25% firefox usage.
Embedding API for Accessibility
in part, being accessible means supporting a built-in accessibility apis for a platform, such as microsoft active accessibility or atk for linux and unix desktops.
Mozilla's Section 508 Compliance
incomplete, we show focus but need to expose it programmatically by supporting carbon/cocoa accessibility.
Multiprocess on Windows
typelib metadata is limited to supporting the same language features which were supported by vb at that time.
ZoomText
you may wish to read through the current issues on this page before reporting bugs.
Accessibility and Mozilla
websites such as online magazines with sophisticated audiences are now reporting upwards of 25% firefox usage.embedding api for accessibilityevent process procedurethis diagram outlines how events are processed within gecko.
Add-ons
there are some porting resources on firefox extension workshop, our site for firefox-specific development resources.
A bird's-eye view of the Mozilla framework
the article focuses on the architecture of the overall framework supporting the mozilla application suite, not the architecture of the individual applications themselves.
Browser chrome tests
call waitforexplicitfinish() from test() if you want to delay reporting a result until after test() has returned.
What to do and what not to do in Bugzilla
a guide for confirming layout bugs (bugs in web page rendering) reporting new bugs you should report a bug in the new state after going through the triaging process as described in the two above-mentioned guides.
Bugzilla
how to tell if a bug has already been reported it's useful (but not mandatory) for you to check if the problem you're reporting has been already tracked.
Chrome registration
platformversion when supporting more then one application, it is often more convenient for an extension to specify which gecko version it is compatible with.
Capturing a minidump
small minidumps are created by the breakpad crash reporting tool, but sometimes that's not sufficient to diagnose a problem.
Debugging JavaScript
you can also start the browser console when you launch firefox, by launching firefox from the command line and passing --jsconsole as a flag: /path/to/firefox --jsconsole log to the browser console using the standard console api after importing console.jsm: let console = (cu.import("resource://gre/modules/console.jsm", {})).console; console.log("hello from firefox code"); error console this is obsolete and is no longer enabled in firefox by default.
Debugging on Windows
here are some wildcards you can use (tested with vc 8): nscomptr.*\:\:.*=nostepinto (nsg|g)etter_*addrefs.*=nostepinto ns_convertutf.* ; might be too broad: (ns|promise)[^\:]*[ss]tring.* ...add common functions to this list should probably make a .reg file for easy importing obtaining stdout and other file handles running the following command in the command window in visual studio returns the value of stdout, which can be used with various debugging methods (such as nsgenericelement::list) that take a file* param: debug.evaluatestatement {,,msvcr80d}(&__iob_func()[1]) (alternatively you can evaluate {,,msvcr80d}(&__iob_func()[1]) in the quickwatch window) simi...
Debugging
reporting a performance problem ...using the gecko profiler extension.
SVG Guidelines
avoid excessive grouping editors can sometimes do excessive grouping while exporting svgs.
Developer guide
crash tracking information about the socorro crash reporting system.
Using the Browser API
MozillaGeckoChromeAPIBrowser APIUsing
false; prev.disabled = true; next.disabled = true; searchbar.value = ''; } } }); note that whenever one of the search-related methods is invoked, a mozbrowserfindchange event is fired to allow you to react to search changes in a more precise way if desired: //browser.addeventlistener('mozbrowserfindchange', function(e) { // can react to find changes if required //}) reporting errors we've got one more piece of code to mention from our source: browser.addeventlistener('mozbrowsererror', function (e) { console.log("loading error: " + e.detail); }); this simple listener logs an error message to the console when an error with the browser iframe is encountered.
How test harnesses work
extension in the profile (for non-marionette tests) gathers the tests (manifestdestiny) potentially sets up an http server for test data (mozhttpd) invokes the binary (mozrunner) it is the job of the shim extension to shut down the browser logging (mozlog, in theory) (run tests, accrue results) cleanup: shutdown the browser check for crashes (mozcrash) reporting (moztest) marionette tests list of testing extensions pageloader (talos) mochitest: //github.com/realityripple/uxp/blob/master/testing/mochitest/install.rdf (mochitest) ...
Extending a Protocol
the tutorial is designed for browser engineers who are implementing dom/web apis that need to, for example, send a message to the os or spin up something off the main thread - so it's biased towards supporting w3c/whatwg dom apis.
Assert.jsm
the assert.jsm javascript code module implements the commonjs unit testing specification version 1.1, which provides a basic, standardized interface for performing in-code logical assertions with optional, customizable error reporting.
AsyncShutdown.jsm
used for debugging/error reporting.
Interfacing with the Add-on Repository
importing the repository code module before you can use the add-on repository api, you need to import the code module: components.utils.import("resource://gre/modules/addonrepository.jsm"); having done this, you can then access the api through the resulting addonrepository object.
Following the Android Toasts Tutorial from a JNI Perspective
var geckoappshell = jni.loadclass(my_jenv, sig.geckoappshell.substr(1, sig.geckoappshell.length - 2), { static_methods: [ { name: 'getcontext', sig: '()' + sig.context } ] }); porting the java code now that all the declarations are complete, we can now side-by-side port the java code to jni.
Examples
when a proper rejection handler is used, it effectively replaces this delayed reporting.
Webapps.jsm
importing components.utils.import("resource://gre/modules/webapps.jsm"); // exported symbol is domapplicationregistry method overview init: function() loadcurrentregistry: function() notifyappsregistrystart: function notifyappsregistrystart() notifyappsregistryready: function notifyappsregistryready() sanitizeredirects: function sanitizeredirects(asource) _savewidgetsfullpath: function(amanifest, adestapp) appkind: function(aapp, amanifest) updatepermissionsforapp: function(aid, aispreinstalled) updateofflinecacheforapp: function(aid) installpreinstalledapp: function installpreinstalledapp(aid) removeifhttpsduplicate: function(aid) installsystemapps: function(...
Localizing with Mozilla Translator
to migrate the existing translation in the old product, you need to export partial glossaries from the old product, selecting the ''link'' origin (see the previous section) and importing them into the ''link'' target.
MathML In Action
your feedback can be manifested by putting mathml content on the web, reporting bugs in bugzilla, and, if you can help with code, inspecting/improving the current code, and/or picking up an item in the todo list.
Mozilla MathML Status
we are only interested in supporting attributes "inherited from the surrounding context", which are those effectively used in practice.
Are We Slim Yet
to this end we request that memory reporting be integrated into any new process before it is enabled on nightly.
tools/power/rapl
windows unfortunately, rapl does not work on windows, and porting it would be difficult because windows does not have apis that allow easy access to the relevant model-specific registers.
Profile Manager
reporting bugs profile manager bugs should be reported in bugzilla, under testing -> profilemanager.
Emscripten
with emscripten, c/c++ developers don’t have the high cost of porting code manually to javascript — or having to learn javascript at all.
MailNews automated testing
this page and its sub-pages describe (and link to) the available test mechanisms within mailnews, and provide supporting information for developers and testers.
Logging
log types and variables two types supporting nspr logging are exposed in the api: prlogmoduleinfo prlogmodulelevel two environment variables control the behavior of logging at execution time: nspr_log_modules nspr_log_file logging functions and macros the functions and macros for logging are: pr_newlogmodule pr_setlogfile pr_setlogbuffering pr_logprint pr_logflush pr_log_test pr_log pr_assert pr_assert pr_static_ass...
NSPR API Reference
library linking library linking types prlibrary prstaticlinktable library linking functions pr_setlibrarypath pr_getlibrarypath pr_getlibraryname pr_freelibraryname pr_loadlibrary pr_unloadlibrary pr_findsymbol pr_findsymbolandlibrary finding symbols defined in the main executable program platform notes dynamic library search path exporting symbols from the main executable program process management and interprocess communication process management types and constants prprocess prprocessattr process management functions setting the attributes of a new process creating and managing processes multiwait receive system information and environment variables logging conditional compilation a...
Getting Started With NSS
the nss library and its supporting command line tools are written in the c programming language.
NSS_3.12.1_release_notes.html
s in lib/util and lib/freebl bug 433437: vfychain ignores the -a option bug 433594: crash destroying ocsp cert id [[@ cert_destroyocspcertid ] bug 434099: nss relies on unchecked pkcs#11 object attribute values bug 434187: fix the gcc compiler warnings in nss/lib bug 434398: libpkix cannot find issuer cert immediately after checking it with ocsp bug 434808: certutil -b deadlock when importing two or more roots bug 434860: coverity 1150 - dead code in ocsp_createcertid bug 436428: remove unneeded assert from sec_pkcs7encryptlength bug 436430: make nss public headers compilable with no_nspr_10_support defined bug 436577: uninitialized variable in sec_pkcs5createalgorithmid bug 438685: libpkix doesn't try all the issuers in a bridge with multiple certs bug 438876: signtool is...
NSS_3.12_release_notes.html
can result in crash if user tries to view certificate [[@ secitem_compareitem_util] [[@ memcmp] bug 396256: certutil and pp do not print all the generalnames in a crldp extension bug 398019: correct confusing and erroneous comments in der_asciitotime bug 422866: vfychain -pp command crashes in nss_shutdown bug 345779: useless assignment statements in ec_gf2m_pt_mul_mont bug 349011: please stop exporting these crmf_ symbols bug 397178: crash when entering chrome://pippki/content/resetpassword.xul in url bar bug 403822: pkix_pl_ocsprequest_create can leave some members uninitialized bug 403910: cert_findusercertbyusage() returns wrong certificate if multiple certs with same subject available bug 404919: memory leak in sftkdb_readsecmoddb() (sftkmod.c) bug 406120: allow application to specify ocsp...
NSS 3.15.1 release notes
bug 876352 - certutil now warns if importing a pem file that contains a private key.
NSS 3.17.2 release notes
this fixes a regression introduced in nss 3.16.2 that prevented nss from importing some rsa private keys (such as in pkcs #12 files) generated by other crypto libraries.
NSS 3.17.4 release notes
notable changes in nss 3.17.4 bug 1084986: if an ssl/tls connection fails, because client and server don't have any common protocol version enabled, nss has been changed to report error code ssl_error_unsupported_version (instead of reporting ssl_error_no_cypher_overlap).
NSS 3.18 release notes
nss 3.18 source distributions are available on ftp.mozilla.org for secure https download: source tarballs: https://ftp.mozilla.org/pub/mozilla.org/security/nss/releases/nss_3_18_rtm/src/ new in nss 3.18 new functionality when importing certificates and keys from a pkcs#12 source, it's now possible to override the nicknames, prior to importing them into the nss database, using new api sec_pkcs12decoderrenamecertnicknames.
NSS 3.30 release notes
the pk12util tool now supports importing and exporting data encrypted in the aes based schemes defined in pkcs#5 v2.1.
NSS 3.38 release notes
when repeatedly importing the same certificate into an sql database, the existing nickname will be kept.
NSS 3.44.4 release notes
thank you to cesar pereida garcia and the network and information security group (nisec) at tampere university for reporting this issue.
NSS 3.49 release notes
64/aarch64 bug 1585189 - nss database uses 3des instead of aes to encrypt db entries bug 1603257 - fix ubsan issue in softoken ckm_nss_chacha20_ctr initialization bug 1590001 - additional hrr tests (cve-2019-17023) bug 1600144 - treat clienthello with message_seq of 1 as a second clienthello bug 1603027 - test that esni is regenerated after helloretryrequest bug 1593167 - intermittent mis-reporting potential security risk sec_error_unknown_issuer bug 1535787 - fix automation/release/nss-release-helper.py on macos bug 1594933 - disable building dbm by default bug 1562548 - improve gcm perfomance on aarch32 this bugzilla query returns all the bugs fixed in nss 3.49: https://bugzilla.mozilla.org/buglist.cgi?resolution=fixed&classification=components&query_format=advanced&product=nss&targ...
NSS 3.52.1 release notes
thank you to cesar pereida garcia and the network and information security group (nisec) at tampere university for reporting this issue.
NSS 3.53.1 release notes
thank you to sohaib ul hassan, billy bob brumley, and the network and information security group (nisec) at tampere university for reporting this issue and providing a patch.
NSS 3.53 release notes
nss 3.53 will be a long-term support release, supporting firefox 78 esr.
NSS API Guidelines
if you're good with tagging your releases, and then checking out (or exporting!) from the tag for your build, this saves you from messing around with specific files revision numbers.
PKCS11 FAQ
MozillaProjectsNSSPKCS11FAQ
nss also does a similiar operation for importing private keys and certificates through pkcs12.
PKCS11 Implement
supporting multiple sessions if you support multiple sessions simultaneously and if you wish to support c_initpin, c_setpin, or c_generatekeypair, you must support simultaneous read-only and read/write sessions.
NSS tools : modutil
modutil -create -dbdir [sql:]directory adding a cryptographic module adding a pkcs #11 module means submitting a supporting library file, enabling its ciphers, and setting default provider status for various security mechanisms.
sslintro.html
configuration the configuration portion of an ssl-enabled application typically begins by opening a new socket and then importing the new socket into the ssl environment: pr_newtcpsocket.
NSS Tools certutil
this extension allows a certificate's key to be dedicated to supporting specific operations such as ssl server or object signing.
NSS Tools modutil
creating a set of security management database files (key3.db, cert8.db, and secmod.db): -create displaying basic module information or detailed information about the contents of a given module: -list [modulename] adding a pkcs #11 module, which includes setting a supporting library file, enabling ciphers, and setting default provider status for various security mechanisms: -add modulename -libfile library-file [-ciphers cipher-enable-list] [-mechanisms mechanism-list] adding a pkcs #11 module from an existing jar file: -jar jar-file -installdir root-installation-directory [-tempdir temporary-directory] deleting a specific pkcs #11 module from a security m...
NSS Tools pk12util
-h tokenname specify the name of the token to import into or export from -v enable debug logging when importing -k slotpasswordfile specify the text file containing the slot's password -k slotpassword specify a slot's password -w p12filepasswordfile specify the text file containing the pkcs 12 file's password -w p12filepassword specify the pkcs 12 file's password -c key-cipher specify the key encryption algorithm -c certcipher specify the pfx encryption algorithm -m | --key_len keylen spe...
NSS tools : modutil
MozillaProjectsNSStoolsmodutil
modutil -create -dbdir [sql:]directory adding a cryptographic module adding a pkcs #11 module means submitting a supporting library file, enabling its ciphers, and setting default provider status for various security mechanisms.
Scripting Java
the package name with "packages." for example, to import the org.mozilla.javascript package you could use importpackage() as follows: $ java org.mozilla.javascript.tools.shell.main js> importpackage(packages.org.mozilla.javascript); js> context.currentcontext; org.mozilla.javascript.context@bb6ab6 occasionally, you will see examples that use the fully qualified name of the package instead of importing using the importpackage() method.
Creating JavaScript jstest reftests
when importing test262, the test file's in-file metadata is translated from test262 format to a format readibly by the jstest harness.
FOSS
flusspferd - (newer) c++ bindings libjspp - c++ template based library for extending & embedding spidermonkey; works with spidermonkey 1.8.5 and above, has lots of goodies spiderape - the oldest c++ bindings for spidermonkey trixul - (trixul cvs) - trixul xml-based gui toolkit embeds spidermonkey, using javascript to implement logic behind its gui, supporting calls from javascript to c++ objects rust mozjs - rust bindings used by servo gnome gjs - javascript bindings to gnome (broadly, to any library using the gobject introspection mechanism) objective caml http://alain.frisch.fr/soft.html#spider - bindings to embed spidermonkey in ocaml applications perl http://jspl.msg.mx/ - bindings to cross-embed spidermonkey and perl.
SpiderMonkey Internals
(otherwise, spidermonkey converts primitive values to objects before invoking their methods, per ecma 262-3 §11.2.1.) error handling spidermonkey has two interdependent error-handling systems: javascript exceptions (which are not implemented with, or even compatible with, any kind of native c/c++ exception handling) and error reporting.
JS::CallArgs
then, when an eventual release making that change occurs, porting efforts will require changing methods' signatures but won't require invasive changes to the methods' implementations, potentially under time pressure.
JSDeletePropertyOp
this callback may veto the ongoing property operation by optionally reporting an error or raising an exception and then returning false.
JSErrorReport
describes the format of a js error that is used either by the internal error reporting mechanism or by a user-defined error-reporting mechanism.
JSNative
(returning false without reporting an error or raising an exception terminates the script with an uncatchable error.
JSPropertyOp
each of these callbacks may veto the ongoing property operation by optionally reporting an error or raising an exception and then returning false.
JSRuntime
exception handling, error reporting, and some language options are per-jscontext.
JS_AddArgumentFormatter
callback description the conversion function should return true on success, and return false after reporting an error or detecting an already-reported error.
JS_ErrorFromException
other contexts in the same runtime can have their own error reporting functions.
JS_GetErrorPrototype
other contexts in the same runtime can have their own error reporting functions.
Parser API
art:{line:1, column:10}, end:{line:1, column:12}}, type:"literal", value:42}) it is also available since firefox 7; it can be imported into the global object via: components.utils.import("resource://gre/modules/reflect.jsm") or into a specified object via: components.utils.import("resource://gre/modules/reflect.jsm", obj) built-in objects whether in spidermonkey shell or firefox (after importing), the global singleton object reflect currently contains just the parse method.
SpiderMonkey 1.8.5
the team is considering the removal of tinyids js_threadsafe is going away, with future versions supporting only thread-safe builds a new debugging api is on the way to replace jsd.
SpiderMonkey 1.8.7
the team is considering the removal of tinyids js_threadsafe is going away, with future versions supporting only thread-safe builds a new debugging api is on the way to replace jsd.
SpiderMonkey 1.8.8
the team is considering the removal of tinyids js_threadsafe is going away, with future versions supporting only thread-safe builds a new debugging api is on the way to replace jsd.
SpiderMonkey 17
the team is considering the removal of tinyids js_threadsafe is going away, with future versions supporting only thread-safe builds a new debugging api is on the way to replace jsd.
SpiderMonkey 24
the team is considering the removal of tinyids js_threadsafe is going away, with future versions supporting only thread-safe builds a new debugging api is on the way to replace jsd.
SpiderMonkey 31
js_threadsafe is going away, with future versions supporting only thread-safe builds a new debugging api is on the way to replace jsd.
SpiderMonkey 38
js_threadsafe is going away, with future versions supporting only thread-safe builds a new debugging api is on the way to replace jsd.
SpiderMonkey 45
(supporting decltype(nullptr)).
TPS Tests
it's common for the phase after the problem to be the one reporting errors (e.g.
Web Replay
porting almost all implementation work so far has been on macos.
Zest
zest topics usecases reporting security vulnerabilities to developers reporting security vulnerabilities to companies defining active and passive scanner rules deep integration with security tools runtimes the runtime environments that support zest tools the tools that include support zest implementation the state of zest development videos simon demoed zest at appsec usa in november 2013,...
Mozilla Projects
crash reporting firefox ships with an open-source crash reporting system.
Pinning violation reports
the error page displayed by firefox when you encounter a pin violation gives you the option of reporting this error.
Signing Mozilla apps for Mac OS X
it will guide you through creating a private key, certificate signing request, and importing your new developer id into the keychain access application on your mac.
Using the Places history service
nsibrowserhistory.addpagewithdetails: called by history importing code.
XPCOM changes in Gecko 2.0
const nsgetfactory = xpcomutils.generatensgetfactory([mycomponent]); a component may implement backwards compatibility with gecko 1.9.2 by dynamically detecting which symbols are exported by xpcomutils.jsm and exporting the correct function: /** * xpcomutils.generatensgetfactory was introduced in mozilla 2 (firefox 4, seamonkey 2.1).
Components.utils.Sandbox
importing functions or objects into the sandbox you can import functions or objects into the sandbox simply by assigning them to the sandbox object.
XPCshell Test Manifest Expressions
lkit 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 of the cpu architecture, in bits one of 32, 64, possibly unknown debug - set to true if this build is a debug build, false otherwise crashreporter - set to true if this build has crash reporting code enabled, false otherwise.
nsCOMPtr
the class itself and the supporting functions that are used with it are not frozen, but they are available as part of the xpcom glue library for easy reuse.
nsSupportsWeakReference
example code // supporting weak references to a hypothetical implementation // of the nsifoo interface...
nsIBrowserHistory
it is called by history importing code and is used in the history migration tool.
nsIClipboard
widget/nsiclipboard.idlscriptable this interface supports basic clipboard operations such as: setting, retrieving, emptying, matching and supporting clipboard data.
nsIConverterOutputStream
implementations not supporting buffering may ignore this parameter.
nsIDOMGeoGeolocation
starting in gecko 1.9.2, you can access this service using: var geolocation = components.classes["@mozilla.org/geolocation;1"] .getservice(components.interfaces.nsidomgeogeolocation); note: if nsidgeogeolocation throws an exception when importing, try using this: var geolocation = components.classes["@mozilla.org/geolocation;1"] .getservice(components.interfaces.nsisupports); method overview void clearwatch(in unsigned short watchid); void getcurrentposition(in nsidomgeopositioncallback successcallback, [optional] in nsidomgeopositionerrorcallback errorcallback, ...
nsIMsgFolder
currently only supporting allmessagecountnotifications which refers to both total and unread message counts.
nsIPrivateBrowsingService
for details on how to do this, see the article supporting private browsing mode.
nsITaskbarPreviewController
the controller and its supporting code, however, may change this values at any time.
nsITelemetry
this is true if the fhr data reporting service or the self-support service is enabled.
Working with Multiple Versions of Interfaces
this is because the call to do_createinstance(acid, aouter, error); will eventually evolve into a request for an object supporting the interface with iid ns_get_iid(nsiaccessibleretrieval).
XSLT 2.0
the code does not currently work on the mac (except for server edition supporting java 1.6) due to its lagging java support (and thus liveconnect support).
Testing Mozilla code
asan nightly projectthe asan nightly project involves building a firefox nightly browser with the popular addresssanitizer tool and enhancing it with remote crash reporting capabilities for any errors detected.clang static analysisthis document is split in two parts.
Index
85 error reporting tools thunderbird currently, thunderbird tends to eat a lot of exceptions.
Thunderbird extensions
an overview of thunderbird components developer reference docs: folder classes db views (message list) message summary database mailnews protocols mailnews filters error reporting tools steel library (obsolete as of thunderbird 52, use https://github.com/protz/thunderbird-stdlib) developing new account types useful newsgroup discussions (anything that's very old should be regarded suspiciously, because there has been significant api rewrite over the past years making most techniques considerably easier) thunderbird api docs (mostly a...
WebIDL bindings
if init() or tojsvalue() returns false, they will generally set a pending exception on the jscontext; reporting those is the responsibility of the caller.
Add to iPhoto
this is done using the js-ctypes library object's declare() method, just like importing a function: this.kcftypearraycallbacks = this.lib.declare("kcftypearraycallbacks", this.cfarraycallbacks); note: for the record, this is the part that requires a nightly build of firefox 3.7a5pre dated april 16, 2010 or later; this capability was introduced in that build.
Standard OS Libraries
gtk+ and qt have begun porting their code to wayland.
Source map errors - Firefox Developer Tools
general source map error reporting if you do see a problem, a message will appear in the webconsole.
Debugger.Script - Firefox Developer Tools
setbreakpoint(offset,handler) if the instance refers to a jsscript, set a breakpoint at the bytecode instruction atoffset in this script, reporting hits to the hit method ofhandler.
Settings - Firefox Developer Tools
style editor show original sources when a css preprocessor supporting source maps is used, this enables the style editor to display the original, preprocessor, sources rather than the generated css.
Style Editor - Firefox Developer Tools
the media sidebar works especially well with responsive design view for creating and debugging responsive layouts: from firefox 46 onwards, if an @media rule contains a screen size in a condition, then it is made clickable: clicking it then resizes the screen to that size using the responsive design view: creating and importing style sheets you can create a new style sheet by clicking the new button in the toolbar.
Using the CSS Painting API - Web APIs
.fancy { background-image: paint(headerhighlight); } putting it together we can then add the fancy class to any element on the page to add a yellow box as a background: <h1 class="fancy">my cool header</h1> the following example will look like the image above in browsers supporting the css painting api.
Using the CSS Typed Object Model - Web APIs
appendchild(document.createtextnode( propval )); row.appendchild( cssvalue ); // and the type of unit const cssunit = document.createelement( 'td' ); cssunit.appendchild( document.createtextnode( allcomputedstyles.get( ofinterest[i] ).unit )); row.appendchild( cssunit ); //add the row to the table stylestable.appendchild( row ); } for those of you using a non-supporting browser, the above output should looks something like this: property value unit padding-top 0 px margin-bottom 16 px font-size 16 px font-stretch 100 percent animation-duration 0 s animation-iteration-count 1 number width auto undefined height auto undefined ...
Basic usage of canvas - Web APIs
fallback content the <canvas> element differs from an <img> tag in that, like for <video>, <audio>, or <picture> elements, it is easy to define some fallback content, to be displayed in older browsers not supporting it, like versions of internet explorer earlier than version 9 or textual browsers.
Using images - Web APIs
importing images into a canvas is basically a two step process: get a reference to an htmlimageelement object or to another canvas element as a source.
Constraint validation API - Web APIs
however, you may want to impose more complex constraints, or to provide clearer reporting of validation failures than the defaults.
DOMImplementation.createHTMLDocument() - Web APIs
the next two lines handle importing the contents of our new document into the new document's context.
DOMTokenList.forEach() - Web APIs
html <span class="a b c"></span> javascript let span = document.queryselector("span"); let classes = span.classlist; let iterator = classes.values(); classes.foreach( function(value, key, listobj) { span.textcontent += `${value} ${key}/${this} ++ `; }, "arg" ); result polyfill this polyfill adds compatibility to all browsers supporting es5: if (window.domtokenlist && !domtokenlist.prototype.foreach) { domtokenlist.prototype.foreach = function (callback, thisarg) { thisarg = thisarg || window; for (var i = 0; i < this.length; i++) { callback.call(thisarg, this[i], i, this); } }; } specifications specification status comment domthe definition of 'foreach() (as iterable<node>)'...
Detecting device orientation - Web APIs
orientation example this example will work on any browser supporting the deviceorientation event and running on a device able to detect its orientation.
Document.adoptNode() - Web APIs
return value the copied importednode in the scope of the importing document.
Document.importNode() - Web APIs
return value the copied importednode in the scope of the importing document.
Element.matches() - Web APIs
WebAPIElementmatches
element.prototype.msmatchesselector || element.prototype.omatchesselector || element.prototype.webkitmatchesselector || function(s) { var matches = (this.document || this.ownerdocument).queryselectorall(s), i = matches.length; while (--i >= 0 && matches.item(i) !== this) {} return i > -1; }; } however, given the practicality of supporting older browsers, the following should suffice for most (if not all) practical cases (i.e.
FederatedCredential - Web APIs
in supporting browsers, an instance of this class may be passed the credential received from the init object for global fetch.
Using Fetch - Web APIs
} polyfill to use fetch in unsupported browsers, there is a fetch polyfill available that recreates the functionality for non-supporting browsers.
HTMLCanvasElement.mozOpaque - Web APIs
firefox will stop supporting it in the future.
HTMLMediaElement.load() - Web APIs
this is described in more detail in supporting multiple formats in video and audio content.
HTMLMediaElement.srcObject - Web APIs
const mediasource = new mediasource(); const video = document.createelement('video'); video.srcobject = mediasource; supporting fallback to the src property the examples below support older browser versions that require you to create an object url and assign it to src if srcobject isn't supported.
HTMLScriptElement - Web APIs
examples dynamically importing scripts let's create a function that imports new scripts within a document creating a <script> node immediately before the <script> that hosts the following code (through document.currentscript).
IDBDatabase.transaction() - Web APIs
if you need to open the object store in readwrite mode to change data, you would use the following: var transaction = db.transaction('my-store-name', "readwrite"); as of firefox 40, indexeddb transactions have relaxed durability guarantees to increase performance (see bug 1112702), which is the same behaviour as other indexeddb-supporting browsers.
IDBTransaction.error - Web APIs
note the transaction.onerror = function(event) { }; block, making use of transaction.error to help in reporting what went wrong when the transaction was unsuccessful.
IDBTransaction.onabort - Web APIs
note the transaction.onabort = function(event) { }; block, reporting when the transaction has been aborted.
IDBTransaction.oncomplete - Web APIs
as of firefox 40, indexeddb transactions have relaxed durability guarantees to increase performance (see bug 1112702), which is the same behaviour as other indexeddb-supporting browsers.
IDBTransaction.onerror - Web APIs
note the transaction.onerror = function(event) { }; block, making use of transaction.error to help in reporting what went wrong when the transaction was unsuccessful.
Basic concepts - Web APIs
as of firefox 40, indexeddb transactions have relaxed durability guarantees to increase performance (see bug 1112702), which is the same behaviour as other indexeddb-supporting browsers.
MediaRecorder - Web APIs
mediarecorder.onerror an eventhandler called to handle the error event, including reporting errors that arise with media recording.
MediaSession.setActionHandler() - Web APIs
audio.currenttime = math.max(audio.currenttime - skiptime, 0); }); supporting multiple actions in one handler function you can also, if you prefer, use a single function to handle multiple action types, by checking the value of the mediasessionactiondetails object's action property: let skiptime = 7; navigator.mediasession.setactionhandler("seekforward", handleseek); navigator.mediasession.setactionhandler("seekbackward", handleseek); function handleseek(details) { s...
Media Session action types - Web APIs
audio.currenttime = math.max(audio.currenttime - skiptime, 0); }); supporting multiple actions in one handler function you can also, if you prefer, use a single function to handle multiple action types, by checking the value of the mediasessionactiondetails object's action property: let skiptime = 7; navigator.mediasession.setactionhandler("seekforward", handleseek); navigator.mediasession.setactionhandler("seekbackward", handleseek); function handleseek(details) { s...
MediaSessionActionDetails - Web APIs
audio.currenttime = math.max(audio.currenttime - skiptime, 0); }); supporting multiple actions in one handler function you can also, if you prefer, use a single function to handle multiple action types, by checking the value of the mediasessionactiondetails object's action property: let skiptime = 7; navigator.mediasession.setactionhandler("seekforward", handleseek); navigator.mediasession.setactionhandler("seekbackward", handleseek); function handleseek(details) { s...
MutationObserverInit.attributeOldValue - Web APIs
syntax var options = { attributeoldvalue: true | false } value a boolean value indicating whether or not the prior value of a changed attribute should be included in the mutationobserver.oldvalue property when reporting attribute value changes.
NDEFMessage - Web APIs
nfc tags supporting ndef.
NDEFReader.onreading - Web APIs
nfc tags supporting ndef, when these devices are within the reader's magnetic induction field.
NDEFReader - Web APIs
nfc tags supporting ndef, when these devices are within the reader's magnetic induction field.
NDEFRecord() - Web APIs
nfc tags supporting ndef.
NDEFRecord - Web APIs
nfc tags supporting ndef.
NDEFWriter - Web APIs
nfc tags supporting ndef, when these devices are within the reader's magnetic induction field.
Node.isSupported() - Web APIs
WebAPINodeisSupported
if the version is not specified, supporting any version of the feature will cause the method to return true.
Node.rootNode - Web APIs
WebAPINoderootNode
example running the following line in supporting browsers should return a reference to the html/document node: console.log(document.body.rootnode); notes gecko-based browsers insert text nodes into a document to represent whitespace in the source markup.
NodeList.prototype.forEach() - Web APIs
WebAPINodeListforEach
let list = node.childnodes; list.foreach( function(currentvalue, currentindex, listobj) { console.log(currentvalue + ', ' + currentindex + ', ' + this); }, 'mythisarg' ); the above code results in the following: [object htmlparagraphelement], 0, mythisarg [object text], 1, mythisarg [object htmlspanelement], 2, mythisarg polyfill this polyfill adds compatibility to all browsers supporting es5: if (window.nodelist && !nodelist.prototype.foreach) { nodelist.prototype.foreach = function (callback, thisarg) { thisarg = thisarg || window; for (var i = 0; i < this.length; i++) { callback.call(thisarg, this[i], i, this); } }; } or if (window.nodelist && !nodelist.prototype.foreach) { nodelist.prototype.foreach = array.prototype.foreach; }...
PasswordCredential - Web APIs
in supporting browsers, an instance of this class may be passed the credential from the init object for global fetch.
PasswordCredential - Web APIs
in supporting browsers an instance of this class may be passed in the credential member of the init object for global fetch.
Using the Permissions API - Web APIs
at the moment we are just reporting the change in state.
Pinch zoom gestures - Web APIs
<style> div { margin: 0em; padding: 2em; } #target { background: white; border: 1px solid black; } </style> global state supporting a two-pointer gesture requires preserving a pointer's event state during various event phases.
RTCIceCandidateType - Web APIs
usage notes the rtcicecandidatetype enumeration is used by the type property of rtcicecandidate objects, as well as when reporting statistics on candidates using rtcicecandidatestats.candidatetype.
RTCRtpSynchronizationSource - Web APIs
if the peer has indicated that it's not supporting voice activity detection, this field is not provided.
Request.mode - Web APIs
WebAPIRequestmode
navigate — a mode for supporting navigation.
RsaHashedImportParams - Web APIs
the rsahashedimportparams dictionary of the web crypto api represents the object that should be passed as the algorithm parameter into subtlecrypto.importkey() or subtlecrypto.unwrapkey(), when importing any rsa-based key pair: that is, when the algorithm is identified as any of rsassa-pkcs1-v1_5, rsa-pss, or rsa-oaep.
SVGSVGElement - Web APIs
svgsvgelement.forceredraw() in rendering environments supporting interactivity, forces the user agent to immediately redraw all regions of the viewport that require updating.
Screen.height - Web APIs
WebAPIScreenheight
internet explorer will take into account the zoom setting when reporting the screen height.
Screen.width - Web APIs
WebAPIScreenwidth
internet explorer will take into account the zoom setting when reporting the screen width.
Using Service Workers - Web APIs
setting up to play with service workers many service workers features are now enabled by default in newer versions of supporting browsers.
SpeechRecognitionEvent.emma - Web APIs
the exact contents can vary across user agents and recognition engines, but all supporting implementations will expose a valid xml document complete with an emma namespace.
SubtleCrypto.exportKey() - Web APIs
keys are not exported in an encrypted format: to encrypt keys when exporting them use the subtlecrypto.wrapkey() api instead.
SubtleCrypto - Web APIs
importing and exporting keys to make keys available outside your app, you need to export the key, and that's what exportkey() is for.
Using Touch Events - Web APIs
for more information about the interaction between mouse and touch events, see supporting both touchevent and mouseevent.
WebGL best practices - Web APIs
demo: https://jdashg.github.io/misc/webgl/device-pixel-presnap.html resizeobserver and 'device-pixel-content-box' on supporting browsers (chromium?), resizeobserver can be used with 'device-pixel-content-box' to request a callback that includes the true device pixel size of an element.
Using WebRTC data channels - Web APIs
this will become an issue when browsers properly support the current standard for supporting larger messages—the end-of-record (eor) flag that indicates when a message is the last one in a series that should be treated as a single payload.
Improving compatibility using WebRTC adapter.js - Web APIs
note: since there is ongoing fluidity in functionality and naming of api terms in webrtc and supporting browsers, use of this adapter is generally recommended.
WebRTC Statistics API - Web APIs
candidate recommendation compatibility of statistic reporting ...
Movement, orientation, and motion: A WebXR example - Web APIs
by importing this polyfill, we allow the example to work on many browsers that don't yet have webxr implementations in place, and we smooth out any transient deviations from the specification that occur during these still somewhat experimental days of the webxr specification.
Rendering and the WebXR frame animation callback - Web APIs
however, it simplifies porting existing webgl code and is frequently good enough to do the job, so we'll look at this method first.
WebXR Device API - Web APIs
supporting advanced controllers and gamepads in webxr applications webxr uses the gamepad object to describe the controls available on complex input devices (such as hand controllers with multiple buttons and/or axes) and gamepad-like devices.
Background audio processing using AudioWorklet - Web APIs
supporting audio parameters just like any other web audio node, audioworkletnode supports parameters, which are shared with the audioworkletprocessor that does the actual work.
Using the Web Storage API - Web APIs
these mechanisms are available via the window.sessionstorage and window.localstorage properties (to be more precise, in supporting browsers the window object implements the windowlocalstorage and windowsessionstorage objects, which the localstorage and sessionstorage properties are members of) — invoking one of these will create an instance of the storage object, through which data items can be set, retrieved, and removed.
Web Storage API - Web APIs
these mechanisms are available via the window.sessionstorage and window.localstorage properties (to be more precise, in supporting browsers the window object implements the windowlocalstorage and windowsessionstorage objects, which the localstorage and sessionstorage properties hang off) — invoking one of these will create an instance of the storage object, through which data items can be set, retrieved and removed.
Using Web Workers - Web APIs
importing scripts and libraries worker threads have access to a global function, importscripts(), which lets them import scripts.
How to check the security state of an XMLHTTPRequest over SSL - Web APIs
// adapted from the patch for moztcpsocket error reporting (bug 861196).
XRReferenceSpace.getOffsetReferenceSpace() - Web APIs
teleporting or setting the position of the viewer upon first creating a scene, you may need to set the user's position within the 3d world.
XRView - Web APIs
WebAPIXRView
it's computed by inverting then transposing the model view matrix: mat4.invert(normalmatrix, modelviewmatrix); mat4.transpose(normalmatrix, normalmatrix); teleporting an object to programmatically move and/or rotate (often referred to as teleporting) an object, you need to create a new reference space for that object which applies a transform that encapsulates the desired changes.
XSLTProcessor - Web APIs
[throws] document xsltprocessor.transformtodocument(node source) transforms the node source applying the stylesheet given importing using the xsltprocessor.importstylesheet() function.
Web APIs
WebAPI
ansport rtcsessiondescription rtcsessiondescriptioncallback rtcstats rtcstatsicecandidatepairstate rtcstatsreport rtcstatstype rtctrackevent rtctrackeventinit radionodelist range readablebytestreamcontroller readablestream readablestreambyobreader readablestreambyobrequest readablestreamdefaultcontroller readablestreamdefaultreader relativeorientationsensor renderingcontext report reportingobserver reportingobserveroptions request requestdestination resizeobserver resizeobserverentry response rsahashedimportparams rsahashedkeygenparams rsaoaepparams rsapssparams s svgaelement svgaltglyphdefelement svgaltglyphelement svgaltglyphitemelement svgangle svganimatecolorelement svganimateelement svganimatemotionelement svganimatetransformelement svganimatedangle svganimated...
ARIA Screen Reader Implementors Guide - Accessibility
the intention is to strike a balance between providing useful guidance on how to use the markup's intended meaning while supporting live regions as an area for screen readers to innovate and compete.
ARIA Test Cases - Accessibility
autocomplete dojo autocomplete expected at behavior: screen reader should announce the fact that this is a control supporting autocomplete.
ARIA: Complementary role - Accessibility
the complementary landmark role is used to designate a supporting section that relates to the main content, yet can stand alone when separated.
ARIA: feed role - Accessibility
keyboard interaction supporting the following, or a similar, interface is recommended when focus is inside the feed: page down: move focus to next article.
WAI-ARIA Roles - Accessibility
elements containing role="checkbox" must also include the aria-checked attribute to expose the checkbox's state to assistive technology.aria: comment rolethe comment landmark role semantically denotes a comment/reaction to some content on the page, or to a previous comment.aria: complementary rolethe complementary landmark role is used to designate a supporting section that relates to the main content, yet can stand alone when separated.
Web applications and ARIA FAQ - Accessibility
there's more to accessibility than just supporting screen readers.
::grammar-error - CSS: Cascading Style Sheets
allowable properties only a small subset of css properties can be used in a rule with ::grammar-error in its selector: color background-color cursor caret-color outline and its longhands text-decoration and its associated properties text-emphasis-color text-shadow syntax ::grammar-error examples simple document grammar check in this example, eventual supporting browsers should highlight any flagged grammatical errors with the styles shown.
::spelling-error - CSS: Cascading Style Sheets
allowable properties only a small subset of css properties can be used in a rule with ::spelling-error in its selector: color background-color cursor caret-color outline and its longhands text-decoration and its associated properties text-emphasis-color text-shadow syntax ::spelling-error examples simple document spell check in this example, eventual supporting browsers should highlight any flagged spelling errors with the styles shown.
:blank - CSS: Cascading Style Sheets
WebCSS:blank
syntax :blank examples simple :blank example in eventual supporting browsers, the :blank pseudo-class will enable developers to highlight in some way input controls that are not required, but still have no content filled in, perhaps as a reminder to users.
@import - CSS: Cascading Style Sheets
WebCSS@import
<mf-value>where <mf-name> = <ident><mf-value> = <number> | <dimension> | <ident> | <ratio> examples importing css rules @import 'custom.css'; @import url("chrome://communicator/skin/"); importing css rules conditionally @import url("fineprint.css") print; @import url("bluish.css") speech; @import "common.css" screen; @import url('landscape.css') screen and (orientation:landscape); specifications specification status comment css cascading and inheritance level 4the definit...
Coordinate systems - CSS: Cascading Style Sheets
displaying the coordinates as we'll see in the html, the inner box (the one we're watching for events on) contains several paragraphs; one for each of the four coordinate systems we'll be reporting on.
Controlling Ratios of Flex Items Along the Main Axis - CSS: Cascading Style Sheets
is flex-basis set to auto or content (in a supporting browser)?
CSS Flexible Box Layout - CSS: Cascading Style Sheets
backwards compatibility of flexbox browser status of flexbox, interoperability issues and supporting older browsers and versions of the spec specifications specification status comment css flexible box layout module candidate recommendation initial definition.
Browser compatibility and Scroll Snap - CSS: Cascading Style Sheets
however, these properties shouldn't cause any problems to non-supporting browsers due to the way that browsers simply ignore css that they do not understand.
CSS Text Decoration - CSS: Cascading Style Sheets
be careful when removing the text decoration on anchors since users often depend on the underline to denote hyperlinks.</p> <p class="underover">this text has lines above <em>and</em> below it.</p> <p class="thick">this text has a really thick purple underline in supporting browsers.</p> <p class="blink">this text might blink for you, depending on the browser you use.</p> specifications specification status comment css text decoration module level 4 working draft css text decoration module level 3 candidate recommendation css level 2 (revision 1) recommendation css level 1 recomm...
Cookbook template - CSS: Cascading Style Sheets
useful fallbacks or alternative methods if there are useful alternative methods for building the recipe, or fallback recipes to use if you have to support non-supporting browsers, include them in separate sections down here.
conic-gradient() - CSS: Cascading Style Sheets
browsers supporting conic gradients also accept percent values, with 100% equaling 360 degrees, but this is not in the specification.
Adapting to the new two-value syntax of display - CSS: Cascading Style Sheets
s specified then the specification explains that the outer value should be set to block: "if a <display-inside> value is specified but <display-outside> is omitted, the element’s outer display type defaults to block—except for ruby, which defaults to inline." finally, we have some legacy pre-composed inline-level values of: inline-block inline-table inline-flex inline-grid if a supporting browser comes across these as single values then it treats them the same as the two-value versions: inline flow-root inline table inline flex inline grid so all of the current situations are neatly covered, meaning that we maintain compatibility of existing and new sites that use the single values, while allowing the spec to evolve.
font-optical-sizing - CSS: Cascading Style Sheets
you should see a difference in supporting browsers.</p> @font-face { src: url('amstelvaralpha-vf.ttf'); font-family:'amstelvar'; font-style: normal; } p { font-size: 36px; font-family: amstelvar; } .no-optical-sizing { font-optical-sizing: none; } note: the font referenced above — which includes optical sizing and is freely-licensed — is good for testing.
outline-color - CSS: Cascading Style Sheets
webaim: color contrast checker mdn understanding wcag, guideline 1.4 explanations understanding success criterion 1.4.3 | w3c understanding wcag 2.0 formal definition initial valueinvert, for browsers supporting it, currentcolor for the otherapplies toall elementsinheritednocomputed valuefor the keyword invert, the computed value is invert.
outline - CSS: Cascading Style Sheets
WebCSSoutline
how to design useful and usable focus indicators wcag 2.1: understanding success criterion 2.4.7: focus visible formal definition initial valueas each of the properties of the shorthand:outline-color: invert, for browsers supporting it, currentcolor for the otheroutline-style: noneoutline-width: mediumapplies toall elementsinheritednocomputed valueas each of the properties of the shorthand:outline-color: for the keyword invert, the computed value is invert.
Guide to scroll anchoring - CSS: Cascading Style Sheets
the feature is enabled by default in supporting browsers.
repeating-conic-gradient() - CSS: Cascading Style Sheets
browsers supporting repeating conic gradients also accept percent values, with 100% equaling 360 degrees, but this is not in the specification.
text-decoration-skip - CSS: Cascading Style Sheets
note: most other browsers are converging on supporting the simpler text-decoration-skip-ink property.
text-decoration - CSS: Cascading Style Sheets
be careful when removing the text decoration on anchors since users often depend on the underline to denote hyperlinks.</p> <p class="underover">this text has lines above <em>and</em> below it.</p> <p class="thick">this text has a really thick purple underline in supporting browsers.</p> <p class="blink">this text might blink for you, depending on the browser you use.</p> specifications specification status comment css text decoration module level 4 working draft adds text-decoration-thickness; note that this isn't yet officially part of the shorthand — this is as yet unspecified.
text-size-adjust - CSS: Cascading Style Sheets
formal definition initial valueauto for smartphone browsers supporting inflation, none in other cases (and then not modifiable).applies toall elementsinheritedyespercentagesyes, refer to the corresponding size of the text fontcomputed valueas specifiedanimation typediscrete formal syntax none | auto | <percentage> examples basic disabling usage as hinted at above, on a properly designed responsive site the text-size-adjust behavior is not needed, so developers ...
Adding captions and subtitles to HTML5 video - Developer guides
flowplayer html5 player supporting webvtt.
Constraint validation - Developer guides
validation-related attributes in addition to the type attribute described above, the following attributes are used to describe basic constraints: attribute input types supporting the attribute possible values constraint description associated violation pattern text, search, url, tel, email, password a javascript regular expression (compiled with the ecmascript 5 global, ignorecase, and multiline flags disabled) the value must match the pattern.
Writing forward-compatible websites - Developer guides
here's an example that works in browsers without html5 support but breaks in a browser supporting html5: <form action="http://www.example.com"> <input type="submit" value="submit the form" </form> due to the missing > on the input tag.
HTML attribute: min - HTML: Hypertext Markup Language
WebHTMLAttributesmin
as we included an invalid value, supporting browsers will show the value as invalid.
HTML attribute: pattern - HTML: Hypertext Markup Language
some of the input types supporting the pattern attribute, notably the email and url input types, have expected value syntaxes that must be matched.
HTML attribute: step - HTML: Hypertext Markup Language
WebHTMLAttributesstep
as we included an invalid value, supporting browsers will show the value as invalid.
<img>: The Image Embed element - HTML: Hypertext Markup Language
WebHTMLElementimg
on browsers supporting srcset, src is treated like a candidate image with a pixel density descriptor 1x, unless an image with this pixel density descriptor is already defined in srcset, or unless srcset contains w descriptors.
<link>: The External Resource Link element - HTML: Hypertext Markup Language
WebHTMLElementlink
browsers not supporting css3 media queries won't necessarily recognize the adequate link; do not forget to set fallback links, the restricted set of media queries defined in html 4.
<picture>: The Picture element - HTML: Hypertext Markup Language
WebHTMLElementpicture
content categories flow content, phrasing content, embedded content permitted content zero or more <source> elements, followed by one <img> element, optionally intermixed with script-supporting elements.
<script>: The Script element - HTML: Hypertext Markup Language
WebHTMLElementscript
that enables you to use module scripts while also providing nomodule-marked fallback scripts for non-supporting browsers.
<tr>: The Table Row element - HTML: Hypertext Markup Language
WebHTMLElementtr
technical summary content categories none permitted content zero or more <td> and/or <th> elements; script-supporting elements (<script> and <template>) are also allowed tag omission start tag is mandatory.
itemtype - HTML: Hypertext Markup Language
they must only be specified on elements with an itemscope attribute, whose itemtype attribute specifies a vocabulary not supporting global identifiers for items, as defined by that vocabulary's specification.
Microdata - HTML: Hypertext Markup Language
microdata uses a supporting vocabulary to describe an item and name-value pairs to assign values to its properties.
Microformats - HTML: Hypertext Markup Language
microformats use supporting vocabularies to describe objects and name-value pairs to assign values to their properties.
Cross-Origin Resource Sharing (CORS) - HTTP
WebHTTPCORS
all these examples use xmlhttprequest, which can make cross-site requests in any supporting browser.
HTTP conditional requests - HTTP
integrity of a partial download partial downloading of files is a functionality of http that allows to resume previous operations, saving bandwidth and time, by keeping the already obtained information: a server supporting partial downloads broadcasts this by sending the accept-ranges header.
Configuring servers for Ogg media - HTTP
don't use http compression for media files one common way to reduce the load on a web server is to use gzip or deflate compression when serving to a supporting web browser.
Content-Encoding - HTTP
the http/1.1 standard also recommends that the servers supporting this content-encoding should recognize x-gzip as an alias, for compatibility purposes.
CSP: report-uri - HTTP
csp version 1 directive type reporting directive this directive is not supported in the <meta> element.
Content-Security-Policy-Report-Only - HTTP
content-security-policy-report-only: default-src https:; report-uri /csp-violation-report-endpoint/ if you still want to receive reporting, but also want to enforce a policy, use the content-security-policy header with the report-uri directive.
Content-Security-Policy - HTTP
reporting directives reporting directives control the reporting process of csp violations.
Feature-Policy: xr-spatial-tracking - HTTP
this policy controls whether navigator.xr.requestsession() can return xrsession that requires spatial tracking and whether user agent can indicate support for sessions supporting spatial tracking via navigator.xr.issessionsupported() and devicechange event on navigator.xr object.
NEL - HTTP
WebHTTPHeadersNEL
header type response header forbidden header name no syntax nel: { "report_to": "name_of_reporting_group", "max_age": 12345, "include_subdomains": false, "success_fraction": 0.0, "failure_fraction": 1.0 } specifications specification network error logging ...
Transfer-Encoding - HTTP
the http/1.1 standard also recommends that the servers supporting this content-encoding should recognize x-gzip as an alias, for compatibility purposes.
HTTP resources and specifications - HTTP
control protocol (htcpcp/1.0) april 1st joke spec rfc 7168 the hyper text coffee pot control protocol for tea efflux appliances (htcpcp-tea) april 1st joke spec html living standard html defines extensions of http for server-sent events living standard tracking preference expression dnt header editor's draft / candidate recommendation reporting api report-to header draft draft spec expect-ct extension for http ietf draft ...
501 Not Implemented - HTTP
WebHTTPStatus501
501 is the appropriate response when the server does not recognize the request method and is incapable of supporting it for any resource.
About JavaScript - JavaScript
in a nutshell, javascript is a dynamic scripting language supporting prototype based object construction.
JavaScript Guide - JavaScript
defining methods getter and setter details of the object model prototype-based oop creating object hierarchies inheritance promises guarantees chaining error propagation composition timing iterators and generators iterators iterables generators meta programming proxy handlers and traps revocable proxy reflect javascript modules exporting importing default exports renaming features aggregating modules dynamic module loading next » ...
Warning: String.x is deprecated; use String.prototype.x instead - JavaScript
examples deprecated syntax var num = 15; string.replace(num, /5/, '2'); standard syntax var num = 15; string(num).replace(/5/, '2'); shim the following is a shim to provide support to non-supporting browsers: /*globals define*/ // assumes all supplied string instance methods already present // (one may use shims for these if not available) (function() { 'use strict'; var i, // we could also build the array of methods with the following, but the // getownpropertynames() method is non-shimable: // object.getownpropertynames(string).filter(function(methodname) { // ret...
TypeError: "x" is not a function - JavaScript
using the latter will throw an error: const sixteen = 2(3 + 5); alert('2 x (3 + 5) is ' + string(sixteen)); //uncaught typeerror: 2 is not a function you can correct the code by adding a * operator: const sixteen = 2 * (3 + 5); alert('2 x (3 + 5) is ' + string(sixteen)); //2 x (3 + 5) is 16 import the exported module correctly ensure you are importing the module correctly.
Math.fround() - JavaScript
polyfill this can be emulated with the following function, if float32array are supported: math.fround = math.fround || (function (array) { return function(x) { return array[0] = x, array[0]; }; })(new float32array(1)); supporting older browsers is slower, but also possible: if (!math.fround) math.fround = function(arg) { arg = number(arg); // return early for ±0 and nan.
Number.prototype.toLocaleString() - JavaScript
a check that works in all hosts, including those supporting ecma-262 prior to ed 5.1, is to test for the features specified in ecma-402 that are required to support regional options for number.prototype.tolocalestring directly: function tolocalestringsupportsoptions() { return !!(typeof intl == 'object' && intl && typeof intl.numberformat == 'function'); } this tests for a global intl object, checks that it's not null and that it has a numberformat p...
WebAssembly.Instance.prototype.exports - JavaScript
instance.exports examples using exports after fetching some webassembly bytecode using fetch, we compile and instantiate the module using the webassembly.instantiatestreaming() function, importing a javascript function into the webassembly module in the process.
WebAssembly.Memory() constructor - JavaScript
the following example (see memory.html on github, and view it live also) fetches and instantiates the loaded memory.wasm byte code using the webassembly.instantiatestreaming() method, while importing the memory created in the line above.
WebAssembly.Memory.prototype.buffer - JavaScript
examples using buffer the following example (see memory.html on github, and view it live also) fetches and instantiates the loaded memory.wasm byte code using the webassembly.instantiatestreaming() method, while importing the memory created in the line above.
WebAssembly.Memory - JavaScript
the following example (see memory.html on github, and view it live also) fetches and instantiates the loaded memory.wasm byte code using the webassembly.instantiatestreaming() method, while importing the memory created in the line above.
WebAssembly.instantiate() - JavaScript
first overload example after fetching some webassembly bytecode using fetch, we compile and instantiate the module using the webassembly.instantiate() function, importing a javascript function into the webassembly module in the process.
Object initializer - JavaScript
in non-supporting environments, these notations will lead to syntax errors.
Strict mode - JavaScript
browsers not supporting strict mode will run strict mode code with different behavior from browsers that do, so don't rely on strict mode without feature-testing for support for the relevant aspects of strict mode.
JavaScript
javascript is a prototype-based, multi-paradigm, single-threaded, dynamic language, supporting object-oriented, imperative, and declarative (e.g.
orientation - Web app manifests
note: orientation and/or its specific values might not be supported by a user agent on various display modes because supporting them does not make sense for the particular context.
Codecs used by WebRTC - Web media technologies
other requirements for the purposes of supporting switching between portrait and landscape orientations, there are two methods that can be used.
Media type and format guide: image, audio, and video content - Web media technologies
WebMediaFormats
the modern web has powerful features to support the presentation and manipulation of media, with several media-related apis supporting various types of content.
Navigation and resource timings - Web Performance
((resource) => { console.dir(resource); }); performance.getentriesbytype('mark').foreach((mark) => { console.dir(mark); }); performance.getentriesbytype("measure").foreach((measure) => { console.dir(measure); }); performance.getentriesbytype('paint').foreach((paint) => { console.dir(paint); }); performance.getentriesbytype('frame').foreach((frame) => { console.dir(frame); }); in supporting browsers, you can use performance.getentriesbytype('paint') to query the measure for first-paint and first-contentful-paint.
Performance Monitoring: RUM vs synthetic monitoring - Web Performance
synthetic monitoring involves deploying scripts to simulate the path an end user might take through a web application, reporting back the performance the simulator experiences.
Using dns-prefetch - Web Performance
if a non-supporting browser encounters a dns-prefetch hint—or any other resource hint—your site won’t break.
Web Performance
in this guide we'll discuss some alternative media formats, how to use them responsibly so that non-supporting browsers don't get left out in the cold, and some advanced guidance on transcoding your existing assets to them.
Privacy, permissions, and information security
e likelihood of man-in-the-middle attacks http strict transport security (hsts) hsts is used by servers to let them protect themselves from protocol downgrade and cookie hijack attacks by letting sites tell clients that they can only use https to communicate with the server http/2 while http/2 technically does not have to use encryption, most browser developers are only supporting it when used with https, so it can be thought of in that regard as being security-related permissions api provides a way to determine the status of permissions for the current browser context transport layer security (tls); formerly known as secure sockets layer (ssl) tls provides security and privacy by encrypting data during transport over the network.
Add to Home screen - Progressive web apps (PWAs)
when this happens, supporting browsers will fire a beforeinstallprompt event.
How to make PWAs installable - Progressive web apps (PWAs)
when the user visits the pwa with a supporting mobile browser, it should display a notification (such as a banner or dialog box) indicating that it's possible to install the app as a pwa.
Structural overview of progressive web apps - Progressive web apps (PWAs)
this script begins by importing data from the file games.js in the data directory: self.importscripts("data/games.js"); then it creates a list of all the files that the service worker needs to cache.
SVG documentation index - SVG: Scalable Vector Graphics
WebSVGIndex
versions of svg viewers prior to the release of firefox 1.5 unfortunately paid scant attention to namespaces, but they are essential to multi-xml dialect supporting user agents such as gecko-based browsers which must be very strict.
Namespaces crash course - SVG: Scalable Vector Graphics
versions of svg viewers prior to the release of firefox 1.5 unfortunately paid scant attention to namespaces, but they are essential to multi-xml dialect supporting user agents such as gecko-based browsers which must be very strict.
SVG fonts - SVG: Scalable Vector Graphics
again, you can use arbitrary svg to define the glyph, which allows for great effects in supporting user agents.
Tools for SVG - SVG: Scalable Vector Graphics
science the well-known plotting tools xfig and gnuplot both support exporting as svg.
Features restricted to secure contexts - Web security
push api 42 17 not supported 44 reporting api supported not supported not supported behind flag since fx 65 service workers 40 17 11.1 44 storage api 55 not supported not supported 51 web authentication api 65 in preview (17) in development 60 web bluetooth 56 not supported not supported not supported web midi (see midiaccess, for exa...
Types of attacks - Web security
in supporting browsers, this will have the effect of ensuring that the session cookie is not sent along with cross-site requests and so the request is effectively unauthenticated to the application server.
Web security
oss-site scripting cryptanalysis cryptographic hash function cryptography csp csrf decryption digital certificate dtls encryption forbidden header name forbidden response header name hash hmac hpkp hsts https key mitm owasp preflight request public-key cryptography reporting directive robots.txt same-origin policy session hijacking sql injection symmetric-key cryptography tofu tls ...
Using the Mozilla JavaScript interface to XSL Transformations - XSLT: Extensible Stylesheet Language Transformations
note: the import is live, meaning that if you alter the stylesheet dom after importing it, this will be reflected in the processing.
Introduction - XSLT: Extensible Stylesheet Language Transformations
introduction with modern browsers supporting xslt, developers can now use javascript to access the power that xslt provides.
Exported WebAssembly functions - WebAssembly
if you load the above example in a webassembly-supporting browser, and run the following lines in your console: var testfunc = othertable.get(0); typeof testfunc; you'll get the result function returned.
Loading and running WebAssembly code - WebAssembly
e.wasm'), importobject) .then(obj => { // call an exported function: obj.instance.exports.exported_func(); // or access the buffer contents of an exported memory: var i32 = new uint32array(obj.instance.exports.memory.buffer); // or access the elements of an exported table: var table = obj.instance.exports.table; console.log(table.get(0)()); }) note: for more information on how exporting from a webassembly module works, have a read of using the webassembly javascript api, and understanding webassembly text format.
Compiling from Rust to WebAssembly - WebAssembly
in this case, we're importing everything in the wasm_bindgen::prelude module.
Understanding WebAssembly text format - WebAssembly
lly equivalent to including a separate function statement outside the function, elsewhere in the module in the same manner as we did before, e.g.: (export "getanswerplus1" (func $functionname)) the javascript code to call our above module looks like so: webassembly.instantiatestreaming(fetch('call.wasm')) .then(obj => { console.log(obj.instance.exports.getanswerplus1()); // "43" }); importing functions from javascript we have already seen javascript calling webassembly functions, but what about webassembly calling javascript functions?