Search completed in 1.35 seconds.
ChromeWorkers and the Chrome worker loader
To complement the open Web Worker functionality, Mozilla has introduced the
ChromeWorker interface, which provides this capability within application
chrome. That makes it available not only to the application itself, but also to add-ons. This documentation covers
chrome Workers and the
chrome worker module loader. Note: If you're contributing content to this section, create subpages using the "New sub-page" option in the "This page" menu. Once you've saved your new page, come back to this one and force-refresh this page. That will regenerate the table of contents below for all readers.
Chrome Worker ModulesThe preferred way to define and load modules for
Chrome Workers is to use the
Chrome Worker Module Loader. This module loader should not surprise developers familiar with CommonJ...
Chrome registration
What is
chrome? ...
... What is
chrome?
Chrome is the set of user interface elements of the application window that are outside the window's content area. Toolbars, menu bars, progress bars, and window title bars are all examples of elements that are typically part of the
chrome. Mozilla locates and reads the root
chrome.manifest file for extensions and themes. Note: With Gecko 1.9.2 and older, Mozilla reads
chrome/*.manifest files from applications. Starting with Gecko 2.0, the root
chrome.manifest is the only manifest used; you can add manifest commands to that file to load secondary manifests.
Chrome providers A supplier of
chrome for a given window type (e.g., for the browser window) is called a
chrome provider. The providers work together to supply a complete set of
chrome for a particular window, f...
...It will typically be a XUL file, since XUL is designed for describing the contents of windows and dialogs. ...
...And 28 more matches
Limitations of chrome scripts
This page describes patterns that used to work in the
chrome process that will no longer work in multiprocess Firefox. These are the sorts of things that will break an old add-on in multiprocess Firefox. The fix is generally some variant of "do that in a frame script loaded into the content process". This is one of a pair of articles: the other one lists limitations of frame scripts. Compatibility shims For many of the patterns described here we've implemented compatibility shims so the patterns still work. For example: whenever extensions try to access web content from the
chrome process, the browser will return a Cross Process Object Wrapper that gives the
chrome code synchronous access to the content. You'll get the shims for your add-on by default, unless you set the multiprocess...
...wser console as you use the add-on. The rest of this page documents patterns that don't work in multiprocess Firefox as well as how are shims try to paper over the problem. For each pattern we've noted: whether a shim exists and what kind of behavior it provides how to update your add-on so you don't need the shim gBrowser.contentWindow, window.content... ...
...ltiprocess Firefox as well as how are shims try to paper over the problem. For each pattern we've noted: whether a shim exists and what kind of behavior it provides how to update your add-on so you don't need the shim gBrowser.contentWindow, window.content... Without the shim All APIs in the
chrome process that provide direct access to content objects will no longer work. ...
...And 14 more matches
Working with windows in chrome code
This article describes working with multiple windows in Mozilla
chrome code (XUL applications and Extensions). It contains tips and example code on opening new windows, finding an already opened window, and passing data between different windows. Opening windows From a <script> in a window or an overlay To open a new window, we usually use a window.open or window.openDialog DOM call, like this: var win = window.open("
chrome://myextension/content/about.xul", "aboutMyExtension", "
chrome,centerscreen"); The first parameter to window.open is the URI of the XUL file that describes the window and its contents. The second parameter is the window's name; the name can be used in links or forms as the target attribute. This is different from the user-visible window t...
...example, when opening a window from XPCOM component code), you might want to use nsIWindowWatcher interface. Its parameters are similar to window.open; in fact, window.open's implementation calls nsIWindowWatcher's methods. var ww = Components.classes["@mozilla.org/embedcomp/window-watcher;1"] .getService(Components.interfaces.nsIWindowWatcher); var win = ww.openWindow(null, "
chrome://myextension/content/about.xul", "aboutMyExtension", "
chrome,centerscreen", null); Window object Note the win variable in the above section, which is assigned the return value of window.open. It can be used to access the opened window. The return value of window.open (and similar methods) is a Window object (usually
ChromeWindow) - the same type as the window variable.
...ty, you can move the initialization code to a load handler of the window being opened or pass a callback function, as described below. You can get a Window object from a document using document.defaultView. ...
...And 14 more matches
nsIChromeRegistry
chrome/public/nsI
ChromeRegistry.idlScriptable Provides access to the
chrome registry; you can use this to get information about
chrome documents that have been registered. ...
...
chrome/public/nsI
ChromeRegistry.idlScriptable Provides access to the
chrome registry; you can use this to get information about
chrome documents that have been registered. ...
...
chrome/public/nsI
ChromeRegistry.idlScriptable Provides access to the
chrome registry; you can use this to get information about
chrome documents that have been registered. ...
...And 12 more matches
The Chrome URL - Archive of obsolete content
<< PreviousNext >> The following section will describe how to refer to XUL documents and other
chrome files. The
Chrome URL XUL files can be referenced with a regular HTTP URL (or any type of URL) just like HTML files. However, packages that are installed into Mozilla's
chrome system can be referenced with special
chrome URLs. The packages included with Mozilla will already be installed but you can register your own. Installed packages have the advantage that they don't have security restrictions placed on them, which is necessary for many applications. Another advantage over other URL types is that they automatically handle multiple themes and locales. ...
...Mozilla will take care of determining where the file is located and return the right data. ...
...ity restrictions placed on them, which is necessary for many applications. Another advantage over other URL types is that they automatically handle multiple themes and locales. For example, a
chrome URL lets you refer to a file in the theme such as an image without needing to know which theme the user is using. As long as the filenames are the same in each theme, you can refer to the file using a
chrome URL. Mozilla will take care of determining where the file is located and return the right data. This also means that it doesn't matter where the package is installed to be able to access it. The
chrome URLs are independent of where the files might physically be located. This makes it much easier to write applications that have lots of files since you don't have to worry about the details of locat...
...And 9 more matches
nsIWebBrowserChrome
Inherits from: nsISupports Last changed in Gecko 0.9.6 Method overview void destroyBrowserWindow(); void exitModalEventLoop(in nsresult aStatus); boolean isWindowModal(); void setStatus(in unsigned long statusType, in wstring status); void showAsModal(); void sizeBrowserTo(in long aCX, in long aCY); Attributes Attribute Type Description
chromeFlags unsigned long The
chrome flags for this browser
chrome. ...
...In this case the implementer is responsible for...
...od overview void destroyBrowserWindow(); void exitModalEventLoop(in nsresult aStatus); boolean isWindowModal(); void setStatus(in unsigned long statusType, in wstring status); void showAsModal(); void sizeBrowserTo(in long aCX, in long aCY); Attributes Attribute Type Description
chromeFlags unsigned long The
chrome flags for this browser
chrome. The implementation should reflect the value of this attribute by hiding or showing its
chrome appropriately. webBrowser nsIWebBrowser The currently loaded WebBrowser. The browser
chrome may be told to set the WebBrowser object to a new object by setting this attribute. In this case the implementer is responsible for taking the new WebBrowser object an...
...And 9 more matches
Browser chrome tests
It is possible to run specific groups of tests. ...
... It is possible to run specific groups of tests. ...
... It is possible to run specific groups of tests. ...
...And 5 more matches
Chrome Authority - Archive of obsolete content
From this, the module can do pretty much anything the browser is capable of. To obtain these privileges, the module must declare its intent with a statement like the following: var {Cc, Ci} = require("
chrome"); The "
chrome" built-in pseudo module is provided by the "toolkit/loader" module. ...
...
Chrome Authority The most powerful low-level modules are run with "
chrome privileges", which gives them access to the infamous Components object, which grants unfettered access to the host system. From this, the module can do pretty much anything the browser is capable of. To obtain these privileges, the module must declare its intent with a statement like the following: var {Cc, Ci} = require("
chrome"); The "
chrome" built-in pseudo module is provided by the "toolkit/loader" module. The object returned by require("
chrome"), when unpacked with the destructuring assignment feature available in the Mozilla JS environment, will provide the usual Components.* aliases: Cc An alias for Components.classes. Ci An alias for Components.interfaces. Cu An alias for Components.utils. Cr An alias f...
...s.* aliases: Cc An alias for Components.classes. Ci An alias for Components.interfaces. Cu An alias for Components.utils. Cr An alias for Components.results. Cm An alias for Components.manager. components An alias for Components itself (note the lower-case). From this you can access less-frequently-used properties like Components.stack and Components.isSuccessCode. Note: the require("
chrome") statement is the only way to access
chrome functionality and the Components API. The Components object should not be accessed from modules. The SDK tools will emit a warning if it sees module code which references Components directly. Your modules should refrain from using
chrome privileges unless they are absolutely necessary.
Chrome-authority-using modules must receive extra security review,...
...And 3 more matches
Metro browser chrome tests - Archive of obsolete content
For information on setting your local build as the default, visit the Windows 8 Integration wiki page. It is possible to run individual tests as well. ...
...For information on setting your local build as the default, visit the Windows 8 Integration wiki page. It is possible to run individual tests as well. ...
...he immersive version of Firefox for Windows 8 and above using JavaScript. It currently allows you to run JavaScript code in the same scope as the immersive browser and report results using the same functions as the Mochitest test framework. Running the metro browser
chrome tests To run Mochitest, first build Mozilla with your changes; then run ./mach mochitest-metro This will launch metro browser
chrome tests in the default immersive browser. For information on setting your local build as the default, visit the Windows 8 Integration wiki page. It is possible to run individual tests as well. As with Mochitest, the path given as an argument is the path to a test file within the Mozilla source tree. If the path points to the root tests directory, then all metro browser
chrome tests will be run. For...
...And 3 more matches
registerChrome - Archive of obsolete content
SKIN is used to register skins, LOCALE is used to register language packs. PACKAGE, a third possibility is the equivalent of SKIN AND/OR LOCALE, and ensures that everything in the XPI is registered. One final option for the switch parameter is DELAYED_
CHROME, which registers the switch only after a relaunch of the browser. Note that you can combine switches as in the example below. ...
...ster
Chrome method has the following parameters: SWITCH SWITCH is the
chrome switch indicating what type of file is being registered. SKIN is used to register skins, LOCALE is used to register language packs. PACKAGE, a third possibility is the equivalent of SKIN AND/OR LOCALE, and ensures that everything in the XPI is registered. One final option for the switch parameter is DELAYED_
CHROME, which registers the switch only after a relaunch of the browser. Note that you can combine switches as in the example below. srcDir srcDir is a FileSpecObject representing the source destination of the installation. FileSpecObjects like that required by this function are created using the getFolder method on the Install object. xpiPath xpiPath is the path within ...
...f the browser. Note that you can combine switches as in the example below. srcDir srcDir is a FileSpecObject representing the source destination of the installation. FileSpecObjects like that required by this function are created using the getFolder method on the Install object. xpiPath xpiPath is the path within the XPI in where the contents.rdf file defining the
chrome is located. For example, "locale/myLocale/aim," points to the locale/myLocale/aim subdirectory of the same XPI file in which the installation script is located. Returns An integer error code. For a list of possible values, see Return Codes. In some situations the method may return other errors. In a few cases you may get a registry error. Description When the third parameter is omitted (pointin...
...And 3 more matches
Chrome-only CSS reference
This page lists CSS properties that are only available in Gecko
Chrome code (and sometimes in other privileged circumstances, eg. UA stylesheets.) Note: Most of the CSS properties exposed to the Web in general are also usable in
Chrome stylesheets: see the CSS documentation for a list of these. -moz-window-draggingThe -moz-window-dragging CSS property specifies whether a window is draggable or not. ...
...es that are only available in Gecko
Chrome code (and sometimes in other privileged circumstances, eg. UA stylesheets.) Note: Most of the CSS properties exposed to the Web in general are also usable in
Chrome stylesheets: see the CSS documentation for a list of these. -moz-window-draggingThe -moz-window-dragging CSS property specifies whether a window is draggable or not. ...
...stances, eg. UA stylesheets.) Note: Most of the CSS properties exposed to the Web in general are also usable in
Chrome stylesheets: see the CSS documentation for a list of these. -moz-window-draggingThe -moz-window-dragging CSS property specifies whether a window is draggable or not. ...
...And 3 more matches
ChromeWorker
andard and is not on a standards track. Do not use it on production sites facing the Web: it will not work for every user. There may also be large incompatibilities between implementations and the behavior may change in the future. ...
... in the future. Summary If you're developing privileged code, and would like to create a worker that can use js-ctypes to perform calls to native code, you can do so by using
ChromeWorker instead of the standard Worker object. It works exactly like a standard Worker, except that it has access to js-ctypes via a global ctypes object available in the global scope of the worker. Examples of
ChromeWorker's using js-ctypes are availabe on Github and are linked to from the See Also section below. To use a postMessage with callback version of
ChromeWorker that features promises, see PromiseWorker. Addons must use absolute URLs to load their workers, and those URLs have to be using a
chrome:// or resource:// protocol (file:// is not accepted). Addons that wish to use file:// URLs must first re...
...hat wish to use file:// URLs must first register a resource replacement path, using code like this: var fileuri = Services.io.newFileURI(file); Services.io.getProtocolHandler('resource'). QueryInterface(Ci.nsIResProtocolHandler). ...
...And 2 more matches
monochrome - CSS: Cascading Style Sheets
The mono
chrome CSS media feature can be used to test the number of bits per pixel in the mono
chrome frame buffer of the output device. Syntax The mono
chrome feature is specified as an <integer> representing the number of bits per pixel in the mono
chrome frame buffer. If the device is not a mono
chrome device, the value is zero. It is a range feature, meaning that you can also use the prefixed min-mono
chrome and max-mono
chrome variants to query minimum and maximum values, respectively. ...
...ono
chrome feature is specified as an <integer> representing the number of bits per pixel in the mono
chrome frame buffer. If the device is not a mono
chrome device, the value is zero. It is a range feature, meaning that you can also use the prefixed min-mono
chrome and max-mono
chrome variants to query minimum and maximum values, respectively. ...
... of bits per pixel in the mono
chrome frame buffer. If the device is not a mono
chrome device, the value is zero. It is a range feature, meaning that you can also use the prefixed min-mono
chrome and max-mono
chrome variants to query minimum and maximum values, respectively. ...
...And 2 more matches
Hiding browser chrome - Archive of obsolete content
This is done, for example, by the about:addons page. This can be accomplished by augmenting the behavior of the XULBrowserWindow object's hide
ChromeForLocation() method. Note: Don't simply replace the hide
ChromeForLocation() method; this will likely hurt the functionality of Firefox itself as well as other extensions. Use the technique demonstrated here. ...
...times in which an extension may find it useful to hide browser
chrome (that is, toolbars, the location bar, and so forth), in order to reduce clutter when presenting a particular user interface. This is done, for example, by the about:addons page. This can be accomplished by augmenting the behavior of the XULBrowserWindow object's hide
ChromeForLocation() method. ...
...rface. This is done, for example, by the about:addons page. This can be accomplished by augmenting the behavior of the XULBrowserWindow object's hide
ChromeForLocation() method. Note: Don't simply replace the hide
ChromeForLocation() method; this will likely hurt the functionality of Firefox itself as well as other extensions. Use the technique demonstrated here. var prevFunc = XULBrowserWindow.hide
ChromeForLocation; XULBrowserWindow.hide
ChromeForLocation = function(aLocation) { return (/* your test goes here */) || prevFunc.apply(XULBrowserWindow, [aLocation]); } This works by saving a reference to the current implementation of the hide
ChromeForLocation() method, then replacing it with a new method that calls through to the previous implementation. By chaining multiple implementations of the m...
...unction(aLocation) { return (/* your test goes here */) || prevFunc.apply(XULBrowserWindow, [aLocation]); } This works by saving a reference to the current implementation of the hide
ChromeForLocation() method, then replacing it with a new method that calls through to the previous implementation. By chaining multiple implementations of the method together in this way, everyone that wants to hide
chrome can do so when appropriate. ...
Chromeless - Archive of obsolete content
The aim is to enable developers to create full blown desktop applications using only Web technologies.
Chromeless apps have access to a collection of JavaScript APIs that provide them with deep desktop integration. One of the core capabilities of the
Chromeless platform is the ability to safely embed untrusted Web applications inside these applications. ...
... [This project may not be active -- check Github https://github.com/mozilla/
chromeless]
Chromeless is a Mozilla Labs project in its early stages. The aim is to enable developers to create full blown desktop applications using only Web technologies.
Chromeless apps have access to a collection of JavaScript APIs that provide them with deep desktop integration. One of the core capabilities of the
Chromeless platform is the ability to safely embed untrusted Web applications inside these applications.
Chromeless vs Prism/WebRunner Prism (an ex-Mozilla Labs project, now discontinued but kept going independently of Mozilla under the [now discontinued] WebRunner name) was/is a way to make Web pages superficially appear to be native applications. Firefox users could choose to turn a Web page into a "P...
... ...
nsIDOMChromeWindow
Inherits from: nsISupports Last changed in Gecko 2.0 (Firefox 4 / Thunderbird 3.3 / SeaMonkey 2.1) Method overview void beginWindowMove(in nsIDOMEvent mouseDownEvent); void getAttention(); void getAttentionWithCycleCount(in long aCycleCount); void maximize(); void minimize(); void notifyDefaultButtonLoaded(in nsIDOMElement defaultButton); void restore(); void setCursor(in DOMString cursor); Attributes Attribute Type Description browserDOMWindow nsIBrowserDOMWindow The related nsIBrowserDOMWindow instance which provides access to yet another layer of utility functions by
chrome script. ...
...It will be null for DOMWindows not corresponding to browsers. messageManager nsI
ChromeFrameMessageManager Read only. title DOMString Obsolete since Gecko 1.9.1 windowState unsigned short Returns current window state, the value is one of STATE_* constants. Read only. Constants Constant Value Description STATE_MAXIMIZED 1 The window is maximized. STATE_MINIMIZED 2 The wind...
...DefaultButtonLoaded(in nsIDOMElement defaultButton); void restore(); void setCursor(in DOMString cursor); Attributes Attribute Type Description browserDOMWindow nsIBrowserDOMWindow The related nsIBrowserDOMWindow instance which provides access to yet another layer of utility functions by
chrome script. It will be null for DOMWindows not corresponding to browsers. messageManager nsI
ChromeFrameMessageManager Read only. title DOMString Obsolete since Gecko 1.9.1 windowState unsigned short Returns current window state, the value is one of STATE_* constants. Read only. Constants Constant Value Description STATE_MAXIMIZED 1 The window is maximized. STATE_MINIMIZED 2 The window is minimized. STATE_NORMAL 3 The window is normal. STATE_FULLSCREEN 4 The window is in full...
InstallTrigger.installChrome - Archive of obsolete content
InstallTrigger.install
Chrome Trigger scripts are typically invoked by JavaScript event handlers on hyperlinks. When a user clicks the link "Install the New Blue theme" in the example below, XPInstall downloads, registers, and installs the theme contained in newblue.xpi to the user's profile directory. ...
... InstallTrigger.install
Chrome Trigger scripts are typically invoked by JavaScript event handlers on hyperlinks. When a user clicks the link "Install the New Blue theme" in the example below, XPInstall downloads, registers, and installs the theme contained in newblue.xpi to the user's profile directory. ...
Specifying Startup Chrome Window - Archive of obsolete content
Main
Chrome Window In order to specify the main
chrome window of your XULRunner application, you'll need to add a preferences file to your application directory structure and add a preference named toolkit.default
ChromeURI to that file. Let's look at the xulmine XULRunner application. It's directory structure is as follows: xulmine +---
chrome +---components +---defaults +---preferences In defaults/preferences, there is a file named xulmine.js. Its contents are: pref("toolkit.default
ChromeURI", "
chrome://xulmine/content/xulmine.xul"); The toolkit.default
ChromeURI preference specifies that the XUL window at
chrome://xulmine/content/xulmine.xul is the main application window. Specifying a Single Instance Main Window By default, each time the user launches the application XULRu...
...mine.js. Its contents are: pref("toolkit.default
ChromeURI", "
chrome://xulmine/content/xulmine.xul"); The toolkit.default
ChromeURI preference specifies that the XUL window at
chrome://xulmine/content/xulmine.xul is the main application window. Specifying a Single Instance Main Window By default, each time the user launches the application XULRunner opens the window specified by toolkit.default
ChromeURI. An application wishing to have only one main window should set the toolkit.singletonWindowType preference and specify the windowtype attribute on the main application window. Specifying Window Features By default, the main window is opened as a resizeable, non-dialog
chrome window. This default can be changed by setting the toolkit.default
ChromeFeatures preference. ...
Chrome - MDN Web Docs Glossary: Definitions of Web-related terms
This is not to be confused with the Google
Chrome browser. ...
... In a browser, the
chrome is any visible aspect of a browser aside from the webpages themselves (e.g., toolbars, menu bar, tabs). This is not to be confused with the Google
Chrome browser. Learn more Browser and GUI
Chrome ...
Chrome Worker Modules
This module loader should not surprise developers familiar with CommonJS, as it implements a minimal CommonJS require(). Loading modules Loading a module is simple. Start by importing the module loader. You only need to do it once for each worker, from within the
chrome worker itself: importScripts("resource://gre/modules/workers/require.js"); Note: Although you only need to do this once for each worker, it doesn't hurt if you do it more than once. ...
...Stack traces Unfortunately, the module loader doesn't play nicely with error stack traces. That is, the following will not show human-readable stacks: try { MyModule.foo(); } catch (ex) { log("Exception raised at " + ex.fileName) log("Stack: " + ex.stack); } Rather, you should use properties moduleName and moduleStack, as follows: try ...
Chrome-only API reference
This page lists APIs that only run in Gecko
Chrome code (and sometimes in other privileged circumstances). Note: Most of the APIs exposed to the Web in general are also usable in
Chrome code: see Web APIs for a list of these. Browser APIThe HTML Browser API is an extension of the HTML <iframe> element that allows web apps to implement browsers or browser-like applications. It currently works in (privileged)
chrome code on Firefox desktop (version 47 and above).
ChromeWorkerIf you're developing privileged code, and would like to create a worker that can use js-ctypes to perform calls to native code, you can do so by using
ChromeWorker instead of the standard Worker object. It works exactly like a standard Worker, except that it has access to js-ctypes via a global ctypes object available...
...ersion 47 and above).
ChromeWorkerIf you're developing privileged code, and would like to create a worker that can use js-ctypes to perform calls to native code, you can do so by using
ChromeWorker instead of the standard Worker object. It works exactly like a standard Worker, except that it has access to js-ctypes via a global ctypes object available in the global scope of the worker. Examples of
ChromeWorker's using js-ctypes are availabe on Github and are linked to from the See Also section below. To use a postMessage with callback version of
ChromeWorker that features promises, see PromiseWorker. ...
nsIWebBrowserChrome2
embedding/browser/webBrowser/nsIWebBrowser
Chrome2.idlScriptable An extension to nsIWebBrowser
Chrome. 1.0 66 Introduced Gecko 1.9 Inherits from: nsIWebBrowser
Chrome Last changed in Gecko 1.9 (Firefox 3) Method overview void setStatusWithContext(in unsigned long statusType, in AString statusText, in nsISupports statusContext); Methods setStatusWithContext() Called when the status text in the
chrome needs to be updated. This method may be called instead of nsIWebBrowser
Chrome.SetStatus(). An implementor of this method, should still implement nsIWebBrowser
Chrome.SetStatus(). void setStatusWithContext( in unsigned long statusType, in AString statusText, in nsISupports statusContext ); Parameters statusType Indicates what is setting the ...
...meters statusType Indicates what is setting the text. statusText Status string. null is an acceptable value meaning no status. statusContext An object that provides context pertaining to the status type. If statusType is STATUS_LINK, then this may be a DOM node corresponding to the source of the link. This value can be null if there is no context. See also nsIWebBrowser
Chrome ...
nsIWebBrowserChrome3
AString onBeforeLinkTraversal( in AString originalTarget, in nsIURI linkURI, in nsIDOMNode linkNode, in PRBool isAppTab ); Parameters originalTarget The original link target. linkURI Link destination URI. ...
...String originalTarget, in nsIURI linkURI, in nsIDOMNode linkNode, in PRBool isAppTab ); Parameters originalTarget The original link target. linkURI Link destination URI. linkNode Link DOM node. isAppTab Whether or not the link is in an application tab. Return value A new link target, if appropriate. Otherwise returns originalTarget. See also nsIWebBrowser
Chrome2 ...
nsIWebBrowserChromeFocus
It represents the focus up-calls from Mozilla to the embedding
chrome. Inherits from: nsISupports Last changed in Gecko 1.7 Method overview void focusNextElement(); void focusPrevElement(); Methods focusNextElement() Set the focus at the next focusable element in the
chrome. void focusNextElement(); Parameters None. focusPrevElement() Set the focus at the previous focusable element in the
chrome. void focusPrevElement(); Parameters None. ...
...void focusPrevElement(); Parameters None. ...
installChrome - Web APIs
install
Chrome Installs new skin or locale packages in Netscape 6 and Mozilla. Method of InstallTrigger object Syntax int install
Chrome( TYPE, url, name ) Parameters The install
Chrome method has the following parameters: TYPE TYPE can be InstallTrigger.SKIN or InstallTrigger.LOCALE. url url is a string containing a full or relative URL to download name name is displayed in the dialog, but is also used to *select* the theme somust match exactly the name in the internal manifest.rdf file. Returns A boolean value indicating False if the software install feature has been turned off, and True if it's on. Note that this return value does not indicate anything about the success of the installation. ...
...RL to download name name is displayed in the dialog, but is also used to *select* the theme somust match exactly the name in the internal manifest.rdf file. Returns A boolean value indicating False if the software install feature has been turned off, and True if it's on. Note that this return value does not indicate anything about the success of the installation. Description install
Chrome is a special method for installing new
chrome in Netscape 6 and Mozilla. The method performs a simplified installation of language packs or Netscape 6/Mozilla skins, and saves you the trouble of writing separate installation scripts in the XPI files or using the more sophisticated methods of the Install and File objects. ...
chrome - Archive of obsolete content
You should avoid using the API if at all possible. We intend to deprecate it in future releases. If you use this API you can expect your add-on to get an extra security review by addons.mozilla.org. This module should not be confused with the "
chrome" global variable that WebExtensions can use to access APIs. The
chrome module gives an Add-on SDK add-on access to the Components object, which in turn gives it access to a large set of privileged low-level Firefox APIs.
chrome is a built-in pseudo module of the toolkit loader. See the
chrome authority tutorial for more details. You can see an example of using this API in the XUL Migration Guide. ...
Using XPCOM without chrome - Archive of obsolete content
Below is an example for the XPCOM bookmark observer. Examples Bookmarks Observer Normally, a bookmark observer would require
Chrome Components and XPCOMUtils as described in the following links: (Observing changes to bookmarks and tags) , (Creating Event Targets). However, with the sdk module , we can remove this need. Below is an example, where we extend the xpcom module's Unknown class with an nsINavBookmarkObserverinterface and one of its optional interface methods (onItemchanged). ...
chrome.manifest - Archive of obsolete content
Copy the following text and paste it into a text file, then save that file as "
chrome.manifest": skin global My_Theme jar:
chrome/My_Theme.jar!/global/ skin mozapps My_Theme jar:
chrome/My_Theme.jar!/mozapps/ skin messenger My_Theme jar:
chrome/My_Theme.jar!/messenger/ skin messenger-newsblog My_Theme jar:
chrome/My_Theme.jar!/messenger-newsblog/ skin communicator My_Theme jar:
chrome/My_Theme.jar!/communicator/ skin help My_Theme jar:
chrome/My_Theme.jar!/help/ skin navigator My_Theme jar:
chrome/My_Theme.jar!/navigator/ skin editor My_Theme jar:
chrome/My_Theme.jar!/editor/ ...
chromemargin - Archive of obsolete content
The specified string should contain four numbers, separated by commas, indicating the margin in pixels for the top, right, bottom, and left edges of the window, respectively. This value may be -1 to use the default margin for that side on the current platform, 0 to have no system border (that is, to extend the client area to the edge of the window), or a value greater than zero to indicate how much less than the default default width you wish the margin on that side to be. If this value turns out to be less than 0, 0 is used. ...
disablechrome - Archive of obsolete content
<< XUL Reference home disable
chrome Type: boolean Set this attribute to true to disable
chrome in the window. This is used to hide
chrome when showing in-browser UI such as the about:addons page, and causes the toolbars to be hidden, with only the tab strip (and, if currently displayed, the add-on bar) left showing. Note: This has no effect if the tabs on top preference is turned off. ...
toolkit.defaultChromeFeatures - Archive of obsolete content
Type: String Specified by: default prefs of XULRunner applications Default: "
chrome,dialog=no,all" Example: pref("toolkit.default
ChromeFeatures", "
chrome,resizable=no,dialog=no"); The toolkit.default
ChromeFeatures preference allows simple XULRunner-based applications to specify what features are passed to window.open() when the main application window is opened. See also: XULRunner:Specifying Startup
Chrome Window, DOM:window.open, toolkit.default
ChromeURI, toolkit.singletonWindowType. ...
toolkit.defaultChromeURI - Archive of obsolete content
Type: String Specified by: default prefs of XULRunner applications Default: none Example: pref("toolkit.default
ChromeURI", "
chrome://myapp/content/"); The toolkit.default
ChromeURI preference allows simple XULRunner-based applications to open a new window when the application is launched. The preference specifies the URI of a
chrome window to be opened. See also: XULRunner:Specifying Startup
Chrome Window, toolkit.default
ChromeFeatures, toolkit.singletonWindowType. ...
Using the DOM File API in chrome code - Extensions
In fact, you get one bonus feature: you can create File objects specifying the path of the file on the user's computer. This only works from privileged code, so web content can't do it. This protects users from the inherent security risks associated with allowing web content free access to the contents of their disks. If you pass a path to the File constructor from unprivileged code (such as web content), an exception will be thrown. Scope Availability In the JSM scope File is available without needing to do anything special. ...
Google Chrome - MDN Web Docs Glossary: Definitions of Web-related terms
Google
Chrome is a free Web browser developed by Google. It's based on the Chromium open source project. Some key differences are described on the Chromium wiki.
Chrome supports its own layout called Blink. Note that the iOS version of
Chrome uses that platform's WebView, not Blink. Learn more General knowledge Google
Chrome on Wikipedia For
Chrome Users Use one of these links if you're an everyday user. Android iOS Desktop For Web Developers If you want to try the latest
Chrome features, install one of the pre-stable builds. Google pushes updates frequently and has designed the distributions to run side-by-side with the stable version. Visit the
Chrome Releases Blog to learn what's new.
Chrome Dev for Android
Chrome Canary for desktop. ...
Debugging Chrome
--disable-accelerated-2d-canvas will disable GPU canvas Google has a page on using PIX on
Chrome. Unfortunately, it requires using --single-process which crashes on startup for me. To work around this I was able to record the GPU commands using apitrace. I copied the d3d9.dll into both C:\Users\jrmuizel\AppData\Local\Google\
Chrome SxS\Application\22.0.1186.0 and C:\Users\jrmuizel\AppData\Local\Google\
Chrome SxS\Application\. I'm not sure which is needed. I did TRACE_FILE=foo.txt and it created the trace file in "C:\Users\jrmuizel\AppData\Local\Google\
Chrome SxS\Application\22.0.1183.0\foo.txt". I needed to run
Chrome using --no-sandbox. I was then able to run PIX on d3dretrace. ...
Chrome-only Events reference
UA widgets). MozBeforePaintGecko 2.0 adds a new method for performing JavaScript controlled animations that synchronize not only with one another, but also with CSS transitions and SMIL animations being performed within the same window.MozScrolledAreaChangedThe MozScrolledAreaChanged event is fired when the document view has been scrolled or resized. ...
Gecko Chrome
This page contains information specific to
Chrome code running in Gecko.
Chrome-only API referenceThis page lists APIs that only run in Gecko
Chrome code (and sometimes in other privileged circumstances.)
Chrome-only CSS referenceThis page lists CSS properties that are only available in Gecko
Chrome code (and sometimes in other privileged circumstances, eg. UA stylesheets.)
Chrome-only Events referenceThis page lists events that are only available in Gecko
Chrome code (and sometimes in other privileged circumstances, eg. UA widgets). ...
nsIChromeFrameMessageManager
1.0 66 Introduced Gecko 2.0 Inherits from: nsIFrameMessageManager Last changed in Gecko 2.0 (Firefox 4 / Thunderbird 3.3 / SeaMonkey 2.1) Method overview void loadFrameScript(in AString aURL, in boolean aAllowDelayedLoad); void removeDelayedFrameScript(in AString aURL); Methods loadFrameScript() Loads a script into the remote frame. ...
Chapter 5: Let's build a Firefox extension - Archive of obsolete content
olean", and type in the name and set the value accordingly. Install the DOM Inspector The DOM Inspector is an extension that lets you examine HTML and XUL DOM tree structures, JavaScript objects and CSS properties, etc. This is not required for developing extensions, but it is handy to have around. Install extensions for Firefox from the Mozilla Add-ons website. ...
... type in the name and set the value accordingly. Install the DOM Inspector The DOM Inspector is an extension that lets you examine HTML and XUL DOM tree structures, JavaScript objects and CSS properties, etc. This is not required for developing extensions, but it is handy to have around. Install extensions for Firefox from the Mozilla Add-ons website. ...
...Script objects and CSS properties, etc. This is not required for developing extensions, but it is handy to have around. Install extensions for Firefox from the Mozilla Add-ons website. Optional - Install Firebug and
Chromebug
Chromebug is used by the Firebug development team to develop Firebug. You can use it to help debug Firefox extensions as well as to inspect and learn how the Firefox UI (
Chrome) is constructed. ...
...And 57 more matches
Choosing the right approach - Learn web development
kes 40 milliseconds to run -- the interval then ends up being only 60 milliseconds. When your code has the potential to take longer to run than the time interval you've assigned, it's better to use recursive setTimeout() -- this will keep the time interval constant between executions regardless of how long the code takes to execute, and you won't get errors. ...
...g only 60 milliseconds. When your code has the potential to take longer to run than the time interval you've assigned, it's better to use recursive setTimeout() -- this will keep the time interval constant between executions regardless of how long the code takes to execute, and you won't get errors. ...
...e interval you've assigned, it's better to use recursive setTimeout() -- this will keep the time interval constant between executions regardless of how long the code takes to execute, and you won't get errors. ...
...And 48 more matches
Selection API - Web APIs
HTML Editing APIsThe definition of 'Selection' in that specification. Editor's Draft Initial (older) definition, which is now outdated. Browser compatibility Selection The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...ification. Editor's Draft Initial (older) definition, which is now outdated. Browser compatibility Selection The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...bility Selection The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...And 47 more matches
IDBObjectStore - Web APIs
t specification. Recommendation Indexed Database API DraftThe definition of 'IDBObjectStore' in that specification. Recommendation Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...base API DraftThe definition of 'IDBObjectStore' in that specification. Recommendation Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...And 41 more matches
Index - Archive of obsolete content
date, and parse URLs. 66 widget Add-on SDK Create a simple user interface for an add-on in Firefox's add-on bar. 67 windows Add-on SDK Enumerate and examine open browser windows, open new windows, and listen for window events. 68 Low-Level APIs No summary! 69 /loader Create CommonJS module loaders. 70
chrome The
chrome module gives an Add-on SDK add-on access to the Components object, which in turn gives it access to a large set of privileged low-level Firefox APIs. 71 console/plain-text Constructor for a console instance. 72 console/traceback Functionality similar to Python's traceback module. 73 content/content Re-exports ...
...s Add-on SDK, Add-ons, Beginner, Extensions, Tutorial No summary! 147 Displaying annotations Add-on SDK No summary! 148 Implementing the widget Add-on SDK, Add-ons, Beginner, Extensions, Tutorial No summary! 149 Overview Add-on SDK No summary! 150 Storing annotations Add-on SDK No summary! 151
Chrome Authority No summary! 152 Creating Event Targets No summary! 153 Creating Reusable Modules Add-on SDK No summary! 154 Developing for Firefox Mobile Add-on SDK No summary! 155 Display a Popup Add-on SDK No summary! 156 Getting Started (jpm) Add-on SDK, JPM In this tutorial we've bui...
... No summary! 163 Modifying Web Pages Based on URL Add-on SDK No summary! 164 Modifying the Page Hosted by a Tab Add-on SDK No summary! 165 Open a Web Page Add-on SDK No summary! 166 Troubleshooting No summary! 167 Unit Testing Add-on SDK, JPM No summary! 168 Using XPCOM without
chrome Bookmarks,
Chrome, SDK, XPCOM No summary! 169 Using third-party modules (jpm) Addon-SDK, JPM First, while in the root of your add-on, install the package that contains the modules you want to use: 170 Bootstrapped extensions Add-ons, Extensions, Firefox 4, Gecko 2.0, Guide, Localization No summary! 171 Code snippets Add-ons, Code ...
...And 39 more matches
Permissions - Web APIs
Specification Status Comment PermissionsThe definition of 'Permissions' in that specification. Working Draft Initial definition. Browser Support The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...sionsThe definition of 'Permissions' in that specification. Working Draft Initial definition. Browser Support The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...tion. Browser Support The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...And 39 more matches
IDBIndex - Web APIs
n that specification. Recommendation Indexed Database API DraftThe definition of 'IDBIndex' in that specification. Recommendation Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...d Database API DraftThe definition of 'IDBIndex' in that specification. Recommendation Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...And 28 more matches
WebAssembly - JavaScript
nvoked. Specifications Specification WebAssembly JavaScript InterfaceThe definition of 'WebAssembly' in that specification. Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... WebAssembly JavaScript InterfaceThe definition of 'WebAssembly' in that specification. Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...r compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...And 27 more matches
WebAssembly
Specification Status Comment WebAssembly JavaScript Interface Working Draft Initial draft definition of the JavaScript API. Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...JavaScript Interface Working Draft Initial draft definition of the JavaScript API. Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...er compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...And 27 more matches
How to convert an overlay extension to restartless - Archive of obsolete content
Some of that will have to be replaced and the rest will need to be loaded differently. ...
...files, for example Services.jsm, you'll do so via privileged JavaScript code like this: Components.utils.import("resource://gre/modules/Services.jsm"); From here on out, it is assumed you've imported Services.jsm somewhere at the top of whatever file you're in and will be using it in all code examples. ...
...o via privileged JavaScript code like this: Components.utils.import("resource://gre/modules/Services.jsm"); From here on out, it is assumed you've imported Services.jsm somewhere at the top of whatever file you're in and will be using it in all code examples. The examples will also assume that you know how to properly add instructions to your add-on's
chrome.manifest to add and remove resource,
chrome, locale, & etc. ...
...And 26 more matches
Fullscreen API - Web APIs
ument to shut off full-screen mode. Specifications Specification Status Fullscreen API Living Standard Browser compatibility Document.fullscreen The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... Specification Status Fullscreen API Living Standard Browser compatibility Document.fullscreen The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...ocument.fullscreen The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...And 23 more matches
appearance (-moz-appearance, -webkit-appearance) - CSS: Cascading Style Sheets
Note that Firefox and Edge also support -webkit-appearance, for compatibility reasons. ...
...This is the default. auto div{ color: black; -moz-appearance: auto; -webkit-appearance: auto; appearance:auto; } <div>Lorem</div> None The user agent selects the appropriate special styling based on the element. Acts as none on elements with no special styling. menulist-button div {...
...: auto; -webkit-appearance: auto; appearance:auto; } <div>Lorem</div> None The user agent selects the appropriate special styling based on the element. Acts as none on elements with no special styling. ...
...And 23 more matches
Creating a Firefox sidebar extension - Archive of obsolete content
ion package usually contains a "content" provider, which contains the XUL code and application logic. Optionally locales and skins can be included. Most additions are provided with a default tree structure, although not required it is recommended to use this structure. Here the package for the sidebar is created, the files included are listed below. Example 1. ...
...r is created, the files included are listed below. Example 1. Package structure emptysidebar \-
chrome |- content |- locale | \- en-US \- skin Create all folders, except for skin. It is not used for this tutorial. The locale holds the locale, only the en-US locale is created. It is listed in Example 2. The locale includes the name and shortcut keys for the sidebar. Example 2.
chrome/locale/emptysidebar.dtd <!ENTITY emptysidebar.title "EmptySidebar"> <!ENTITY openEmptySidebar.commandkey "E"> <!ENTITY openEmptySidebar.modifierskey "shift accel"> The content folder includes our sidebar, the emptysidebar.xul is shown in Example 3. It creates a page holding one label. ...
...le 2.
chrome/locale/emptysidebar.dtd <!ENTITY emptysidebar.title "EmptySidebar"> <!ENTITY openEmptySidebar.commandkey "E"> <!ENTITY openEmptySidebar.modifierskey "shift accel"> The content folder includes our sidebar, the emptysidebar.xul is shown in Example 3. It creates a page holding one label. Other elements can be included, please read the XUL tutorials for more information. Example 3. ...
...And 22 more matches
BluetoothCharacteristicProperties - Web APIs
n Status Comment Web BluetoothThe definition of 'BluetoothCharacteristicProperties' in that specification. Draft Initial definition. Browser Compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. DesktopMobile
ChromeEdgeFirefoxInternet ExplorerOperaSafariAndroid webview
Chrome for AndroidFirefox for AndroidOpera for AndroidSafari on iOSSamsung InternetBluetoothCharacteristicProperties Experimental
Chrome Full support 56Notes Full support 56Notes Notes
ChromeOS and macOS only. Full support ...
... Full support 70Notes Notes Windows 10.Edge Full support <=79Notes Full support <=79Notes Notes EdgeOS and macOS only. ...
... Full support 56Notes Notes
ChromeOS and macOS only. Full support 56Notes Disabled Notes Linux and versions of Windows earlier than 10.Disabled From version 56: this feature is behind the #enable-experimental-web-platform-features preference (needs to be set to enabled). To change preferences in
Chrome, visit
chrome://flags. Full support 70Notes Notes Windows 10.Edge Full support <=79Notes Full support <=79Notes Notes EdgeOS and macOS only. Full support <=79Notes Disabled Notes Linux and versions of Windows earlier than 10.Disable...
...And 22 more matches
SeaMonkey - making custom toolbar (SM ver. 1.x) - Archive of obsolete content
You can optionally use a jar tool or zip tool to package your button as a cross-platform installable (XPI) for other people to install and use. Making a button There are nine easy steps. When you have completed all the steps, you will have a structure like this in the directory where you installed SeaMonkey: 1. Go to the directory where you installed SeaMonkey, then go to the
chrome directory there. Note: For information about how to find the directory where you installed SeaMonkey, see: Installation directory If you cannot easily find the directory, you can use the following method to find it. From SeaMonkey's menu bar, choose Tools - Web Development - JavaScript Console. Copy the following code. It is one very long line ending in path--make sure that you get all of it...
... line ending in path--make sure that you get all of it: Components.classes["@mozilla.org/file/directory_service;1"].getService( Components.interfaces.nsIProperties).get("AChrom", Components.interfaces.nsIFile).path In the JavaScript Console window, paste the code in the field near the top. Presss the Return or Enter key, or the Evaluate button. The console displays the location of SeaMonkey's
chrome directory. Explanation: The
chrome directory contains program files that are part of SeaMonkey itself, together with other files that are provided by extensions. Your toolbar button will be an extension. 2. Delete these two files:
chrome.rdf overlays.rdf Explanation: SeaMonkey automatically rebuilds these files the next time it starts. When it rebuilds them, ...
...hat are part of SeaMonkey itself, together with other files that are provided by extensions. Your toolbar button will be an extension. 2. Delete these two files:
chrome.rdf overlays.rdf Explanation: SeaMonkey automatically rebuilds these files the next time it starts. When it rebuilds them, it will include your new extension. 3. Edit the file: installed-
chrome.txt At the end of the file, add the following line. Copy and paste the line from here, to avoid typing errors: content,install,url,resource:/
chrome/custombutton/ Explanation: This line registers your custom toolbar button extension, linking it into SeaMonkey. 4. Create a new directory named: custombutton Perform the following steps in this new dir...
...And 21 more matches
XUL Structure - Archive of obsolete content
age, or from an extension or standalone XULRunner application. Content from remote sources (e.g. http://localhost/~username/ ), regardless of whether they are HTML or XUL or another document type, are limited in the type of operations they can perform, for security reasons. For this reason, Mozilla provides a method of installing content locally and registering the installed files as part of its
chrome system. This allows a special URL form, called a
chrome:// URL, to be used. By accessing a file using a
chrome URL, the files receive elevated privileges to access local files, access preferences and bookmarks and perform other privileged operations. Obviously, web pages do not get these privileges, unless they are signed with a digital certificate and the user has granted permission to perform t...
...The extensions are small packages of XUL files, JavaScript, style sheets and images packed together into a single file. These packaged files can be created by using a ZIP utility. ...
...XUL from the extension to mesh with the XUL in the browser. To the user, it may seem like the extension has modified the browser, but in reality, the code is all separate, and the extension may be easily uninstalled. Registered packages are not required to use overlays, of course. If they don't, you won't be able to access them via the main browser interface, but you can still access them via the
chrome URL, if you know what it is. Standalone XUL applications may include XUL code in a similar way, but, of course, the XUL for the application will be included as part of the installation, instead of having to be installed separately as an extension. However, this XUL code will be registered in the
chrome system such that the application can display the UI. It is worth noting that the Mozilla brow...
...And 21 more matches
IDBTransaction - Web APIs
and the event bubbles up to the transaction object. Also available via the onerror property. Mode constants These constants are no longer available -- they were removed in Gecko 25. You should use the string constants directly instead. (bug 888598) Transactions can have one of three modes: Constant Value Description READ_ONLY "readonly" (0 in
Chrome) Allows data to be read but not changed. READ_WRITE "readwrite" (1 in
Chrome) Allows reading and writing of data in existing data stores to be changed. VERSION_CHANGE "versionchange" (2 in
Chrome) Allows any operation to be performed, including ones that delete and create object stores and indexes. This mode is for updating...
...xes. This mode is for updating the version number of transactions that were started using the setVersion() method of IDBDatabase objects. Transactions of this mode cannot run concurrently with other transactions. Transactions in this mode are known as "upgrade transactions." Even if these constants are now deprecated, you can still use them to provide backward compatibility if required (in
Chrome the change was made in version 21). You should code defensively in case the object is not available anymore: var myIDBTransaction = window.IDBTransaction || window.webkitIDBTransaction || { READ_WRITE: "readwrite" }; Examples In the following code snippet, we open a read/write transaction on our database and add some data to an object store. Note also the functions attached to transaction even...
... Recommendation Initial definition Indexed Database API DraftThe definition of 'IDBTransaction' in that specification. Recommendation Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...And 21 more matches
The Essentials of an Extension - Archive of obsolete content
ox 11, add-ons will default to compatible and Firefox will mostly ignore the version range. Testing your add-ons with every Firefox version is always recommended, though. This is the information Firefox and other Mozilla applications need to install an add-on. Any errors or missing information will cause the installation process to fail, or the extension to be installed in a disabled state. The
chrome.manifest File
Chrome is the set of user interface elements of the application window that are outside of a window's content area. Toolbars, menu bars, progress bars, and window title bars are all examples of elements that are typically part of the
chrome. Taken from
Chrome Registration. In other words, the
chrome is everything you see in Firefox. All Firefox windows can be seen as having two...
...
Chrome is the set of user interface elements of the application window that are outside of a window's content area. Toolbars, menu bars, progress bars, and window title bars are all examples of elements that are typically part of the
chrome. Taken from
Chrome Registration. In other words, the
chrome is everything you see in Firefox. All Firefox windows can be seen as having two parts: (1) the
chrome and (2) possibly a content area, like the one that displays web pages in a Firefox tab. Windows like the Downloads window are pure
chrome. Most of the code for an extension resides in the
chrome folder, just like in the Hello World example. As we saw in the directory structure of the unpacked extension, the
chrome is composed of 3 sections: content, locale and skin. The 3 are necessary for most ...
... area, like the one that displays web pages in a Firefox tab. Windows like the Downloads window are pure
chrome. Most of the code for an extension resides in the
chrome folder, just like in the Hello World example. As we saw in the directory structure of the unpacked extension, the
chrome is composed of 3 sections: content, locale and skin. The 3 are necessary for most extensions. If we open the
chrome.manifest file (again, any text editor will do), we see that the same 3 sections are mentioned: content xulschoolhello content/ skin xulschoolhello classic/1.0 skin/ locale xulschoolhello en-US locale/ The
chrome.manifest file tells Firefox where to look for
chrome files. The text is spaced to look like a table, but that is not necessary. The parser ignores re...
...And 20 more matches
IDBDatabase - Web APIs
on. Recommendation Initial version Indexed Database API DraftThe definition of 'IDBDatabase' in that specification. Recommendation Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...tabase API DraftThe definition of 'IDBDatabase' in that specification. Recommendation Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...And 20 more matches
XULRunner tips - Archive of obsolete content
d extensions from the application directory; only the XULRunner directory and the user profile directory are checked. However, it seems that with XULRunner 1.9 the XULRunner directory is ignored, while the profile and application directories are checked. ...
...ctory are checked. However, it seems that with XULRunner 1.9 the XULRunner directory is ignored, while the profile and application directories are checked. ...
...hile the profile and application directories are checked. ...
...And 19 more matches
<textarea> - HTML: Hypertext Markup Language
the value attribute. The <textarea> element also accepts several attributes common to form <input>s, such as autocomplete, autofocus, disabled, placeholder, readonly, and required. Attributes This element includes the global attributes. autocapitalize This is a non-standard attribute supported by WebKit on iOS (therefore nearly all browsers running on iOS, including Safari, Firefox, and
Chrome), which controls whether and how the text value should be automatically capitalized as it is entered/edited by the user. The non-deprecated values are available in iOS 5 and later. Possible values are: none: Completely disables automatic capitalization. sentences: Automatically capitalize the first letter of sentences. words: Automatically capitalize the first letter of words. character...
...xtarea>s -- one of which is disabled, and one of which is readonly. Have a play with both and you'll see the difference in behavior -- the disabled element is not selectable in any way (and its value is not submitted), whereas the readonly element is selectable and its contents copyable (and its value is submitted); you just can't edit the contents. Note: In browsers other than firefox, such as
chrome, the disabled textarea content may be selectable and copyable. <textarea name="textarea" rows="5" cols="30" disabled>I am a disabled textarea</textarea> <textarea name="textarea" rows="5" cols="30" readonly>I am a readonly textarea</textarea> Technical summary Content categories Flow content, phrasing content, Interactive content, listed, labelable, resettable, and ...
...' in that specification. Recommendation HTML 4.01 SpecificationThe definition of '<textarea>' in that specification. Recommendation Browser Compatibility The compatibility table in this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...And 19 more matches
Custom toolbar button - Archive of obsolete content
99/02/22-rdf-syntax-ns#" xmlns:em="http://www.mozilla.org/2004/em-rdf#"> <Description about="urn:mozilla:install-manifest" em:name="Custom Button" em:description="My custom toolbar button" em:creator="My name" em:id="custom-toolbar-button@example.com" em:version="1.0" em:homepageURL="http://developer.mozilla.org/en/docs/Custom_Toolbar_Button" em:iconURL="
chrome://custombutton/content/icon.png" > <em:targetApplication><!-- Firefox --> <Description em:id="{ec8030f7-c20a-464f-9b0e-13a3a9e97384}" em:minVersion="1.4" em:maxVersion="*" /> </em:targetApplication> <em:targetApplication><!-- Thunderbird --> <Description em:id="{3550f703-e582-4d05-9a08-453d09bdfdc6}" em:minVersion="1.5" em:...
...lines. Optionally remove the sections for target applications that you do not want. Save the file. Explanation: This file contains information used by the application's extension manager. Sections for target applications specify the versions where the extension works. The last section in the file specifies that this extension adds content to the application. 4. ...
... Explanation: This file contains information used by the application's extension manager. Sections for target applications specify the versions where the extension works. The last section in the file specifies that this extension adds content to the application. 4. Create a plain text file named
chrome.manifest. ...
...And 18 more matches
Cross Process Object Wrappers
This document describes Cross Process Object Wrappers (CPOWs), which enable
chrome code to synchronously access content in multiprocess Firefox. Note that from Firefox 47 onwards, unsafe CPOW usage is no longer permitted in browser code. If browser code tries an unsafe CPOW operation, the browser will throw an exception and you'll see an "unsafe CPOW usage forbidden" error in the Browser Console. Add-on code is still allowed to use CPOWs "unsafely". However, if an add-on passes a CPOW into a platform API, and that platform API then attempts an unsafe operation on it, this will throw an exception. So as a general rule, add-ons should avoid passing CPOWs into non-addon code. ...
...n exception and you'll see an "unsafe CPOW usage forbidden" error in the Browser Console. Add-on code is still allowed to use CPOWs "unsafely". However, if an add-on passes a CPOW into a platform API, and that platform API then attempts an unsafe operation on it, this will throw an exception. So as a general rule, add-ons should avoid passing CPOWs into non-addon code. In multiprocess Firefox,
chrome code runs in a different process from web content. So
chrome code can't directly interact with web content: instead, it must factor out the code that interacts with web content into separate scripts that are called frame scripts.
Chrome code can load frame scripts into the content process using the message manager, and can then communicate with them using a message-passing API. To learn more abo...
...This is because the
chrome process runs the Firefox UI, so if it were blocked by the content process, then a slow content process could cause Firefox to become unresponsive to users. ...
...And 18 more matches
FileSystemEntry - Web APIs
s, which provide features specific to file system entries representing files and directories, respectively. The FileSystemEntry interface includes methods that you would expect for manipulating files and directories, but it also includes a convenient method for obtaining the URL of the entry: toURL(). It also introduces a new URL scheme: filesystem:. You can use the filesystem: scheme on Google
Chrome to see all the files and folders that are stored in the origin of your app. Just use filesystem: scheme for the root directory of the origin of the app. For example, if your app is in http://www.html5rocks.com, open filesystem:http://www.html5rocks.com/temporary/ in a tab.
Chrome shows a read-only list of all the files and folders stored the origin of your app. Example To see an example of how ...
... Status Comment File and Directory Entries API Draft Draft of proposed API This API has no official W3C or WHATWG specification. Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... API Draft Draft of proposed API This API has no official W3C or WHATWG specification. Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...And 18 more matches
Manifest Files - Archive of obsolete content
<< PreviousNext >> In this section, we'll see how to put
chrome and XUL files into a package and create the manifest files for them. Packages A package is a set of XUL files and scripts that define the functionality of a user interface. Packages may be installed into Mozilla and referenced with
chrome URLs. A package can contain any kinds of files and may be split into subdirectories for different parts of the package. A package can be stored either as a directory or as a JAR archive. Manifest files A manifest file describes a package and maps its location on disk to a
chrome URL. The manifest files in the
chrome directory will be examined when a Mozilla application starts up to see what packages are installed. That means that all you need to do to install a new package is add a...
... be stored either as a directory or as a JAR archive. Manifest files A manifest file describes a package and maps its location on disk to a
chrome URL. The manifest files in the
chrome directory will be examined when a Mozilla application starts up to see what packages are installed. That means that all you need to do to install a new package is add a new manifest file either into the application
chrome directory or the user specific
chrome directory. This latter
chrome directory is normally the one used since the application directory might not have sufficient permissions to write into it. Note: Starting in Gecko 2.0, only the file named
chrome.manifest is read automatically; if you need to read multiple manifest files, use the manifest command in that file to import additional manifests. Use...
...ests. Use manifest flags to configure the scenarios in which the secondary manifest is imported. If you just want to try testing privileged XUL code in the Firefox browser, you can do this easily by just using a manifest with only one line in it: Create a new directory somewhere. For example, on a Windows machine, you might use C:\testfiles Create a new ASCII1 file called test.manifest in the
chrome directory. It doesn't actually matter what the file is called as long as it has the .manifest extension. ( 1. doesn't work with UTF-8 with BOM.) Add the following line to it: content tests file:///C:/testfiles/ The file path in that line should point to the directory created above. If you aren't sure what the file path is, open that directory in a browser and copy the URL from the address fie...
...And 17 more matches
Common Firefox theme issues and solutions - Archive of obsolete content
} } For more information about this issue please see bug 732757 and bug 732757 and this MozillaZine thread. Mac OS X OS X Lion missing toolbar button icons Due to Firefox bug 679708 and bug 702558, some toolbar buttons icons may be missing on Firefox 8 and later running on Mac OS X Lion. ...
...aZine thread. Mac OS X OS X Lion missing toolbar button icons Due to Firefox bug 679708 and bug 702558, some toolbar buttons icons may be missing on Firefox 8 and later running on Mac OS X Lion. In order to work around this issue, you need to either rename any of the following files that are in your
chrome://browser/skin/ folder and fix any references to those files, or copy them to the folder
chrome://browser/skin/lion/: keyhole-circle.png Toolbar.png toolbarbutton-dropmarker.png tabbrowser/alltabs-box-bkgnd-icon.png tabview/tabview.png places/toolbar.png Linux Linux select box fields are showing both drop arrow and spinner arrows On Linux: the styling of drop down select box fields may show both a drop arrow and up/down spinner arrows. The problem is commonly caused by a -moz-a...
...-circle.png Toolbar.png toolbarbutton-dropmarker.png tabbrowser/alltabs-box-bkgnd-icon.png tabview/tabview.png places/toolbar.png Linux Linux select box fields are showing both drop arrow and spinner arrows On Linux: the styling of drop down select box fields may show both a drop arrow and up/down spinner arrows. The problem is commonly caused by a -moz-appearance:menulist style rule in
chrome://global/skin/menulist.css. Once the offending rule is found, it should be deleted and manual styling used. App button not styled on Linux, but is styled on Windows On Linux the Firefox app button that is displayed when tabs are on top and menu bar is disabled is not styled properly compared to Windows and is not changing colors when in private browsing mode. The cause of this issue is that Lin...
...And 16 more matches
WebIDL bindings
le: interface MyInterface { [BindingAlias=otherAttr] readonly attribute boolean attr; }; MyInterface.prototype.otherAttr and MyInterface.prototype.attr will both exist, have separate getter/setter functions, but call the same binding glue code and implementation function on the objects implementing MyInterface. Multiple [BindingAlias] extended attributes can be used on a single attribute. [
ChromeOnly] This extended attribute can be specified on any method, attribute, or constant on an interface or on an interface as a whole. It can also be specified on dictionary members. Interface members flagged as [
ChromeOnly] are only exposed in
chrome Windows (and in particular, are not exposed to webpages). From the point of view of web content, it's as if the interface member were not there at a...
...n be specified on any method, attribute, or constant on an interface or on an interface as a whole. It can also be specified on dictionary members. Interface members flagged as [
ChromeOnly] are only exposed in
chrome Windows (and in particular, are not exposed to webpages). From the point of view of web content, it's as if the interface member were not there at all. These members are exposed to
chrome script working with a content object via Xrays. If specified on an interface as a whole, this functions like [Func] except that the binding code will automatically check whether the caller script has the system principal (is
chrome or a worker started from a
chrome page) instead of calling into the C++ implementation to determine whether to expose the interface object on the global. This means t...
... specified on an interface as a whole, this functions like [Func] except that the binding code will automatically check whether the caller script has the system principal (is
chrome or a worker started from a
chrome page) instead of calling into the C++ implementation to determine whether to expose the interface object on the global. This means that accessing a content global via Xrays will show [
ChromeOnly] interface objects on it. If specified on a dictionary member, then the dictionary member will only appear to exist in system-privileged code. This extended attibute can be specified together with [Func], and [Pref]. If more than one of these is specified, all conditions will need to test true for the interface or interface member to be exposed. [Pref=prefname] This extended attribute ca...
...And 15 more matches
BluetoothRemoteGATTDescriptor - Web APIs
cation Status Comment Web BluetoothThe definition of 'BluetoothRemoteGATTDescriptor' in that specification. Draft Initial definition. Browser Compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. DesktopMobile
ChromeEdgeFirefoxInternet ExplorerOperaSafariAndroid webview
Chrome for AndroidFirefox for AndroidOpera for AndroidSafari on iOSSamsung InternetBluetoothRemoteGATTDescriptor Experimental
Chrome Full support 57Notes Full support 57Notes Notes macOS only. Full support 57Not...
... 57Notes Full support 57Notes Notes macOS only. Full support 57Notes Disabled Notes Linux and versions of Windows earlier than 10.Disabled From version 57: this feature is behind the #enable-experimental-web-platform-features preference (needs to be set to enabled). To change preferences in
Chrome, visit
chrome://flags. Full support 70Notes Notes Windows 10.Edge Full support <=79Notes Full support <=79Notes Notes macOS only. Full support <=79Notes Disabled Notes Linux and versions of Windows earlier than 10.Disa...
... and versions of Windows earlier than 10.Disabled From version 44: this feature is behind the #enable-experimental-web-platform-features preference (needs to be set to enabled). ...
...And 15 more matches
PasswordCredential - Web APIs
ng else. }); Specifications Specification Status Comment Credential Management Level 1 Working Draft Initial definition. Browser Compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...tus Comment Credential Management Level 1 Working Draft Initial definition. Browser Compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...tibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...And 15 more matches
@font-feature-values - CSS: Cascading Style Sheets
s Comment CSS Fonts Module Level 4The definition of '@font-feature-values' in that specification. Working Draft Initial definition. Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...tion of '@font-feature-values' in that specification. Working Draft Initial definition. Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...owser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...And 15 more matches
JavaScript modules - JavaScript
this article is all about. This can only be a good thing -- browsers can optimize loading of modules, making it more efficient than having to use a library and do all of that extra client-side processing and extra round trips. ...
...browsers can optimize loading of modules, making it more efficient than having to use a library and do all of that extra client-side processing and extra round trips. ...
...and do all of that extra client-side processing and extra round trips. ...
...And 15 more matches
Media container formats (file types) - Web media technologies
h include information about what the container is typically useful for, what codecs it supports, and which browsers support it, among other specifics. ...
...(short) Full codec name Browser compatibility1 3GP Third Generation Partnership Firefox for Android ADTS Audio Data Transport Stream Firefox2 FLAC Free Lossless Audio Codec
Chrome 56, Edge 16, Firefox 51, Safari 11 MPEG / MPEG-2 Moving Picture Experts Group (1 and 2) -- MPEG-4 (MP4) Moving Picture Experts Group 4
Chrome 3, Edge 12, Firefox, Internet Explorer 9, Opera 24, Safari 3.1 Ogg Ogg
Chrome 3, Firefox 3.5, Edge 173 (desktop only), Internet Explorer 9, Opera 10.50 QuickTime (MOV) Apple QuickTime movie Only older versions of Safari, plus other browsers that supported Apple's QuickTime plugin WebM Web Media
Chrome 6, Edge 173 (desktop only), Firefox 4, Opera 10.6, ...
...tainer; other types may be used depending on the specific codec or codecs in use; in addition, you can add the codecs parameter to the MIME type string to indicate which codecs are used for the audio and/or video tracks, and to optionally provide details about the profile, level, and/or other codec configuration specifics. Video codecs supported by 3GP Codec Browser support
Chrome Edge Firefox Safari AVC (H.264) Yes1,2 H.263 Yes1 MPEG-4 Part 2 (MP4v-es) Yes1 VP8 Yes1 [1] Firefox only supports 3GP on OpenMAX-based devices, which currently means the Boot to Gecko (B2G) platform. [2] Firefox support for H.264 relies upon the operating system's media infrastruct...
...And 15 more matches
Creating toolbar buttons (Customize Toolbar Window) - Archive of obsolete content
Creating an overlay The first step is to create an overlay for the document containing the toolbar you wish to enhance. Explaining overlays is beyond the scope of this tutorial -- you can read about them in the XUL Tutorial. To overlay a document, you need to know its URI. You can find a list of URIs for the most commonly overlaid documents at the bottom of this page. Note: Some people overlay
chrome://messenger/content/mailWindowOverlay.xul. that should cause the button to appear on all windows that mailWindowOverlay.xul is applied to (i.e. Main window and View Message window). This needs to be looked into. Adding the toolbar button Toolkit applications have customizable toolbars; therefore, it's common practice for extensions to add their toolbar buttons to the toolbar palette, rather tha...
...on runtime in a Bootstrap addon is a bit different because the BrowserPalette is indirectly reached. A simple document.getElementById('BrowserToolbarPalette') will not work. This is the code to create and add it in. let button = doc.createElement("toolbarbutton"); button.setAttribute("id", BUTTON_ID); button.setAttribute("label", "Replace Bookmark"); button.setAttribute("class", "toolbarbutton-1
chromeclass-toolbar-additional"); button.setAttribute("tooltiptext", "Replace an existing bookmark"); button.style.listStyleImage = "url(" + icon + ")"; button.addEventListener("command", main.action, false); toolbox.palette.appendChild(button); This code is thanks to dgutov and is seen in full context at his repository here at GitHub: dgutov / bmreplace / bootstrap.js. Watch for a snippet that you ca...
...To attach it to the overlay, put this processing instruction (PI) at the top of the overlay file: <?xml-sty...
...And 14 more matches
Xray vision
Xray vision helps JavaScript running in a privileged security context safely access objects created by less privileged code, by showing the caller only the native version of the objects. Gecko runs JavaScript from a variety of different sources and at a variety of different privilege levels. ...
...in a privileged security context safely access objects created by less privileged code, by showing the caller only the native version of the objects. Gecko runs JavaScript from a variety of different sources and at a variety of different privilege levels. The JavaScript code that along with the C++ core, implements the browser itself is called
chrome code and runs using system privileges. If
chrome-privileged code is compromised, the attacker can take over the user's computer. JavaScript loaded from normal web pages is called content code. Because this code is being loaded from arbitrary web pages, it is regarded as untrusted and potentially hostile, both to other websites and to the user. As well as these two levels of privilege,
chrome code can create sandboxes. The security principal d...
...security principal defined for the sandbox determines its privilege level. If an Expanded Principal is used, the sandbox is granted certain privileges over content code and is protected from direct access by content code. ...
...And 14 more matches
MSGestureEvent - Web APIs
MSGestureEnd MSGestureTap MSGestureHold MSGestureChange MSInertiaStart Specifications Not part of any specification. Microsoft has a description on MSDN. Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...MSInertiaStart Specifications Not part of any specification. Microsoft has a description on MSDN. Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...And 14 more matches
Extensions support in SeaMonkey 2 - Archive of obsolete content
argetApplication> <!-- SeaMonkey --> <Description> <em:id>{92650c4d-4b8e-4d2a-b7eb-24ecf4f6b63a}</em:id> <em:minVersion>2.0</em:minVersion> <em:maxVersion>2.*</em:maxVersion> </Description> </em:targetApplication> The install.js is not supported any more and should be removed. ...
...on> <em:maxVersion>2.*</em:maxVersion> </Description> </em:targetApplication> The install.js is not supported any more and should be removed. Differences as compared to other toolkit/-based applications You need to overlay/open different
chrome URLs as compared to Firefox. ...
... </Description> </em:targetApplication> The install.js is not supported any more and should be removed. Differences as compared to other toolkit/-based applications You need to overlay/open different
chrome URLs as compared to Firefox. ...
...And 13 more matches
Creating XPI Installer Modules - Archive of obsolete content
s Firefox or Thunderbird, should be packaged in a different way. Mozilla has introduced major changes to the way that themes and all the other parts of the UI are packaged. This new packaging scheme is called XPI (pronounced "zippy"), and interacts with XPInstall. A XPI file typically contains the resources to be installed (in this case the barley.jar we want to have installed in the Mozilla/bin/
chrome/ directory) and an install script that guides the installation process. Under the
chrome/ directory, you'll notice that in addition to the package subdirectories, there are now also a handful of JAR files, or Java archives (see figure below). JAR is a file format based on the ZIP file format and is used for aggregating multiple files into a single file. These archives are redundant with the subdi...
...ubdirectories, there are now also a handful of JAR files, or Java archives (see figure below). JAR is a file format based on the ZIP file format and is used for aggregating multiple files into a single file. These archives are redundant with the subdirectories: Mozilla now installs both the compressed and uncompressed versions of the UI, though you can change this when you build Mozilla yourself.
chrome/ US/ US.jar chatzilla/ chatzilla.jar
chrome.rdf
chromelist.txt classic/ classic.jar comm/ comm.jar content-packs/ content-packs.jar embed-sample/ embed-sample.jar en-US/ en-US.jar en-mac/ en-mac.jar en-unix/ en-unix.jar en-win/ en-win.jar help/ help.jar inspector/ inspector.jar installed-
chrome.txt messenger/ messenger.jar ... In additi...
...mple/ embed-sample.jar en-US/ en-US.jar en-mac/ en-mac.jar en-unix/ en-unix.jar en-win/ en-win.jar help/ help.jar inspector/ inspector.jar installed-
chrome.txt messenger/ messenger.jar ... In addition to these JAR files, there are also several new RDF files. These new files represent a redesign of the way that the Mozilla UI is packaged and installed. Though the
chrome directory still includes subdirectories of uncompressed files by default, a new way to aggregate and distribute the files has improved performance, made the UI components more portable and easier to install, and made the installation process a much easier one. However, this new arrangement does not make things much easier for the web or user interface developer. The relatively simple process of f...
...And 13 more matches
Building a Theme - Archive of obsolete content
a Skin for Firefox. Note: Firefox for Mac OS X has changed some directories so the guide may be obsolete. Setting up the Development Environment Themes and extensions are packaged and distributed in ZIP files or Bundles, with the XPI (pronounced "zippy") file extension. An example of the content within a typical XPI file for a theme: example.xpi: /install.rdf /
chrome.manifest /preview.png /icon.png /
chrome/ browser/ communicator/ global/ mozapps/ We'll want to create a file structure similar to the one above for our tutorial, so let's begin by creating a folder for your theme somewhere on your hard disk (e.g. C:\themes\my_theme\ or ...
... browser/ communicator/ global/ mozapps/ We'll want to create a file structure similar to the one above for our tutorial, so let's begin by creating a folder for your theme somewhere on your hard disk (e.g. C:\themes\my_theme\ or ~/themes/my_theme/). Inside your new theme folder, create two new empty text files, one called
chrome.manifest and the other called install.rdf. The file preview.png is shown as a preview of the theme in the themes panel of the add-ons window. The file icon.png is used as an icon in the same panel. We'll leave both of them out for now, unless you have something picked out that you want to use. The remaining directories will be extracted from the default theme. First, you'll want to create a dire...
...con.png is used as an icon in the same panel. We'll leave both of them out for now, unless you have something picked out that you want to use. The remaining directories will be extracted from the default theme. First, you'll want to create a directory somewhere. Copy your Firefox installation's omni.ja into this directory. ...
...And 13 more matches
Index
ently in Mozilla and xpcshell to give you access to XPCOM components. 61 XPConnect wrappers Guide, NeedsContent, XPCOM, XPCOM:Language Bindings, XPConnect This document is a high-level overview of XPConnect wrapper objects (for the more technical description see XPConnect security membranes). For practical advice on dealing with wrappers, see Safely accessing content DOM from
chrome. 62 appShellService XPCOM:Language Bindings, XPConnect Quitting Mozilla: 63 nsIProfile Interfaces, XPCOM, XPCOM:Language Bindings, XPConnect This interface is obsolete; you should use nsIToolkitProfileService instead; however, reference documentation for nsIProfile is available if you're working with old code. 64 nsIRegistry XPCOM:Language ...
...hell lets the scripts running in it access XPCOM functionality. 66 HOWTO Problem 67 Profiling XPCShell Sometimes, you might want to get a performance profile of a certain piece of JavaScript (like an XPCOM module), to see which part takes the most time. You could use Venkman for that. But sometimes, Venkman gives too much noise (because it also profiles
chrome code). Or you might want to have a more reproducible testcase. In those cases, an xpcshell script can help. You can just call the code you want to test. But then, you can't use the Venkman UI. 68 WithJSModulesAnd
Chrome Moved to HOWTO 69 XPCShell Reference Automated testing, Developing Mozilla, JavaScript, JavaScript:Tools, Tools, XPCOM:Language Bindings, XPCon...
...ng C++ implementation hierarchy, you run into multiple inheritance. That's not inherently multiple inheritance, though, because you only mix in interfaces (i.e. the problem would not exist with Java's interfaces). 116 Making cross-thread calls using runnables Guide, Threads, XPCOM In the Mozilla platform, most activities such as layout, DOM operations, content JavaScript, and
chrome JavaScript run on the main thread. However, it may be useful for C++ code in the Mozilla platform to run tasks on another thread. 117 Mozilla internal string guide Guide, XPCOM Most of the Mozilla code uses a C++ class hierarchy to pass string data, rather than using raw pointers. This guide documents the string classes which are visible to code within the Mozilla codebase (c...
...And 13 more matches
DOM Inspector internals - Firefox Developer Tools
tcuts with host-integration overlays. DOM Inspector explicitly supports several Mozilla project applications by providing its own host-integration overlays. ...
...by providing its own host-integration overlays. ...
...rlays. ...
...And 13 more matches
BasicCardResponse - Web APIs
tion Status Comment Basic Card PaymentThe definition of 'BasicCardResponse' in that specification. Working Draft Initial definition. Browser Compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...inition of 'BasicCardResponse' in that specification. Working Draft Initial definition. Browser Compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... Browser Compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...And 13 more matches
URLUtilsReadOnly - Web APIs
interface doesn't inherit any methods. URLUtilsReadOnly.toString() Returns a DOMString containing the whole URL. It is a synonym for URLUtilsReadOnly.href. Browser compatibility The compatibility table in this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...oString() Returns a DOMString containing the whole URL. It is a synonym for URLUtilsReadOnly.href. Browser compatibility The compatibility table in this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... Browser compatibility The compatibility table in this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...And 13 more matches
break-before - CSS: Cascading Style Sheets
Working Draft Initial definition. Extends the CSS 2.1 page-break-before property to handle both page and column breaks. Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...e-break-before property to handle both page and column breaks. Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...e on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...And 13 more matches
Getting started with XULRunner - Archive of obsolete content
.com/matthewkastor/XULRunner-Examples. Please continue reading to learn the "what", "why" and "how" parts of building a XULRunner application. On Windows, I created the root in a new c:\program files\myapp folder, but you can create it wherever you like, using whatever OS you like. The same application structure is used on Windows, Mac and Linux. ...
..., "why" and "how" parts of building a XULRunner application. On Windows, I created the root in a new c:\program files\myapp folder, but you can create it wherever you like, using whatever OS you like. The same application structure is used on Windows, Mac and Linux. Here is the subfolder structure: + myapp/ | +-+
chrome/ | | | +-+ content/ | | | | | +-- main.xul | | | | | +-- main.js | | | +--
chrome.manifest | +-+ defaults/ | | | +-+ preferences/ | | | +-- prefs.js | +-- application.ini | +--
chrome.manifest Notice that there are 5 files in the folder structure: application.ini,
chrome.manifest (2), prefs.js, and main.xul. The /
chrome/
chrome.manifest file is optional, but might be useful for backward compatibility. See the note below. For more details on the structure of installable ...
...ini | +--
chrome.manifest Notice that there are 5 files in the folder structure: application.ini,
chrome.manifest (2), prefs.js, and main.xul. The /
chrome/
chrome.manifest file is optional, but might be useful for backward compatibility. See the note below. For more details on the structure of installable bundles in general see: Structure of an installable bundle. Note: In XULRunner 2.0, the
chrome.manifest is now used to register XPCOM components in addition to its previous uses. Part of this change means the /
chrome/
chrome.manifest is no longer considered the "root" manifest. XULRunner will not check that folder location for a root-level
chrome.manifest. ...
...And 12 more matches
IDBKeyRange - Web APIs
on Initial definition. Indexed Database API DraftThe definition of 'IDBKeyRange' in that specification. Recommendation Adds includes(). Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...tThe definition of 'IDBKeyRange' in that specification. Recommendation Adds includes(). Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...And 12 more matches
min-width - CSS: Cascading Style Sheets
s it as the initial value. CSS Level 2 (Revision 1)The definition of 'min-width' in that specification. Recommendation Initial definition. Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...The definition of 'min-width' in that specification. Recommendation Initial definition. Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
.... Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. DesktopMobile
ChromeEdgeFirefoxInternet ExplorerOperaSafariAndroid webview
Chrome for AndroidFirefox for AndroidOpera for AndroidSafari on iOSSamsung Internetmin-width
Chrome Full support 1Edge Full support 12Firefox Full support 1Notes Full support 1Notes Notes CSS 2.1 leaves the behavior of min-width with table undefined. Firefox supports applying min-width to table elements.IE ...
...And 12 more matches
Web video codec guide - Web media technologies
erage and maximum bit rates, and limits on the number of tiles and tile columns used in the encoding/decoding process. For example, level AV1 level 2.0 offers a maximum frame width of 2048 pixels and a maximum height of 1152 pixels, but its maximum frame size in pixels is 147,456, so you can't actually have a 2048x1152 video at level 2.0. It's worth noting, however, that at least for Firefox and
Chrome, the levels are actually ignored at this time when performing software decoding, and the decoder just does the best it can to play the video given the settings provided. For compatibility's sake going forward, however, you should stay within the limits of the level you choose. The primary drawback to AV1 at this time is that it is very new, and support is still in the process of being integrated...
...r 10 4:0:0 (greyscale) or 4:2:0 High 8 or 10 4:0:0 (greyscale), 4:2:0, or 4:4:4 Professional 8, 10, or 12 4:0:0 (greyscale), 4:2:0, 4:2:2, or 4:4:4 HDR support Yes Variable Frame Rate (VFR) support 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:...
... 8 to 10 4:0:0 (greyscale), 4:2:0, and 4:2:2 High 4:4:4 Predictive 8 to 14 4:0:0 (greyscale), 4:2:0, 4:2:2, and 4:4:4 HDR support Yes; Hybrid Log-Gamma or Advanced HDR/SL-HDR; both are part of ATSC Variable Frame Rate (VFR) 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.o...
...And 12 more matches
Structure of an installable bundle - Archive of obsolete content
Path from the root of the bundle Description Version information /install.rdf Extension/Theme Install Manifest /application.ini Application Launch Manifest /bootstrap.js The bootstrap script for extensions not requiring a restart (those with <em:bootstrap>true</em:bootstrap> in their install.rdf). Note that other files and directories (e.g. ...
... /application.ini Application Launch Manifest /bootstrap.js The bootstrap script for extensions not requiring a restart (those with <em:bootstrap>true</em:bootstrap> in their install.rdf). Note that other files and directories (e.g.
chrome.manifest, components, defaults) in bootstrapped extensions are not processed by a supporting application. ...
...ication.ini Application Launch Manifest /bootstrap.js The bootstrap script for extensions not requiring a restart (those with <em:bootstrap>true</em:bootstrap> in their install.rdf). Note that other files and directories (e.g.
chrome.manifest, components, defaults) in bootstrapped extensions are not processed by a supporting application. ...
...And 11 more matches
A XUL Bestiary - Archive of obsolete content
rouded in mystery, misused as concepts or terms, or underestimated according to their role in XUL and cross-platform development. In contrast to the Mozilla Jargon File, this article describes items of specific interest to the web or content developer looking to establish a context for understanding Mozilla's new technologies -- and in particular Mozilla's XML-based User Interface Language, XUL.
Chrome Some of the most powerful and frequently misunderstood features of XUL and the Mozilla browser have to do with
chrome. The term
chrome is used in different contexts to mean different things. 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...
...ferent things. 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. By contrast, the skin is just the CSS and referenced graphics for a XUL file, the localization strings are just a DTD, and the content is just the XUL. The
Chrome URL This concept of a
chrome as an integrated, dynamic thing in some way divorced from the "appcore" is realized in the use of the
chrome URL to point to chunks of XUL and their related files. The
chrome URL, which appears in place of the HTTP URL in pointers like the following global skin processing instruction: <?xml-stylesheet href="
chrome://global/skin/" type="text/css"?> Specifies a chro...
...y divorced from the "appcore" is realized in the use of the
chrome URL to point to chunks of XUL and their related files. The
chrome URL, which appears in place of the HTTP URL in pointers like the following global skin processing instruction: <?xml-stylesheet href="
chrome://global/skin/" type="text/css"?> Specifies a
chrome to be loaded by the Gecko rendering engine. ...
...And 11 more matches
IDBFactory - Web APIs
that specification. Recommendation Indexed Database API DraftThe definition of 'IDBFactory' in that specification. Recommendation Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...Database API DraftThe definition of 'IDBFactory' in that specification. Recommendation Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...And 11 more matches
MediaMetadata - Web APIs
pecification Status Comment Media Session StandardThe definition of 'MediaMetaData' in that specification. Draft Initial definition. Browser Compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...ndardThe definition of 'MediaMetaData' in that specification. Draft Initial definition. Browser Compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...Compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...And 11 more matches
break-after - CSS: Cascading Style Sheets
Working Draft Initial definition. Extends the CSS 2.1 page-break-after property to handle both page and column breaks. Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...ge-break-after property to handle both page and column breaks. Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...e on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...And 11 more matches
WebAssembly.Table - JavaScript
instance too. Specifications Specification WebAssembly JavaScript InterfaceThe definition of 'Table' in that specification. Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... WebAssembly JavaScript InterfaceThe definition of 'Table' in that specification. Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...And 11 more matches
Image file type and format guide - Web media technologies
e world. However, the ones listed below are generally recognized as usable on the Web, though BMP is generally not recommended as browser support is potentially constrained; it should usually be avoided for web content. ...
...ough BMP is generally not recommended as browser support is potentially constrained; it should usually be avoided for web content. ...
...ntent. ...
...And 11 more matches
Install Manifests - Archive of obsolete content
alid version format will not be installed. The version format is different from, although backwards-compatible with, 1.0's. For add-ons hosted on addons.mozilla.org - Mozilla's update website may repackage your add-on and correct or reject malformed version strings. Optional Property Reference You may need to supply these properties, depending on the capabilities of your add-on. ...
...At the moment this only works for add-ons with em:type="2". The default value is false. For more information, see Bootstrapped extensions. contributor The name(s) of additional contributors. ...
...s van der Merwe</em:developer> hasEmbeddedWebExtension If present and given the value "true", this indicates that this add-on contains an embedded WebExtension. <em:hasEmbeddedWebExtension>true</em:hasEmbeddedWebExtension> homepageURL A link to the add-on's home page - intended for display in the user interface. ...
...And 10 more matches
Making it into a static overlay - Archive of obsolete content
f this tutorial, but for more information see mozilla.org's hacking documentation. Mozilla installer packages are called XPIs (pronounced "zippies"), which stands for cross-platform installer. The packages are just standard ZIP archives of the files to be installed along with a JavaScript script that performs the installation and some RDF files that describe the components being installed for the
chrome registry. Because our extension modifies an existing file in the Mozilla distribution, before we package it up we need to separate the modifications into a different file and add them back in at run time via a dynamic XUL overlay. A XUL overlay is a XUL file containing elements to be inserted into another XUL file when the other XUL file is rendered into an application interface. Static overlays ...
... add them back in at run time via a dynamic XUL overlay. A XUL overlay is a XUL file containing elements to be inserted into another XUL file when the other XUL file is rendered into an application interface. Static overlays are added to a XUL file via a reference at the top of the file (much like stylesheets and JavaScript scripts). Dynamic overlays are added to a XUL file via a reference in the
chrome registry. Overlays provide a way to break up a large XUL file into several different files (one that describes the overall structure of an application window and the others to implement specific portions of the window) to improve code readability, maintainability, and extensability. Dynamic overlays also make it possible to modify a XUL file without actually changing the code of the file itself, ...
... changing the code of the file itself, which is necessary when installing an extension like ours. We'll first make the file into a static overlay, then we'll make it into a dynamic overlay. ...
...And 10 more matches
window - Archive of obsolete content
cture of a top-level window. It is the root node of a XUL document. It is by default a horizontally oriented box. As it is a box, all box attributes can be used. By default, the window will have a platform-specific frame around it. To set an icon for the window, create a platform-specific icon file <windowid>.ico and/or <windowid>.xpm and place or install these files into the <mozilla-directory>/
chrome/icons/default/ directory. The <windowid> is the value of the id attribute on the window. This allows you to have a different icon for each window. Without including the css file at "
chrome://global/skin/", the window will not be stylized and will be invisible and glitchy when opened as a dialog. Note: Starting in Gecko 1.9.2, you can detect when a window is activated or deactivated by watching...
... including the css file at "
chrome://global/skin/", the window will not be stylized and will be invisible and glitchy when opened as a dialog. Note: Starting in Gecko 1.9.2, you can detect when a window is activated or deactivated by watching for the "activate" and "deactivate" events. See Window activation events. More information is available in the XUL tutorial. ...
...le at "
chrome://global/skin/", the window will not be stylized and will be invisible and glitchy when opened as a dialog. Note: Starting in Gecko 1.9.2, you can detect when a window is activated or deactivated by watching for the "activate" and "deactivate" events. See Window activation events. More information is available in the XUL tutorial. ...
...And 10 more matches
Communicating with frame scripts
The API is mostly symmetrical, with one major exception: frame scripts can send asynchronous or synchronous messages to
chrome, but
chrome can only send asynchronous messages to content. This is an intentional design decision made to prevent content code from making
chrome code unresponsive. Where absolutely necessary, frame scripts can pass wrappers called Cross Process Object Wrappers (also known as CPOWs) to
chrome, and
chrome can use these wrappers to get synchronous access to content objects. Content to
chrome The frame script can choose to send synchronous or asynchronous messages to
chrome code. ...
... Asynchronous messaging To send an asynchronous message the frame script uses the global sendAsyncMessage() function: // frame script sendAsyncMessage("my-addon@me.org:my-e10s-extension-message"); sendAsyncMessage() takes one mandatory parameter, which is the name of the message. ...
... Asynchronous messaging To send an asynchronous message the frame script uses the global sendAsyncMessage() function: // frame script sendAsyncMessage("my-addon@me.org:my-e10s-extension-message"); sendAsyncMessage() takes one mandatory parameter, which is the name of the message. ...
...And 10 more matches
Message manager overview
In multiprocess Firefox there are (at least) two processes: the
chrome process, also called the parent process, runs the browser UI (
chrome) code and code inserted by extensions one or more content processes, also called child processes. These processes run web content. Message managers are designed to enable
chrome-privileged JavaScript code in one process to communicate with
chrome-privileged JavaScript code in a different process. This article describes the different types of message manager, how to access them, and at a high level, what sorts of things you can use them for. ...
...ned to enable
chrome-privileged JavaScript code in one process to communicate with
chrome-privileged JavaScript code in a different process. This article describes the different types of message manager, how to access them, and at a high level, what sorts of things you can use them for. At the top level, there are two different sorts of message managers: Frame message managers: these enable
chrome process code to load a script into a browser frame (essentially, a single browser tab) in the content process. These scripts are called frame scripts, and as the name suggests, they are scoped to a specific browser frame. If
chrome code wants to run code in the content process so it can access web content, this is usually the sort of message manager to use. Process message managers: these corres...
...From Firefox 38 onwards, they also enable code running in the parent process to load process scripts into the child process. ...
...And 10 more matches
Index - Web APIs
cument, or null if none is available. 897 Document.designMode API, Document, HTML DOM, NeedsContent, NeedsSpecTable, Property, Reference, editor document.designMode controls whether the entire document is editable. Valid values are "on" and "off". According to the specification, this property is meant to default to "off". Firefox follows this standard. The earlier versions of
Chrome and IE default to "inherit". Starting in
Chrome 43, the default is "off" and "inherit" is no longer supported. In IE6-10, the value is capitalized. 898 Document.dir API, Document, HTML DOM, NeedsSpecTable, Property, Reference The Document.dir property is a DOMString representing the directionality of the text of the document, whether left to right (default) or right to left. ...
... System API, File and Directory Entries API, Files, Non-standard, Overview, Reference The File and Directory Entries API simulates a local file system that web apps can navigate within and access files in. You can develop apps which read, write, and create files and/or directories in a virtual, sandboxed file system. ...
... local file system that web apps can navigate within and access files in. You can develop apps which read, write, and create files and/or directories in a virtual, sandboxed file system. 1330 File and Directory Entries API support in Firefox API,
Chrome, Compatibility, File System API, File and Directory Entries API, Files, Firefox, Guide, Offline, Web Compatibility, google, google
chrome The original File System API was created to let browsers implement support for accessing a sandboxed virtual file system on the user's storage device. Work to standardize the specification was abandoned back in 2012, but by that point, Google
Chrome included its own implementation of the API. Over time, a number of popular sites and Web applications came to use it, often without providing a...
...And 10 more matches
PhotoCapabilities - Web APIs
ange object indicating the image height range supported by the user agent. PhotoCapabilities.imageWidth Read only Returns a MediaSettingsRange object indicating the image width range supported by the user agent. PhotoCapabilities.fillLightMode Read only Returns an array of available fill light options. Options may include auto, off, or flash. Example The following example, extracted from
Chrome's Image Capture / Photo Resolution Sample, uses the results from getPhotoCapabilities() to modify the size of an input range. This example also shows how the ImageCapture object is created using a MediaStreamTrack retrieved from a device's MediaStream. const input = document.querySelector('input[type="range"]'); var imageCapture; navigator.mediaDevices.getUserMedia({video: true}) .then(mediaS...
... Status Comment MediaStream Image CaptureThe definition of 'PhotoCapabilities' in that specification. Working Draft Initial definition. Browser Compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...inition of 'PhotoCapabilities' in that specification. Working Draft Initial definition. Browser Compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...And 10 more matches
Browser detection using the user agent - HTTP
our page, but instead, you check to see if the specific feature you need is available. If it's not, you use a fallback. In those rare cases where behavior differs between browsers, instead of checking the user agent string, you should instead implement a test to detect how the browser implements the API and determine how to use it from that. An example of feature detection is as follows. In 2017,
Chrome unflagged experimental lookbehind support in regular expressions, but no other browser supported it. So, you might have thought to do this: // this code snippet splits a string in a special notation if (navigator.userAgent.indexOf("
Chrome") !== -1){ // YES! The user is suspected to support look-behind regexps // DO NOT USE /(?<=[A-Z])/. It will cause a syntax error in // browsers...
... Most importantly, it assumed no other browsers would support the...
...erformant, but works*/ var splitUpString = function(str){ return str.replace(/[A-Z]/g,"z$1").split(/z(?=[A-Z])/g); }; } console.log(splitUpString("fooBare")); // ["fooB", "are"] console.log(splitUpString("jQWhy")); // ["jQ", "W", "hy"] The above code would have made several incorrect assumptions: It assumed that all user agent strings that include the substring "
Chrome" are
Chrome. UA strings are notoriously misleading. It assumed that the lookbehind feature would always be available if the browser was
Chrome. The agent might be an older version of
Chrome, from before support was added, or (because the feature was experimental at the time) it could be a later version of
Chrome that removed it. Most importantly, it assumed no other browsers would support the feature. Su...
...And 10 more matches
XUL Migration Guide - Archive of obsolete content
there are a few different options. In order of complexity, the main options are: the SDK includes modules that implement some basic user interface components including buttons, dialogs, and context menu items. there is a collection of community-developed modules that includes various user interface components. by using the SDK's low-level APIs you can directly modify the browser
chrome. ...
...f community-developed modules that includes various user interface components. by using the SDK's low-level APIs you can directly modify the browser
chrome. XUL Windows XUL windows are used to define completely new windows to host user interface elements specific to the add-on. The SDK generally expects you to specify your user interface using HTML, not XUL. However, you can include a
chrome.manifest file in your add-on and it will be included in the generated XPI. ...
... SDK's low-level APIs you can directly modify the browser
chrome. XUL Windows XUL windows are used to define completely new windows to host user interface elements specific to the add-on. The SDK generally expects you to specify your user interface using HTML, not XUL. However, you can include a
chrome.manifest file in your add-on and it will be included in the generated XPI. my-addon/
chrome/ content/ locale/ skin/
chrome.manifest data/ lib/ package.json There are limitations on what you can do in this manifest file: for example, you can't register overlays, resource: URIs, or components. However, you can register a
chrome: URI, with a skin and locale, and this means you can include XUL windows in an SDK-based add-on. You can keep the "chrom...
...And 9 more matches
Creating custom Firefox extensions with the Mozilla build system - Archive of obsolete content
o "1" before running the development version of Firefox. You'll also need to use a different profile for your development version: firefox -P development Where development is replaced with the name of the extra profile you've created. This will let you run both versions of Firefox simultaneously, saving you oodles of time over the course of the build/test cycle. No Place Like
Chrome Yippee-ki-yay! Now you have an extension that does, well, absolutely nothing. It's time to do something with those groovy components that you've implemented and registered. The simplest way to do this is to write some JavaScript and XUL code. At this point, it would be very helpful to have a bit of experience writing "regular" extensions (i.e. without using custom C++ components). If you'v...
...ever done this, I strongly recommend that you think of a cool idea for something simple that you've always wanted to tweak in Firefox and write it. Just displaying a new menu item that opens a "Hello, World!" dialog box would be already be a great exercise to get warmed up with. ...
...would be already be a great exercise to get warmed up with. Assuming you know how to write XUL/JavaScript extensions, you're aware that the most important stuff goes in the
chrome/ directory of your extension. Well, the fact that you're also using C++ components doesn't change that one whit. So now you need to create the normal content/, locale/ and skin/ directories in which to place your
chrome files. Personally I like placing these directly under the root directory of my module, but I don't suppose it makes any difference if you prefer putting them under a
chrome/ subdirectory or whatever. ...
...And 9 more matches
JavaScript Object Management - Archive of obsolete content
The first step to good JavaScript object management is having a namespace, or a JavaScript object that contains our code and data, that you know will not conflict with Firefox code or other extensions. Namespace declaration is best located in a file of its own, so that you have this one JS file that should be included in all of your XUL files. We'll be using the placeholder <Namespace> below. This needs to be replaced with an identifier name which is unique to your add-on. ...
...ponds to the development group (or company), and the second to the specific project. However, most extensions are small projects by individuals, so these examples follow a more practical approach of having just one namespace with the project name. Notice how the <Namespace> namespace is declared using var. We need the namespace to be a global object that it can be used everywhere in the window
chrome. You can include functions in any namespace, since namespaces are just regular JS objects. That should come in handy when you have general utility functions or properties that you want to use across all objects within the namespace. For instance, there are frequently used XPCOM services such as the Observer service that can be included as members in the namespace: /** * <Namespace> namespace...
...th dynamically generated names. It's one of the funky properties of JavaScript: all objects are nothing more than name / value mappings. You can add or replace functions and attributes to any Javascript object, at any moment you want. This is an odd, but powerful feature that comes in handy at times when things get complicated. For instance, you could replace a method in any object in the Firefox
chrome, so that it behaves differently than how it normally does. This should be a last resort option, but it is very useful at times. You usually need only one JS file to control a XUL window, since the code required is normally not that much. If you have complex behavior that requires too much code, look for ways to divide it into multiple objects and files. You can include as many scripts in a XUL...
...And 9 more matches
Getting Started - Archive of obsolete content
, and select the classic skin. You can use the same version as the one you use to browse the web, but if you mess it up, it is possible that you will be unable to access your browser without uninstalling and reinstalling Mozilla. For this reason we suggest that you install a second copy into a second directory (Make sure that you use a different profile as stated in the release notes) Extract the
chrome The
chrome is stored in \mozilla\
chrome and the individual modules are stored in Jar files. Jar files are zip files with a different extension. You can open them up in your zip program the same way you open up zip files. Mozilla currently comes with two skins, Classic and Modern. Looking in the directory you'll also notice that there are classic.jar and modern.jar files. For this tutorial we are ...
... files. Jar files are zip files with a different extension. You can open them up in your zip program the same way you open up zip files. Mozilla currently comes with two skins, Classic and Modern. Looking in the directory you'll also notice that there are classic.jar and modern.jar files. For this tutorial we are going to use the Classic skin as a base. Extract classic.jar into \classic (\mozilla\
chrome\classic), but make sure to keep the directory structure. Remember if at any point you wish to revert back to the original code again, just extract this jar over top of what you've modified. Now all of the CSS and images are extracted, but if you make some changes and run Mozilla as it is, you will not see them because it's still set to look at the files in the Jar files. To point Mozilla at the c...
...ctory structure. Remember if at any point you wish to revert back to the original code again, just extract this jar over top of what you've modified. Now all of the CSS and images are extracted, but if you make some changes and run Mozilla as it is, you will not see them because it's still set to look at the files in the Jar files. ...
...And 9 more matches
Installer Script - Archive of obsolete content
returned: " + err); 33. // create the plugins folder next to mozilla 34. var pluginsFolder = getFolder("Plugins"); 35. if (!fileExists(pluginsFolder)) 36. { 37. var ignoreErr = dirCreate(pluginsFolder); 38. logComment("dirCreate() returned: " + ignoreErr); 39. } 40. else 41. logComment("Plugins folder already exists"); 42. ...
... // create the plugins folder next to mozilla 34. var pluginsFolder = getFolder("Plugins"); 35. if (!fileExists(pluginsFolder)) 36. { 37. var ignoreErr = dirCreate(pluginsFolder); 38. logComment("dirCreate() returned: " + ignoreErr); 39. } 40. else 41. logComment("Plugins folder already exists"); 42. var cf = getFolder("
Chrome"); 43. ...
... folder next to mozilla 34. var pluginsFolder = getFolder("Plugins"); 35. if (!fileExists(pluginsFolder)) 36. { 37. var ignoreErr = dirCreate(pluginsFolder); 38. logComment("dirCreate() returned: " + ignoreErr); 39. } 40. else 41. logComment("Plugins folder already exists"); 42. var cf = getFolder("
Chrome"); 43. ...
...And 9 more matches
Creating a Window - Archive of obsolete content
<< PreviousNext >> We're going to be creating a simple find files utility throughout this tutorial. First, however, we should look at the basic syntax of a XUL file. Creating a XUL File An XUL file can be given any name but it really should have a .xul extension. The simplest XUL file has the following structure: <?xml version="1.0"?> <?xml-stylesheet href="
chrome://global/skin/" type="text/css"?> <window id="findfile-window" title="Find Files" orient="horizontal" xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"> <!-- Other elements go here --> </window> This window will not do anything since it doesn't contain any UI elements. Those will be added in the next section. In fact, there will not be shown any window at all. If you want to fo...
...ext section. In fact, there will not be shown any window at all. If you want to force the window to become visible you can add the width and height attribute to the window tag. Here is a line by line breakdown of the code above: <?xml version="1.0"?> This line simply declares that this is an XML file. You would normally add this line as is at the top of each xul file. <?xml-stylesheet href="
chrome://global/skin/" type="text/css"?> This line is used to specify the style sheets to use for the file. This is the syntax that XML files use to import style sheets. In this case, we import the styles found in the global part of a skin package. We didn't specify a specific file so Mozilla will determine which files in the directory to use. In this case, the all-important global.css file is selecte...
...elements (the buttons, menus and other user interface components) to appear in the window. We'll add some of these in the next set of sections. </window> And finally, we need to close the window tag at the end of the file. Opening a Window In order to open a XUL window, there are several methods that can be used. If you are only in the development stage, you can just type the URL (whether a
chrome:, file: or other URL type) into the location bar in a Mozilla browser window. You should also be able to double-click the file in your file manager, assuming that XUL files are associated with Mozilla. The XUL window will appear in the browser window as opposed to a new window, but this is often sufficient during the early stages of development. Note: The local XUL document can be opened in the ...
...And 9 more matches
Message manager overview
In the initial version of multiprocess Firefox there are two processes: the
chrome process, also called the parent process, runs the browser UI (
chrome) code and code inserted by extensions the content processes, also called the child processes, run all web content. Different tabs may run in different processes. Message managers are designed to enable code in one process to communicate with code in a different process. At the top level, there are two different sorts of message managers: Frame message managers: these enable
chrome process code to load a script into a browser frame (essentially, a single browser tab) in the content process. ...
...e process to communicate with code in a different process. At the top level, there are two different sorts of message managers: Frame message managers: these enable
chrome process code to load a script into a browser frame (essentially, a single browser tab) in the content process. These scripts are called frame scripts, and as the name suggests, they are scoped to a specific browser frame. If
chrome code wants to run code in the content process so it can access web content, this is usually the sort of message manager to use. Process message managers: these correspond to process boundaries, and enable code running in the parent (
chrome) process to communicate with code running in the child (content) process. From Firefox 38 onwards, they also enable code running in the parent process to load...
...espond to process boundaries, and enable code running in the parent (
chrome) process to communicate with code running in the child (content) process. From Firefox 38 onwards, they also enable code running in the parent process to load process scripts into the child process. These are like frame scripts, except they are global to the child process. Process scripts are most likely to be useful when
chrome code wants to run some code only once in the content process, to access some global service: for example, to register an observer or a content policy. ...
...And 9 more matches
FileSystemDirectoryEntry - Web APIs
ification Status Comment File and Directory Entries APIThe definition of 'FileSystemDirectoryEntry' in that specification. Draft Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...ry Entries APIThe definition of 'FileSystemDirectoryEntry' in that specification. Draft Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...ity The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...And 9 more matches
NavigationPreloadManager - Web APIs
n Status Comment Service WorkersThe definition of 'NavigationPreloadManager' in that specification. Working Draft Initial definition. Browser Compatibility The compatibility table in this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...n of 'NavigationPreloadManager' in that specification. Working Draft Initial definition. Browser Compatibility The compatibility table in this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...ity The compatibility table in this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...And 9 more matches
PushRegistrationManager - Web APIs
iated with the current webapp. PushRegistrationManager.hasPermission() Returns a promise that resolves to the PushPermissionStatus of the requesting webapp. Browser Compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...ermission() Returns a promise that resolves to the PushPermissionStatus of the requesting webapp. Browser Compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...And 9 more matches
WritableStream - Web APIs
Specification Status Comment StreamsThe definition of 'WritableStream' in that specification. Living Standard Initial definition. Browser Compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...finition of 'WritableStream' in that specification. Living Standard Initial definition. Browser Compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...ompatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...And 9 more matches
max-height - CSS: Cascading Style Sheets
ent, fit-content keywords. CSS Level 2 (Revision 1)The definition of 'max-height' in that specification. Recommendation Initial definition. Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...The definition of 'max-height' in that specification. Recommendation Initial definition. Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
.... Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. DesktopMobile
ChromeEdgeFirefoxInternet ExplorerOperaSafariAndroid webview
Chrome for AndroidFirefox for AndroidOpera for AndroidSafari on iOSSamsung Internetmax-height
Chrome Full support 18Edge Full support 12Firefox Full support 1Notes Full support 1Notes Notes CSS 2.1 leaves the behavior of max-height with table undefined. Firefox supports applying max-height to table elements.IE ...
...And 9 more matches
max-width - CSS: Cascading Style Sheets
ent, fit-content keywords. CSS Level 2 (Revision 1)The definition of 'max-width' in that specification. Recommendation Initial definition. Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...The definition of 'max-width' in that specification. Recommendation Initial definition. Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
.... Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. DesktopMobile
ChromeEdgeFirefoxInternet ExplorerOperaSafariAndroid webview
Chrome for AndroidFirefox for AndroidOpera for AndroidSafari on iOSSamsung Internetmax-width
Chrome Full support 1Edge Full support 12Firefox Full support 1Notes Full support 1Notes Notes CSS 2.1 leaves the behavior of max-width with table undefined. Firefox supports applying max-width to table elements.IE ...
...And 9 more matches
position - CSS: Cascading Style Sheets
so on. You must specify a threshold with at least one of top, right, bottom, or left for sticky positioning to behave as expected. Otherwise, it will be indistinguishable from relative positioning. ...
...ation CSS Positioned Layout Module Level 3The definition of 'position' in that specification. Working Draft Adds sticky property value. Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...efinition of 'position' in that specification. Working Draft Adds sticky property value. Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...And 9 more matches
WebAssembly.Module - JavaScript
Specifications Specification WebAssembly JavaScript InterfaceThe definition of 'WebAssembly.Module()' in that specification. Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...bly JavaScript InterfaceThe definition of 'WebAssembly.Module()' in that specification. Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...rowser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...And 9 more matches
Chapter 3: Introduction to XUL—How to build a more intuitive UI - Archive of obsolete content
a tool for writing and displaying presentations To try out the code samples in this chapter, save them as text files with .xul extensions and drag and drop them into the Firefox browser window. ...
...se next listings If we want to run Firefox displaying none of its GUI and only the contents of a certain XUL file, we can launch Firefox and set the option: -
chrome file_URL.xul Another way, as shown in Listing 1, is to use the window.openDialog() method, which can be used only within a XUL window. This is used by extensions to open a separate window. window.openDialog('another.xul', '_blank','
chrome,all,dialog=no'); Listing 1: Opening a window without the Firefox GUI XUL as an XML application Listing 2 shows an example of a GUI definition file marked up in XUL (a "XUL document"). The root element in XUL is generally the "window" element. The namespace URI is : http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul If the character encoding is UTF-8, both the encoding specifier ...
...ase include them. Because a XUL document is also an XML document, it can contain XHTML, SVG, MathML, and other elements; if you use external entity references, the XML document's contents are modularized; combined with other XML-related technologies, such as DOM, XLink, or XSLT, you can use it for a number of different applications. <?xml version="1.0" encoding="UTF-8"?> <?xml-stylesheet href="
chrome://global/skin/"?> <window xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"> <!-- Contents go here. --> </window> Listing 2: General structure of a XUL document Even with the internationalization of Firefox and extensions, this kind of XML function is being used. Reading in style sheets XUL uses CSS to specify the appearance of its elements. Again, since XUL is a type o...
...And 8 more matches
Setting up an extension development environment - Archive of obsolete content
zilla preferences, refer to the mozillaZine article on "about:config". Tip: You can install either the Developer Profile or DevPrefs add-ons to handle setting these preferences automatically, and skip the rest of this section. DevPrefs can now be found at https://github.com/Noitidart/DevPrefs. maxVersion needs to be set in install.rdf javascript.options.showInConsole = true. Logs errors in
chrome files to the Error Console. nglayout.debug.disable_xul_cache = true. Disables the XUL cache so that changes to windows and dialogs do not require a restart. This assumes you're using directories rather than JARs. Changes to XUL overlays will still require reloading of the document overlaid. browser.dom.window.dump.enabled = true. Enables the use of the dump() statement to print to the standard ...
... info. You can use nsIConsoleService instead of dump() from a privileged script. javascript.options.strict = true. Enables strict JavaScript warnings in the Error Console. Note that since many people have this setting turned off when developing, you will see lots of warnings for problems with their code in addition to warnings for your own extension. You can filter those with Console2. devtools.
chrome.enabled = true. This enables to run JavaScript code snippets in the
chrome context of the Scratchpad from the Tools menu. Don't forget to switch from content to browser as context. devtools.debugger.remote-enabled = true. This adds a "Browser Debugger" entry to the "Web Developer" submenu of the "Tools" menu. The Browser Debugger can be used to debug the JavaScript code of extensions. The devto...
... devtools.debugger.prompt-connection = false. This prevents the Browser Debugger from prompting for connection permission every time. extensions.logging.enabled = true. ...
...And 8 more matches
Getting Started - Archive of obsolete content
y 2 installation directory. A .jar file is in reality a renamed zip archive. Opening the .jar files in your archive manager of choice should result in the file being automatically detected as being a zip archive. However, if your application doesn't detect classic.jar as a standard zip archive, rename the file classic.zip and continue extraction. Classic.jar locations Linux: folder_with_seamonkey/
chrome/classic.jar Windows: folder_with_seamonkey\
chrome\classic.jar For Mac OS X: folder_with_seamonkey/
chrome/classic.jar Copy classic.jar to another easily accessible folder -- Classic is recommended -- extract the contents of that folder, being sure to maintain the directory structure. Directories Inside classic.jar is one directory, skin. skin skin simply contains another directory, classic which ...
... restrictively difficult to set up) you must first learn how to repackage the classic theme to make it installable. For the sake of this discussion we will call your theme "My_Theme", though you can replace that with any name. Copying The Necessary Files The first step is to move all the files into the right directory structure. So create a new directory called My_Theme. Create a directory called
chrome inside it. Into this directory put a ZIP archive called My_Theme.jar containing navigator, global, communicator, editor, help, messenger, messenger-newsblog and mozapps directories from above. (Yes, this means that the structure of your new directory and classic.jar will be slightly different.) Creating the Install Files Icon.png and preview.png These are some PNG images containing the icon and t...
...ectory put a ZIP archive called My_Theme.jar containing navigator, global, communicator, editor, help, messenger, messenger-newsblog and mozapps directories from above. (Yes, this means that the structure of your new directory and classic.jar will be slightly different.) Creating the Install Files Icon.png and preview.png These are some PNG images containing the icon and the preview of the theme.
Chrome.manifest Make a copy of
chrome.manifest and place it in \My_Theme and open it up in your text editor. This file is a small manifest file which is used to describe the skin. In the code search for all instances of "My_Theme" and replace them with the name of your theme. The packages section lists which components of the browser you're modifying. If we also had skins for Chatzilla, we would need to...
...And 8 more matches
nsIWindowWatcher
ated or destroyed, so only a weak reference is kept. Note that there is no interface for such notifications (not a public one, anyway). This is taken care of both in Mozilla and by common embedding code. Embedding clients need do nothing special about that requirement. This component must be initialized at application startup by calling setWindowCreator(). ...
...stroyed, so only a weak reference is kept. Note that there is no interface for such notifications (not a public one, anyway). This is taken care of both in Mozilla and by common embedding code. Embedding clients need do nothing special about that requirement. This component must be initialized at application startup by calling setWindowCreator(). ...
...w nsIDOMWindow The Watcher serves as a global storage facility for the current active (front most non-floating-palette-type) window, storing and returning it on demand. Users must keep this attribute current, including after the topmost window is closed. This attribute will be null if the active window is not an nsIDOMWindow; for example, if the active window is an alert. ...
...And 8 more matches
Address Book examples
.nsIAbManager); abManager.deleteAddressBook(mailList.URI); How do I display properties dialogs to the user? In the following examples: selectedAB is the URI of an address book to default the dialog to saving the card in. This may be blank if not required. abURI and card are the URI of the address book and the card contained within that address book. ...
...e user? In the following examples: selectedAB is the URI of an address book to default the dialog to saving the card in. This may be blank if not required. abURI and card are the URI of the address book and the card contained within that address book. ...
... blank if not required. abURI and card are the URI of the address book and the card contained within that address book. ...
...And 8 more matches
FileReaderSync - Web APIs
Specification Status Comment File APIThe definition of 'FileReaderSync' in that specification. Working Draft Initial definition. Browser Compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...definition of 'FileReaderSync' in that specification. Working Draft Initial definition. Browser Compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... Browser Compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...And 8 more matches
Guide to the Fullscreen API - Web APIs
ed plug-ins, cannot be presented in fullscreen mode. Attempting to put an element which can't be displayed in fullscreen mode (or the parent or descendant of such an element) won't work. Instead, the element which requested fullscreen will receive a mozfullscreenerror event. When a fullscreen request fails, Firefox will log an error message to the Web Console explaining why the request failed. In
Chrome and newer versions of Opera however, no such warning is generated. Note: Fullscreen requests need to be called from within an event handler or otherwise they will be denied. Getting out of full screen mode The user always has the ability to exit fullscreen mode of their own accord; see Things your users want to know. You can also do so programmatically by calling the Document.exitFullscreen...
...n the document (checking it prefixed with both moz, ms, or webkit). If it's null, the document is currently in windowed mode, so we need to switch to fullscreen mode. Switching to fullscreen mode is done by calling element.requestFullscreen(). If fullscreen mode is already active (fullscreenElement is non-null), we call document.exitFullscreen(). ...
...call document.exitFullscreen(). Prefixing Note: Currently, only Firefox 64 and
Chrome 71 supports this unprefixed. For the moment not all browsers are implementing the unprefixed version of the API (for vendor agnostic access to the Fullscreen API you can use Fscreen). ...
...And 8 more matches
break-inside - CSS: Cascading Style Sheets
ndle region breaks. CSS Multi-column Layout ModuleThe definition of 'break-inside' in that specification. Working Draft Initial definition. Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...he definition of 'break-inside' in that specification. Working Draft Initial definition. Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...tibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...And 8 more matches
font-variant - CSS: Cascading Style Sheets
ation. Recommendation No change CSS Level 1The definition of 'font-variant' in that specification. Recommendation Initial definition Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...e definition of 'font-variant' in that specification. Recommendation Initial definition Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...And 8 more matches
Web audio codec guide - Web media technologies
imum bit rate for stereo sound 96 kbps at 48 kHz sample rate Compression Lossy Maximum audio channels 48 (plus 16 Low Frequency Enhancement channels) Audio frequency bandwidth 0 Hz - 96 kHz (standard audio channels) 0 Hz - 120 Hz (LFE channels) Latency 20 ms to 405 ms Browser compatibility Feature
Chrome Edge Firefox Internet Explorer Opera Safari AAC support Yes[2] Yes Yes[1] 9 Yes 3.1 Container support MP4, ADTS, 3GP RTP / WebRTC compatible Yes Licensing For streaming or distributing AAC-encoded content: no license required; developers of co...
...ox relies upon a platform's native support for AAC. This capability was introduced on each platform in different Firefox releases: AAC support in Firefox using external library, by platform Platform First Firefox version with AAC support Windows (Vista and later) 22 Android 20 Linux (depends on GStreamer) 26 macOS 35 [2]
Chrome supports AAC only in MP4 containers, and only supports AAC's Main Profile. In addition, AAC is not available in Chromium builds. ALAC (Apple Lossless Audio Codec) The Apple Lossless Audio Codec (ALAC or Apple Lossless) is a lossless codec developed by Apple. After initially being a closed format, Apple opened it up under an Apache license. Cross-platform and browser support for ALAC is not ver...
...-bit, 20-bit, 24-bit, and 32-bit integer Supported sample rates 1 Hz to 384,000 Hz Recommended minimum bit rate for stereo sound n/a Compression Lossless; up to 45-60% Maximum audio channels 8 (up to 7.1 surround) Audio frequency bandwidth ? Latency ? ...
...And 8 more matches
Scrollbar - Archive of obsolete content
This example shows how to style the scrollbars in your xul application. Scrollbars inside browser elements will be styled to. Tested on windows xp. ...
... This example shows how to style the scrollbars in your xul application. Scrollbars inside browser elements will be styled to. Tested on windows xp. ...
... This example shows how to style the scrollbars in your xul application. Scrollbars inside browser elements will be styled to. Tested on windows xp. ...
...And 7 more matches
Index of archived content - Archive of obsolete content
querystring request selection self simple-prefs simple-storage system tabs timers ui url widget windows Low-Level APIs /loader
chrome console/plain-text console/traceback content/content content/loader content/mod content/symbiont content/worker core/heritage core/namespace core/promise dev/panel event/core event/target frame/hidden-fr...
... Add a Context Menu Item Add a Menu Item to Firefox Adding a Button to the Toolbar Annotator Creating annotations Displaying annotations Implementing the widget Overview Storing annotations
Chrome Authority Creating Event Targets Creating Reusable Modules Developing for Firefox Mobile Display a Popup Getting Started (jpm) Getting started (cfx) List Open Tabs Listen for Page Load Listening for Load and Unload Localization Logging ...
... Getting started (cfx) List Open Tabs Listen for Page Load Listening for Load and Unload Localization Logging Modifying Web Pages Based on URL Modifying the Page Hosted by a Tab Open a Web Page Troubleshooting Unit Testing Using XPCOM without
chrome Using third-party modules (jpm) Bootstrapped extensions Code snippets Alerts and Notifications Autocomplete Bookmarks Boxes Canvas code snippets Cookies Customizing the download progress bar Dela...
...And 7 more matches
Making it into a dynamic overlay and packaging it up for distribution - Archive of obsolete content
ackage that installs our extension as a dynamic overlay. XPIs have a complex structure designed to separate UI layers from each other. To make our XPI we'll start out by creating a directory to hold the files we're going to add to the XPI. Then we'll modify URLs in our files so they point to the right place. After that we'll create a contents.rdf file describing the tinderstatus component for the
chrome registry and an install.js script to perform the installation. Finally we'll zip the files into an archive. Start out by creating a directory called tinderstatus-installer. Create a tinderstatus subdirectory in it and a content sub-subdirectory in that subdirectory. Copy the following files into the content sub-subdirectory: tinderstatusOverlay.xul tinderstatus.js tinderstatus.css tb-buste...
...ectory: tinderstatusOverlay.xul tinderstatus.js tinderstatus.css tb-busted.png tb-nostatus.png tb-success.png tb-testfailed.png These are the files we're going to put into the XPI. ...
...inderstatusOverlay.xul to point to the new locations the files will be in when they get installed via the XPI: <?xml version="1.0"?> <?xml-stylesheet href="
chrome://tinderstatus/content/tinderstatus.css" type="text/css"?> <overlay id="tinderstatusOverlay" xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"> <script type="application/javascript" src="
chrome://tinderstatus/content/tinderstatus.js" /> <statusbar id="status-bar"> <statusbarpanel class="statusbarpanel-iconic" id="tinderbox-status" insertbefore="offline-status" status="none"/> </statusbar> </overlay> We also need to change the URLs in the copy of tinderstatus.css: statusbarpanel#tinderbox-status { list-style-image: url("
chrome://tinderstatus/content...
...And 7 more matches
Learn XPI Installer Scripting by Example - Archive of obsolete content
dates. A XPI is a PKZIP-compressed archive (like ZIP and JAR files) with a special script at the highest level that manages the installation. That installer script , usually named install.js, is the subject of this article. ...
...th a call to performInstall at the end), is the communicatorFolder directory defined at line 22 as "Program." "Program" is one of a short list of keywords that can be used in place of full path names in methods such as addFile. "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). Registering the Software Registering software is sometimes a requirement of both the operating system and of the Netscape 6 platform. When you install new
chrome, for example, like the browser.xpi install does, you need to alert the
chrome registry to these changes, so that skins, user preferences, packaging...
...the Windows user profile and the Windows registry, respectively. The browser.xpi install script does not demonstrate the use of these objects, but see the XPInstall API Reference for more information about registering software with the win32 operating systems and other operating systems. To register new Netscape 6-based software (e.g., plug-ins, new components, new themes, new packages) with the
chrome registry, you must use the register
Chrome function of the Install object. If successful, this function returns a "0" and makes entries into theinstalled-
chrome.txt file in the
chrome subdirectory, which is then used to regenerate the various RDF files that make up the
chrome registry. var cf = getFolder("
Chrome"); register
Chrome(CONTENT | DELAYED_
CHROME, getFolder(cf,"toolkit.xpi"),"content/gl...
...And 7 more matches
Index - Archive of obsolete content
57 close XUL Attributes, XUL Reference No summary! 58 closebutton XUL Attributes, XUL Reference No s...
... XUL Attributes, XUL Reference No summary! 92 dir XUL Attributes, XUL Reference No summary! 93 disableKeyNavigation XUL Attributes, XUL Reference No summary! 94 disableautocomplete XUL Attributes, XUL Reference No summary! 95 disableautoselect XUL Attributes, XUL Reference No summary! 96 disable
chrome XUL, XUL Attribute, XUL Reference No summary! 97 disableclose XUL Attributes, XUL Reference No summary! 98 disabled XUL Attributes, XUL Reference No summary! 99 disablefastfind XUL, XUL Attribute, XUL Reference No summary! 100 disableglobalhistory No summary! 101 disablehistory No ...
...ry! 133 group XUL Attributes, XUL Reference No summary! 134 handleCtrlTab XUL Attributes, XUL Reference No summary! 135 height XUL Attributes, XUL Reference No summary! 136 helpURI XUL Attributes, XUL Reference No summary! 137 hidden XUL Attributes, XUL Reference No summary! 138 hide
chrome XUL Attributes, XUL Reference No summary! 139 hidecolumnpicker XUL Attributes, XUL Reference No summary! 140 hideheader XUL Attributes, XUL Reference No summary! 141 hideseconds XUL Attributes, XUL Reference No summary! 142 hidespinbuttons XUL Attributes, XUL Reference No summary! 143 highligh...
...And 7 more matches
Complete - Archive of obsolete content
lcustom. It uses this name as the default file name throughout. Where you see a URL in the code with no file name, the application uses this default file name and an extension appropriate for the type of file expected. The extension is supplied as a XPI, which is compressed to reduce download times. ...
... default file name and an extension appropriate for the type of file expected. The extension is supplied as a XPI, which is compressed to reduce download times. The XPI contains: install.rdf Information about the extension
chrome.manifest Registration data for Firefox etc. ...
...expected. The extension is supplied as a XPI, which is compressed to reduce download times. The XPI contains: install.rdf Information about the extension
chrome.manifest Registration data for Firefox etc. ...
...And 7 more matches
Debugging a XULRunner Application - Archive of obsolete content
n run Console Redirector.exe /? JavaScript Console To enable the JS console, start XULRunner with the -jsconsole argument. Note: If you are not using the stub executable to launch the application, the -jsconsole argument is after the application.ini argument: e.g. xulrunner.exe /path/to/application.ini -jsconsole By default the JS console only shows errors from web content. To show errors in
chrome JavaScript, the pref pref("javascript.options.showInConsole", true) must be set. To log JS errors to disk, set the environment variable XRE_CONSOLE_LOG to the path to the filename. i.e. export XRE_CONSOLE_LOG=/path/to/logfile or set XRE_CONSOLE_LOG=C:\path\to\logfile. To output messages to the JavaScript console There are two ways to output messages to the JS console: Components.utils.repor...
... // is suitable for your app. DebuggerServer.addBrowserActors("myXULRunnerAppWindowType"); } DebuggerServer.openListener(6000); For XULRunner version 37+ the code to enable the debugger has changed: Components.utils.import('resource://gre/modules/devtools/dbg-server.jsm'); if (!DebuggerServer.initialized) { DebuggerServer.init(); DebuggerServer.addBrowserActors(); DebuggerServer.allow
ChromeProcess = true; } let dbgListener=DebuggerServer.createListener(); dbgListener.portOrPath=6000; dbgListener.open(); Add the following to your prefs.js: (in recent ffox, edit about:config instead) pref("devtools.debugger.remote-enabled", true); In Firefox, go to Tools > Web Developer > Connect... and you should be able to point the debugger to your app. Happy debugging :) Venkman Follow the...
...ging :) Venkman Follow these instructions to install Venkman into your XULRunner application (XULRunner 1.9 and later): Get Venkman from addons.mozilla.org (v0.9.87 at the time of writing). To download the package, right-click the install link and save the package locally. Create a directory <application>/distribution/bundles/venkman. Unzip the package into that directory. Add <script src="
chrome://venkman/content/venkman-overlay.js" /> to one of your XUL windows. Add UI to open Venkman to your window (it could be a menu item or a toolbar button). Make it call start_venkman() when activated. Troubleshooting x-jsd is not a registered protocol If the message "x-jsd is not a registered protocol" appears when trying to open *.js files in Venkman, then add an empty file called .autoreg in...
...And 7 more matches
Strategies for carrying out testing - Learn web development
ngs". This is not an accurate, scientific approach, but as someone who has experience with the web industry you'll have a pretty good idea of at least some of the browsers you should test. This can form a good basis for a support chart. For example, if you live in Western Europe or North America, you will know that a lot of people use Windows and Mac desktops/laptops, where the main browsers are
Chrome, Firefox, Safari, IE, and Edge. You probably want to just test the latest versions of the first three, as these browsers receive regular updates. For Edge and IE, you probably want to test the last couple of versions; these should all go in the A grade tier. Note: You can only have one version of IE or Edge installed on a machine at once, so you will probably have to use virtual machine, or oth...
...e A grade tier. Note: You can only have one version of IE or Edge installed on a machine at once, so you will probably have to use virtual machine, or other strategy to do the testing you need. See Virtual machines later on. ...
...ouple of versions of the old Android stock browser, and
Chrome and Firefox for iOS and Android. You should ideally test these on both a phone and a tablet, to make sure that responsive designs are working OK. You might also know that a number of people still use IE 9. This is old and less capable, so let's put it in the B grade tier. This gives us the following support chart so far: A grade:
Chrome and Firefox for Windows/Mac, Safari for Mac, Edge and IE for Windows (last two versions of each), iOS Safari for iPhone/iPad, Android stock browser (last two versions) on phone/tablet,
Chrome and Firefox for Android (last two versions) on phone tablet B grade: IE 9 for Windows C grade: n/a If you live somewhere else, or are working on a site that will serve somewhere else (e.g. certain countr...
...And 7 more matches
XPCOM changes in Gecko 2.0
tration The way XPCOM components are registered changed in Gecko 2. Prior to Gecko 2, during component registration, all binary and JavaScript component files were loaded and called, asking them to register themselves. If you used XPCOMUtils.jsm, some of this was hidden from you, but it was still there. Starting in Gecko 2, however, components are registered using manifest files, similarly to how
chrome is registered. In fact, the same
chrome manifest file will be used to register components. All existing XPCOM components will need to be updated to support this. However, it's very easy to do, and you can actually support both types of registration for backward compatibility. Component manifests All component registration is now handled through manifest files. For extensions, this is the same chr...
... manifest file will be used to register components. All existing XPCOM components will need to be updated to support this. However, it's very easy to do, and you can actually support both types of registration for backward compatibility. Component manifests All component registration is now handled through manifest files. For extensions, this is the same
chrome.manifest currently used to register
chrome. XPT files The path of any XPT files must be listed explicitly in a manifest using an interfaces directive: interfaces components/mycomponent.xpt JavaScript components The registration information for JavaScript components is no longer located in the component itself; instead, it's located in the manifest. The component is loaded only when the XPCOM component manager needs to create a component. ...
.... XPT files The path of any XPT files must be listed explicitly in a manifest using an interfaces directive: interfaces components/mycomponent.xpt JavaScript components The registration information for JavaScript components is no longer located in the component itself; instead, it's located in the manifest. The component is loaded only when the XPCOM component manager needs to create a component.
chrome.manifest: # The {classID} here must match the classID in mycomponent.js component {e6b866e3-41b2-4f05-a4d2-3d4bde0f7ef8} components/mycomponent.js contract @foobar/mycomponent;1 {e6b866e3-41b2-4f05-a4d2-3d4bde0f7ef8} category profile-after-change MyComponent @foobar/mycomponent;1 The JavaScript code no longer exports a NSGetModule() function. It now must export a NSGetFactory() function, which a...
...And 7 more matches
Building the WebLock UI
idget, where the input string is retrieved as the value property of the textbox element. You also need to create the function that displays the WebLock window itself when the user clicks the weblock icon in the statusbar. That function uses the openDialog method from the window object and takes the URL to the XUL file in which the dialog is defined: function loadWebLock() { window.openDialog("
chrome://weblock/weblock.xul"); } XUL The entire user interface of the Mozilla browser and all of the applications that go with it, including the mail client, the IRC client, and others, have been defined in an XML language called XUL. Elements in the XUL markup map to widgets in the interface that Gecko renders in a fairly straightforward way - so, for instance, the root element of an application wi...
... which the user interface for the dialog and the events that initiate interaction with the web locking are defined. At the top of all XUL documents, an XML declaration is followed by the root element for the document, which is usually <window/> but for dialog boxes can also be the element <dialog/>. ...
...he <hbox/> centers the textbox and the button children, and it orients them horizontally (in contrast to the <vbox/>, which orients its children vertically). Notice also that when it's clicked, the button executes a JavaScript function called addThisSite(), which we've already defined in the weblock.js file in Client Code Overview above. ...
...And 7 more matches
BudgetService - Web APIs
imes in the future. BudgetService.reserve() Returns a Promise that resolves to a boolean, indicating whether the requested budget operation can be reserved. Browser Compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...ise that resolves to a boolean, indicating whether the requested budget operation can be reserved. Browser Compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...mpatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...And 7 more matches
FederatedCredential - Web APIs
hing else. }); Specifications Specification Status Comment Credential Management Level 1 Working Draft Initial definition. Browser compatibility The compatibility table in this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...atus Comment Credential Management Level 1 Working Draft Initial definition. Browser compatibility The compatibility table in this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...tibility The compatibility table in this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...And 7 more matches
NotificationEvent - Web APIs
ion. Living Standard Living standard. Note: This interface is specified in the Notifications API, but accessed through ServiceWorkerGlobalScope. Browser Compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...is interface is specified in the Notifications API, but accessed through ServiceWorkerGlobalScope. Browser Compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...atibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...And 7 more matches
WebAssembly.Global - JavaScript
Specifications Specification WebAssembly JavaScript InterfaceThe definition of 'WebAssembly.Global()' in that specification. Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...bly JavaScript InterfaceThe definition of 'WebAssembly.Global()' in that specification. Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...rowser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...And 7 more matches
WebAssembly.Memory - JavaScript
ArrayBuffer. Specifications Specification WebAssembly JavaScript InterfaceThe definition of 'Memory' in that specification. Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... WebAssembly JavaScript InterfaceThe definition of 'Memory' in that specification. Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...rowser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...And 7 more matches
Add to Home screen - Progressive web apps (PWAs)
inside it -- this is the "Add to Home screen" icon displayed for any site that has the necessary features in place. Tapping this will show a confirmation banner -- pressing the big + ADD TO HOME SCREEN button completes the action, adding the app to the Home screen. (Note: In Android 8 and higher, a system-level "Add to Home screen" permission dialog will be shown first.) If you have Mobile
Chrome available, the experience is slightly different; upon loading our site, you'll see an install banner pop up asking whether you want to add this app to your Home screen. Note: You can find out a lot more about
Chrome install banners from the article Web App Install Banners. If you choose not to add it to your Home screen at this point, you can do so later using the Add to Home screen icon in...
... Regardless of which browser you are using, when you choose to add the app to your Home screen, you'll see it appear along with a short title, in the same way that native apps do. ...
...r app to be added to a Home screen, it needs the following: To be served over HTTPs -- the web is increasingly being moved in a more secure direction, and many modern web technologies (A2HS included) will work only on secure contexts. To have a manifest file with the correct fields filled in, linked from the HTML head. To have an appropriate icon available for displaying on the Home screen.
Chrome additionally requires the app to have a service worker registered (e.g., so it can function when offline). Manifest The web manifest is written in standard JSON format and should be placed somewhere inside your app directory (in the root is probably best) with the name somefilename.webmanifest (we've chosen manifest.webmanifest). It contains multiple fields that define certain information abou...
...And 7 more matches
Creating a Help Content Pack - Archive of obsolete content
ifies what topic is loaded when the user hits the Home button in the viewer. We'll get to exactly how to fill in this attribute later. This attribute is optional, with fallback to the value welcome. nc:base contains the base URL relative to which the Help content referenced in the descriptor file is located. For example, if your glossary, index, and table of contents RDF files are all located at
chrome://myapp/locale/help/*, then you could put
chrome://myapp/locale/help/ here and use only the actual file names without path when needed later. You don't actually need this attribute if you don't want it, but it's a useful shorthand to save typing. Next, we need to describe where to find the glossary, index, and table of contents. (We're still not actually to the point where we're describing the ...
...reate the relevant information descriptions within the rdf:Seq element. ...
...In Firefox 1.0 each data source...
...And 6 more matches
Deploying XULRunner - Archive of obsolete content
ers should use pre-existing solutions for a native Windows installer. An example of one such solution may be found in the article: Creating a Windows Inno Setup installer for XULRunner applications. The installed files should be arranged in the following directory structure: installdir/ application.ini components/ ... components which are part of the application
chrome/ ...
chrome which is part of the application ... additional application files such as icons, etc myapplicationname.exe (This is the "stub executable"... you should copy and rename this file from xulrunner-stub.exe in your XULRunner installation.) xulrunner/ ... copy xulrunner/ to this directory When deploying with XULRunner 2.0 and above do t...
...ich is part of the application ... additional application files such as icons, etc myapplicationname.exe (This is the "stub executable"... you should copy and rename this file from xulrunner-stub.exe in your XULRunner installation.) xulrunner/ ... copy xulrunner/ to this directory When deploying with XULRunner 2.0 and above do the following: Move
chrome.manifest to the root directory, and adjust resource paths inside
chrome.manifest accordingly With XULRunner 9.0 or 10.0 you may need to copy "mozutils.dll" and/or "mozcrt19.dll" from the xulrunner directory to the root directory. This should be fixed with XULRunner 11.0 With XULRunner 11.0 you may need to copy "gkmedias.dll" from the xulrunner directory to the root directory Mac ...
... Instead, the library files are placed directly into the MacOS directory alongside the main executable file. Here's how the entire application bundle looks: MyApp.app/ Contents/ Info.plist PkgInfo Resources/ application.ini app_icon.icns components/ ... components which are part of the application
chrome/ ...
chrome which is part of the application ... additional application files such as icons, etc MacOS/ xulrunner (This is the "stub executable"... you should copy this file from /Library/Frameworks/XUL.framework/Versions/1.8/xulrunner.) libmozglue.dylib (the main XUL library) ... other executables and librari...
...And 6 more matches
Sunbird Theme Tutorial - Archive of obsolete content
paste your identifier between the double-quote characters, replacing the identifier that is there now. Change the next six lines to describe your theme. Ensure that the internal name is a single word. Note: If your theme is for a version of Sunbird later than 0.4, then also change the maxVersion. Save the file. Registering your theme To register your theme, create a plain text file named <tt>
chrome.manifest</tt>. Copy and paste the content from here (just one line): skin calendar testing
chrome/calendar/ Change <tt>testing</tt> to your theme's one-word internal name. Save the file. Creating the theme itself To create the theme itself, go to Sunbird's program directory. Note: If you do not know where the program directory is, look at the properties of the shortcut or launcher icon that...
...e <tt>testing</tt> to your theme's one-word internal name. Save the file. Creating the theme itself To create the theme itself, go to Sunbird's program directory. Note: If you do not know where the program directory is, look at the properties of the shortcut or launcher icon that you use to start Sunbird. There you can see the location of the directory. In the program directory, go to the <tt>
chrome</tt> directory. Use a jar tool or zip tool to unpack the file <tt>calendar.jar</tt> there. Go to the <tt>skin</tt> directory that has just been created, then to the <tt>classic</tt> directory there. Copy the <tt>calendar</tt> directory that you find there. In your theme directory, create a new directory named <tt>
chrome</tt>. Paste the copied <tt>calendar</tt> directory, together with all its con...
...Now you have a theme, although it looks exactly the same as Sunbird's classic theme. ...
...And 6 more matches
Frame script loading and lifetime
Loading frame scripts To load a frame script use the loadFrameScript() function. This line of code loads a frame script into the currently selected tab. ...
...tedBrowser.messageManager; mm.loadFrameScript('data:,dump("foo\\n")', true); loadFrameScript() takes two mandatory parameters: A URL that points to the frame script you want to load A boolean flag, allowDelayedLoad Note: if the message manager is a global frame message manager or a window message manager, loadFrameScript() may load the script multiple times, once in each applicable frame. ...
...ta:,dump("foo\\n")', true); loadFrameScript() takes two mandatory parameters: A URL that points to the frame script you want to load A boolean flag, allowDelayedLoad Note: if the message manager is a global frame message manager or a window message manager, loadFrameScript() may load the script multiple times, once in each applicable frame.
chrome: URLs Extension developers usually use a
chrome:// URL to refer to the frame scripts. ...
...And 6 more matches
nsIXULWindow
When the window is destroyed, it will fire a "xul-window-destroyed" notification through the global observer service. This signals the application in case it needs to quit. ...
...ko 2.0 (Firefox 4 / Thunderbird 3.3 / SeaMonkey 2.1) An nsIXULWindow is created as part of the creation of a top-level
chrome window. When the window is destroyed, it will fire a "xul-window-destroyed" notification through the global observer service. This signals the application in case it needs to quit. ...
... An nsIXULWindow is created as part of the creation of a top-level
chrome window. When the window is destroyed, it will fire a "xul-window-destroyed" notification through the global observer service. This signals the application in case it needs to quit. ...
...And 6 more matches
ctypes.open
. This native file can be placed in any folder of an addon and then loaded from js-ctypes. They can also be loaded from the system library path. Loading the native file If your addon is restartless, you must set it to be unpacked. ...
... custom native files cannot be loaded through
chrome:// or resource:// URIs. They must be accessed through a local file path (file://) or a JAR path (jar:). If the addon is an unpacked addon, such as bootstrap or Add-on SDK addons, the JAR path must be used. Therefore, the path has to be converted and then the converted path is used for loading with ctypes.open. ...
...dd-on SDK addons, the JAR path must be used. Therefore, the path has to be converted and then the converted path is used for loading with ctypes.open. ...
...And 6 more matches
GestureEvent - Web APIs
event types gesturestart gesturechange gestureend Specifications Not part of any specification. Apple has a description at the Safari Developer Library. Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...cifications Not part of any specification. Apple has a description at the Safari Developer Library. Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...r compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...And 6 more matches
SVGCircleElement - Web APIs
Scalable Vector Graphics (SVG) 1.1 (Second Edition)The definition of 'SVGCircleElement' in that specification. Recommendation Initial definition Browser Compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...efinition of 'SVGCircleElement' in that specification. Recommendation Initial definition Browser Compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... Browser Compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...And 6 more matches
ScreenOrientation - Web APIs
n Status Comment Screen Orientation APIThe definition of 'ScreenOrientation' in that specification. Working Draft Initial definition. Browser Compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...finition of 'ScreenOrientation' in that specification. Working Draft Initial definition. Browser Compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... Browser Compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...And 6 more matches
Screen Orientation API - Web APIs
Specifications Specification Status Comment Screen Orientation API Working Draft Initial definition. Browser Compatibility ScreenOrientation The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... Screen Orientation API Working Draft Initial definition. Browser Compatibility ScreenOrientation The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...lity ScreenOrientation The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...And 6 more matches
Firefox user agent string reference - HTTP
Starting in Version 6, users can opt into using a GeckoView-based Focus for Android with a hidden preference: it uses a GeckoView UA string to advertise Gecko compatibility. Focus Version (Rendering Engine) User Agent string 1.0 (WebView Mobile) Mozilla/5...
... Starting in Version 6, users can opt into using a GeckoView-based Focus for Android with a hidden preference: it uses a GeckoView UA string to advertise Gecko compatibility. Focus Version (Rendering Engine) User Agent string 1.0 (WebView Mobile) Mozilla/5.0 (Linu...
...ut do not contain a Mobile token. Starting in Version 6, users can opt into using a GeckoView-based Focus for Android with a hidden preference: it uses a GeckoView UA string to advertise Gecko compatibility. Focus Version (Rendering Engine) User Agent string 1.0 (WebView Mobile) Mozilla/5.0 (Linux; Android 7.0) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Focus/1.0
Chrome/59.0.3029.83 Mobile Safari/537.36 1.0 (WebView Tablet) Mozilla/5.0 (Linux; Android 7.0) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Focus/1.0
Chrome/59.0.3029.83 Safari/537.36 6.0 (GeckoView) Mozilla/5.0 (Android 7.0; Mobile; rv:62.0) Gecko/62.0 Firefox/62.0 Klar for Android Since version 4.1, Klar for Android uses the same UA string as Focus for Android. Be...
...And 6 more matches
Bootstrapped extensions - Archive of obsolete content
ger window. When the application is started up, if the extension is enabled and compatible with the application. Some examples of when the shutdown() function may be called: When the extension is uninstalled, if it's currently enabled. When the extension becomes disabled. When the user quits the application, if the extension is enabled. ...
... extension is enabled and compatible with the application. Some examples of when the shutdown() function may be called: When the extension is uninstalled, if it's currently enabled. When the extension becomes disabled. When the user quits the application, if the extension is enabled. ...
...() function may be called: When the extension is uninstalled, if it's currently enabled. When the extension becomes disabled. When the user quits the application, if the extension is enabled. Notes on modifying the application user interface
chrome.manifest in bootstrapped add-ons You can use a
chrome.manifest file in bootstrapped add-ons to: Make your add-on's content available via a
chrome:// URL (using the content, locale, and skin instructions in the manifest). Replace existing
chrome:// URIs with your content (using the override instruction). Not all
chrome.manifest instructions are supported in bootstrapped add-ons, for example you still cannot register XUL Overlays from a bootstrapped add-on. See the
chrome.manifest documentation for details. In Firefox 10 and later the ch...
...And 5 more matches
Customizing the download progress bar - Archive of obsolete content
This example illustrates how to customize the progress bar displayed for a given download in the Downloads window. First you need to overlay the Downloads window so that you can add a new stylesheet. ...
... This example illustrates how to customize the progress bar displayed for a given download in the Downloads window. First you need to overlay the Downloads window so that you can add a new stylesheet. ...
... This example illustrates how to customize the progress bar displayed for a given download in the Downloads window. First you need to overlay the Downloads window so that you can add a new stylesheet. ...
...And 5 more matches
Interaction between privileged and non-privileged pages - Archive of obsolete content
In your extension's browser.xul overlay, write code which listens for a custom DOM event. Here we call the event MyExtensionEvent. var myExtension = { myListener: function(evt) { alert("Received from web page: " + evt.target.getAttribute("attribute1") + "/" + evt.target.getAttribute("attribute2")); } } document.addEventListener("MyExtensionEvent", function(e) { myExtension.myListener(e); }, false, true); // The last value is a Mozilla-specific value to indicate untrusted content is allowed to trigger the event. ...
...document.addEventListener("MyExtensionEvent", function(e) { myExtension.myListener(e); }, false, true); If you need to to pass lots of data, consider using CDATA sections instead of the simple attributes on a custom element. Note: If you're using HTML5's postMessage() to send a message from unprivileged code to privileged code, adding 'true' to the end of your event listener in your privileged
chrome code will allow the message to be received. document.addEventListener("message", function(e) { yourFunction(e); }, false, true); Sending data from
chrome to unprivileged document To "answer" the web page (e.g., return code), your extension can set an attribute or attach child elements on the event target element (<MyExtensionDataElement/> in this example). You can optionally clean up the cr...
...ert(element.getAttribute("attribute3") + " " + EvtAnswer.target.getAttribute("Part1")); } Basic example of similar idea, extension passes information via attributes and fires event on div in page, here. ...
...And 5 more matches
Adding Toolbars and Toolbar Buttons - Archive of obsolete content
items in Firefox, including those added by extensions. To add your buttons, all you need to do is overlay the palette in your main browser overlay. <overlay id="xulschoolhello-browser-overlay" xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"> <toolbarpalette id="BrowserToolbarPalette"> <toolbarbutton id="xulschoolhello-hello-world-button" class="toolbarbutton-1
chromeclass-toolbar-additional" label="&xulschoolhello.helloWorld.label;" tooltiptext="&xulschoolhello.helloWorld.tooltip;" oncommand="XULSchool
Chrome.BrowserOverlay.doSomething(event);" /> <!-- More buttons here. --> </toolbarpalette> <!-- More overlay stuff. --> </overlay> One detail that is easy to overlook is the fact that the toolbarpalette element is outside of the wind...
...gin to happen. Always set the label and tooltiptext attributes of a toolbarbutton. In the case of a toolbaritem element (discussed later), use the title attribute instead of label. Tooltips are very important for users that want to know what a button does before clicking it. Setting the image for a toolbar button is done with CSS: #xulschoolhello-hello-world-button { list-style-image: url("
chrome://xulschoolhello/skin/hello-world.png"); } It's not really that simple to set the image for a toolbar button, because we need to consider the appearance of the button on different systems, and also consider the different button states, but we'll get into that further ahead. The CSS file with your toolbar styles needs to be included in the overlay file, as you would expect, but also in the chro...
...s, and also consider the different button states, but we'll get into that further ahead. The CSS file with your toolbar styles needs to be included in the overlay file, as you would expect, but also in the
chrome.manifest file. This is very important because the toolbar customization dialog won't work correctly without this. The way to include the file in the manifest is to add this line: style
chrome://global/content/customizeToolbar.xul
chrome://xulschoolhello/skin/toolbar.css If you are using XBL bindings (explained way ahead) for your toolbar items, you'll have to include the CSS files for those as well, each in a new line like the one above. We now have code that adds one or more buttons to the toolbar palette. The user can now use the Customize Dialog to add the buttons to the current...
...And 5 more matches
Appendix D: Loading Scripts - Archive of obsolete content
y, as Sandbox objects can be created with an arbitrary prototype object, the evaluated code can be given access to the global properties of any existing scope. Security: Sandbox objects are initialized with a security principal object, or otherwise a window or URL from which to derive one. This means that evalInSandbox can be used to execute code with a specified privilege level rather than full
chrome privileges. Beyond this, the scope of the Sandbox can be augmented or rarified to add or remove privileges as necessary. Under ordinary circumstances, native objects passed out of Sandboxes are wrapped in XrayWrapper objects, which means that only native properties of these objects are directly exposed to privileged code. This behavior can be reversed by setting the wantsXrays parameter to false ...
... compartments is not entirely transparent. Some known issues include: E4X XML objects cannot be wrapped for passage between compartments: bug 613142 There are a number of type detection issues, including: String.replace does not recognize RegExp objects from foreign compartments: bug 633830 Debugging: Support for Sandbox evaluation in development tools is uneven.
Chromebug supports Firebug based Sandboxes. Examples The following code will execute a simple script in a Sandbox with the privilege level of the current content page. The globals of the current content window will be available in the scripts global scope. In stack traces, the script will appear to have been loaded from the file "zz-9://plural/zed/alpha", line 42. // Use the current content window a...
...current global object. // The following may be used instead at the top-level: // // let context = this if (Components.utils.getGlobalForObject) // Gecko 2.x var context = Components.utils.getGlobalForObject({}); else // Gecko 1.x context = {}.__parent__; loadScript("script.js", context); The Sub-Script Loader The mozIJSSubScriptLoader can be used to load local scripts from the
chrome:, resource:, and file: protocols into any JavaScript object. Any new globals created by this script are defined as properties of this object. Additionally, any properties of the target object are available as variables in the script's global namespace, along with as any properties of the global associated with the target object. These scripts execute with the same privileges and restrictions of t...
...And 5 more matches
Install Scripts - Archive of obsolete content
any other operations you wish to have happen. No files get copied until step three. Because of this, you can easily specify a number of files to be installed, come across some kind of error, and abort the whole process without modifying the user's system. The Component Registry Mozilla maintains a file which is a registry of all the components that are currently installed. Components include new
chrome packages, skins and plugins. When a new component is installed, the registry gets updated. The registry also stores the set of files and version information about the installed components. That way, it is easier to check if a version of your component is already present and only update it if necessary. The component registry works somewhat like the Windows registry does. It consists of a hierarch...
...the files will be installed. There are two ways to do this. The simple method assigns an install directory and installs all files into it. The second method allows you to assign a destination on a per-file (or directory) basis. The first method is described below. The function setPackageFolder() assigns an installation directory. For the find files dialog, we will install the files into the
chrome directory. (We could actually put them anywhere though.) The setPackageFolder() takes one argument, the directory to install to. For maximum portability, you can't specify a string name for the directory. Instead, you specify an identifier of a known directory and get subdirectories of it. Thus, if your application needed to install some system libraries, you don't need to know the name of those ...
...Folder() takes one argument, the directory to install to. For maximum portability, you can't specify a string name for the directory. Instead, you specify an identifier of a known directory and get subdirectories of it. Thus, if your application needed to install some system libraries, you don't need to know the name of those directories. The directory identifiers are listed on this page. For the
chrome directory, the directory identifier is '
Chrome'. The getFolder() function can be used to get one of these special directories. This function takes two arguments, the first is the identifier and the second is a subdirectory. For example: findDir = getFolder("
Chrome","findfile"); setPackageFolder(findDir); Here, we get findfile folder in the
Chrome folder and pass it directly to the setPackageFold...
...And 5 more matches
Skinning XUL Files by Hand - Archive of obsolete content
you are going to create a skin for a XUL file and apply it by specifying classes for all of the interested elements. The skin will reside in a single CSS file, appropriately named drxul.css. As you will see, CSS provides a lot of flexibility for defining styles to individual elements, to classes of elements, to pseudo-classes, and to anonymous classes. By the way, in contrast to the term skin, "
chrome" refers to the skin and the content and whatever localization and platform-specific files are necessary for a particular part of the application or window. The skin is just the style or appearance of an interface, where the
chrome is the style, content, and structure. The
chrome is everything in the front end of an application. Much of what makes XUL look (and act!) the way it does comes from th...
... a button with a particular id, for example, some of the more basic style information for buttons in the global skin may take precedence over your new style and cause it not to be applied. Make sure you are aware of the way that the global skin defines the skin and which elements, in general, it is addressing. Since the purpose of the global skin is to create a look for the entire application or
chrome that can be changed dynamically, you should not create style information in a custom CSS file that controverts the global skin unless you really mean to. If your XUL file is to be a part of a larger application that can be skinned, like Mozilla, you probably want your XUL file to pick up the global changes when the application is dynamically reskinned. To keep your XUL looking consistent and to a...
...bably want your XUL file to pick up the global changes when the application is dynamically reskinned. 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. Stylesheet Syntax To familiarize yourself with the global skin, open up the text file called global.css in the
chrome/classic.jar!/skin/classic/global directory of the Mozilla application. In a cascading stylesheet, the style defin...
...And 5 more matches
Theme changes in Firefox 4 - Archive of obsolete content
is does impact theme developers, since many of the files that they need to pull out and work with are now in a new place. In particular, the new file omni.jar contains most of the resources, including the skin. It's also important to note that skin files are now split into two subfolders within the omni.jar file, and you'll need to look in both places to find all the skin resources you need. /
chrome/browser/skin Contains application-specific skin resource files. /
chrome/toolkit/skin Contains toolkit skin files. Note: When extracting omni.jar, you may incorrectly get false warnings from some virus protection software. In addition, due to the way the archive is optiimized, some zip utilities don't work with it. Controlling the actual icon size used by add-on toolbar buttons The iconsi...
...vigator-toolbox[iconsize="large"] > #PersonalToolbar { counter-reset: largeicons; } To use large icons everywhere, including the menu bar, regardless of the user preference: #navigator-toolbox > toolbar, #addon-bar { counter-reset: largeicons; } Creating a theme that works for Firefox 4 on Mac OS X Create a new directory (for example, My_Theme). Inside that, create another new directory
chrome. ...
...: largeicons; } Creating a theme that works for Firefox 4 on Mac OS X Create a new directory (for example, My_Theme). Inside that, create another new directory
chrome. Now copy all of the directories from omni.jar mentioned above into it. Then copy all of icon.png, install.rdf and preview.png from <firefox-app-bundle>/Contents/MacOS/extensions/{...} into My_Theme. ...
...And 5 more matches
Localizing without a specialized tool
les/l10n.ini l10n-mozilla-1.9.2 x-testing For convenience, try saving the output of this command to a text file on your Desktop so you can review it as you go. Run: $ compare-locales mozilla-1.9.2/browser/locales/l10n.ini l10n-mozilla-1.9.2 x-testing > ~/Desktop/x-testing.compare Open the x-testing.compare file that is on your desktop. ...
...nage Search Engines..." can easily be found in the Firefox browser UI by clicking on the drop-down arrow in the search box in the upper-right corner of your browser. At the bottom of the list of search engines that appears, you'll see, "Manage Search Engines...". To start, make sure you are in /path/to/your/working/directory/l10n-mozilla-1.9.2/x-testing And then, type the command mkdir /browser/
chrome/browser Now, step back out to the broader directory that contains both your l10n base (l10n-mozilla-1.9.2) and the en-US source code (mozilla-1.9.2). You can do this by typing: cd ../../ where each ".." represents the prior sub directory before the main directory where you want to be. You can always check the path by typing pwd Once you are in the root working directory with both en-US sour...
...mozilla-1.9.2) and the en-US source code (mozilla-1.9.2). You can do this by typing: cd ../../ where each ".." represents the prior sub directory before the main directory where you want to be. You can always check the path by typing pwd Once you are in the root working directory with both en-US source and the l10n base, copy the searchbar.dtd file by typing cp mozilla-1.9.2/browser/locales/
chrome/browser/searchbar.dtd l10n-mozilla-1.9.2/x-testing/browser/
chrome/browser/ Open the file in your x-testing directory and translate the words inside the quotation marks. Be sure to only translate what is in the quotation marks. For the purposes of this tutorial, we will just convert all letters to uppercase, so that the change is visible in the UI. <!ENTITY cmd_engineManager.label "MANAGE ...
...And 5 more matches
nsIFaviconService
ImageForPage() Obsolete since Gecko 22.0 (Firefox 22.0 / Thunderbird 22.0 / SeaMonkey 2.19) Note: This method was removed in Gecko 22.0. You should use the new async API mozIAsyncFavicons.getFaviconURLForPage() and getFaviconLinkForIcon() instead. This method is very similar to that of getFaviconLinkForIcon() method. For a given page will give you a URI that, when displayed in
chrome, will result in the given page's favicon. Unlike the other get functions, we needn't have heard of the page or its favicon: the default one will be returned in this case. When compared to getFaviconLinkForIcon() method, this method only adds the extra level of indirection, looking up the favicon based on the page URI and using the default if not found. nsIURI getFaviconImageForPage( in nsIURI a...
... Return value Returns a URI that will give you the icon image. This is not the URI of the icon as set on the page, but a URI that will give you the data out of the favicon service. For a normal page with a favicon we've stored, this will be an annotation URI which will then cause the corresponding favicon data to be loaded from this service. For pages where we don't have a favicon, this will be a
chrome URI of the default icon for a web page. getFaviconLinkForIcon() This method, for a given icon URI will return a URI that will result in the image. In most cases, this is an annotation URI. For
chrome, this will do nothing and return the input URI. No validity checking is done. If you pass an icon URI that we've never seen, you'll get back a URI that references an invalid icon. The moz-anno protoc...
...nsIURI getFaviconLinkForIcon( in nsIURI aFaviconURI ); Parameters aFaviconURI The URI of an icon in the favicon service. Return value Returns a URI that will load the desired icon. This is not the URI of the icon as set on the page, but a URI that will give you the data out of the favicon service. ...
...And 5 more matches
BudgetState - Web APIs
t Returns the anticipated processing budget at a specific time. BudgetState.time Returns a timestamp at which the budgetAt value is valid. Methods None. Browser Compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...ime. BudgetState.time Returns a timestamp at which the budgetAt value is valid. Methods None. Browser Compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...And 5 more matches
ByteLengthQueuingStrategy - Web APIs
ation Status Comment StreamsThe definition of 'ByteLengthQueuingStrategy' in that specification. Living Standard Initial definition. Browser Compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... 'ByteLengthQueuingStrategy' in that specification. Living Standard Initial definition. Browser Compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...y The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...And 5 more matches
CountQueuingStrategy - Web APIs
cification Status Comment StreamsThe definition of 'CountQueuingStrategy' in that specification. Living Standard Initial definition. Browser Compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...on of 'CountQueuingStrategy' in that specification. Living Standard Initial definition. Browser Compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...bility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...And 5 more matches
FileSystem - Web APIs
The File and Directory Entries API interface FileSystem is used to represent a file system. These objects can be obtained from the filesystem property on any file system entry. Some browsers offer additional APIs to create and manage file systems, such as
Chrome's requestFileSystem() method. This interface will not grant you access to the users filesystem. Instead you will have a "virtual drive" within the browser sandbox. If you want to gain access to the users filesystem you need to invoke the user by eg. installing a
Chrome extension. The relevant
Chrome API can be found here. Basic concepts There are two ways to get access to a FileSystem object: You can directly ask for one representing a sandboxed file system created just for your web app directly by calling window.requestFileSyst...
... Specification Status Comment File and Directory Entries APIThe definition of 'FileSystem' in that specification. Draft Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...le and Directory Entries APIThe definition of 'FileSystem' in that specification. Draft Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...And 5 more matches
FileSystemFileEntry - Web APIs
tus Comment File and Directory Entries APIThe definition of 'FileSystemFileEntry' in that specification. Draft Draft of proposed API Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...e definition of 'FileSystemFileEntry' in that specification. Draft Draft of proposed API Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...And 5 more matches
FileSystemFlags - Web APIs
Status Comment File and Directory Entries APIThe definition of 'FileSystemFlags' in that specification. Draft Initial specification. Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...IThe definition of 'FileSystemFlags' in that specification. Draft Initial specification. Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...ompatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...And 5 more matches
GamepadEvent - Web APIs
w.gamepaddisconnected event. window.addEventListener("gamepaddisconnected", function(e) { console.log("Gamepad disconnected from index %d: %s", e.gamepad.index, e.gamepad.id); }); Specifications Specification Status Comment GamepadThe definition of 'GamepadEvent' in that specification. ...
...addisconnected", function(e) { console.log("Gamepad disconnected from index %d: %s", e.gamepad.index, e.gamepad.id); }); Specifications Specification Status Comment GamepadThe definition of 'GamepadEvent' in that specification. ...
...pad.index, e.gamepad.id); }); Specifications Specification Status Comment GamepadThe definition of 'GamepadEvent' in that specification. ...
...And 5 more matches
HTMLIFrameElement.allowPaymentRequest - Web APIs
tRequest property. HTML Living StandardThe definition of 'HTMLIFrameElement: allowPaymentRequest' in that specification. Living Standard Browser Compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...on of 'HTMLIFrameElement: allowPaymentRequest' in that specification. Living Standard Browser Compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...ibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...And 5 more matches
Metadata - Web APIs
Status Comment File and Directory Entries API Draft Draft of proposed API This API has no official W3C or WHATWG specification. Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... API Draft Draft of proposed API This API has no official W3C or WHATWG specification. Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...bility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...And 5 more matches
Using the Web Speech API - Web APIs
- plus a number of closely-related interfaces for representing grammar, results, etc. Generally, the default speech recognition system available on the device will be used for the speech recognition -- most modern OSes have a speech recognition system for issuing voice commands. Think about Dictation on macOS, Siri on iOS, Cortana on Windows 10, Android Speech, etc. Note: On some browsers, like
Chrome, using Speech Recognition on a web page involves a server-based recognition engine. Your audio is sent to a web service for recognition processing, so it won't work offline. Demo To show simple usage of Web speech recognition, we've written a demo called Speech color changer. When the screen is tapped/clicked, you can say an HTML color keyword, and the app's background color will change to tha...
...ition, we've written a demo called Speech color changer. When the screen is tapped/clicked, you can say an HTML color keyword, and the app's background color will change to that color. 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. Browser support Support for Web Speech API speech recognition is curently limited to
Chrome for Desktop and Android --
Chrome has supported it since around version 33 but with prefixed interfaces, so you need to include prefixed versions of them, e.g. webkitSpeechRecognition. HTML and CSS The HTML and CSS for the app is really trivial. We simply have a title, instructions paragraph, and a di...
...uctions paragraph, and a div into which we output diagnostic messages. <h1>Speech color changer</h1> <p>Tap/click then say a color to change the background color of the app.</p> <div> <p class="output"><em>...diagnostic messages</em></p> </div> The CSS provides a very simple responsive styling so that it looks ok across devices. JavaScript Let's look at the JavaScript in a bit more detail. ...
...And 5 more matches
:is() (:matches(), :any()) - CSS: Cascading Style Sheets
CSSWG issue #3258. The :is() CSS pseudo-class function takes a selector list as its argument, and selects any element that can be selected by one of the selectors in that list. This is useful for writing large selectors in a more compact form. Note that currently browsers support this functionality as :matches(), or through an older, prefixed pseudo-class -- :any(), including older versions of
Chrome, Firefox, and Safari. :any() works in exactly the same way as :matches()/:is(), except that it requires vendor prefixes and doesn't support complex selectors. /* Selects any paragraph inside a header, main or footer element that is being hovered */ :is(header, main, footer) p:hover { color: red; cursor: pointer; } /* The above is equivalent to the following */ header p:hover, main p:hove...
... Specification Status Comment Selectors Level 4The definition of ':is()' in that specification. Working Draft Initial definition Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...Level 4The definition of ':is()' in that specification. Working Draft Initial definition Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...And 5 more matches
:visited - CSS: Cascading Style Sheets
estrict its behavior for privacy reasons. CSS Level 1The definition of ':visited' in that specification. Recommendation Initial definition. Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... 1The definition of ':visited' in that specification. Recommendation Initial definition. Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...on. Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...And 5 more matches
:where() - CSS: Cascading Style Sheets
cification Status Comment Selectors Level 4The definition of ':where()' in that specification. Working Draft Initial definition. Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... 4The definition of ':where()' in that specification. Working Draft Initial definition. Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...n. Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...And 5 more matches
CSS Scrollbars - CSS: Cascading Style Sheets
gh contrast and that their hit area is large enough for people who use touch input. Baseline Rules for Scrollbar Usability | Adrian Roselli Browser compatibility The compatibility table in this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...le who use touch input. Baseline Rules for Scrollbar Usability | Adrian Roselli Browser compatibility The compatibility table in this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...tibility The compatibility table in this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...And 5 more matches
aspect-ratio - CSS: Cascading Style Sheets
rnal ruby or table boxesInheritednoComputed valueas specifiedAnimation typediscrete Formal syntax auto | <ratio> Examples Mapping width and height to aspect-ratio Firefox has added an internal aspect-ratio property (in version 69 onwards) that applies to replaced elements and other related elements that accept width and height attributes. This appears in the browser's internal UA stylesheet.
Chrome is also shipping this feature. In Firefox, the internal stylesheet rule looks like this: img, input[type="image"], video, embed, iframe, marquee, object, table { aspect-ratio: attr(width) / attr(height); } Specifications Specification Status Comment CSS Box Sizing Module Level 4The definition of 'aspect-ratio' in that specification. Editor's Draft Initial ...
...tatus Comment CSS Box Sizing Module Level 4The definition of 'aspect-ratio' in that specification. Editor's Draft Initial definition Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...he definition of 'aspect-ratio' in that specification. Editor's Draft Initial definition Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...And 5 more matches
caption-side - CSS: Cascading Style Sheets
the writing-mode value. CSS Level 2 (Revision 1)The definition of 'caption-side' in that specification. Recommendation Initial definition. Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... definition of 'caption-side' in that specification. Recommendation Initial definition. Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...And 5 more matches
<input type="time"> - HTML: Hypertext Markup Language
ing the sole major browser not yet implementing it; in Safari, and any other browsers that don't support <time>, it degrades gracefully to <input type="text">. The source for this interactive example is stored in a GitHub repository. If you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request. ...
...owser not yet implementing it; in Safari, and any other browsers that don't support <time>, it degrades gracefully to <input type="text">. The source for this interactive example is stored in a GitHub repository. If you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request. Appearance
Chrome and Opera In
Chrome/Opera the time control is simple, with slots to enter hours and minutes in 12 or 24-hour format depending on operating system locale, and up and down arrows to increment and decrement the currently selected component. In some versions, an "X" button is provided to clear the control's value. 12-hour 24-hour
Chrome 83 In
Chrome 83, the UI controls have been updated with a new look and feel. T...
... arrows to increment and decrement the currently selected component. In some versions, an "X" button is provided to clear the control's value. 12-hour 24-hour
Chrome 83 In
Chrome 83, the UI controls have been updated with a new look and feel. The new element is functionally identical to the old one, but has a similar UI to Edge. 24-hour Firefox Firefox's time control is very similar to
Chrome's, except that it doesn't have the up and down arrows. It also uses a 12- or 24-hour format for inputting times, based on system locale. An "X" button is provided to clear the control's value. ...
...And 5 more matches
WebAssembly.Instance - JavaScript
functions. Specifications Specification WebAssembly JavaScript InterfaceThe definition of 'Instance' in that specification. Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... WebAssembly JavaScript InterfaceThe definition of 'Instance' in that specification. Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...wser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...And 5 more matches
Modules - Archive of obsolete content
totype. This breaks encapsulation, as it allows the script being loaded to access the built-in constructors of the loading script, which are defined on its global object. The problem with breaking encapsulation like this is that malicious scripts can use it to get the loading script to execute arbitrary code, by overriding one of the methods on the built-in constructors. If the loading script has
chrome privileges, then so will any methods called by the loading script, even if that method was installed by a malicious script. To avoid problems like this, the object passed to loadSubScript should be a true global object, having its own instances of the built-in constructors. This is exactly what sandboxes are for. A sandbox is a global object that lives in a separate compartment. Compartments are...
...an be seen as a separate memory space. Objects living in one compartment cannot be accessed directly from another compartment: they need to be accessed through an intermediate object, known as a wrapper. Compartments are very useful from a security point of view: each compartment has a set of privileges that determines what a script running in that compartment can and cannot do. Compartments with
chrome privileges have access to the Components object, giving them full access to the host platform. In contrast, compartments with content privileges can only use those features available to ordinary websites. The Sandbox constructor takes a URL parameter, which is used to determine the set of privileges for the compartment in which the sandbox will be created. Passing an XUL URL will result in a com...
...ve access to the Components object, giving them full access to the host platform. In contrast, compartments with content privileges can only use those features available to ordinary websites. The Sandbox constructor takes a URL parameter, which is used to determine the set of privileges for the compartment in which the sandbox will be created. Passing an XUL URL will result in a compartment with
chrome privileges (note, however, that if you ever actually do this in any of your code, Gabor will be forced to hunt you down and kill you). Otherwise, the compartment will have content privileges by default. Rewriting the loadScript function using sandboxes, we end up with: function loadScript(url, imports) { let global = Components.utils.Sandbox(url); global.imports = imports; global.exp...
...And 4 more matches
Inline options - Archive of obsolete content
r the preferences defined with this new syntax appears in the extension's detail view in the Add-on Manager. This functionality originally appeared in Firefox mobile and is now available in Firefox on the desktop as well. Options file The XUL allowed for the inline options is limited to a few new tags. Here is an example of an options.xul file: <?xml version="1.0"?> <!DOCTYPE mydialog SYSTEM "
chrome://myaddon/locale/mydialog.dtd"> <vbox xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"> <setting type="bool" pref="extensions.myaddon.bool" title="Boolean" desc="Stored as a boolean preference" /> </vbox> Note that it's limited to <setting> tags. The root <vbox> just acts as a container, it isn't merged into the main window. If you need script support, see the display no...
...o find out when the UI is about to be removed. Use this notification to remove event listeners, or any other references that might otherwise be leaked. Locating the options file There are two ways to let the Add-on Manager find your options file: Method 1 Name the file options.xul and put it in the extension's root folder (alongside install.rdf). ...
...ile: Method 1 Name the file options.xul and put it in the extension's root folder (alongside install.rdf). This method does not require you to create a
chrome.manifest and set it's path. This method does not require you to specify optionsType in install.rdf. Method 2 Use install.rdf to identify the XUL file used for displaying the options. This requires that you register a content path in the
chrome.manifest. ...
...And 4 more matches
Adding Events and Commands - Archive of obsolete content
viousNext >> Event handlers Just like with HTML, most JavaScript code execution is triggered by event handlers attached to DOM elements. The most commonly used event is the onload event, which is used in overlays and other windows to detect when the window has loaded and then run initialization code: // rest of overlay code goes here. window.addEventListener( "load", function() { XulSchool
Chrome.BrowserOverlay.init(); }, false); You can do something similar with the onunload event, to do any cleanup you may need. Please read Appendix A for recommendations on how to use the load event to initialize your add-on without having a negative performance impact on Firefox. Another way to attach event handlers, just like HTML, is to place the handler in the XUL code: <overlay id="xulschoolhe...
... can do something similar with the onunload event, to do any cleanup you may need. Please read Appendix A for recommendations on how to use the load event to initialize your add-on without having a negative performance impact on Firefox. Another way to attach event handlers, just like HTML, is to place the handler in the XUL code: <overlay id="xulschoolhello-browser-overlay" onload="XulSchool
Chrome.BrowserOverlay.init();" xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"> We prefer the first method because it keeps a better separation of content and behavior. Also, note that the addEventListener method receives the event name without the "on" prefix, while element attributes do have the prefix. There's a long list of events you can listen to, and which you use depend...
...s can take an event argument, which is an Event object that holds information on the event. You can get information on key modifiers (in case the user was holding a modifier key like Alt while performing the event), screen coordinates for mouse events, and most importantly, the target element for the event. For example: <button label="&xulschoolhello.defaultGreeting.label;" oncommand="XulSchool
Chrome.BrowserOverlay.changeGreeting(event);" /> Then on the Javascript code you would have something like this: changeGreeting : function(aEvent) { // more stuff aEvent.target.setAttribute("label", someNewGreeting); } The target in this example is the button element, so clicking on it will change its text. The advantage of using the event argument is that the method is not dependent of the spe...
...And 4 more matches
Install.js - Archive of obsolete content
he file. And it also knows how to install packaged components, search engines and default preferences. Cons: Code is bloated since it has to cater for several different ways an extension author can package the .JAR file contained in the .XPI file. XPI file structure You can use the code below (taken from Pike's extensions ). It assumes the following structure of your XPI file: sampleext.xpi
chrome\ sampleext.jar content\ sampleext\ locale\ (optional) en-US\ sampleext\ ... skin\ (optional) classic\ sampleext\ ... install.js install.rdf (optional -- see above) Code // install.js // XpiInstaller // By Pike (Heavily inspired by code from Henrik Gemal and Stephen Clavering) var XpiInstaller = { // --- E...
...r: 'Insert-your-name-here', extLocaleNames: null, // e.g. ['en-US', 'en-GB'] extSkinNames: null, // e.g. ...
...Install.PROFILE_
CHROME : Install.DELAYED_
CHROME; // Register content Install.register
Chrome(Install.CONTENT | installType, jarPath, 'content/' + this.extShortName + '/'); // R...
...And 4 more matches
Makefile.mozextension.2 - Archive of obsolete content
MKDIR) $(PROJECT) || { echo "creating directory failed; it probably exists. ...
...ailed; it probably exists. ...
...ts to build."; exit 1; } @echo $(MKDIR) $(PROJECT) $(MKDIR) $(PROJECT)/content $(PROJECT)/locale $(PROJECT)/locale/en-us $(PROJECT)/components/ $(PROJECT)/defaults/ $(PROJECT)/defaults/preferences/ $(PROJECT)/locale/de-de $(PROJECT)/skin make_xpi: $(MKDIR) $(PROJECT)/
chrome && \ cd $(PROJECT) && \ $(ZIPPROG) -r
chrome/$(PROJECT).jar content locale skin && \ $(ZIPPROG) -r $(PROJECT).xpi
chrome.manifest install.rdf components defaults
chrome && cd .. ...
...And 4 more matches
Providing Command-Line Options - Archive of obsolete content
a category. See also: XULRunner:CommandLine Overview The code below is an example of writing a JavaScript XPCOM component to handle command line parameters. You can learn more about how the command line is interpreted by looking at the documentation for the nsICommandLine interface. ...
...ow is an example of writing a JavaScript XPCOM component to handle command line parameters. You can learn more about how the command line is interpreted by looking at the documentation for the nsICommandLine interface. Example The below example component implements two command line parameters: firefox.exe -myapp Opens a
chrome window for My Application. firefox.exe -viewapp url Opens a
chrome window for My Application and passes it an nsIURI object. ...
...ne interface. Example The below example component implements two command line parameters: firefox.exe -myapp Opens a
chrome window for My Application. firefox.exe -viewapp url Opens a
chrome window for My Application and passes it an nsIURI object. ...
...And 4 more matches
Code Samples - Archive of obsolete content
e an e-mail To compose an e-mail, use the same code as in the section Open a web page above. Change the first line to specify: const url = "mailto://" Open an application window To open one of the application's windows, use code like this. If the window already exists, this code just focusses it. ...
...name of the window..." const uri = "...
chrome URI of the window..." var w = Components .classes["@mozilla.org/appshell/window-mediator;1"] .getService(Components.interfaces.nsIWindowMediator) .getMostRecentWindow(name) if (w) w.focus() else Components .classes["@mozilla.org/embedcomp/window-watcher;1"] .getService(Components.interfaces.nsIWindowWatcher) .openWindow(null, uri, name, "
chrome,resizable", null) Change the first two lines to specify the window that you want to open. ...
... .classes["@mozilla.org/embedcomp/window-watcher;1"] .getService(Components.interfaces.nsIWindowWatcher) .openWindow(null, uri, name, "
chrome,resizable", null) Change the first two lines to specify the window that you want to open. ...
...And 4 more matches
Localization - Archive of obsolete content
file is created which contains the entity declarations for each supported language. In English, the &findLabel; entity will probably be declared to have the text "Find". DTD Files Entities are declared in Document Type Definition (DTD) files. Files of this type are normally used to declare the syntax and semantics of a particular XML file, but they also let you declare entities. In the Mozilla
chrome system, you will find DTD files located in the locales subdirectory. You would normally have one DTD file (with an extension .dtd) per XUL file. If you look in the
chrome directory, you should see an archive for your language. (en-US.jar is the default for English.) You might have locale files in multiple languages, for example, US English (en-US) and French (fr). Inside these archives, you will...
...t for each window. The structure of the archives is very similar to the directory structure used for skins. Inside the archives, you would place the DTD files in which you declare entities. Typically, you will have one DTD file for each XUL file, usually with the same filename except with a .dtd extension. So, for the find files dialog, we will need a file called findfile.dtd. For non-installed
chrome files, you can just put the DTD file in the same directory as the XUL file. Note: You should encode DTD files as UTF-8 for non-ASCII characters. That is, you should save them in UTF-8 format (without BOM). For more information, see Mozilla Language Packs. Once you have created a DTD file for your XUL, you will need to add a line to the XUL file which indicates that you want to use the DTD file.
...-8 format (without BOM). For more information, see Mozilla Language Packs. Once you have created a DTD file for your XUL, you will need to add a line to the XUL file which indicates that you want to use the DTD file. Otherwise, errors will occur as it won't be able to find the entities. ...
...And 4 more matches
Using the standard theme - Archive of obsolete content
h does by no means correspond to the standard theme (the theme currently chosen by the user in the Theme Selector), or even the default theme delivered with your the base application. Applying the standard theme In order to use the theme currently chosen by the user of the base application (the so called "Global Skin"), you have to add the following line to your XUL file: <?xml-stylesheet href="
chrome://global/skin/" type="text/css"?> This imports the styles found in the <tt>global/skin</tt>
chrome directory and will make the standard XUL widgets of your application use the selected chosen theme. You do not have to specify a specific file; Mozilla will determine by its own which files in the directory it needs to use. If you are only going to use these global style sheets, you of course do no...
...nd will make the standard XUL widgets of your application use the selected chosen theme. You do not have to specify a specific file; Mozilla will determine by its own which files in the directory it needs to use. ...
...>
chrome.manifest</tt>. Adding custom styles In order to provide custom styling for some of your widgets (apart from the standard global skin) you can take two different routes. You can either add multiple <tt>xml-stylesheet</tt> processing instructions to your XUL file, or create an <tt>@import</tt> chain. No matter which approach you choose, do not forget to register your custom skin in the <tt>
chrome.manifest</tt>. Note that you can also mix these two approaches, although it makes your code more readable when sticking to only one way. ...
...And 4 more matches
Advanced form styling - Learn web development
izing the look of these controls. The appearance property was created as a way to control what OS- or system-level styling was applied to web form controls. Unfortunately, the behavior of this property's original implementations was very different across browsers, making it not very usable. Newer implementations are more consistent in behavior; interestingly enough, both Chromium-based browsers (
Chrome, Opera, Edge), Safari, and Firefox all support the -webkit- prefixed version (-webkit-appearance). Firefox settled on this because web developers mostly seemed to be using the -webkit- prefixed version, so it was better for compatibility. If you look at the reference page you'll see a lot of different possible values listed for -webkit-appearance, however by far the most helpful value, and prob...
...search and radio buttons/checkboxes, it becomes way more useful. We'll look at those now. Taming search boxes <input type="search"> is basically just a text input, so why is appearance: none; useful here? The answer is that in Chromium-based browsers on macOS, search boxes have some styling restrictions -- you can't adjust their height or font-size freely, for example. This is because non-macOS
Chrome browsers no longer use the WebKit rendering engine, which enabled Aqua appearance by default for certain form controls. With Aqua enabled, some form controls are not scalable. This can be fixed using our friend appearance: none;, which disables the default Aqua appearance: input[type="search"] { -webkit-appearance: none; appearance: none; } In the example below, you can see two identi...
...th Aqua enabled, some form controls are not scalable. This can be fixed using our friend appearance: none;, which disables the default Aqua appearance: input[type="search"] { -webkit-appearance: none; appearance: none; } In the example below, you can see two identical styled search boxes. The right one has appearance: none; applied, and the left one doesn't. If you look at it in macOS
Chrome you'll see that the left one isn't sized properly. Interestingly, setting border/background on the search field also fixes this problem, as it disables or "breaks" the Aqua appearance too. The following styled search doesn't have appearance: none; applied, but it doesn't suffer from the same problem in macOS
Chrome as the previous example. Note: You may have noticed that in the search fiel...
...And 4 more matches
Performance best practices for Firefox front-end engineers
in event processing or painting. That means that the more code we can get off of the main thread, the more that thread can respond to user events, paint, and generally be responsive to the user. You might want to consider using a Worker if you need to do some computation that can be done off of the main thread. If you need more elevated privileges than a standard worker allows, consider using a
ChromeWorker, which is a Firefox-only API which lets you create workers with more elevated privileges. Use requestIdleCallback() If you simply cannot avoid doing some kind of long job on the main thread, try to break it up into smaller pieces that you can run when the browser has a free moment to spare, and the user isn't doing anything. You can do that using requestIdleCallback() and the Cooperative ...
...nsive step (see Detecting and avoiding synchronous reflow below). To avoid this: avoid reading style information if you can. If you must read style information, do so at the very beginning of the frame, before any changes have been made to the DOM since the last time a style flush occurred. Historically, there hasn't been an easy way of doing this - however, bug 1434376 has recently landed some
ChromeOnly helpers to the window binding to make this simpler. If you want to queue up some JavaScript to run after the next "natural" style and layout flush, try: // Suppose we want to get the computed "display" style of some node without // causing a style flush. We could do it this way: async function nodeIsDisplayNone(node) { let display = await window.promiseDocumentFlushed(() => { // Do _n...
... the JavaScript has finished running during the 16ms window. Interruptible reflow Since the early days, Gecko has had the notion of interruptible reflow. This is a special type of content-only reflow that checks at particular points whether or not it should be interrupted (usually to respond to user events). Because interruptible reflows can only be interrupted when laying out content, and not
chrome UI, the rest of this section is offered only as context. When an interruptible reflow is interrupted, what really happens is that certain layout operations can be skipped in order to paint and process user events sooner. When an interruptible reflow is interrupted, the best-case scenario is that all layout is skipped, and the layout operation ends. The worst-case scenario is that none of the l...
...And 4 more matches
Script security
but highly restricted access to objects from a different origin. The rules for determining whether an object is same-origin with another, and what access is allowed cross-origin, are now mostly standardized across browsers. Gecko has an additional problem, though: while its core is written in C++, the front-end code is written in JavaScript. This JavaScript code, which is commonly referred to as
chrome code, runs with system privileges. If the code is compromised, the attacker can take over the user's computer. Legacy SDK extensions also run with
chrome privileges. Having the browser front end in JavaScript has benefits: it can be much quicker to develop in JavaScript than in C++, and contributors do not need to learn C++. However, JavaScript is a highly dynamic, malleable language, and withou...
... Security policy Gecko implements the following security policy: Objects that are same-origin are able to access each other freely. ...
...n policy. For example, code served from https://example.org/ trying to access objects from https://somewhere-else.org/ will have restricted access. Objects in a privileged scope are allowed complete access to objects in a less privileged scope, but by default they see a restricted view of such objects, designed to prevent them from being tricked by the untrusted code. An example of this scope is
chrome-privileged JavaScript accessing web content. Objects in a less privileged scope don't get any access to objects in a more privileged scope, unless the more privileged scope explicitly clones those objects. An example of this scope is web content accessing objects in a
chrome-privileged scope. Compartments Compartments are the foundation for Gecko's script security architecture. A compartment...
...And 4 more matches
Localization and Plurals
rule: For a given language, there is a grammatical rule on how to change words, depending on the number qualifying the word. Different languages can have different rules. plural form: For a particular plural rule, there can be multiple forms of a word, such as "page" and "pages". In this case, there are 2 forms, but other languages can have 1 or many more. If you're here for pluralRule in the
chrome/global/intl.properties file, you'll need to figure out what plural rule to choose for your localization. This plural rule is used to determine how many plural forms are needed for each word that needs to be localized, with plurals in mind. For all other properties files that link to this page, you'll need to provide enough plural forms of the desired word, and separate them with semi-colons (;).
... for your localization. This plural rule is used to determine how many plural forms are needed for each word that needs to be localized, with plurals in mind. For all other properties files that link to this page, you'll need to provide enough plural forms of the desired word, and separate them with semi-colons (;). If you don't know how many plural forms you need, check the pluralRule number in
chrome/global/intl.properties, and look up the corresponding entry in the following list of plural rules. List of Plural Rules This section contains a list of plural rules ordered by their plural rule number. Each entry indicates how many plural forms are needed when localizing a word. For each entry, there is a list of families and languages in those families, to help you figure out if it's the rule ...
...the button. The extension will load each property and display the plural forms in a table. Selecting a table entry will populate the bottom box with sample uses of the word for some numbers. Install pluralForm Checker v0.3 extension Extension input It would be good to keep this list updated with all the words that need plural forms. People using the extension can then copy/paste this input. ...
...And 4 more matches
mozilla::services namespace
, you first need to include the header into your C++ file: #include "mozilla/Services.h" Then you can obtain references to services by simply accessing them from the mozilla::services namespace. ...
...de the header into your C++ file: #include "mozilla/Services.h" Then you can obtain references to services by simply accessing them from the mozilla::services namespace. ...
...r C++ file: #include "mozilla/Services.h" Then you can obtain references to services by simply accessing them from the mozilla::services namespace. ...
...And 4 more matches
HOWTO
finished, i.e. both success and error callbacks, put: gScriptDone = true; If you forget some condition where your script should exit but you don't add this statement, your script will hang (busy wait). This is of course a massive, ugly hack prone to error, but this is what the xpcshell test harness does. There should really be a better solution in xpcshell. Using JS modules and non-UI JavaScript
chrome files Problem You want to write a JavaScript file, and run it in xpcshell. The file uses JS modules. Maybe it even uses JavaScript files from
chrome:// URLs. E.g., you use: Components.utils.import("resource://app/modules/gloda/log4moz.js"); However, you get (for that particular line, which is the first import): uncaught exception: [Exception... "Component returned failure code: 0x80040111 (NS_ER...
...eption... ...
... ...
...And 4 more matches
customDBHeaders Preference
e! ...
...ave the string property set correctly. The attaching of the column handler through the ObserverService object is some pretty new stuff, so I was using the addEventListener("select"...) stuff as a backup. Depending on the release you use one, both, or none of the methods may work. ...
...ough the ObserverService object is some pretty new stuff, so I was using the addEventListener("select"...) stuff as a backup. Depending on the release you use one, both, or none of the methods may work. ...
...And 4 more matches
FileList - Web APIs
n that specification. Working Draft HTML Living StandardThe definition of 'selected files' in that specification. Living Standard Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...ving StandardThe definition of 'selected files' in that specification. Living Standard Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...And 4 more matches
FileSystemSync - Web APIs
ystem. The name must be unique across the list of exposed file systems. root readonly DirectoryEntry The root directory of the file system. Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...le systems. root readonly DirectoryEntry The root directory of the file system. Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...And 4 more matches
File and Directory Entries API support in Firefox - Web APIs
e Web: it will not work for every user. There may also be large incompatibilities between implementations and the behavior may change in the future. The original File System API was created to let browsers implement support for accessing a sandboxed virtual file system on the user's storage device. Work to standardize the specification was abandoned back in 2012, but by that point, Google
Chrome included its own implementation of the API. Over time, a number of popular sites and Web applications came to use it, often without providing any means of falling back to standard APIs or even checking to be sure the API is available before using it. Mozilla instead opted to implement other APIs which can be used to solve many of the same problems, such as IndexedDB; see the blog post Why no File...
...providing any means of falling back to standard APIs or even checking to be sure the API is available before using it. Mozilla instead opted to implement other APIs which can be used to solve many of the same problems, such as IndexedDB; see the blog post Why no FileSystem API in Firefox? for more insights. This has caused a number of popular web sites not to work properly on browsers other than
Chrome. Because of that, an attempt was made to create a spec offering the features of Google's API which consensus could be reached on. The result was the File and Directory Entries API. This subset of the API provided by
Chrome is still not fully specified; however, for web compatibility reasons, it was decided to implement a subset of the API in Firefox; this was introduced in Firefox 50. This artic...
...s the File and Directory Entries API. This subset of the API provided by
Chrome is still not fully specified; however, for web compatibility reasons, it was decided to implement a subset of the API in Firefox; this was introduced in Firefox 50. This article describes how the Firefox implementation of the File and Directory Entries API differs from other implementations and/or the specification. ...
...And 4 more matches
FontFaceSetLoadEvent - Web APIs
Comment CSS Font Loading Module Level 3The definition of 'FontFaceSetLoadEvent' in that specification. Working Draft Initial definition. Browser Compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...tion of 'FontFaceSetLoadEvent' in that specification. Working Draft Initial definition. Browser Compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...bility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...And 4 more matches
IDBCursorWithValue - Web APIs
ecification. Recommendation Indexed Database API DraftThe definition of 'IDBCursorWithValue' in that specification. Recommendation Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... API DraftThe definition of 'IDBCursorWithValue' in that specification. Recommendation Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...And 4 more matches
IDBRequest.error - Web APIs
The error read-only property of the IDBRequest interface returns the error in the event of an unsuccessful request. Note: This feature is available in Web Workers. Syntax var myError = request.error; Value A DOMError containing the relevant error. In
Chrome 48+/Firefox 58+ this property returns a DOMException because DOMError has been removed from the DOM standard. The following error codes are returned under certain conditions: Error Explanation AbortError If you abort the transaction, then all requests still in progress receive this error. ConstraintError If you insert data that doesn't conform to a constraint. It's an exception type for creating stores and indexes. You get this error, for example, if you try to add a new key that already exists...
... in that specification. Recommendation Indexed Database API DraftThe definition of 'error' in that specification. Recommendation Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...xed Database API DraftThe definition of 'error' in that specification. Recommendation Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...And 4 more matches
IDBTransaction.error - Web APIs
The exact error is one of serveral possibilities. ...
...r' in that specification. Recommendation Indexed Database API DraftThe definition of 'error' in that specification. Recommendation Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...exed Database API DraftThe definition of 'error' in that specification. Recommendation Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...And 4 more matches
PushEvent - Web APIs
Specification Status Comment Push APIThe definition of 'PushEvent' in that specification. Working Draft Initial definition. Browser Compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...IThe definition of 'PushEvent' in that specification. Working Draft Initial definition. Browser Compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. DesktopMobile
ChromeEdgeFirefoxInternet ExplorerOperaSafariAndroid webview
Chrome for AndroidFirefox for AndroidOpera for AndroidSafari on iOSSamsung InternetPushEvent Experimental
Chrome Full support 42Edge Full support 16Disabled Full support 16Disabled Disabled From version 16: this feature is behind the Enable service workers preference. ...
... 44Notes Notes Extended Support Releases (ESR) before Firefox 78 ESR do not support service workers and the Push API.IE No support NoOpera Full support 37Safari No support NoWebView Android No support No
Chrome Android Full support 42Firefox Android Full support 44 Full support 44 Full support 48Notes Notes Push enabled by default.Opera Android Full support 37Safari iOS ...
...And 4 more matches
animation-direction - CSS: Cascading Style Sheets
on Status Comment CSS AnimationsThe definition of 'animation-direction' in that specification. Working Draft Initial definition. Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...ition of 'animation-direction' in that specification. Working Draft Initial definition. Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...rowser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...And 4 more matches
background-position - CSS: Cascading Style Sheets
ercentage> values to be mixed. CSS Level 1The definition of 'background-position' in that specification. Recommendation Initial definition. Browser compatibility The compatibility table in this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...ition of 'background-position' in that specification. Recommendation Initial definition. Browser compatibility The compatibility table in this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...Browser compatibility The compatibility table in this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...And 4 more matches
background-size - CSS: Cascading Style Sheets
ension is computed using the specified dimension and the intrinsic proportions. If the image has only one intrinsic dimension but has no intrinsic proportions, it's rendered using the specified dimension and the other dimension of the background positioning area. Note: SVG images have a preserveAspectRatio attribute that defaults to the equivalent of contain. In Firefox 43, as opposed to
Chrome 52, an explicit background-size causes preserveAspectRatio to be ignored. If the background-size has one auto component and one non-auto component: If the image has intrinsic proportions, it's stretched to the specified dimension. The unspecified dimension is computed using the specified dimension and the intrinsic proportions. If the image has no intrinsic proportions, it's stretched ...
... CSS Backgrounds and Borders Module Level 3The definition of 'background-size' in that specification. Candidate Recommendation Initial definition. Browser compatibility The compatibility table in this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...f 'background-size' in that specification. Candidate Recommendation Initial definition. Browser compatibility The compatibility table in this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...And 4 more matches
platform/xpcom - Archive of obsolete content
Implement XPCOM objects, factories, and services. Usage The xpcom module makes it simpler to perform three main tasks: Implement XPCOM object interfaces Implement and register XPCOM factories Implement and register XPCOM services If all you need to do is use XPCOM objects that someone else has implemented, then you don't need to use this module. You can just use require("
chrome") to get direct access to the Components object, and access XPCOM objects from there. Implementing XPCOM Interfaces This module exports a class called Unknown which implements the fundamental XPCOM interface nsISupports. By subclassing Unknown, either using standard JavaScript inheritance or using the SDK's heritage module, you can provide your own implementations of XPCOM interfaces. "Unknown" is named aft...
...tance or using the SDK's heritage module, you can provide your own implementations of XPCOM interfaces. "Unknown" is named after the "IUnknown" interface in COM. For example, the add-on below implements the nsIObserver interface to listen for and log all topic notifications: var { Class } = require('sdk/core/heritage'); var { Unknown } = require('sdk/platform/xpcom'); var { Cc, Ci } = require('
chrome') var observerService = Cc['@mozilla.org/observer-service;1']. getService(Ci.nsIObserverService); var StarObserver = Class({ extends: Unknown, interfaces: [ 'nsIObserver' ], topic: '*', register: function register() { observerService.addObserver(this, this.topic, false); }, unregister: function() { observerService.removeObserver(this, this.topic); }...
...clients to access the HelloWorld component, given its contract ID. In this example the HelloWorld component is available to JavaScript only, so we use the technique documented under the "Using wrappedJSObject" section of How to Build an XPCOM Component in JavaScript. ...
...And 3 more matches
window/utils - Archive of obsolete content
ested in. Returns ID: the given window's ID. getOuterId(window) Returns the ID of the specified window's outer window. This function wraps nsIDOMWindowUtils.outerWindowID. Parameters window : nsIDOMWindow The window whose outer window we are interested in. Returns ID: the outer window's ID. ...
...indow: var { Ci } = require('
chrome'); var utils = require('sdk/window/utils'); var active = utils.getMostRecentBrowserWindow(); active instanceof Ci.nsIXULWindow // => false utils.getXULWindow(active) instanceof Ci.nsIXULWindow // => true Parameters window : nsIDOMWindow Returns nsIXULWindow getBaseWindow(window) Returns the nsIBaseWindow for the given nsIDOMWindow: var { Ci } = require('
chrome'); var utils = require('sdk/window/utils'); var active = utils.getMostRecentBrowserWindow(); active instanceof Ci.nsIBaseWindow // => false utils.getBaseWindow(active) instanceof Ci.nsIBaseWindow // => true Parameters window : nsIDOMWindow Returns nsIBaseWindow getToplevelWindow(window) Returns the toplevel nsIDOMWindow for the given child nsIDOMWindow: var { Ci } = require('
chrome'); var ...
...tion is used to open top level (application) windows. It takes the uri of the window document as its first argument and an optional hash of options as its second argument. var { open } = require('sdk/window/utils'); var window = open('data:text/html,Hello Window'); This function wraps nsIWindowWatcher.openWindow. Parameters uri : string URI of the document to be loaded into the window. Only
chrome, resource, and data schemes are accepted. options : object Options for the function, with the following properties: Name Type parent nsIDOMWindow Parent for the new window. Optional, defaults to null. name string Name that is assigned to the window. Optional, defaults to null. features object Map of features to set for the ...
...And 3 more matches
Dialogs and Prompts - Archive of obsolete content
Describing dialog windows Dialogs in Mozilla Whenever you want to create a dialog in your application, use <dialog> (instead of usual <window>) as root element in the XUL file. This will: Handle a few keyboard events (ENTER/ESC and more), which is good for keyboard accessibility. Add OK and Cancel buttons in an order that is consistent with OS default (but the button set and layout is highly customizable, see below). ...
... (ENTER/ESC and more), which is good for keyboard accessibility. Add OK and Cancel buttons in an order that is consistent with OS default (but the button set and layout is highly customizable, see below). Simple dialog code The following XUL code defines a simple dialog with two buttons, OK and Cancel (buttons="accept,cancel" attribute on dialog). <?xml version="1.0"?> <?xml-stylesheet href="
chrome://global/skin/global.css" type="text/css"?> <dialog xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" id="..." title="..." buttons="accept,cancel" ondialogaccept="return onAccept();" ondialogcancel="return onCancel();"> <script src="
chrome://..."/> <!-- Content --> </dialog> You need to implement onAccept and onCancel functions in your script. If they return anything ...
...gtype attribute to them. Valid values for dlgtype are the six button types listed above. Be sure to use ondialog* attributes on dialog element instead of putting oncommand on the button with dlgtype, because button's oncommand is executed only when the button is pressed, and ondialog* handlers are executed for keyboard and other events too. ...
...And 3 more matches
Displaying web content in an extension without security issues - Archive of obsolete content
history etc) and to user's files. These issues can easily be avoided by making use of the existing security mechanisms in the Mozilla codebase. The following article explains these security mechanisms, ideally an extension that needs to display web content (which is always potentially dangerous) will use all of them. Displaying untrusted data as content In Firefox, there is a distinction between
chrome and content documents. The top document in a window is always a
chrome document. If you look at the frames it loads, those will usually be
chrome documents as well. However, if the document is loaded into <iframe type="content"> or <browser type="content">, it will be considered a content document, and so will be all the frames it loads (the "type" attribute is ignored at that point). So if we lo...
...s always a
chrome document. If you look at the frames it loads, those will usually be
chrome documents as well. However, if the document is loaded into <iframe type="content"> or <browser type="content">, it will be considered a content document, and so will be all the frames it loads (the "type" attribute is ignored at that point). So if we look at the frame hierarchy there is a boundary between
chrome and content, and at that boundary a number of security mechanisms apply. In particular, a content document can only go up in the frame hierarchy until the topmost content document, it cannot access the
chrome documents above it. This means for example that JavaScript code top.location.href = "about:blank" will only unload the content document but won't have any effect on the
chrome. Note: This ha...
...ply. In particular, a content document can only go up in the frame hierarchy until the topmost content document, it cannot access the
chrome documents above it. This means for example that JavaScript code top.location.href = "about:blank" will only unload the content document but won't have any effect on the
chrome. Note: This has really nothing to do with the source of the document. If you open "
chrome://foo/content/foo.xul" in the browser, it will open as a content document despite having extended privileges. This also means that you won't be able to establish a security boundary between your extension and untrusted data if your extension opens as a tab in the browser -- so displaying your extension in a browser tab is a bad choice. Note: Dynamic changes of the "type" attribute have no effect,...
...And 3 more matches
Enhanced Extension Installation - Archive of obsolete content
xtension Metadata The Extension System stores metadata in both of the two locations, in the following files: <location>/extensions/Extensions.rdf - an XML/RDF datasource listing all the Extensions installed at that location. <location>/extensions.ini - an INI manifest listing the directories for all the Extensions and Themes at the location (used by the Component Manager, Preferences system,
Chrome Registry etc to locate files during the startup process). In the profile directory, the file compatibility.ini stores information about the version of the application (build info) that last started this profile - during startup this file is checked and if the version info held by the running app disagrees with the info held by this file, a compatibility check is run on all installed items. Whe...
...BeInstalled flag on the item in the datasource). It locates the staged copy of the XPI file, extracts its contents (logging file additions as it goes into {GUID}/uninstall/Uninstall), loads the Install Manifest file and copies all metadata into the appropriate datasource. At this time a new extensions.ini file is written locating the Extension so that the Component Manager, Preferences System and
Chrome Registry can locate additional files on the next start. The finalization process then notifies the startup process that finalization has changed this manifest, and that the application must be restarted to pick up changes specified therein. The startup process receives this "needsRestart" bit when the Extension manager's startup completes, shuts down XPCOM and relaunches the application. On the ...
...changed this manifest, and that the application must be restarted to pick up changes specified therein. The startup process receives this "needsRestart" bit when the Extension manager's startup completes, shuts down XPCOM and relaunches the application. On the next restart, the XREDirProvider now supplies a list of directories to requesting systems listing the new item's components, defaults and
chrome manifests. Uninstallation, Disabling, Enabling These functions work on the same principle as installation - the user requests an action through the UI while the application is running and metadata is written (toBeUninstalled, toBeDisabled, toBeEnabled) and a .autoreg file created in the profile so that on the subsequent startup the Extension System's startup routine can remove files (in the Uni...
...And 3 more matches
Adding menus and submenus - Archive of obsolete content
S X to make sure everything works adequately. ...
...milar to this: <toolbox> <menubar id="xulschoolhello-menubar"> <menu id="xulschoolhello-greeting-menu" label="&xulschoolhello.greeting.label;"> <menupopup> <menuitem label="&xulschoolhello.greet.short.label;" oncommand="XULSchool
Chrome.GreetingDialog.greetingShort(event);" /> <menuitem label="&xulschoolhello.greet.medium.label;" oncommand="XULSchool
Chrome.GreetingDialog.greetingMedium(event);" /> <menuitem label="&xulschoolhello.greet.long.label;" oncommand="XULSchool
Chrome.GreetingDialog.greetingLong(event);" /> <menuseparator /> <menuitem label="&xulschoolhello.greet.custom.label;" oncommand="XULSchool
Chrome.GreetingDialog.greetingCustom(event);" /> </menupopup> </menu> </menubar> </toolbox...
... multiple nesting levels: <toolbox> <menubar id="xulschoolhello-menubar"> <menu id="xulschoolhello-greeting-menu" label="&xulschoolhello.greeting.label;"> <menupopup> <menu id="xulschoolhello-greeting-sizes-menu" label="&xulschoolhello.greetingSizes.label;"> <menupopup> <menuitem label="&xulschoolhello.greet.short.label;" oncommand="XULSchool
Chrome.GreetingDialog.greetingShort(event);" /> <menuitem label="&xulschoolhello.greet.medium.label;" oncommand="XULSchool
Chrome.GreetingDialog.greetingMedium(event);" /> <menuitem label="&xulschoolhello.greet.long.label;" oncommand="XULSchool
Chrome.GreetingDialog.greetingLong(event);" /> </menupopup> </menu> <menuitem label="...
...And 3 more matches
Appendix F: Monitoring DOM changes - Archive of obsolete content
not have such severe performance impacts. Mutation observers Mutation observers are the more efficient, W3C speced replacement for the highly inefficient mutation events. Their major advantage is in their performance and their ease of use, especially when combined with simple libraries. Their main disadvantage is that, due to their recent advent, support is currently limited to Firefox 14+ and
Chrome 18. While they are still viable for add-ons targeting only the latest Firefox, those wishing to support older browsers will need to provide fallbacks. For more information, see this blog post on the issues at hand. Non-mutation triggers It is usually possible to tell when a mutation has occurred or is about to occur without resorting to mutation events or observers. Most of these methods are s...
...en times, this must be used in combination with a slight delay, or even polling, via setTimeout, for cases where the URL change happens before the page is fully loaded. This method works particularly well with services like Google Instant, and the Gawker family of sites. Network listeners AJAX-based page changes are almost universally tied to XMLHttpRequests. These requests can be tracked from
chrome code using a variety of methods, including web progress listeners, HTTP observers, and content policies. While these are not exceptionally efficient (they run for every HTTP request, and considerably more often for some methods), they work very well for certain applications Pure CSS Pure CSS can be more powerful than most people suspect. It is often possible to do things for which people have t...
...res, the event.target and its parents can be searched for a matching element. You can read more about event delegation here. It is important to note, however, that this method can have severe performance implications for certain events, namely mouseover, mouseout, and friends, which are fired very often while the mouse is moving. Monkey patching In many instances, especially when dealing with
chrome code, the best way to modify actions which result in DOM mutations is by wrapping the functions that trigger those changes. For instance, when you want to modify the result of DOM mutations that you know are the result of the doAwesomeDOMStuff() function, you can wrap it as follows: { let originalDoAwesomeDOMStuff = doAwesomeDOMStuff; doAwesomeDOMStuff = function _doAwesomeDOMStu...
...And 3 more matches
Observer Notifications - Archive of obsolete content
Observers method to send a notification to all of them. The method takes three parameters. The first parameter can be any XPCOM object to pass to those observers (can be null), the second parameter is the notification topic and the last parameter is an additional string to pass to those observers (can be null). observerService.notifyObservers(null, "xulschoolhello-test-topic", "hello"); Non-
chrome to
chrome communication Non-
chrome to
chrome communication is one of the main uses of observers. By non-
chrome we mean JavaScript Code Modules or XPCOM. As we saw in previous sections, you can use JavaScript Code Module and XPCOM objects very easily from the
chrome. But given that
chrome is window-dependent and non-
chrome objects are not, it's tricky to send a message to the
chrome. You would ha...
... /** * Notifies all the registered observers with the test notification topic. */ notifyTest : function() { let observerService = Components.classes["@mozilla.org/observer-service;1"]. ...
... /** * Notifies all the registered observers with the test notification topic. */ notifyTest : function() { let observerService = Components.classes["@mozilla.org/observer-service;1"]. getService(Components.interfaces.nsIObserverService); let subject = Components.classes["@mozilla.org/supports-string;1"]. ...
...And 3 more matches
Security best practices in extensions - Archive of obsolete content
rbird or SeaMonkey. Web content handling In general the best way to ensure that the browser is not compromised when you load content is to make sure it does not have those privileges. A more detailed explanation of this process is in Displaying web content in an extension without security issues. The privileges that a document gets also depend on where it comes from. ...
...One way to do this is to use custom DOM events; see Interaction between privileged and non-privileged pages. ...
... restricted privileges. One of the best ways to do this is to use Components.utils.evalInSandbox(). Note that objects passed into the sandbox are restricted, but objects that come back out from it are not. Refer to the document to find out how to avoid such pitfalls. For more information, refer to the evalInSandbox section. The sidebar: a use case The sidebar in Firefox is designed to hold both
chrome (privileged) content and Web (nonprivileged) content, the latter being in the form of Web pages. These Web pages can come from a server, or come from local HTML files bundled with the extension. For pages coming from the server, you need to take steps to ensure that the content can not call back into the Web browser and run malicious code. The main way to do this is by creating an iframe or brows...
...And 3 more matches
Tabbed browser - Archive of obsolete content
tabbed browser. The comments normally mark where you should be inserting your own code. Each snippet normally includes some code to run at initialization, these are best run using a load listener. These snippets assume they are run in the context of a browser window. If you need to work with tabs from a non-browser window, you need to obtain a reference to one first, see Working with windows in
chrome code for details. Multiple meanings for the word 'browser' The word 'browser' is used several ways. Of course the entire application Firefox is called "a browser". Within the Firefox browser are tabs and inside each tab is a browser, both in the common sense of a web page browser and the XUL sense of a browser element. Furthermore another meaning of 'browser' in this document and in some Firefo...
...s called "a browser". Within the Firefox browser are tabs and inside each tab is a browser, both in the common sense of a web page browser and the XUL sense of a browser element. Furthermore another meaning of 'browser' in this document and in some Firefox source is "the tabbrowser element" in a Firefox XUL window. Getting access to the browser From main window Code running in Firefox's global
ChromeWindow, common for extensions that overlay into browser.xul, can access the tabbrowser element using the global variable gBrowser. // gBrowser is only accessible from the scope of // the browser window (browser.xul) gBrowser.addTab(...); If gBrowser isn't defined your code is either not running in the scope of the browser window or running too early. You can access gBrowser only after the brows...
...ing with gBrowser right after the window is opened, listen for the load event and use gBrowser in the event listener. If your code does not have access to the main window because it is run in a sidebar or dialog, you first need to get access to the browser window you need before you can use gBrowser. You can find more information on getting access to the browser window in Working with windows in
chrome code. From a sidebar Basically, if your extension code is a sidebar you can use: var mainWindow = window.QueryInterface(Components.interfaces.nsIInterfaceRequestor) .getInterface(Components.interfaces.nsIWebNavigation) .QueryInterface(Components.interfaces.nsIDocShellTreeItem) .rootTreeItem .QueryInterf...
...And 3 more matches
Using the Stylesheet Service - Archive of obsolete content
The API is defined in nsIStyleSheetService.idl. The stylesheets registered with this API apply to all documents; Firefox 18 extended nsIDOMWindowUtils with loadAdditionalStyleSheet() and removeAdditionalStyleSheet() to manage stylesheets for a specific document (bug 737003). The examples in this document are all written in JavaScript using XPCOM. Using the API The string "
chrome://myext/content/myext.css" in the examples below is just an example. Replace it with the URL of the CSS file you want to load. ...
...ser
Chrome.css files. The API is defined in nsIStyleSheetService.idl. The stylesheets registered with this API apply to all documents; Firefox 18 extended nsIDOMWindowUtils with loadAdditionalStyleSheet() and removeAdditionalStyleSheet() to manage stylesheets for a specific document (bug 737003). The examples in this document are all written in JavaScript using XPCOM. Using the API The string "
chrome://myext/content/myext.css" in the examples below is just an example. Replace it with the URL of the CSS file you want to load. You can replace USER_SHEET with AGENT_SHEET or AUTHOR_SHEET, depending where in the CSS Cascade you want the sheet to be placed. See the CSS Specification for more details. Note that UA stylesheets are allowed to do certain unsafe things that user stylesheets are not al...
...e, create a URI and pass the URI to the stylesheet service's loadAndRegisterSheet method. var sss = Components.classes["@mozilla.org/content/style-sheet-service;1"] .getService(Components.interfaces.nsIStyleSheetService); var ios = Components.classes["@mozilla.org/network/io-service;1"] .getService(Components.interfaces.nsIIOService); var uri = ios.newURI("
chrome://myext/content/myext.css", null, null); sss.loadAndRegisterSheet(uri, sss.USER_SHEET); Note: loadAndRegisterSheet will load the stylesheet synchronously, so you should only call this method using local URIs. Determining whether a sheet has been loaded If you are writing an extension and adding your stylesheet in an onload handler, you'll want to see if your sheet has already been added. If y...
...And 3 more matches
Creating a status bar extension - Archive of obsolete content
a-464f-9b0e-13a3a9e97384}" is a GUID that uniquely identifies Firefox as the target. minVersion The oldest version of the target application on which the extension is supported. maxVersion The most recent version of the target application on which the extension is known to work. For details on the format of an install manifest, read the Install Manifests section. ...
...7384}" is a GUID that uniquely identifies Firefox as the target. minVersion The oldest version of the target application on which the extension is supported. maxVersion The most recent version of the target application on which the extension is known to work. For details on the format of an install manifest, read the Install Manifests section. ...
...on The oldest version of the target application on which the extension is supported. maxVersion The most recent version of the target application on which the extension is known to work. For details on the format of an install manifest, read the Install Manifests section. The
chrome manifest The
chrome manifest is a file that tells the target application where to look for the
chrome package for your extension. ...
...And 3 more matches
Localizing an extension - Archive of obsolete content
e the XUL files Each XUL file needs to reference its corresponding locale file. We also need to update the code to use the entities instead of the strings, so that the substitutions take place based on the currently active locale. To add a reference to the correct locale file for a given XUL file, we need to add one line to the XUL file. To options.xul, we add this line: <!DOCTYPE window SYSTEM "
chrome://stockwatcher2/locale/options.dtd"> We add a similar line to the stockwatcher.xul file: <!DOCTYPE overlay SYSTEM "
chrome://stockwatcher2/locale/stockwatcher2.dtd"> In larger applications you might need to use entities from several locale files in a single XUL file. Using multiple DTDs describes how to do it. Note that the URLs of the DTD files don't actually include the name of the localizati...
...2/locale/options.dtd"> We add a similar line to the stockwatcher.xul file: <!DOCTYPE overlay SYSTEM "
chrome://stockwatcher2/locale/stockwatcher2.dtd"> In larger applications you might need to use entities from several locale files in a single XUL file. Using multiple DTDs describes how to do it. Note that the URLs of the DTD files don't actually include the name of the localization to use. The
Chrome Registry resolves the URIs based on the user's current locale setting and the data you provide in your
Chrome manifest. Then we simply replace each text string in our XUL files with the corresponding entity. For example, in stockwatcher2.xul, we change this line: <menuitem label="Refresh Now" oncommand="StockWatcher.refreshInformation()"/> to <menuitem label="&menu_refresh_now.label;" oncomman...
...our
Chrome manifest. Then we simply replace each text string in our XUL files with the corresponding entity. For example, in stockwatcher2.xul, we change this line: <menuitem label="Refresh Now" oncommand="StockWatcher.refreshInformation()"/> to <menuitem label="&menu_refresh_now.label;" oncommand="StockWatcher.refreshInformation()"/> Do this for every string used in each XUL file. Update the
chrome manifest To let Firefox know about the locale files, we need to make a revision to our
chrome.manifest file, adding one line for each localization: locale stockwatcher2 en-US
chrome/locale/ This instructs Firefox that the en-US localization is located in the
chrome/locale/en-US directory. Localizing strings in JavaScript code If your JavaScript code contains literal strings that need to be loca...
...And 3 more matches
MCD, Mission Control Desktop, AKA AutoConfig - Archive of obsolete content
Unwanted White Space Reappeared Unfortu...
...s.import("resource:///modules/gloda/log4moz.js"); var log = Log4Moz.getConfiguredLogger("MCD"); // Enable alerts. var alerts = Components.classes["@mozilla.org/alerts-service;1"] .getService(Components.interfaces.nsIAlertsService); // displayError() is broken. Let's override it. function displayError(title, msg) { log.debug(title + ": " + msg); alerts.showAlertNotification("
chrome://branding/content/icon48.png", title, msg); } Firefox It's the same principles as for firefox as it was described above for thunderbir. Binary distributions should now include support for AutoConfig (pref extension!) but unfortunately not for LDAP calls :-( (cf. MOZ_LDAP_XPCOM=1). It is not vital in Firefox as it is for us in Thunderbird (need to get the cn and email address to set email acco...
...fox/browser/omni.ja]: 3598815 extra bytes at beginning or within zipfile (attempting to process anyway) error [/usr/lib/firefox/browser/omni.ja]: reported length of central directory is -3598815 bytes too long (Atari STZip zipfile? J.H.Holm ZIPSPLIT 1.1 zipfile?). Compensating... ...
...And 3 more matches
Automated testing tips and tricks - Archive of obsolete content
TODO: check example code in to the tree somewhere How to quit the browser on all platforms window.close() of the last open window does not quit the application on Mac http://people.mozilla.com/~davel/scripts/ - look at quit.js and quit.xul install manifest file in appdir/
chrome to map
chrome://tests/content to directory containing quit.js and quit.xul example: content tests file:///Users/davel/Work/tests/ start app with command line flag -
chrome chrome://tests/content/quit.xul How to create a new profile from the command line First, use the -CreateProfile command line flag to add a profile entry to profiles.ini and populate the new profile directory with a prefs.js file firefox-bin -CreateProfile "testprofile ${PROFILE...
...In test scripts, <code>sleep 5 after the above command should ensure the profile is created before the next command in the test script is run How to enable dump in a new profile add user_pref("browser.dom.window.dump.enabled", true); to profiledir/user.js How...
...In test scripts, <code>sleep 5 after the above command should ensure the profile is created before the next command in the test script is run How to enable dump in a new profile add user_pref("browser.dom.window.dump.enabled", true); to profiledir/user.js How to exe...
...And 3 more matches
Making a Mozilla installation modifiable - Archive of obsolete content
the code and then re-add them to the archive afterwards. Instead, you only have to extract them once and can then make as many modifications as you like. To make Mozilla modifiable, we will first extract the UI files from the archives using an unzip utility, then edit Mozilla's registry of UI files to use the extracted files instead of the original JAR archives. The archives are stored within the
chrome subdirectory of the Mozilla installation directory. Use your unzip utility to extract all files in that directory with a .jar extension. Make sure you extract them into the same (
chrome) directory in which they are located. On Unix-like operating systems with bash-like shells, you can run the following command within that directory to accomplish this task: for file in *.jar; do unzip $file; done ...
...plish this task: for file in *.jar; do unzip $file; done On operating systems with DOS-like shells, the following command accomplishes this task: for %file in (*.jar); do unzip %file Note that there are platform-specific files -- en-mac.jar, en-unix.jar, and en-win.jar -- in that directory. Extract only the one appropriate for your platform. After extracting the files we will modify the Mozilla
chrome registry to use the extracted files instead of the original JAR archives. The
chrome registry is a file that lists each major Mozilla component and where in the
chrome directory its UI files are located. It is located in the
chrome directory itself and is called either
chrome.rdf or installed-
chrome.txt (or both). The registry contains a bunch of complicated configuration statements in which you ...
...riginal JAR archives. The
chrome registry is a file that lists each major Mozilla component and where in the
chrome directory its UI files are located. It is located in the
chrome directory itself and is called either
chrome.rdf or installed-
chrome.txt (or both). The registry contains a bunch of complicated configuration statements in which you will find a number of URLs of the form jar:resource:/
chrome/SOMETHING.jar!/SOMETHING-ELSE... which point to directories within the JAR archives. Change them so they point to the extracted files by removing the leading jar: and the part in the middle that says SOMETHING.jar!. ...
...And 3 more matches
browser.type - Archive of obsolete content
<< XUL Reference home type Type: one of the values below. The type of browser, which can be used to set access of the document loaded inside the browser. If this is not set, the loaded document has the same access as the window containing the browser. More precisely: The document loaded into a
chrome window is always of
chrome type. ...
... << XUL Reference home type Type: one of the values below. The type of browser, which can be used to set access of the document loaded inside the browser. If this is not set, the loaded document has the same access as the window containing the browser. More precisely: The document loaded into a
chrome window is always of
chrome type. ...
... << XUL Reference home type Type: one of the values below. The type of browser, which can be used to set access of the document loaded inside the browser. If this is not set, the loaded document has the same access as the window containing the browser. More precisely: The document loaded into a
chrome window is always of
chrome type. ...
...And 3 more matches
Writing Skinnable XUL and CSS - Archive of obsolete content
package should contain a file called navigator.css that determines the default look of all XUL windows posed from this package. If inheriting the global skin, a skin file must import the global skin explicitly. If your skin file wishes to inherit the global skin, then it should import the global skin explicitly. This is done using an @import directive placed at the top of the file. @import url(
chrome://global/skin/) ... rest of skin file ... CSS files for a skin fall into two categories: base skin files and derived skin files. CSS files that import another skin file are calledderived skin files. CSS files that don't import another skin file are calledbase skin files. There is one notable exception to this rule. Skin files that don't import any other skin files, but that are only intended ...
...s unless the presence of the other packages can be guaranteed. For example, a Navigator XUL file can only load a Sidebar overlay explicitly if the Sidebar UI is always going to be installed with navigator. If it is possible that the sidebar is a separate component that could be installed or uninstalled, then the overlaying should not occur in the XUL file. ...
...ple, a Navigator XUL file can only load a Sidebar overlay explicitly if the Sidebar UI is always going to be installed with navigator. If it is possible that the sidebar is a separate component that could be installed or uninstalled, then the overlaying should not occur in the XUL file. It should instead take place through the
chrome registry. ...
...And 3 more matches
browser - Archive of obsolete content
eb document. It is similar to an iframe except that it holds a page history and contains additional methods to manipulate the currently displayed page. Are you here looking for information about the Firefox web browser, or because you'd like to download the latest version of Firefox? Get Firefox Most of the properties and methods of the browser will rarely be used and can only be called from
chrome URLs. Other URLs will need to use the document and history objects to change the displayed document. Attributes autocompleteenabled, autocompletepopup, autoscroll, disablehistory, disableglobalhistory, disablesecurity, droppedLinkHandler, homepage, showcaret, src, type Properties accessibleType, canGoBack, canGoForward, contentDocument, contentPrincipal, contentTitle, contentViewerEdit, ...
...t area. Default is false. src Type: URI The URI of the content to appear in the element. type Type: one of the values below. The type of browser, which can be used to set access of the document loaded inside the browser. If this is not set, the loaded document has the same access as the window containing the browser. More precisely: The document loaded into a
chrome window is always of
chrome type. Subdocuments of
chrome documents are of
chrome type, unless the container element (one of iframe, browser or editor) has one of the special type attribute values (the common ones are content, content-targetable and content-primary) indicating that the subdocument is of content type. This boundary has a number of special effects, such as making window.top == window...
...The type attribute on all frames in content documents is ignored; subdocuments of content documents are always content documents. Warning: The type attribute must be set before the element is inserted into the document. content A browser for content. ...
...And 3 more matches
How to enable locale switching in a XULRunner application - Archive of obsolete content
Include a XUL control for the locale selection The next step is to add a XUL control to your application which lists the available locales in the package and makes it possible for the user to select one of them. I chose a listbox with a button. Screenshot of sample locale switching control 3. ...
...or the locale selection The next step is to add a XUL control to your application which lists the available locales in the package and makes it possible for the user to select one of them. I chose a listbox with a button. Screenshot of sample locale switching control 3. Populate the XUL control with the available locales The available package locales are declared in the
chrome manifest. Sample
chrome/
chrome.manifest content localeswitchdemo content/ locale localeswitchdemo de-DE locale/de-DE/ locale localeswitchdemo en-GB locale/en-GB/ locale localeswitchdemo fr-FR locale/fr-FR/ How are you going to populate the XUL listbox? You can hardwire the choices into the XUL code using fixed list items, or could take the elegant approach and construct the list dynamically. The dynamic lis...
...le as well as all locales available in the application package. ...
...And 3 more matches
What is CSS? - Learn web development
language for specifying how documents are presented to users -- how they are styled, laid out, etc. A document is usually a text file structured using a markup language -- HTML is the most common markup language, but you may also come across other markup languages such as SVG or XML. Presenting a document to a user means converting it into a form usable by your audience. Browsers, like Firefox,
Chrome, or Edge , are designed to present documents visually, for example, on a computer screen, projector or printer. Note: A browser is sometimes called a user agent, which basically means a computer program that represents a person inside a computer system. Browsers are the main type of user agent we think of when talking about CSS, however, it is not the only one. There are other user agents avail...
...ere is usually a gap where you can use some part of CSS in some browsers and not in others. For this reason, being able to check implementation status is useful. On each property page on MDN you can see the status of the property you are interested in, so you can tell if you will be able to use it on a website. What follows is the compat data chart for the CSS font-family property. ...
...ome browsers and not in others. For this reason, being able to check implementation status is useful. On each property page on MDN you can see the status of the property you are interested in, so you can tell if you will be able to use it on a website. What follows is the compat data chart for the CSS font-family property. DesktopMobile
ChromeEdgeFirefoxInternet ExplorerOperaSafariAndroid webview
Chrome for AndroidFirefox for AndroidOpera for AndroidSafari on iOSSamsung Internetfont-family
Chrome Full support 1Edge Full support 12Firefox Full support 1Notes Full support 1Notes Notes Not supported on option elements. Se...
...And 3 more matches
Limitations of frame scripts
Frame scripts run with system privileges and have access to the Components object, enabling them to use XPCOM objects and JSMs. Many privileged APIs will just work in a content process. Anything that just manipulates data structures will just work. XHR and Workers will work. However, some APIs that work in the
chrome process will not work in a frame script. This article lists the most important of these APIs. This is one of a pair of articles: the other one lists limitations of
chrome scripts. Security Restrictions on File Access Processes that host remote content are isolated from the local system through a content security sandbox. One of the functions of the sandbox is to restrict access to the local file system by processes that host remote content. Since frame and process script...
...sage manager) HTMLInputElement.mozSetFileNameArray (alternative: mozSetFileArray) XUL and browser UI Anything that tries to touch the browser UI or anything to do with XUL is likely to not work in the content process. For example: nsIPromptService nsIFilePicker nsIXUL* <need more examples> Services Some services will not work in frame scripts. Services.search Services.downloads
Chrome windows Anything that needs to use
chrome windows will not work in the content process. For example: nsISessionStore nsIWindowMediator <need more examples> Places API The Places API can't be used inside a frame script. For example: nsINavHistoryService nsINavBookmarksService Observers in the content process As noted in Observers in the
chrome process, most observers should be regi...
...hing that needs to use
chrome windows will not work in the content process. For example: nsISessionStore nsIWindowMediator <need more examples> Places API The Places API can't be used inside a frame script. For example: nsINavHistoryService nsINavBookmarksService Observers in the content process As noted in Observers in the
chrome process, most observers should be registered in the
chrome process and will not work in the content process. The exceptions are: content-document-global-created document-element-inserted outer-window-destroyed inner-window-destroyed dom-window-destroyed These must be registered in the content process. QI from content window to
chrome window There's a particular pattern often used to get from a content window to the associated
chrome window. It...
...And 3 more matches
Process scripts
ipt is loaded more than once, then you will get multiple notifications for that event. The solution in these cases is to use a process script instead of a frame script. You can load a process script by accessing a parent process message manager and calling its loadProcessScript() function. The following code uses the global parent process message manager, which will load the script into the the
chrome process and any child processes: //
chrome code let ppmm = Cc["@mozilla.org/parentprocessmessagemanager;1"] .getService(Ci.nsIProcessScriptLoader); ppmm.loadProcessScript("
chrome://whatever/process-script.js", true); ppmm.addMessageListener("Hello", function(msg) { ... }); The process script's global is a child process message manager, which enables the process script to receive messages from...
...ess and any child processes: //
chrome code let ppmm = Cc["@mozilla.org/parentprocessmessagemanager;1"] .getService(Ci.nsIProcessScriptLoader); ppmm.loadProcessScript("
chrome://whatever/process-script.js", true); ppmm.addMessageListener("Hello", function(msg) { ... ...
...ode let ppmm = Cc["@mozilla.org/parentprocessmessagemanager;1"] .getService(Ci.nsIProcessScriptLoader); ppmm.loadProcessScript("
chrome://whatever/process-script.js", true); ppmm.addMessageListener("Hello", function(msg) { ... ...
...And 3 more matches
Embedding Tips
rowserPrint::GetGlobalPrintSettings()) that you wish to preview the page with. The nsIWebBrowserPrint::PrintPreviewNavigate() method can be used to step through the pages. When finished with preview mode, call nsIWebBrowserPrint::ExitPrintPreview(). How do I get popup windows working? Implement and register a nsIWindowCreator object with the window watcher service. The nsIWindowCreator::Create
ChromeWindow method will be called whenever Gecko needs to open a new window. This method should create the new browser window in the specified style and hand back the nsIWebBrowser
Chrome interface to it. nsCOMPtr<nsIWindowWatcher> wwatch(do_GetService(NS_WINDOWWATCHER_CONTRACTID)); if (wwatch) { wwatch->SetWindowCreator(myWindowCreator); } I need the JavaScript inside the browser window to talk to...
... How do I specify alternate locations for profiles? Specify a profile directory in your implementation of nsIDirectoryServiceProvider passed to XRE_InitEmbedding. Use XRE_NotifyProfile to make gecko actually use a profile location. How do I change the user agent string? The default useragent is set using the value from your application.ini/nsXREAppData. You can override this default ...
...nt and register your own prompt service. How do I get the DOM document from the web browser object? nsCOMPtr<nsIDOMDocument> doc; nsCOMPtr<nsIDOMWindow> window; webBrowser->GetContentDOMWindow(getter_AddRefs(window)); if (window) { window->GetDocument(getter_AddRefs(doc)); } What is the docshell? A description of the docshell may be found here. ...
...And 3 more matches
PBackground
PBackground is a mechanism available since Gecko 30 (see bug 956218) that builds on top of IPDL to provide a solution to common problems that arise when handling multiple threads in the
chrome process, for example communication between workers and multiple child processes and other parent-process worker threads. This article outlines what PBackground is, and how it works. IPDL recap IPDL is a language used to define "protocols" -- essentially formalized versions of how two things can communicate. It is similar in some respects to IDL and WebIDL. ...
...hreads. This article outlines what PBackground is, and how it works. IPDL recap IPDL is a language used to define "protocols" -- essentially formalized versions of how two things can communicate. It is similar in some respects to IDL and WebIDL. At build time the IPDL compiler automatically generates a large amount of C++ glue code from the IPDL files. IPDL protocols are used to specify how the
chrome and content processes talk to each other and verify that a content process is "following the rules". Note: If you want more detailed information on IPDL, start out by reading the IPDL tutorial. When used at run time, every protocol has two actors -- a parent and a child. These actors can live in different processes due to IPDL, which automatically serializes calls on one side and transmits th...
...erify that a content process is "following the rules". Note: If you want more detailed information on IPDL, start out by reading the IPDL tutorial. When used at run time, every protocol has two actors -- a parent and a child. These actors can live in different processes due to IPDL, which automatically serializes calls on one side and transmits them to the other. This is the foundation of how
chrome and content processes talk to each other in e10s. The actor tree All live actors exist in a tree. The root of the tree is known as the top-level actor, an instance of one of a small number of top-level protocols. All actors in a tree "live" on the same thread, and can only be used safely from that thread. The top-level actor for most things is PContent, which connects the main thread of the chr...
...And 3 more matches
CustomizableUI.jsm
e. before CustomizableUI was introduced, then you have to make sure that in case of running on newer browsers, XUL overlay does not contain description of the button that you are creating with createWidget() method. Otherwise, conflicting static XUL overlay button and dynamic CustomizableUI buttons might cause the created button to be unstable or create a double button. To avoid that, update your
Chrome Manifest file with links to two different versions of XUL overlay, using Manifest Flags. Note: unlike button described with XUL overlay, widget-button created via createWidget() method cannot have references to other overlay elements transferred directly as parameters. For example, if there is a need to create a button with dynamically assignable tooltip, the node for static tooltip should be de...
.... ...
...tion) { console.log('a widget moved to an area, arguments:', arguments); if (aWidgetId != 'noida') { return } console.log('my widget moved'); var useIcon; if (aArea == CustomizableUI.AREA_PANEL) { useIcon = '
chrome://branding/content/icon32.png'; } else { useIcon = '
chrome://branding/content/icon16.png'; } var myInstances = CustomizableUI.getWidget('noida').instances; for (var i=0; i<myInstances.length; i++) { myInstances[i].node.setAttribute('image', useIcon); } }, onWidgetDestroyed: function(aWidgetId) { console.log('a widget destroyed so removing listener, arguments:', ...
...And 3 more matches
nsIAppShellService
hellService); Method overview void closeTopLevelWindow(in nsIXULWindow aWindow); Obsolete since Gecko 1.8 void createHiddenWindow(in nsIAppShell aAppShell); Native code only! ...
...denWindow(in nsIAppShell aAppShell); Native code only! ...
...he width to make the initial window(s) opened. aWindowHeight The height to make the initial window(s) opened. Return value true if a window was opened. createTopLevelWindow() This method creates a window, which will be initially invisible. ...
...And 3 more matches
nsIComponentManager
Until Gecko 10 you had to call this method manually from within the add-on's star...
...s(aIID),retval] out nsQIResult result); void getClassObjectByContractID(in string aContractID, in nsIIDRef aIID, [iid_is(aIID),retval] out nsQIResult result); void removeBootstrappedManifestLocation(in nsILocalFile aLocation); Methods addBootstrappedManifestLocation() Loads a "bootstrapped"
chrome.manifest file from the specified directory or XPI file. A "bootstrapped"
chrome manifest supports some of the instructions allowed in a regular
chrome manifest, see the
Chrome Registration documentation for details. This method was introduced in Gecko 8 to let bootstrapped add-ons provide content at
chrome:// URIs. Until Gecko 10 you had to call this method manually from within the add-on's startup() method (with a matching removeBootstrappedManifestLocation() call in the a...
... createInstance() Creates an instance of the class specified by ClassID. ...
...And 3 more matches
Building an Account Manager Extension
Furthermore we show the new panel only for IMAP accounts... ...
...Extension "devmo-account" and state that it is located in the
Chrome Package "example@mozilla.org". Furthermore we show the new panel only for IMAP accounts... Components.utils.import("resource://gre/modules/XPCOMUtils.jsm"); //class constructor function DevmoAccountManagerExtension() {}; // class definition DevmoAccountManagerExtension.prototype = { name : "devmo-account",
chromePackageName : "example@mozilla.org", showPanel: function(server) { //this panel is only shown for imap accounts... if (server.type == \"imap\") return true; return false; }, QueryInterface: XPCOMUtils.generateQI([ Components.interfaces.nsIMsgAccountManagerExtension ]) } Step 2: Building a Component We convert the interface to a XPCOM Compon...
...e module if (XPCOMUtils.generateNSGetFactory) var NSGetFactory = XPCOMUtils.generateNSGetFactory([DevmoAccountManagerExtension]); else var NSGetModule = XPCOMUtils.generateNSGetModule([DevmoAccountManagerExtension]); Step3: Create the new panel As next Step we create the XUL and the property file for your new panel. We defined in Step 1 "devmo-account" as name and "example@mozilla.org" as
chrome package. This means the XUL file for the new panel has to be located in
chrome://example@mozilla.org/content/am-devmo-account.xul. And the property file needs to be in
chrome://example@mozilla.org/locale/am-devmo-account.properties. The XUL file needs a page element as root element, with a special on load command. Furthermore you should include the AccountManager.js script and accountManage.css ...
...And 3 more matches
nsIWebBrowser
The interface may also be used at runtime to obtain the content DOM window and from that the rest of the DOM. ...
.../ SeaMonkey 2.1) Warning: This interface was frozen for a very long time, but was unfrozen for Gecko 2.0. Method overview void addWebBrowserListener(in nsIWeakReference aListener, in nsIIDRef aIID); void removeWebBrowserListener(in nsIWeakReference aListener, in nsIIDRef aIID); Attributes Attribute Type Description containerWindow nsIWebBrowser
Chrome The
chrome object associated with the browser instance. The embedder must create one
chrome object for each browser object that is instantiated. The embedder must associate the two by setting this property to point to the
chrome object before creating the browser window via the browser's nsIBaseWindow interface. The
chrome object must also implement nsIEmbeddingSiteWindow. The chr...
...The embedder must create one
chrome object for each browser object that is instantiated. The embedder must associate the two by setting this property to point to the
chrome object before creating the browser window via the browser's nsIBaseWindow interface. The
chrome object must also implement nsIEmbeddingSiteWindow. The
chrome may optionally implement nsIInterfaceRequestor, nsIWebBrowser
ChromeFocus, nsIContextMenuListener and nsITooltipListener to receive additional notifications from the browser object. The
chrome object may optionally implement nsIWebProgressListener instead of explicitly calling addWebBrowserListener() and removeWebBrowserListener() to register a progress listener object. If the implementation does this, it must also implement nsIWeakReference. Note: The imp...
...And 3 more matches
Browser Console - Firefox Developer Tools
for add-ons, and for the browser's own code. If you also want to use the other web developer tools in the regular Web Toolbox with add-on or browser code, consider using the Browser Toolbox. Similarly, you can execute JavaScript expressions using the Browser Console. ...
... executes code in the page window scope, the Browser Console executes them in the scope of the browser's
chrome window. This means you can interact with all the browser's tabs using the gBrowser global, and even with the XUL used to specify the browser's user interface. NB: The Browser Console command line (to execute JavaScript expressions) is disabled by default. To enable it set the devtools.
chrome.enabled preference to true in about:config, or set the "Enable browser
chrome and add-on debugging toolboxes" (Firefox 40 and later) option in the developer tool settings. Opening the Browser Console You can open the Browser Console in one of two ways: from the menu: select "Browser Console" from the Web Developer submenu in the Firefox Menu (or Tools menu if you display the menu bar or ar...
...ss the content document of the Browser Console this can be done with the HUDService. This example here makes it so that when you mouse over the "Clear" button it will clear the Browser Console: Components.utils.import("resource://devtools/shared/Loader.jsm"); var HUDService = devtools.require("devtools/client/webconsole/hudservice"); var hud = HUDService.getBrowserConsole(); var clearBtn = hud.
chromeWindow.document.querySelector('.webconsole-clear-console-button'); clearBtn.addEventListener('mouseover', function() { hud.jsterm.clearOutput(true); }, false); Bonus Features Available For Add-on SDK add-ons, the console API is available automatically. Here's an example add-on that just logs an error when the user clicks a widget: widget = require("sdk/widget").Widget({ id: "an-error-happen...
...And 3 more matches
DevTools API - Firefox Developer Tools
own tab (we call one tab a panel). These tabs are located in a box we call a Toolbox. A toolbox can be hosted within a browser tab (at the bottom or on the side), or in its own window (we say that the toolbox is undocked). A Toolbox (and all the tools it contains) is linked to a Target, which is the object the tools are debugging. A target is usually a web page (a tab), but can be other things (a
chrome window, a remote tab,...). In terms of code, each tool has to provide a ToolDefinition object. A definition is a JS light object that exposes different information about the tool (like its name and its icon), and a build method that will be used later-on to start an instance of this tool. The gDevTools global object provides methods to register a tool definition and to access tool instances. An...
...e. Default: false inMenu Boolean, optional. If true the tool will be shown in the Developer Menu. Default: false menuLabel String, optional. A label for the Developer Menu item. Default: {label} accesskey String, optional. accesskey for the Developer Menu <xul:menuitem>. Example Here's a minimal definition for a tool. let def = { id: "my-tool", label: "My Tool", icon: "
chrome://browser/skin/devtools/tool-webconsole.svg", url: "about:blank", isTargetSupported: target => true, build: (window, toolbox) => new MyToolPanel(window, toolbox) }; // Register it. gDevTools.registerTool(def); TargetType FIXME: HostType FIXME ToolPanel The ToolPanel is an interface the toolbox uses to manage the panel of a tool. The object that ToolDefinition.build() returns should ...
...ady Tab is loaded and can be used {tabId}-selected Tab has been selected and is visible {tabId}-unselected Tab has been unselected and is not visible show The sidebar has been opened. hide The sidebar has been closed. Examples Register a tool gDevTools.registerTool({ // FIXME: missing key related properties. ...
...And 3 more matches
BiquadFilterNode() - Web APIs
ification Status Comment Web Audio APIThe definition of 'BiquadFilterNode()' in that specification. Working Draft Initial definition. Browser Compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...inition of 'BiquadFilterNode()' in that specification. Working Draft Initial definition. Browser Compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...patibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...And 3 more matches
FileSystemDirectoryReader - Web APIs
Status Comment File and Directory Entries API Draft Draft of proposed API This API has no official W3C or WHATWG specification. Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...s API Draft Draft of proposed API This API has no official W3C or WHATWG specification. Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...mpatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...And 3 more matches
GainNode() - Web APIs
Specification Status Comment Web Audio APIThe definition of 'GainNode()' in that specification. Working Draft Initial definition. Browser Compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...The definition of 'GainNode()' in that specification. Working Draft Initial definition. Browser Compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...ser Compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...And 3 more matches
IDBEnvironment - Web APIs
r db; function openDB() { var DBOpenRequest = window.indexedDB.open("toDoList"); DBOpenRequest.onsuccess = function(e) { db = DBOpenRequest.result; }; } Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...dDB.open("toDoList"); DBOpenRequest.onsuccess = function(e) { db = DBOpenRequest.result; }; } Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...ty The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...And 3 more matches
IDBObjectStore.name - Web APIs
' in that specification. Recommendation Indexed Database API DraftThe definition of 'name' in that specification. Recommendation Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...exed Database API DraftThe definition of 'name' in that specification. Recommendation Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...n Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...And 3 more matches
IDBVersionChangeRequest - Web APIs
a separate thread. Attributes Attribute Type Description onblocked Function The event handler for the blocked event. Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... Description onblocked Function The event handler for the blocked event. Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...And 3 more matches
Key Values - Web APIs
L (0xFFEB), GDK_KEY_Super_R (0xFFEC), GDK_KEY_Hyper_L (0xFFED), and GDK_KEY_Hyper_R (0xFFEE) on Linux. [2] Internet Explorer (tested on release 9 and 11) reports "Scroll" instead of "ScrollLock" for the Scroll Lock key. [3] Firefox did not add support for the Symbol key until Firefox 37. [4] Firefox generates the key value "OS" for the Super and Hyper keys, instead of "Super" and "Hyper". [5]
Chrome 67 and Firefox 63 now correctly interpret the right Alt key for keyboard layouts which map that key to AltGr. See Firefox bug bug 900750 and
Chrome bug 25503 for further details. Whitespace keys KeyboardEvent.key Value Description Virtual Keycode Windows Mac Linux Android "Enter" The Enter or ? key (sometimes labeled Return). VK_RETURN (0x0D) ...
... The Select key. VK_SELECT (0x29) GDK_KEY_Select (0xFF60) KEYCODE_BUTTON_SELECT (109) "ZoomIn" [6] The ZoomIn key. GDK_KEY_ZoomIn (0x1008FF8B) Qt::Key_ZoomIn (0x010000F6) KEYCODE_ZOOM_IN (168) "ZoomOut" [6] The ZoomOut key. GDK_KEY_ZoomOut (0x1008FF8C) Qt::Key_ZoomOut (0x010000F7) KEYCODE_ZOOM_OUT (169) [1] In Google
Chrome 52, the Cancel key incorrectly returns the key code "Pause". This is fixed in
Chrome 53. (See
Chrome bug 612749 for details.) [2] In Internet Explorer (tested on release 9 and 11) and Firefox 36 and earlier, the Esc key returns "Esc" instead of "Escape". [3] Internet Explorer (tested on release 9 and 11) and Firefox 36 and earlier report "Apps" instead of "ContextMenu" for the context menu key.
... [2] In Internet Explorer (tested on release 9 and 11) and Firefox 36 and earlier, the Esc key returns "Esc" instead of "Escape". [3] Internet Explorer (tested on release 9 and 11) and Firefox 36 and earlier report "Apps" instead of "ContextMenu" for the context menu key. [4] The Attn key generates the key code "Unidentified" on Internet Explorer (tested on release 9 and 11). Firefox and Google
Chrome report the same, unless the Japanese keyboard layout is in effect, in which case it generates "KanaMode" instead. [5] The Finish key gemerates the key code "Unidentified" on Internet Explorer (tested on release 9 and 11). Firefox reports the same, unless the Japanese keyboard layout is in effect, in which case it generates "Katakana" instead. [6] Firefox didn't support the "ZoomIn" and "ZoomOut...
...And 3 more matches
Using the Notifications API - Web APIs
to a user gesture (e.g. clicking a button). This is not only best practice -- you should not be spamming users with notifications they didn't agree to -- but going forward browsers will explicitly disallow notification permission requests not triggered in response to a user gesture. Firefox is already doing this from version 72, for example, and Safari has done it for some time. In addition, In
Chrome and Firefox you cannot request notifications at all unless the site is a secure context (i.e. HTTPS), and you can no longer allow notification permissions to be requested from cross-origin <iframe>s. Checking current permission status You can check to see if you already have permission by checking the value of the Notification.permission read only property. It can have one of three possible val...
...we include an "Enable notifications" button that, when pressed, requests notification permissions for the app. ...
...the promise-based version (supported everywhere except Safari), and if not, we run the older callback-based version (which is supported in Safari). To avoid duplicating code, we have stored a few bits of housekeeping code inside the handlePermission() function, which is the first main block inside this snippet. ...
...And 3 more matches
PerformanceLongTaskTiming - Web APIs
Status Comment Long Tasks API 1The definition of 'PerformanceLongTaskTiming' in that specification. Working Draft Initial definition. Browser Compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... of 'PerformanceLongTaskTiming' in that specification. Working Draft Initial definition. Browser Compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...ty The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...And 3 more matches
SVGAnimatedString - Web APIs
Scalable Vector Graphics (SVG) 1.1 (Second Edition) Recommendation Scalable Vector Graphics (SVG) 2 Candidate Recommendation Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... Recommendation Scalable Vector Graphics (SVG) 2 Candidate Recommendation Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...And 3 more matches
SVGTransformList - Web APIs
Scalable Vector Graphics (SVG) 1.1 (Second Edition)The definition of 'SVGTransformList' in that specification. Recommendation Initial definition Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...efinition of 'SVGTransformList' in that specification. Recommendation Initial definition Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...And 3 more matches
Selection.extend() - Web APIs
Specification Status Comment Selection APIThe definition of 'Selection.extend()' in that specification. Working Draft Current Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...n APIThe definition of 'Selection.extend()' in that specification. Working Draft Current Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...And 3 more matches
Slottable - Web APIs
ns Specification Status Comment DOMThe definition of 'Slottable' in that specification. Living Standard Initial definition. Browser Compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...The definition of 'Slottable' in that specification. Living Standard Initial definition. Browser Compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...wser Compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...And 3 more matches
WaveShaperNode.WaveShaperNode() - Web APIs
cification Status Comment Web Audio APIThe definition of 'WaveShaperNode()' in that specification. Working Draft Initial definition. Browser Compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...finition of 'WaveShaperNode()' in that specification. Working Draft Initial definition. Browser Compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...mpatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...And 3 more matches
Window.openDialog() - Web APIs
newly opened window. name The window name (optional). See window.open() description for detailed information. features See window.open() for details. arg1, arg2, ... The arguments to be passed to the new window (optional). Example var win = openDialog("http://example.tld/zzz.xul", "dlg", "", "pizza", 6.98); Notes New features all - Initially activates (or deactivates ("all=no")) all
chrome (except the behavior flags
chrome, dialog and modal). These can be overridden (so "menubar=no,all" turns on all
chrome except the menubar.) This feature is explicitly ignored by window.open(). window.openDialog() finds it useful because of its different default assumptions. Default behavior The
chrome and dialog features are always assumed on, unless explicitly turned off ("
chrome=no"). openDia...
...his feature is explicitly ignored by window.open(). window.openDialog() finds it useful because of its different default assumptions. Default behavior The
chrome and dialog features are always assumed on, unless explicitly turned off ("
chrome=no"). openDialog() treats the absence of the features parameter the same way window.open() does; that is, an empty string sets all features to off) except
chrome and dialog, which default to on. If the features parameter is a zero-length string, or contains only one or more of the behavior features (
chrome, dependent, dialog and modal) the
chrome features are assumed "OS' choice." That is, window creation code is not given specific instructions, but is instead allowed to select the
chrome that best fits a dialog on that operating system. Passing extra pa...
...: var retVals = window.arguments[2]; retVals.address = enteredAddress; retVals.delivery = "immediate"; Specification This is not part of any specification. Browser Compatibility The compatibility table in this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...And 3 more matches
Window.prompt() - Web APIs
sign = window.prompt('Are you feeling lucky', 'sure'); // open the window with Text "Are you feeling lucky" and default value "sure" When the user clicks the OK button, text entered in the input field is returned. If the user clicks OK without entering any text, an empty string is returned. If the user clicks the Cancel button, this function returns null. The above prompt appears as follows (in
Chrome on OS X): Notes A prompt dialog contains a single-line textbox, a Cancel button, and an OK button, and returns the (possibly empty) text the user entered into that textbox. The following text is shared between this article, DOM:window.confirm and DOM:window.alert Dialog boxes are modal windows; they prevent the user from accessing the rest of the program's interface until the dialog box is c...
...ation Specification Status Comment HTML Living StandardThe definition of 'prompt()' in that specification. Living Standard Browser Compatibility The compatibility table in this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...HTML Living StandardThe definition of 'prompt()' in that specification. Living Standard Browser Compatibility The compatibility table in this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...And 3 more matches
Window.scroll() - Web APIs
omment CSS Object Model (CSSOM) View ModuleThe definition of 'window.scroll()' in that specification. Working Draft Initial definition. Browser Compatibility The compatibility table in this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...definition of 'window.scroll()' in that specification. Working Draft Initial definition. Browser Compatibility The compatibility table in this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...tion. Browser Compatibility The compatibility table in this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...And 3 more matches
Window.scrollBy() - Web APIs
ment CSS Object Model (CSSOM) View ModuleThe definition of 'window.scrollBy()' in that specification. Working Draft Initial definition. Browser Compatibility The compatibility table in this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...finition of 'window.scrollBy()' in that specification. Working Draft Initial definition. Browser Compatibility The compatibility table in this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...on. Browser Compatibility The compatibility table in this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...And 3 more matches
Worker.prototype.postMessage() - Web APIs
value,second.value]); console.log('Message posted to worker'); } For a full example, see ourBasic dedicated worker example (run dedicated worker). Note: postMessage() can only send a single object at once. As seen above, if you want to pass multiple values you can send an array. ...
...sole.log('Message posted to worker'); } For a full example, see ourBasic dedicated worker example (run dedicated worker). Note: postMessage() can only send a single object at once. As seen above, if you want to pass multiple values you can send an array. ...
...r example (run dedicated worker). Note: postMessage() can only send a single object at once. As seen above, if you want to pass multiple values you can send an array. Transfer Example This example shows a Firefox add-on that transfers an ArrayBuffer from the main thread to the
ChromeWorker, and then the
ChromeWorker transfers it back to the main thread. ...
...And 3 more matches
:scope - CSS: Cascading Style Sheets
Specification Status Comment Selectors Level 4The definition of ':scope' in that specification. Working Draft Initial definition. Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...vel 4The definition of ':scope' in that specification. Working Draft Initial definition. Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...tion. Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. DesktopMobile
ChromeEdgeFirefoxInternet ExplorerOperaSafariAndroid webview
Chrome for AndroidFirefox for AndroidOpera for AndroidSafari on iOSSamsung Internet:scope
Chrome Full support 27Edge Full support 79Firefox Full support 32Notes Full support 32Notes Notes Firefox 55 removes support for <style scoped> but not for the :scope pseudo-class, which is still supported. <style scoped> mad...
...And 3 more matches
@supports - CSS: Cascading Style Sheets
tion. CSS Conditional Rules Module Level 3The definition of '@supports' in that specification. Candidate Recommendation Initial definition. Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...ition of '@supports' in that specification. Candidate Recommendation Initial definition. Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...n. Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...And 3 more matches
background-position-x - CSS: Cascading Style Sheets
in that specification. Editor's Draft Initial specification of longhand sub-properties of background-position to match longstanding implementations. Browser compatibility The compatibility table in this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...ation of longhand sub-properties of background-position to match longstanding implementations. Browser compatibility The compatibility table in this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...owser compatibility The compatibility table in this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...And 3 more matches
background-position-y - CSS: Cascading Style Sheets
in that specification. Editor's Draft Initial specification of longhand sub-properties of background-position to match longstanding implementations. Browser compatibility The compatibility table in this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...ation of longhand sub-properties of background-position to match longstanding implementations. Browser compatibility The compatibility table in this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...owser compatibility The compatibility table in this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...And 3 more matches
clear - CSS: Cascading Style Sheets
ficant changes, though details are clarified. CSS Level 1The definition of 'clear' in that specification. Recommendation Initial definition Browser compatibility The compatibility table in this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...evel 1The definition of 'clear' in that specification. Recommendation Initial definition Browser compatibility The compatibility table in this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...nition Browser compatibility The compatibility table in this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...And 3 more matches
font-size-adjust - CSS: Cascading Style Sheets
ion Initial definition The CSS property font-size-adjust was initially defined in CSS 2, but dropped in CSS 2.1. It has been newly defined in CSS 3. Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...-adjust was initially defined in CSS 2, but dropped in CSS 2.1. It has been newly defined in CSS 3. Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...And 3 more matches
object-position - CSS: Cascading Style Sheets
mment CSS Images Module Level 3The definition of 'object-position' in that specification. Candidate Recommendation Initial definition. Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...f 'object-position' in that specification. Candidate Recommendation Initial definition. Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...And 3 more matches
pointer-events - CSS: Cascading Style Sheets
ial definition Its extension to HTML elements, though present in early drafts of CSS Basic User Interface Module Level 3, has been pushed to its level 4. Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... present in early drafts of CSS Basic User Interface Module Level 3, has been pushed to its level 4. Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... 4. Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...And 3 more matches
ruby-position - CSS: Cascading Style Sheets
atus Comment CSS Ruby Layout Module Level 1The definition of 'ruby-position' in that specification. Working Draft Initial definition Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...he definition of 'ruby-position' in that specification. Working Draft Initial definition Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...And 3 more matches
List of default Accept values - HTTP
html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8 (since Firefox 66) text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8 (in Firefox 65) text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8 (before) In Firefox 65 and earlier, this value can be modified using the network.http.accept.default parameter. ...
...e, like through an HTML <img> element, user-agent often sets a specific list of media types to be welcomed. User Agent Value Comment Firefox image/webp,*/* (since Firefox 65) */* (since Firefox 47) image/png,image/*;q=0.8,*/*;q=0.5 (before) This value can be modified using the image.http.accept parameter. ...
...9 (IEInternals' MSDN blog) Values for a video When a video is requested, via the <video> HTML element, most browsers use specific values. User Agent Value Comment Firefox earlier than 3.6 no support for <video> Firefox 3.6 and later video/webm,video/ogg,video/*;q=0.9,application/ogg;q=0.7,audio/*;q=0.6,*/*;q=0.5 See bug 489071 source
Chrome */* source Internet Explorer 8 or earlier no support for <video> Values for audio resources When an audio file is requested, like via the <audio> HTML element, most browsers use specific values. User Agent Value Comment Firefox 3.6 and later audio/webm,audio/ogg,audio/wav,audio/*;q=0.9,application/ogg;q=0.7,video/*;q=0.6,*/*;q=0.5 See b...
...And 3 more matches
WebAssembly.CompileError - JavaScript
efinition of 'WebAssembly constructors' in that specification. ECMAScript (ECMA-262)The definition of 'NativeError' in that specification. Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...n. ECMAScript (ECMA-262)The definition of 'NativeError' in that specification. Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...And 3 more matches
WebAssembly.LinkError - JavaScript
InterfaceThe definition of 'LinkError' in that specification. ECMAScript (ECMA-262)The definition of 'NativeError' in that specification. Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...n. ECMAScript (ECMA-262)The definition of 'NativeError' in that specification. Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...ser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...And 3 more matches
WebAssembly.Memory() constructor - JavaScript
ArrayBuffer. Specifications Specification WebAssembly JavaScript InterfaceThe definition of 'Memory' in that specification. Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... WebAssembly JavaScript InterfaceThe definition of 'Memory' in that specification. Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...bility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...And 3 more matches
WebAssembly.RuntimeError - JavaScript
efinition of 'WebAssembly constructors' in that specification. ECMAScript (ECMA-262)The definition of 'NativeError' in that specification. Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...n. ECMAScript (ECMA-262)The definition of 'NativeError' in that specification. Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...And 3 more matches
Codecs used by WebRTC - Web media technologies
ch all compliant browsers are required to support. Some browsers may choose to allow other codecs as well. Below are the video codecs which are required in any fully WebRTC-compliant browser, as well as the profiles which are required and the browsers which actually meet the requirement. Mandatory video codecs Codec name Profile(s) Browser compatibility VP8 --
Chrome, Edge, Firefox, Safari (12.1+) AVC / H.264 Constrained Baseline (CB)
Chrome (52+), Edge, Firefox[1], Safari [1] Firefox for Android 68 and later do not support AVC (H.264) anymore. This is due to a change in Google Play store requirements that prevent Firefox from downloading and installing the OpenH264 codec needed to handle H.264 in WebRTC connections. See this article on ...
...products that are able to communicate with WebRTC to some extent may or may not support these codecs, although they're encouraged to by the specification documents. In addition to the mandatory codecs, some browsers support additional codecs as well. Those are listed in the following table. Other video codecs Codec name Profile(s) Browser compatibility VP9 --
Chrome (48+), Firefox VP8 VP8, which we describe in general in the main guide to video codecs used on the web, has some specific requirements that must be followed when using it to encode or decode a video track on a WebRTC connection. Unless signaled otherwise, VP8 will use square pixels (that is, pixels with an aspect ratio of 1:1). Other notes The network payload format for sharing VP8 usi...
...required to support the special "filler payload" and "full frame freeze" SEI messages; these are used to support switching among multiple input streams seamlessly. Supported audio codecs The audio codecs which RFC 7874 mandates that all WebRTC-compatible browsers must support are shown in the table below. Mandatory audio codecs Codec name Browser compatibility Opus
Chrome, Edge, Firefox, Safari G.711 PCM (A-law)
Chrome, Firefox, Safari G.711 PCM (u-law)
Chrome, Firefox, Safari See below for more details about any WebRTC-specific considerations that exist for each codec listed above. It's useful to note that RFC 7874 defines more than a list of audio codecs that a WebRTC-compliant browser must support; it also provides recommendation...
...And 3 more matches
The "codecs" parameter in common media types - Web media technologies
xed number of characters long; if the value is less than that length, it must be padded with leading zeros. AV1 codec parameter string components Component Details P The one-digit profile number: AV1 profile numbers Profile number Description 0 "Main" profile; supports YUV 4:2:0 or mono
chrome bitstreams with bit depth of 8 or 10 bits per component. 1 "High" profile adds support for 4:4:4 chroma subsampling. 2 "Professional" profile adds support for 4:2:2 chroma subsampling and 12 bit per component color. LL The two-digit level number, which is converted to the X.Y format level format, where X = 2...
...dicator. For the Main tier (seq_tier equals 0), this character is the letter M. For the High tier (seq_tier is 1), this character is the letter H. The High tier is only available for level 4.0 and up. DD The two-digit component bit depth. This value must be one of 8, 10, or 12; which values are valid varies depending on the profile and other properties. M The one-digit mono
chrome flag; if this is 0, the video includes the U and V planes in addition to the Y plane. Otherwise, the video data is entirely in the Y plane and is therefore monochromatic. See YUV in Digital video concepts for details on how the YUV color system works. The default value is 0 (not mono
chrome). CCC CCC indicates the chroma subsampling as three digits. The first digit is subsampling_...
...ee digits. The first digit is subsampling_x, the second is subsampling_y. If both of those are 1, the third is the value of chroma_sample_position; otherwise, the third digit is always 0. ...
...And 3 more matches
windows - Archive of obsolete content
vate browsing, then you won't see any private browser windows. Private browser windows won't appear in the browserWindows property, you won't receive any window events, and you won't be able to open private windows. To learn more about private windows, how to opt into private browsing, and how to support private browsing, refer to the documentation for the private-browsing module. Converting to
chrome windows To convert from the BrowserWindow objects used in this API to the
chrome window objects used in the window/utils API, use the viewFor() function exported by the viewFor module. To convert back the other way, from a
chrome window to a BrowserWindow object, use the modelFor() function, exported by the modelFor module. Here's an example converting from a high-level BrowserWindow to a chro...
...er way, from a
chrome window to a BrowserWindow object, use the modelFor() function, exported by the modelFor module. ...
...dow object, use the modelFor() function, exported by the modelFor module. ...
...And 2 more matches
Creating Reusable Modules - Archive of obsolete content
no longer considered secure, it works fine outside a security context. Here we'll write an add-on that lets the user select a file on disk and calculates its hash. For both these operations we'll use XPCOM interfaces. File picker To let the user select a file we'll use nsIFilePicker. ...
...the string paths. var path = fp.file.path; // work with returned nsILocalFile... } return path; } Hash function Firefox has built-in support for hash functions, exposed via the nsICryptoHash XPCOM interface The documentation page for that interface includes an example of calculating an MD5 hash of a file's contents, given its path. ...
...data back var hash = ch.finish(false); // convert the binary hash data to a hex string. ...
...And 2 more matches
Boxes - Archive of obsolete content
ontents In HTML you can use a DIV as a container and when the DIV changes size, the contents will wrap or adjust the layout. This does not happen with XUL BOX (or HBOX and VBOX) by default. However, you can easily add this capability with a style change. ...
...el value="SSS"/> <label value="TTT"/> <label value="UUU"/> <label value="VVV"/> <label value="WWW"/> <label value="XXX"/> <label value="YYY"/> <label value="ZZZ"/> </hbox> </window> Images If you put IMAGE in the contents, you should probably add align="start" attribute to the BOX. ...
... </hbox> </window> Images If you put IMAGE in the contents, you should probably add align="start" attribute to the BOX. ...
...And 2 more matches
Sidebar - Archive of obsolete content
closing with which ever extension going last "winning". Web panels sidebar Content such as web pages can be safely loaded as sidebar in the "viewWebPanelsSidebar". Bookmarks with "Load this bookmark in sidebar" checked in the properties open in the "viewWebPanelsSidebar". A web page can use window.sidebar to create bookmark with that property. To open a page in the "viewWebPanelsSidebar" from
chrome code (browser/addon/extension) such as from menuitem, it can call: openWebPanel(aTitle, aURI); Accessing the sidebar from a browser.xul script The sidebar content is always in a document separate from the main browser document (the sidebar is actually implemented as a XUL browser element). This means you can't directly access the sidebar content from a script referenced from a browser.xul over...
...our sidebar's window or document objects, you need to use the contentWindow or contentDocument properties of document.getElementById("sidebar") respectively. For example the code below calls a function defined in the sidebar's context: var sidebarWindow = document.getElementById("sidebar").contentWindow; // Verify that our sidebar is open at this moment: if (sidebarWindow.location.href == "
chrome://yourextension/content/whatever.xul") { // call "yourNotificationFunction" in the sidebar's context: sidebarWindow.yourNotificationFunction(anyArguments); } Testing which sidebar is open The sidebar content may contain different panels (bookmarks, history, webpanel, etc.) and sometimes one wants to only act on the sidebar when it contains a specific panel. The good practice to determine w...
... in the sidebar's context: sidebarWindow.yourNotificationFunction(anyArguments); } Testing which sidebar is open The sidebar content may contain different panels (bookmarks, history, webpanel, etc.) and sometimes one wants to only act on the sidebar when it contains a specific panel. ...
...And 2 more matches
Signing an XPI - Archive of obsolete content
n creating Mozilla XPI signed archives because it sorts the directory entries alphabetically, and Mozilla requires the first entry to be META-INF/zigbert.rsa. C:\Projects\CodeSigning\> md signed C:\Projects\CodeSigning\> copy C:\Projects\fsb\fsb.xpi signed 1 file(s) copied. ...
...I signed archives because it sorts the directory entries alphabetically, and Mozilla requires the first entry to be META-INF/zigbert.rsa. C:\Projects\CodeSigning\> md signed C:\Projects\CodeSigning\> copy C:\Projects\fsb\fsb.xpi signed 1 file(s) copied. C:\Projects\CodeSigning\> cd signed C:\Projects\CodeSigning\signed> unzip fsb.xpi Archive: fsb.xpi creating:
chrome/ inflating:
chrome.manifest inflating:
chrome/fsb.jar inflating: install.rdf C:\Projects\CodeSigning\signed> del fsb.xpi C:\Projects\CodeSigning\signed> cd .. Sign XPI C:\Projects\CodeSigning\> signtool -d . -k myTestCert -p "password" signed/ using certificate directory: . Generating signed//META-INF/manifest.mf file.. -->
chrome/fsb.jar -->
chrome.manifest --> install.rdf Generating zigbert.sf file.. tre...
...ith the META-INF/zigbert.rsa file listed first, then add the remaining files. C:\Projects\Certs\> cd signed C:\Projects\CodeSigning\signed\> zip fsb.xpi META-INF/zigbert.rsa adding: META-INF/zigbert.rsa (deflated 35%) C:\Projects\CodeSigning\signed> zip -r -D fsb.xpi * -x META-INF/zigbert.rsa adding: META-INF/manifest.mf (deflated 37%) adding: META-INF/zigbert.sf (deflated 40%) adding:
chrome/fsb.jar (deflated 74%) adding:
chrome.manifest (deflated 69%) adding: install.rdf (deflated 62%) Test your certificate To test your certificate, install it into your browser, and attempt to load the signed extension by following these steps: 1. Temporarily install the Test Certificate Authority into your Mozilla browser Rename the x509.cacert file generated earlier to x509.cert Import i...
...And 2 more matches
In-Depth - Archive of obsolete content
l now be split into two parts. At the top, there is a list of all the groups of styles that are applied to this object. When you select an item in the list the bottom portion will display the actual styles that are applied. Go through this list one item at a time and find the one which applies the image to the button (.toolbarButton-1). Look at the file column. It says that the file is located in
chrome://navigator/skin/. This is a small problem with the display in Mozilla 1.2 what it means is \navigator\navigator.css (Most of the time it displays the file correctly, but sometimes, like in this case, it does not). Go into \mySkin\navigator and load navigator.css. You'll notice that the .toolbar-1 class is located here. Now you can point the image to wherever you like. The image that is listed th...
...n/. This is a small problem with the display in Mozilla 1.2 what it means is \navigator\navigator.css (Most of the time it displays the file correctly, but sometimes, like in this case, it does not). Go into \mySkin\navigator and load navigator.css. You'll notice that the .toolbar-1 class is located here. Now you can point the image to wherever you like. ...
...Open up navigator.css, again (if you closed it), and look for the #back-button section. It has a -moz-image-region style in there which you can change. If you look through the rest of this file, you'll also notice that there are regions for the different states of #back-button. Change those to match your new image as well. ...
...And 2 more matches
Introduction to XUL - Archive of obsolete content
Warning: The content of this article may be out of date. Preamble Mozilla has configurable, downloadable
chrome, meaning that the arrangement and even presence or absence of controls in the main window is not hardwired into the application, but loaded from a separate UI description. In fact, most of Mozilla's windows (and dialogs) will be described using this mechanism. XUL (pronounced "zool," as if that spelling helped any, and short for "XML User Interface Language") is our name for the language in which these UI descriptions are built. Window
chrome is displayed and managed by the same layout engine that manages HTML content in the browser. UI descriptions, then, look a great deal like HTML 4. XUL is an application of XML. In fact, it is just XML with specific meaning define...
...mantics, there must always be associated stylesheets. Mozilla includes a standard stylesheet, "xul.css". You can load as many style sheets as you wish using repeated processing directives, although you should always make sure to load the xul.css file initially. And finally, any namespaces used in the document must be declared. So a XUL file will begin <?xml version="1.0"?> <?xml-stylesheet href="
chrome://global/skin/xul.css" type="text/css"?> <!DOCTYPE window> <window xmlns:html="http://www.w3.org/1999/xhtml" xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"> The HTML namespace is of course the standard one. The XUL namespace is obviously a temporary one, but at least serves to explain the pronunciation. Note that the above example is using an implicit XUL namespace. Thi...
...ozilla.org/keymaster/gatekeeper/there.is.only.xul"> The HTML namespace is of course the standard one. The XUL namespace is obviously a temporary one, but at least serves to explain the pronunciation. Note that the above example is using an implicit XUL namespace. This is optional; other examples in this document will on occasion belabor the namespace issue by declaring each use explicitly. The
chrome protocol is another Mozilla extension allowing the exact location of files involved in the
chrome description to be moved without affecting the XUL source. So it's just an indirection. Someday, there will be a complete description of this mechanism at packages, but for now there's a good but somewhat out of date document at Configurable
Chrome available for more information. Scripting A XUL in...
...And 2 more matches
Adding Style Sheets - Archive of obsolete content
ice to leave the defaults as is. Other times, however, you will want to provide a custom style sheet. In general, you will associate a single style sheet with each XUL file. You can place a style sheet anywhere you wish. If your XUL file is stored remotely and accessed via an HTTP URL, you can store the style sheet remotely as well. If you are creating a XUL package to be installed as part of the
chrome system, you have two choices. First, you could store the style sheet in the same directory as the XUL file. This method has the disadvantage because it means your application will not be themeable. The second method involves placing your files as part of a theme. Let's assume that we are building the find files dialog for themeability, because the find files dialog can be referred to with the ...
...tem, you have two choices. First, you could store the style sheet in the same directory as the XUL file. This method has the disadvantage because it means your application will not be themeable. The second method involves placing your files as part of a theme. Let's assume that we are building the find files dialog for themeability, because the find files dialog can be referred to with the URL
chrome://findfile/content/findfile.xul so the style sheet file will be stored in
chrome://findfile/skin/findfile.css. All the XUL examples so far have actually been using a style sheet already. The second line has always been: <?xml-stylesheet href="
chrome://global/skin/" type="text/css"?> This line indicates that we want to use the style provided by
chrome://global/skin/. In Mozilla, this will be tra...
... where a difference in layout might change the meaning of the element. However you should avoid this as much as possible. For installed files, you'll have to create or modify a manifest file and install the skin. Our Find Files Dialog Example Let's modify the find files dialog so that its style comes from a separate style file. First, the modifed lines of findfile.xul: <?xml-stylesheet href="
chrome://global/skin/" type="text/css"?> <?xml-stylesheet href="findfile.css" type="text/css"?> ... <spacer class="titlespace"/> <groupbox orient="horizontal"> <caption label="Search Criteria"/> <menulist id="searchtype"> <menupopup> <menuitem label="Name"/> <menuitem label="Size"/> <menuitem label="Date Modified"/> </menupopup> </menuli...
...And 2 more matches
Cross Package Overlays - Archive of obsolete content
or example, if Mail is not installed, there will be no New Message command. However, if Mail is installed, an overlay will be applied to the menu to add the New Message command. Below, we'll add a find files toolbar to the browser. It probably wouldn't be useful to have this feature, but we'll do it anyway. Mozilla allows you to add a list of overlays to the contents.rdf file that you use to list
chrome packages, skins and locales. Once you have created an overlay, you can add it to the contents.rdf file. Then add items, one for each window that you want the overlay to apply to. Our find files example First, let's create a simple overlay. It will just have a few elements for entering a filename and directory to search. Call the file foverlay.xul and add it to the findfile directory along wi...
...d Firefox 3 by duplicating the <code><span class="plain">' .. <toolbox> .. '</span></code> section with that ID. To add this overlay to the manifest file, we need to add two resources. First, we add one for each window that we are applying an overlay to. The code below should be added into contents.rdf just before the closing RDF tag. <RDF:Seq about="urn:mozilla:overlays"> <RDF:li resource="
chrome://navigator/content/navigator.xul"/> </RDF:Seq> This declares that we are adding a overlay window, a child of the root overlay node (urn:mozilla:overlays). You can add additional nodes for any other windows that you want to apply overlays to by adding additional li nodes. Next, we add a node for each overlay to apply to the window. In this case, we only have one, but we could apply others al...
...t we are adding a overlay window, a child of the root overlay node (urn:mozilla:overlays). You can add additional nodes for any other windows that you want to apply overlays to by adding additional li nodes. Next, we add a node for each overlay to apply to the window. In this case, we only have one, but we could apply others also. Add these lines just after the previous lines. <RDF:Seq about="
chrome://navigator/content/navigator.xul"> <RDF:li>
chrome://findfile/content/foverlay.xul</RDF:li> </RDF:Seq> Mozilla reads this information and builds a list of overlays that are applied to other windows. It stores this information in the
chrome/overlayinfo directory. You do not need to manually modify the files in this directory. It is automatically generated and modified when Mozilla is first...
...And 2 more matches
iframe - Archive of obsolete content
Methods | Related ] An inner frame that works much like the HTML <iframe> element. The src attribute can be used to specify the content of the frame. This content is a separate document. The children of the iframe are ignored. Currently, XUL iframes running in remote processes are not supported. If you want to run content in a remote process, use a XUL browser element. Warning: When used in
chrome-privileged documents (either HTML or XUL) such as Firefox addons, the contents of the frame may have the same permissions as Firefox itself. This can be a serious security vulnerability, for example if you use src="http://...". When used in this case, please see Displaying web content in an extension without security issues. More information is available in the XUL tutorial. Attributes show...
...nt area. Default is false. src Type: URI The URI of the content to appear in the element. type Type: one of the values below. The type of browser, which can be used to set access of the document loaded inside the browser. If this is not set, the loaded document has the same access as the window containing the browser. More precisely: The document loaded into a
chrome window is always of
chrome type. Subdocuments of
chrome documents are of
chrome type, unless the container element (one of iframe, browser or editor) has one of the special type attribute values (the common ones are content, content-targetable and content-primary) indicating that the subdocument is of content type. This boundary has a number of special effects, such as making window.top == window...
...The type attribute on all frames in content documents is ignored; subdocuments of content documents are always content documents. Warning: The type attribute must be set before the element is inserted into the document. content A browser for content. ...
...And 2 more matches
prefpane - Archive of obsolete content
since it will be loaded as an overlay to the main preferences window. More information is available in the Preferences System article. Attributes helpURI, image, label, onpaneload, selected, src Properties image, label, preferenceElements, preferences, selected, src Examples Methods preferenceForElement <prefpane id="paneGeneral" label="General" src="
chrome://path/to/paneOverlay.xul"/> or <prefpane id="paneGeneral" label="General" onpaneload="onGeneralPaneLoad(event);"> <preferences> <preference id="pref_one" name="extensions.myextension.one" type="bool"/> ... more preferences ... </preferences> <checkbox label="Number one?" preference="pref_one"/> ... more UI elements ... </prefpane> Attributes helpURI Type: URI ...
...lements, but instead below them. Otherwise the dialog will show erratic behavior and not display correctly. Place the <script> tags as in the following example for preference dialogs to work correctly: <prefwindow> <prefpane id="paneGeneral" label="General"> ... </prefpane> <prefpane id="paneSecurity" label="Security"> ... ...
...and not display correctly. Place the <script> tags as in the following example for preference dialogs to work correctly: <prefwindow> <prefpane id="paneGeneral" label="General"> ... </prefpane> <prefpane id="paneSecurity" label="Security"> ... ...
...And 2 more matches
Creating XULRunner Apps with the Mozilla Build System - Archive of obsolete content
should be fairly straightforward since you just have to copy and adapt the files from the McCoy repository. You'll learn a lot more by looking at the project files than you will from reading this drivel, but just to be safe let's run through the files one by one: Makefile.in - the top-level makefile. Contains the names of the subdirectories that need to be built, which at very least will include
chrome and app. build.mk - maybe you thought that the --enable-application option told Mozilla which directory your app is located in. Wrong! It tells Mozilla where to look for the build.mk file, which is what tells it where to start building your app. Don't think to hard about this, just copy McCoy's file and adapt accordingly. confvars.sh - some basic configuration options. You should be able to use t...
...pplication Packaging. In this case you can basically copy over the file as is, since once again variables are used for things like the application name and version. But you will have to change the ID to something unique to your app. default-prefs.js - these are the default Mozilla preferences used by XULRunner when running your app. The important ones are described in XULRunner:Specifying Startup
Chrome Window. You can add other preferences for things like debugging, as McCoy does (e.g. javascript.options.showInConsole). default.ico and default.xpm - Icons for your app on Windows and Linux. macbuild/ - When Steve Jobs said "think different", we took that to heart, and not just by rejecting useless adverbial endings. We've included a whole subdirectory just for the Mac. It's got a lot of stuff in...
...ust by rejecting useless adverbial endings. We've included a whole subdirectory just for the Mac. It's got a lot of stuff in it, but once again you can mostly ignore this and copy the whole directory over from McCoy. You will, however, need to change the name of the icon file in Info.plist.in. And, of course you'll need to replace mccoy.icns with the icon file to be used by your app on OS X. The
chrome/ subdirectory
Chrome for your application should be placed in the
chrome/ subdirectory as described in XUL Tutorial:XUL Structure.
Chrome will be packaged automatically by the build system, so you also need to specify which files get put into which packages by using JAR Manifests. In the case of McCoy, a separate manifest is used for content/, skin/ and locale/. This also means that you will need...
...And 2 more matches
MacFAQ - Archive of obsolete content
out" menu make sure that you use "aboutName" as the id for your menu item To enable the Mac "Preferences" menu make sure that you use "menu_preferences" as the id for your options/preferences menu item Toolbars Mac windows have a small "jelly bean" button in the top right corner. This button is used to show/hide the toolbar. The toolkit will automatically enable this behavior if you add class="
chromeclass-toolbar" to your <toolbar> element. Commandline Support Commandline handlers work great on the Mac IF it's a cold start. Here's how to implement command-line trapping when the app is already running, without getting into AppleEvents or c++ code. This is implemented in a pseudo "hidden window" technique and parsing the window arguments instead of command-line handlers and some of the toolk...
...mplement command-line trapping when the app is already running, without getting into AppleEvents or c++ code. This is implemented in a pseudo "hidden window" technique and parsing the window arguments instead of command-line handlers and some of the toolkit singleton window code. ...
...ow" technique and parsing the window arguments instead of command-line handlers and some of the toolkit singleton window code. ...
...And 2 more matches
Extentsions FAQ - Archive of obsolete content
customizes toolbar button to coexist in a toolbar palette and status bar? Option #3 Install Status Buttons 1.0 <https://addons.mozilla.org/firefox/1272/> "Lets you put toolbar buttons at either end of the status-bar. Just drag them there from the toolbar customisation window, like you would when adding buttons to the toolbars." Option #4 Install Toolbar Control <http://webdesigns.ms11.net/
chromeditp.html> Asking for help with getting an extension to process Windows messages. use WM_COPYDATA How to creating an extension that can replace HTML code on a specific page that does not use Greasemonkey? var newNode = document.createElement(" ... html content here ... "); var replaceMe = document.getElementById("replaceMe"); replaceMe.parentNode.replaceChild(newNode, replaceMe); Is i...
...n)? I have two states switching images in the tool bar and would have no problem implementing a third, so yes it's possible. ...
...bar-button").setAttribute("toolbar-button", "on"); //or document.getElementById("toolbar-button").setAttribute("toolbar-button","off"); //CSS #myExten-toolbar-button[myExten-toolbar-button="on"] { list-style-image: url("
chrome://myExten/skin/toolbar-button.png"); -moz-image-region: rect(0px 24px 24px 0px);} #myExten-toolbar-button[myExten-toolbar-button="off"] { list-style-image: url("
chrome://myExten/skin/toolbar-button-off.png"); -moz-image-region: rect(0px 24px 24px 0px);} To implement a third I would simply change add an attribute and the corresponding CSS See http://www.w3.org/TR/REC-CSS2/cascade.html#cascade Friday, October 13 - 20, 2006 (? top) How to get a refenece to the sidebar window Assuming you have
chrome privileges, this should work: var Ci = Components.i...
...And 2 more matches
XForms Custom Controls - Archive of obsolete content
This also includes content loaded from file:// URLs. It is possible to re-enable this by following the steps on Using Remote XUL. This is required for all examples here to run! Purpose You are in the right place if you would like to create your own custom renderings of the XForms controls like input, output, trigger, etc. We will also show you how to create custom controls that work with the XForms model and are automatically updated just like XForms controls. The purpose of this article is to give you enough background information so that you'll be able to get a good start. ...
...ple, in the Mozilla XForms extension we will render a combobox widget when appearance='minimal' on a select1 control. Should the form author instead choose to use appearance='compact' on this control, we would render a listbox widget. Here is a snippet from our .css file to show the type of CSS rule we would use to make such a determination. xf|select1[appearance="compact"] { -moz-binding: url('
chrome://xforms/content/select-xhtml.xml#xformswidget-select1-compact'); } The mediatype attribute can be used by the form author to align the type of presentation with the type of data that the bound instance node contains. For example, if mediatype='image/*' then the user should see the image that the bytes represent rather than just the byte sequence. xf|output[mediatype^="image"] { -moz-binding: ...
...orms/content/select-xhtml.xml#xformswidget-select1-compact'); } The mediatype attribute can be used by the form author to align the type of presentation with the type of data that the bound instance node contains. For example, if mediatype='image/*' then the user should see the image that the bytes represent rather than just the byte sequence. xf|output[mediatype^="image"] { -moz-binding: url('
chrome://xforms/content/xforms-xhtml.xml#xformswidget-output-mediatype-anyURI'); } Custom Data Types If you define a new schema data type or you use a built-in data type and find the current XForms control for this type to be insufficient, then you should write a new custom control. For example, if you have an instance node of type xsd:date and you'd like to see the date displayed in a local format. In...
...And 2 more matches
Index - MDN Web Docs Glossary: Definitions of Web-related terms
gInt is a numeric data type that can represent integers in the arbitrary precision format. In other programming languages different numeric types can exist, for examples: Integers, Floats, Doubles, or Bignums. 31 Blink Glossary, Infrastructure, Layout, Rendering engine Blink is an open-source browser layout engine developed by Google as part of Chromium (and therefore part of
Chrome as well). Specifically, Blink began as a fork of the WebCore library in WebKit, which handles layout, rendering, and DOM, but now stands on its own as a separate rendering engine. 32 Block Disambiguation, Glossary The term block can have several meanings depending on the context. It may refer to: 33 Block (CSS) CSS, CodingScripting, Design, Glossary, HTML ...
...s for different textual interpretations. By specifying a particular encoding (such as UTF-8), we specify how the sequence of bytes is to be interpreted. 73 Character set Glossary, character encoding, character set A character set is an encoding system to let computers know how to recognize Character, including letters, numbers, punctuation marks, and whitespace. 74
Chrome Browser,
Chrome, Glossary, WebMechanics In a browser, the
chrome is any visible aspect of a browser aside from the webpages themselves (e.g., toolbars, menu bar, tabs). This is not to be confused with the Google
Chrome browser. 75 Cipher Cryptography, Glossary, Privacy, Security In cryptography, a cipher is an algorithm that can encode cleartext to make it unreadabl...
...y A glyph is a term used in typography for the visual representation of one or more characters. 176 Gonk Boot2Gecko, Firefox OS, Glossary, Gonk, Infrastructure, Intro Gonk is the lower-level operating system of Firefox OS and consists of a Linux kernel (based on the Android Open Source Project (AOSP)) and userspace hardware abstraction layer (HAL). 177 Google
Chrome Browser,
Chrome canary,
Chrome stable, Chromium, Glossary, WebMechanics, google
chrome Google
Chrome is a free Web browser developed by Google. It's based on the Chromium open source project. Some key differences are described on the Chromium wiki.
Chrome supports its own layout called Blink. Note that the iOS version of
Chrome uses that platform's WebView, not Blink. 178 Gra...
...And 2 more matches
What are browser developer tools? - Learn web development
If you can't see the Develop menu, go to Safari ? Preferences ? Advanced, and check the Show Develop menu in menu bar checkbox. Opera: Developer ? Developer tools Context menu: Press-and-hold/right-click an item on a webpage (Ctrl-click on the Mac), and choose Inspect Element from the context menu that appears. (An a...
...at a glance what padding, border and margin is applied to it, and how big its content is. Grid: If the page you are inspecting uses CSS Grid, this section allows you to view the grid details. Fonts: In Firefox, the Fonts tab shows the fonts applied to the current element. Find out more Find more out about the Inspector in different browsers: Firefox Page inspector IE DOM Explorer
Chrome DOM inspector (Opera's inspector works the same as this) Safari DOM inspector and style explorer The JavaScript debugger The JavaScript debugger allows you to watch the value of variables and set breakpoints, places in your code that you want to pause execution and identify the problems that prevent your code from executing properly. To get to the debugger: Firefox: Select ? Web Develope...
...ript debugger allows you to watch the value of variables and set breakpoints, places in your code that you want to pause execution and identify the problems that prevent your code from executing properly. To get to the debugger: Firefox: Select ? Web Developer ? Debugger or press Ctrl + Shift + S to open the JavaScript Debugger. If the tools are already displayed, click on the Debugger tab.
Chrome: Open the Developer tools and then select the Sources tab. (Opera works the same way.) Edge and Internet Explorer 11: Press F12 and then, Ctrl + 3, or if the tools are already displayed, click on the Debugger tab. Safari: Open the Developer Tools and then select the Debugger tab. Exploring the debugger There are three panes in the JavaScript Debugger on Firefox. File list The first pane on ...
...And 2 more matches
Handling common HTML and CSS problems - Learn web development
iv> <label for="date">Enter a date:</label> <input id="date" type="date"> </div> <div> <label for="time">Enter a time:</label> <input id="time" type="time"> </div> </form> Note: You can also see this running live as forms-test.html on GitHub (see the source code also). If you view the example on a supporting browser like desktop/Android
Chrome or iOS Safari, you'll see the special widgets/features in action as you try to input data. On a non-supporting platform such as Firefox or Internet Explorer, the inputs will just fallback to normal text inputs, so at least the user can still enter some information. Note: Of course, this may not be a great solution for your project's needs -- the difference in visual presentation is not great, p...
...set of problems comes with CSS prefixes -- these are a mechanism originally used to allow browser vendors to implement their own version of a CSS (or JavaScript) feature while the technology is in an experimental state, so they can play with it and get it right without conflicting with other browser's implementations, or the final unprefixed implementations. ...
... The last three lines show three different versions of the linear-gradient() function, which is used to generate a linear gradient in the background of an element: The first one has a -moz- prefix, and shows a slightly older version of th...
...And 2 more matches
Introduction to cross browser testing - Learn web development
dea by looking at other sources, such as usage stats for competitors, or countries the site will be serving. You can also use a bit of intuition. So for example, you might be building an e-commerce site that serves customers in North America. The site should work entirely in the last few versions of the most popular desktop and mobile (iOS, Android, Windows phone) browsers -- this should include
Chrome (and Opera as it is based on the same rendering engine as
Chrome), Firefox, IE/Edge, and Safari. It should also provide an acceptable experience on IE 8 and 9, and be accessible with WCAG AA compliance. Now you know your target testing platforms, you should go back and review the required featureset and what technologies you are going to use. For example, if the e-commerce site owner wants a Web...
...s that you test each small part before committing it -- don't leave all the testing till the end! Testing/discovery After each implementation phase, you will need to test the new functionality. To start with, you should make sure there are no general issues with your code that are stopping your feature from working: Test it in a couple of stable browsers on your system, like Firefox, Safari,
Chrome, or IE/Edge. Do some lo-fi accessibility testing, such as trying to use your site with only the keyboard, or using your site via a screen reader to see if it is navigable. Test on a mobile platform, such as Android or iOS. At this point, fix any problems you find with your new code. Next, you should try expanding your list of test browsers to a full list of target audience browsers and start...
...fix any problems you find with your new code. Next, you should try expanding your list of test browsers to a full list of target audience browsers and start concentrating on weeding out cross browser issues (see the next article for more information on determining your target browsers). For example: Try to test the latest change on all the modern desktop browsers you can -- including Firefox,
Chrome, Opera, IE, Edge, and Safari on desktop (Mac, Windows, and Linux, ideally). Test it in common phone and tablet browsers (e.g. iOS Safari on iPhone/iPad,
Chrome and Firefox on iPhone/iPad/Android), Also do tests in any other browsers you have included inside your target list. The most lo-fi option is to just do all the testing you can by yourself (pulling in team mates to help out if you are w...
...And 2 more matches
Theme concepts
lowing video: If you have not built a browser extension before, check out Your first extension for a step-by-step guide. Cross-browser compatibility There is currently limited compatibility between themes in the major browsers. Opera takes an entirely different approach, and Microsoft Edge themes are not yet open to developers. ...
... extension for a step-by-step guide. Cross-browser compatibility There is currently limited compatibility between themes in the major browsers. Opera takes an entirely different approach, and Microsoft Edge themes are not yet open to developers. There is good compatibility between Firefox static themes and
Chrome themes, providing the ability to port a single header image theme from Firefox to
Chrome. ...
...between themes in the major browsers. Opera takes an entirely different approach, and Microsoft Edge themes are not yet open to developers. There is good compatibility between Firefox static themes and
Chrome themes, providing the ability to port a single header image theme from Firefox to
Chrome. However, noting that "frame": and "tab_background_text": only support RGB color array definition on
Chrome. ...
...And 2 more matches
Limitations of frame scripts
Frame scripts run with system privileges and have access to the Components object, enabling them to use XPCOM objects and JSMs. Many privileged APIs will just work in a content process. Anything that just manipulates data structures will just work. XHR and Workers will work. However, some APIs that work in the
chrome process will not work in a frame script. This article lists the most important of these APIs. File I/O You should not write to or read from the disk from a frame script, in particular, the profile directory. Even if this is possible, you should not do it and may expect that it could stop working at any time. File I/O should all be done in the
chrome process. For example: nsIFileInputStream nsIFileOutputStream Constructing a File from a string or nsIFile (but File obje...
...etFileNameArray (alternative: mozSetFileArray) file: URIs, see bug 1187099 <...> XUL and browser UI Anything that tries to touch the browser UI or anything to do with XUL is likely not to work in the content process. For example: nsIPromptService nsIFilePicker nsIXUL* <need more examples> Services Some services will not work in frame scripts. Services.search Services.downloads
Chrome windows Anything that needs to use
Chrome windows will not work in the content process. For example: nsISessionStore nsIWindowMediator <need more examples> Places API The Places API can't be used inside a frame script. For example: nsINavHistoryService nsINavBookmarksService Observers in the content process As noted in Observers in the
chrome process, most observers should be regi...
...hing that needs to use
Chrome windows will not work in the content process. For example: nsISessionStore nsIWindowMediator <need more examples> Places API The Places API can't be used inside a frame script. For example: nsINavHistoryService nsINavBookmarksService Observers in the content process As noted in Observers in the
chrome process, most observers should be registered in the
chrome process and will not work in the content process. The exceptions are: content-document-global-created document-element-inserted outer-window-destroyed inner-window-destroyed dom-window-destroyed These must be registered in the content process. QI from content window to
chrome window There's a particular pattern often used to get from a content window to the associated
chrome window. It...
...And 2 more matches
PromiseWorker.jsm
The PromiseWorker object is used to deliver all of the OS.File functionality to the main thread. ...
... The PromiseWorker object is used to deliver all of the OS.File functionality to the main thread. ...
... The PromiseWorker object is used to deliver all of the OS.File functionality to the main thread. Here is the test case from Firefox codebase: Mozilla DXR :: test_Promise.js. ...
...And 2 more matches
Using JavaScript code modules
a code module, be sure to change the application's build ID (e.g., the version) before your next test run; otherwise, you may find yourself running the previous version of your module's code. The URL for a code module As you can see from the example above, you need a URL to import a code module. (The URL in the example is "resource://app/my_module.jsm".) Code modules can only be loaded using a
chrome: (), resource:, or file: URL. If you're writing an extension for Firefox 4 and already have a
chrome.manifest with a content instruction in it, you can put the code module in your content folder and reference it like your other content files via
chrome://<yourextension>/content/<yourmodule>.jsm. If your extension or application needs to support Mozilla 1.9.x (Firefox 3.x), you should register...
...L runtime The <relative-path> can be multiple levels deep and is always relative to the location defined by the <alias>. The common relative path is "modules" and is used by XUL Runner and Firefox. Code modules are simple JavaScript files with a .js or .jsm extension. <alias> must be unique to your add-on, as the application and other extensions share the same namespace for all aliases. ...
...e common relative path is "modules" and is used by XUL Runner and Firefox. Code modules are simple JavaScript files with a .js or .jsm extension. <alias> must be unique to your add-on, as the application and other extensions share the same namespace for all aliases. ...
...And 2 more matches
Bootstrapping a new locale
l making sure you are *not* inside mozilla-1.9.x/ and then run the following commands. Warning: Don't copy and paste these commands; you need to replace "ab-CD" with your language identifier first and 1.9.x with the most current release branch. For instance, Firefox 3.6 is released from the 1.9.2 branch. ...
...e needs some corrections, (see expected structure below $cd ab-CD/browser/
chrome/browser) may be needs $cp -R mozilla-1.9.x/browser/locales/ ab-CD and then $mv ab-CD/en-US ab-CD/browser and the same for the others the commands seems symbolic and not real ... see also structure expected more below. ...
...e also structure expected more below. ...
...And 2 more matches
powermetrics
91.42 42.12 204.47 plugin-container 84628 377.22 37.18 43.91 18.56 178.65 75.85 17.29 Terminal 694 9.86 79.94 0.00 0.00 4.39 2.20 0.00 powermetrics 84694 1.21 31.53 0.00 0.00 0.20 0.20 0.00 com.google.
Chrome 489 233.83 48.10 25.95 0.00 Google
Chrome Helper 84688 181.57 92.81 0.00 0.00 23.95 12.77 0.00 Google
Chrome 84681 57.26 76.07 4.39 0.00 23.75 12.97 0.00 Google
Chrome Helper 84685 0.13 48.08 0.00 ...
...ox 84496 76.70 89.18 10.58 5.59 124.55 63.48 0.00 This sample was taken while the following programs were running: Firefox Beta (single process, invoked from the Mac OS dock, shown in the org.mozilla.firefox coalition.) Firefox Nightly (multi-process, invoked from the command line, shown in the com.apple.Terminal coalition.) Google
Chrome. Safari. The grouping of parent and child processes (in coalitions) is obvious. The meaning of the columns is as follows. Name: Coalition/process name. Process names within coalitions are indented. ID: Coalition/process ID number. CPU ms/s: CPU time used by the coalition/process, per second, during the sample period. The sum of the process values typically exceeds the coalition value slig...
...ver. Run with the --show-all to see all of these at once, but note that you'll need a very wide window to see all the data. Also note that powermetrics -h is a better guide to the the command-line options than man powermetrics. ...
...And 2 more matches
Packaging WebLock
pplications, Mozilla extensions, or individual components. The installation script for the WebLock component can also be used to register the component with the browser into which it is installed (see Registration Methods in XPCOM for more information on registration). The sample installation script shown below uses the Mozilla XPInstall technology to manipulate an installer and talk to Mozilla's
chrome registry as high-level JavaScript objects. What Is the
Chrome Registry? Like the Windows registry, the
chrome registry is a database of information about applications, skins, and other extensions that have been installed in a Gecko application. Since Mozilla and other Gecko-based applications are cross-platform, this database is abstracted above the operating system or any particular platform'...
...-level JavaScript objects. What Is the
Chrome Registry? Like the Windows registry, the
chrome registry is a database of information about applications, skins, and other extensions that have been installed in a Gecko application. Since Mozilla and other Gecko-based applications are cross-platform, this database is abstracted above the operating system or any particular platform's registry. The
chrome registry lives in a series of RDF/XML files in the application directory of Mozilla and other Gecko-based browsers, where new installs, user configurable data, skins, and other information are related to one another and the application itself. JavaScript APIs from the XPInstall Install object download the JAR in which the installable files appear and call registration methods that tell Mozilla ...
...and its contents should look like this: weblock.xpi Archive Viewed in WinZIP Note that the top level of the archive holds the install.js installation file, an RDF manifest for the package as a whole, and the component files (weblock.xpt and weblock4.dll). The component files are copied to the components directory of the Gecko application, and the weblock subdirectory gets copied over into the
chrome subdirectory, where its UI resources can be added dynamically to the XUL-based Gecko application. The next section shows how this process of downloading, copying and registering the necessary files from the XPI can be achieved with an XPInstall installation script. The WebLock Installation Script The installation script is the JavaScript file that is stored within the XPI. It must appear at th...
...And 2 more matches
nsIPushService
id unsubscribe(in DOMString scope, in nsIPrincipal principal, in nsIUnsubscribeResultCallback callback); Methods subscribe() Creates a push subscription. void subscribe( in DOMString scope, in nsIPrincipal principal, in nsIPushSubscriptionCallback callback ); Parameters scope The ServiceWorkerRegistration.scope for a service worker subscription, or a unique URL (for example,
chrome://my-module/push) for a system subscription. principal The nsIPrincipal to associate with the subscription. Privileged code should pass the system principal. callback The callback to call when the nsIPushSubscription is created. Passing the system principal exempts the subscription from permission checks and background messages quotas, which are enforced for service worker subscriptions. ...
...enforced for service worker subscriptions. Example const { classes: Cc, interfaces: Ci, utils: Cu } = Components; const scriptSecurityManager = Cc["@mozilla.org/scriptsecuritymanager;1"] .getService(Ci.nsIScriptSecurityManager); const pushService = Cc["@mozilla.org/push/Service;1"] .getService(Ci.nsIPushService); pushService.subscribe( "
chrome://my-module/push", scriptSecurityManager.getSystemPrincipal(), (code, subscription) => { if (!Components.isSuccessCode(code)) { Cu.reportError("Error creating subscription: " + code); return; } // `subscription` implements `nsIPushSubscription`. subscription.endpoint; subscription.getKey("p256dh"); subscription.getKey("auth"); } ); getSubscription() Fe...
...oid getSubscription( in DOMString scope, in nsIPrincipal principal, in nsIPushSubscriptionCallback callback ); Parameters scope The unique scope URL, as passed to nsIPushService.subscribe(). principal The subscription nsIPrincipal, as passed to nsIPushService.subscribe(). callback The callback to call with the fetched nsIPushSubscription. Example pushService.getSubscription( "
chrome://my-module/push", scriptSecurityManager.getSystemPrincipal(), (code, subscription) => { if (!Components.isSuccessCode(code)) { Cu.reportError("Error fetching subscription: " + code); return; } // `subscription == null` if the `(scope, principal)` pair doesn't have a // push subscription. Otherwise, it's an instance of `nsIPushSubscription`. } ); unsubscribe() ...
...And 2 more matches
Building a Thunderbird extension 2: extension file layout
Warning: This content is for older versions of Thunderbird. Much of it may no longer be relevant. See developer.thunderbird.net for newer information. Extensions are packaged and distributed in archive files (also known as Bundles), with the XPI (pronounced "zippy") file extension. At a minimum, they contain an install.rdf, the
chrome.manifest and a
chrome/ folder. A content/ folder sometimes contains the actual content files. ...
...the
chrome.manifest and a
chrome/ folder. A content/ folder sometimes contains the actual content files. These files contain the code that makes your extension actually do something. ...
...es contains the actual content files. These files contain the code that makes your extension actually do something. ...
...And 2 more matches
Introduction to DOM Inspector - Firefox Developer Tools
elect the desired document a few different ways. Inspecting Content Documents The Inspect Content Document menupopup can be accessed from the File menu, and it will list currently loaded content documents. In Firefox and SeaMonkey browser, these will be the webpages you have opened in tabs. For Thunderbird and SeaMonkey Mail and News, any messages you're viewing will be listed here. Inspecting
Chrome Documents The Inspect
Chrome Document menupopup can be accessed from the File menu , and it will contain the list of currently loaded
chrome windows and subdocuments. A browser window and the DOM Inspector are likely be already open and displayed in this list. The DOM Inspector keeps track of all the windows that are open, so to inspect the DOM of a particular window in the DOM Inspector, simply...
...nspecting arbitrary URLs You may also inspect the DOM of arbitrary URLs by using the Inspect a URL menuitem in the File menu, or by just entering a URL into the DOM Inspector's address bar and clicking Inspect or pressing enter. For example, you can enter http://www.mozilla.org in the address bar and see the DOM structure of the mozilla.org home page. You should not use this approach to inspect
chrome documents. Instead, ensure that the document loads via normal means and use the Inspect
Chrome Document menupopup to select it for inspection. When you inspect a web page with this method, a browser pane at the bottom of the DOM Inspector window will open up, displaying the web page. This allows you to use the DOM Inspector without having to use a separate browser window, or without embedding ...
...g the web page. This allows you to use the DOM Inspector without having to use a separate browser window, or without embedding a browser in your application at all. If you find that the browser pane takes up too much space, you may close it, but you will not be able to observe any of the visual consequences of your actions. Using the DOM Inspector Once you've opened the document for the page or
chrome you are interested in, you'll see that it loads the DOM Nodes viewer in the document pane and the DOM Node viewer in the object pane. In the DOM Nodes viewer, there should be a structured, hierarchical view of the DOM. By clicking around in the document pane, you'll see that the viewers are linked; whenever you select a new node from the DOM Nodes viewer, the DOM Node viewer is automatically upda...
...And 2 more matches
DynamicsCompressorNode() - Web APIs
on Status Comment Web Audio APIThe definition of 'DynamicsCompressorNode()' in that specification. Working Draft Initial definition. Browser Compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... of 'DynamicsCompressorNode()' in that specification. Working Draft Initial definition. Browser Compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...ity The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...And 2 more matches
Element.scroll() - Web APIs
CSS Object Model (CSSOM) View ModuleThe definition of 'element.scroll()' in that specification. Working Draft Initial definition. Browser Compatibility The compatibility table in this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...n of 'element.scroll()' in that specification. Working Draft Initial definition. Browser Compatibility The compatibility table in this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
.... Browser Compatibility The compatibility table in this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...And 2 more matches
Element.scrollTo() - Web APIs
ent CSS Object Model (CSSOM) View ModuleThe definition of 'element.scrollTo()' in that specification. Working Draft Initial definition. Browser Compatibility The compatibility table in this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...inition of 'element.scrollTo()' in that specification. Working Draft Initial definition. Browser Compatibility The compatibility table in this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...on. Browser Compatibility The compatibility table in this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...And 2 more matches
FileSystemDirectoryReader.readEntries() - Web APIs
Status Comment File and Directory Entries API Draft Draft of proposed API This API has no official W3C or WHATWG specification. Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...s API Draft Draft of proposed API This API has no official W3C or WHATWG specification. Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...bility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...And 2 more matches
Introduction to the File and Directory Entries API - Web APIs
he. The API is a better choice for apps that deal with blobs for the following reasons: The File and Directory Entries API offers client-side storage for use cases that are not addressed by databases. If you want to have large mutable chunks of data, the File and Directory Entries API is a much more efficient storage solution than a database. ...
...ice for apps that deal with blobs for the following reasons: The File and Directory Entries API offers client-side storage for use cases that are not addressed by databases. If you want to have large mutable chunks of data, the File and Directory Entries API is a much more efficient storage solution than a database. ...
...ries API offers client-side storage for use cases that are not addressed by databases. If you want to have large mutable chunks of data, the File and Directory Entries API is a much more efficient storage solution than a database. While Firefox supports blob storage for IndexedDB,
Chrome currently does not (
Chrome is still implementing support for blob storage in IndexedDB). If you are targeting
Chrome for your app and you want to store blobs, the File and Directory Entries API and App Cache are your only choices. However, AppCache storage isn't locally mutable, and doesn't allow for fine-grained client-side management. In
Chrome, you can use the File and Directory Entries API with the Quota Management API, which lets you ask for more storage and manage your storage quota. Sample use cases ...
...And 2 more matches
HTMLInputElement.webkitEntries - Web APIs
type file, but only if that selection was made using drag-and-drop: selecting a file in the dialog will leave the property empty (bug 1326031). The array can only contain directories if the webkitdirectory property is true. This means the <input> element was configured to let the user choose directories. This property is called webkitEntries in the specification due to its origins as a Google
Chrome-specific API. It's likely to be renamed someday. Syntax var entries = HTMLInputElement.webkitEntries; Value An array of objects based on FileSystemEntry, each representing one file which is selected in the <input> element. More specifically, files are represented by FileSystemFileEntry objects, and, if they're allowed, directories are represented by FileSystemDirectoryEntry objects. Example...
...ries APIThe definition of 'webkitEntries' in that specification. Draft Initial specification. This API has no official W3C or WHATWG specification. Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...ion. Draft Initial specification. This API has no official W3C or WHATWG specification. Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...And 2 more matches
IDBCursor.key - Web APIs
' in that specification. Recommendation Indexed Database API DraftThe definition of 'key' in that specification. Recommendation Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...exed Database API DraftThe definition of 'key' in that specification. Recommendation Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...n Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...And 2 more matches
IDBDatabase.transaction() - Web APIs
later) you can force a transaction to flush to disk before delivering the complete event by creating a transaction using the experimental (non-standard) readwriteflush mode (see IDBDatabase.transaction.) This is currently experimental, and can only be used if the dom.indexedDB.experimental pref is set to true in about:config. details Optional Dictionary of other settings, supported only by
Chrome: Return value An IDBTransaction object. Exceptions This method may raise a DOMException of one of the following types: Exception Description InvalidStateError The close() method has previously been called on this IDBDatabase instance. NotFoundError An object store specified in in the storeNames parameter has been deleted or removed. ...
...at specification. Recommendation Indexed Database API DraftThe definition of 'transaction()' in that specification. Recommendation Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...abase API DraftThe definition of 'transaction()' in that specification. Recommendation Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...And 2 more matches
IDBIndex.name - Web APIs
' in that specification. Recommendation Indexed Database API DraftThe definition of 'name' in that specification. Recommendation Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...exed Database API DraftThe definition of 'name' in that specification. Recommendation Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...n Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...And 2 more matches
NodeList.prototype.forEach() - Web APIs
Specifications Specification Status Comment Web IDLThe definition of 'forEach' in that specification. Candidate Recommendation Defines forEach on iterable declarations Browser Compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/m...
... Comment Web IDLThe definition of 'forEach' in that specification. Candidate Recommendation Defines forEach on iterable declarations Browser Compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...in that specification. Candidate Recommendation Defines forEach on iterable declarations Browser Compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...And 2 more matches
OfflineAudioCompletionEvent.OfflineAudioCompletionEvent() - Web APIs
Status Comment Web Audio APIThe definition of 'OfflineAudioCompletionEvent()' in that specification. Working Draft Initial definition. Browser Compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...OfflineAudioCompletionEvent()' in that specification. Working Draft Initial definition. Browser Compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...And 2 more matches
PaymentResponse.complete() - Web APIs
mment Payment Request APIThe definition of 'PaymentResponse: complete' in that specification. Candidate Recommendation Initial definition. Browser Compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...Response: complete' in that specification. Candidate Recommendation Initial definition. Browser Compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... Browser Compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...And 2 more matches
PaymentResponse.details - Web APIs
e server }); Specifications Specification Status Comment Payment Request API Candidate Recommendation Initial definition. Browser Compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...us Comment Payment Request API Candidate Recommendation Initial definition. Browser Compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...on. Browser Compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...And 2 more matches
PaymentResponse.payerEmail - Web APIs
.payerEmail; Specifications Specification Status Comment Payment Request API Candidate Recommendation Initial definition. Browser Compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...us Comment Payment Request API Candidate Recommendation Initial definition. Browser Compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... Browser Compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...And 2 more matches
PaymentResponse.shippingAddress - Web APIs
(details); } Specifications Specification Status Comment Payment Request API Candidate Recommendation Initial definition. Browser Compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...tus Comment Payment Request API Candidate Recommendation Initial definition. Browser Compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... Browser Compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...And 2 more matches
PaymentResponse.shippingOption - Web APIs
details); } Specifications Specification Status Comment Payment Request API Candidate Recommendation Initial definition. Browser Compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...us Comment Payment Request API Candidate Recommendation Initial definition. Browser Compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... Browser Compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...And 2 more matches
StereoPannerNode.StereoPannerNode() - Web APIs
fication Status Comment Web Audio APIThe definition of 'StereoPannerNode()' in that specification. Working Draft Initial definition. Browser Compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...nition of 'StereoPannerNode()' in that specification. Working Draft Initial definition. Browser Compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...atibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...And 2 more matches
Window.open() - Web APIs
"DescriptiveWindowName", "resizable,scrollbars,status" ); } If a window with the name already exists, then url is loaded into the existing window. In this case the return value of the method is the existing window and windowFeatures is ignored. Providing an empty string for url is a way to get a reference to an open window by its name without changing the window's location. On Firefox and
Chrome (at least), this only works from the same parent, ie. if the current window is the opener of the window you try to get an handle on. Otherwise the call to window.open() will just create a new window. To open a new window on every call of window.open(), use the special value _blank for windowName. Note on the use of window.open() to reopen an existing window with name windowName : This function...
...a new window on every call of window.open(), use the special value _blank for windowName. Note on the use of window.open() to reopen an existing window with name windowName : This functionality is not valid for all browsers and more with variable conditions. Firefox (50.0.1) functions as described: from the same domain+port reopen with same name will access the previously created window. Google
Chrome (55.0.2883.87 m ) on the other hand will do it only from the same parent (as if the window was created dependent, which is the "opener"). This is a wide limitation and generates unbelievable complexity of development. Firefox (51.) gets the handle but cannot run any Element.focus() while
Chrome can run focus() from opener to child but not between siblings nor, reverse, from child to opener. This ...
...t window resizing borders. outerHeight (only on Firefox, obsolete from Firefox 80) Specifies the height of the whole browser window in pixels. This outerHeight value includes any/all present toolbar, window horizontal scrollbar (if present) and top and bottom window resizing borders. Minimal required value is 100. Toolbar and UI parts features In modern browsers (Firefox 76 or newer, Google
Chrome, Safari, Chromium Edge), the following features are just a condition for whether to open popup or not. See popup condition section. The following features control the visibility of each UI parts, All features can be set to yes or 1, or just be present to be on. Set them to no or 0, or in most cases just omit them, to be off. Example: status=yes, status=1, and status have identical results. ...
...And 2 more matches
Window.print() - Web APIs
cation Specification Status Comment HTML Living StandardThe definition of 'print()' in that specification. Living Standard Browser Compatibility The compatibility table in this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... HTML Living StandardThe definition of 'print()' in that specification. Living Standard Browser Compatibility The compatibility table in this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...rd Browser Compatibility The compatibility table in this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...And 2 more matches
Window.requestFileSystem() - Web APIs
The non-standard Window method requestFileSystem() method is a Google
Chrome-specific method which lets a web site or app gain access to a sandboxed file system for its own use. The returned FileSystem is then available for use with the other file system APIs. Even compared to the rest of the File and Directory Entries API, requestFileSystem() is especially non-standard; only
Chrome implements it, and all other browser makers have decided that they will not implement it. It has even been removed from the proposed specification. Do not use this method! Syntax This method is prefixed with webkit in all browsers that implement it (that is, Google
Chrome). window.requestFileSystem(type, size, successCallback[, errorCallback]); Parameters type The type of storage to request. Specify W...
... Status Comment File and Directory Entries API Draft Draft of proposed API This API has no official W3C or WHATWG specification. Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...s API Draft Draft of proposed API This API has no official W3C or WHATWG specification. Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...And 2 more matches
Window.setCursor() - Web APIs
The Window.setCursor() method sets the cursor for the current window. Example function setBusyCursor(enable) { window.setCursor(enable ? ...
...ndow interface. This function is unavailable to web pages, which can use the CSS cursor property instead. Specification This is not part of any specification. Browser Compatibility The compatibility table in this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...hich can use the CSS cursor property instead. Specification This is not part of any specification. Browser Compatibility The compatibility table in this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...And 2 more matches
Window.showModalDialog() - Web APIs
The Window.showModalDialog() created and displayed a modal dialog box containing a specified HTML document. Syntax returnVal = window.showModalDialog(uri[, arguments][, options]); returnVal holds the returnValue property as set by the document specified by uri. uri is the URL of the document to display in the dialog. arguments is an optional variant containing values passed to the dialog; these are made available in the window object's window.dialogArguments property. ...
... standardized as part of HTML5. The third argument for additional options was not present in the HTML5 version. Specification MSDN page for showModalDialog Browser compatibility The compatibility table in this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...ional options was not present in the HTML5 version. Specification MSDN page for showModalDialog Browser compatibility The compatibility table in this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...And 2 more matches
Window.updateCommands() - Web APIs
Syntax window.updateCommands("sCommandName") Parameters sCommandName is a particular string which describes what kind of update event this is (e.g. whether we are in bold right now). Notes This enables or disables items (setting or clearing the "disabled" attribute on the command node as appropriate), or ensures that the command state reflects the state of the selection by setting current state information in the "state" attribute of the XUL command nodes. Specification DOM Level 0. Not part of specification. Browser Compatibility The compatibility table in this page is generated from structured data. ...
...of the selection by setting current state information in the "state" attribute of the XUL command nodes. Specification DOM Level 0. Not part of specification. Browser Compatibility The compatibility table in this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... "state" attribute of the XUL command nodes. Specification DOM Level 0. Not part of specification. Browser Compatibility The compatibility table in this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...And 2 more matches
Viewport concepts - CSS: Cascading Style Sheets
he browser window, which can be as big as the viewport or smaller, and the document is the website, which can be much taller or wider than the viewport. To recap, the viewport is basically the part of the document that is currently visible. Viewport sizes are mutable The width of the viewport is not always the width of the window. ...
....clientWidth is the inner width of a document in CSS pixels, including padding (but not borders, margins, or vertical scrollbars, if present). This is the viewport width. The Window.innerWidth is the width, in CSS pixels, of the browser window viewport including, if rendered, the vertical scrollbar. The Window.outerWidth is the width of the outside of the browser window including all the window
chrome. In an experiment with these, the innerWidth and outerWidth was seen to be the same, but the outerHeight was 100px taller than the innerHeight. This is because the outerHeight includes the browser
chrome: measurements were taken on a browser with an address bar and bookmarks bar totalling 100px in height, but no
chrome on the left or right of the window. The area within the innerHeight and inn...
... When zoomed in, both Firefox and
Chrome report the new CSS pixel size for innerWidth and clientWidth. ...
...And 2 more matches
Adapting to the new two-value syntax of display - CSS: Cascading Style Sheets
e values, while allowing the spec to evolve. Can I start to use the two-value syntax? As demonstrated above, there is not a lot of advantage in using the two-value version right now; if you did your page would only work in Firefox! Other browsers do not yet implement the two-value versions. Therefore display: block flex will only get you flex layout in Firefox, and will be ignored as invalid in
Chrome. ...
...refore display: block flex will only get you flex layout in Firefox, and will be ignored as invalid in
Chrome. You can see current support in the compat data for the two-value syntax: The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...Firefox, and will be ignored as invalid in
Chrome. You can see current support in the compat data for the two-value syntax: The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...And 2 more matches
letter-spacing - CSS: Cascading Style Sheets
endation Initial SVG definition. CSS Level 1The definition of 'letter-spacing' in that specification. Recommendation Initial definition. Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...definition of 'letter-spacing' in that specification. Recommendation Initial definition. Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...And 2 more matches
mix-blend-mode - CSS: Cascading Style Sheets
t Compositing and Blending Level 1The definition of 'mix-blend-mode' in that specification. Candidate Recommendation Initial definition Browser compatibility The compatibility table in this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...n of 'mix-blend-mode' in that specification. Candidate Recommendation Initial definition Browser compatibility The compatibility table in this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... Browser compatibility The compatibility table in this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...And 2 more matches
outline-color - CSS: Cascading Style Sheets
endation No change. CSS Level 2 (Revision 1)The definition of 'outline-color' in that specification. Recommendation Initial definition. Browser compatibility The compatibility table in this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...definition of 'outline-color' in that specification. Recommendation Initial definition. Browser compatibility The compatibility table in this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... Browser compatibility The compatibility table in this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...And 2 more matches
quotes - CSS: Cascading Style Sheets
fication. Working Draft CSS Level 2 (Revision 1)The definition of 'quotes' in that specification. Recommendation Initial definition Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...n 1)The definition of 'quotes' in that specification. Recommendation Initial definition Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...tion Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...And 2 more matches
<shape> - CSS: Cascading Style Sheets
us Comment CSS Level 2 (Revision 1)The definition of '<shape>' in that specification. Recommendation Defines with the clip property. Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...ition of '<shape>' in that specification. Recommendation Defines with the clip property. Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...And 2 more matches
Live streaming web audio and video - Developer guides
fter it happened. Video Streaming File Formats A couple of HTTP-based live streaming video formats are beginning to see support across browsers. Note: You can find a guide to encoding HLS and MPEG-DASH for use on the web at Setting up adaptive streaming media sources. MPEG-DASH DASH stands for Dynamic Adaptive Streaming over HTTP and is a new format that has recently seen support added to
Chrome, and Internet Explorer 11 running on Windows 8.1. It is supported via Media Source Extensions which are used by JavaScript libraries such as DASH.js. This approach allows us to download chunks of the video stream using XHR and "append" the chunks to the stream that's played by the <video> element. So for example, if we detect that the network is slow, we can start requesting lower quality (smalle...
...k is slow, we can start requesting lower quality (smaller) chunks for the next segment. This technology also allows an advertising segment to be appended/inserted into the stream. Note: you can also use WebM with the MPEG DASH adaptive streaming system. HLS HLS or HTTP Live Streaming is a protocol invented by Apple Inc and supported on iOS, Safari and the latest versions of Android browser /
Chrome. HLS is also adaptive. HLS can also be decoded using JavaScript, which means we can support the latest versions of Firefox,
Chrome and Internet Explorer 10+. See this HTTP Live Streaming JavaScript player. At the start of the streaming session, an extended M3U (m3u8) playlist is downloaded. This contains the metadata for the various sub-streams that are provided. Streaming File Format Support ...
...et Explorer 10+. See this HTTP Live Streaming JavaScript player. At the start of the streaming session, an extended M3U (m3u8) playlist is downloaded. This contains the metadata for the various sub-streams that are provided. ...
...And 2 more matches
<acronym> - HTML: Hypertext Markup Language
lement interface for this element. Example <p>The <acronym title="World Wide Web">WWW</acronym> is only a component of the Internet.</p> Default styling Though the purpose of this tag is purely for the convenience of the author, its default styling varies from one browser to another: Some browsers, like Internet Explorer, do not style it differently than a <span> element. Opera, Firefox,
Chrome, and some others add a dotted underline to the content of the element. A few browsers not only add a dotted underline, but also put it in small caps; to avoid this styling, adding something like font-variant: none in the CSS takes care of this case. It is therefore recommended that web authors either explicitly style this element, or accept some cross-browser variation. Specifications ...
... Specification Status Comment HTML 4.01 SpecificationThe definition of '<acronym>' in that specification. Recommendation Browser compatibility The compatibility table in this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...L 4.01 SpecificationThe definition of '<acronym>' in that specification. Recommendation Browser compatibility The compatibility table in this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...And 2 more matches
<img>: The Image Embed element - HTML: Hypertext Markup Language
by web browsers is available. Below is a list of the image formats that are most commonly used on the web, as well as some older formats that should no longer be used, despite existing content possibly still using them. ...
...y used on the web, as well as some older formats that should no longer be used, despite existing content possibly still using them. ...
...g them. ...
...And 2 more matches
<input type="datetime-local"> - HTML: Hypertext Markup Language
g the year, month, and day as well as the time in hours and minutes. The source for this interactive example is stored in a GitHub repository. If you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request. The control's UI varies in general from browser to browser; at the moment support is patchy, with only
Chrome/Opera and Edge on desktop and most modern versions of mobile browsers having usable implementations. In other browsers, these degrade gracefully to simple <input type="text"> controls. The control is intended to simply represent a local date and time, not necessarily the user's local date and time. In other words, an implementation should allow any valid combination of year, month, day, hour, an...
...use separate date and time inputs, each of which is more widely supported than datetime-local. Some browsers may resort to a text-only input element that validates that the results are legitimate date/time values before letting them be delivered to the server, as well, but you shouldn't rely on this behavior since you can't easily predict it. For those of you not using a supporting browser, the
Chrome/Opera datetime-local control looks like the below screenshot. Clicking the down arrow on the right hand side brings up a date picker to allow you to choose a date; you have to enter the time manually. The Edge datetime-local control looks like the below; clicking the date and the time parts of the value bring up two separate pickers for you, so you can easily set both the date and the time. Th...
...result here is that: Only days in June 2017 can be selected -- only the "days" part of the date value will be editable, and dates outside June can't be scrolled to in the datepicker widget. Depending on what browser you are using, you might find that times outside the specified values might not be selectable in the time picker (e.g. Edge), or invalid (see Validation) but still available (e.g.
Chrome). Note: You should be able to use the step attribute to vary the number of days jumped each time the date is incremented (e.g. maybe you only want to make Saturdays selectable). However, this does not seem to work effectively in any implementation at the time of writing. Controlling input size <input type="datetime-local"> doesn't support form control sizing attributes such as size. You'll ...
...And 2 more matches
<input type="month"> - HTML: Hypertext Markup Language
Y-MM", where YYYY is the four-digit year and MM is the month number. The source for this interactive example is stored in a GitHub repository. If you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request. The control's UI varies in general from browser to browser; at the moment support is patchy, with only
Chrome/Opera and Edge on desktop -- and most modern mobile browser versions -- having usable implementations. In browsers that don't support month inputs, the control degrades gracefully to a simple <input type="text">, although there may be automatic validation of the entered text to ensure it's formatted as expected. For those of you using a browser that doesn't support month, the screenshot below sh...
... -- and most modern mobile browser versions -- having usable implementations. In browsers that don't support month inputs, the control degrades gracefully to a simple <input type="text">, although there may be automatic validation of the entered text to ensure it's formatted as expected. For those of you using a browser that doesn't support month, the screenshot below shows what it looks like in
Chrome and Opera. Clicking the down arrow on the right hand side brings up a date picker that lets you select the month and year. The Microsoft Edge month control looks like this: Value A DOMString representing a month and year, or empty. Events change and input Supported common attributes autocomplete, list, readonly, and step. IDL attributes value ...
...01" max="1999-12"> </form> The result here is that: Only months between in January 1900 and December 1999 can be selected; months outside that range can't be scrolled to in the control. Depending on what browser you are using, you might find that months outside the specified range might not be selectable in the month picker (e.g. Edge), or invalid (see Validation) but still available (e.g.
Chrome). Controlling input size <input type="month"> doesn't support form sizing attributes such as size. You'll have to resort to CSS for sizing needs. Validation By default, <input type="month"> does not apply any validation to entered values. The UI implementations generally don't let you enter anything that isn't a date -- which is helpful -- but you can still submit the form with the month inp...
...And 2 more matches
Features restricted to secure contexts - Web security
ts for a definition and more details. Current features available only in secure contexts This section lists all the APIs available only in secure contexts, along with browser versions the limitation was introduced in, as appropriate. Note: Only the browsers that actually support secure contexts are listed in this document. See here for information on secure contexts support. ...
...Not supported Not supported Not supported Web Crypto API 60 79 Not supported 75 Secure context restrictions that vary by browser Some browsers may decide to disable certain APIs in non-secure contexts or apply other restrictions/security measures, despite the spec not requiring them. This section lists any such differences existing in browsers. ...
... Secure context restrictions that vary by browser Some browsers may decide to disable certain APIs in non-secure contexts or apply other restrictions/security measures, despite the spec not requiring them. This section lists any such differences existing in browsers. ...
...And 2 more matches
/loader - Archive of obsolete content
SDK generates a manifest file at build time representing a dependency graph of all modules used by an add-on. ...
...ates a manifest file at build time representing a dependency graph of all modules used by an add-on. ...
...at build time representing a dependency graph of all modules used by an add-on. Any attempt to load a module not listed in the manifest is unauthorized and is rejected with an exception: let { Loader } = require('toolkit/loader'); let manifest = { './main': { 'requirements': { 'panel': 'sdk/panel' } }, 'sdk/panel': { 'requirements': { '
chrome': '
chrome' } } '
chrome': { 'requirements': {} } }; let loader = Loader({ resolve: function(id, requirer) { let requirements = manifest[requirer].requirements; if (id in manifest) return requirements[id]; else throw Error('Module "' + requirer + '" has no authority to require ' + 'module "' + id + "') } }); Thrown exceptions will propagate to the caller of require(). ...
...This alternative approach of providing capabilities via modules makes it possible to build module capability graphs by analyzing require statements. These graphs can be used to reason about modules without diving into implementation details. @loader/options This...
File I/O - Archive of obsolete content
You access the file system using Mozilla XPCOM components. Note: File objects are nsIFile. For legacy reasons, there is also an nsILocalFile interface. ...
...: "file" is an object that implements nsIFile. If you want the // file system path, use file.path Note: file is an object that implements nsIFile. If you want the file system path, use file.path, . Here are some of the special locations the directory service supports: (Scope: d = product-wide, f = profile wide) String Scope Meaning AChrom d %CurProcD%/
chrome APlugns d %CurProcD%/plugins (Deprecated - use APlugnsDL) APlugnsDL d ComsD n/a %CurProcD%/components CurProcD n/a Current working directory (usually the application's installation directory). DefProfLRt d Location of user profile temporary directories live. DefProfRt d The root of the default profile dire...
... f Local Settings on Windows; where the network cache and fastload files are stored. Progs d User Start menu programs directory (for example, C:\Documents and Settings\username\Start Menu\Programs). This is a Windows-specific value. TmpD d The operating system's temporary files directory (for example, /tmp on Mac OS X and Linux). UChrm f The user
chrome directory in their profile: %profile%/
chrome. resource:app d The application directory in an XULRunner application. Look in the source for other strings available: xpcom/io/nsAppDirectoryServiceDefs.h, xpcom/io/nsDirectoryServiceDefs.h. Other such keys as the "ProfD" key are available; check the known locations. Enumerating drives on Windows While you can use initWith...
.../gre/modules/Services.jsm"); var url = Services.io.newFileURI(file); // url is a nsIURI; to get the string "file://...", see url.spec To get an nsIFile from the 'file://' URL, use nsIFileURL: // url is a nsIURI; see nsIIOService::newURI for getting a string into a nsIURI. var file = url.QueryInterface(Components.interfaces.nsIFileURL).file; // file is a nsIFile To load from file://, http://,
chrome://, resource:// and other URLs directly, use XMLHttpRequest or NetUtil.asyncFetch(). Also note that generally you don't need to use nsIFile::path. Use nsIFile directly wherever possible. An example below shows how you should save a path in user prefs. Storing nsIFile in preferences The following two snippets show the right way to store a file path in user preferences (more about preferences in...
Preferences - Archive of obsolete content
xcept that when there is no user value, getComplexValue() gets the default value from a locale file (thus making the default value localizable). It's easier to explain this by example. Let's say you want to make the default value for the extensions.myext.welcomemessage preference localizable. ...
...g: Add this line to some .properties file (for all of your locales), say to
chrome://myext/locale/defaults.properties: extensions.myext.welcomemessage=Localized default value Add the default value for extensions.myext.welcomemessage, pointing to that properties file, by adding the following line to your file with default preferences (see below). ...
... Setting nsIPrefLocalizedString preferences is similar to setting nsISupportsString: var pls = Components.classes["@mozilla.org/pref-localizedstring;1"] .createInstance(Components.interfaces.nsIPrefLocalizedString); pls.data =...
...n on how to do it). It has the following benefits: You don't have to duplicate default values in various parts of your code. The code for reading preferences is simplified, since you don't need to worry about the get methods throwing exceptions. ...
Jetpack Processes - Archive of obsolete content
Jetpack processes are created by components that implement the nsIJetpackService interface, and their parent
chrome process communicates with them via the nsIJetpack interface. Note: The Jetpack service, provided by nsIJetpackService, is not included by default in Firefox 4. Prior to Firefox 12, it could be included in custom builds by using ENABLE_JETPACK_SERVICE at compile time. However, the service has been removed entirely as of Firefox 12. These processes are relatively lightweight, do not have access to XPCOM, and can innately do little other than compute. Messaging facilities that allow them to communicate with their parent
chrome process are the only means by which they can be endowed with any real power. Note: The above statement is not currently true, as js-ctypes is now provid...
...588563. A mechanism to optionally disable this feature has been proposed in bug 614351. Privileged APIs When script is evaluated in a Jetpack process via a call to nsIJetpack.evalScript(), the script's global scope is endowed with the following privileged APIs: sendMessage(aMessageName [, v1 [, v2 [, ...]]]) Similar to nsIJetpack.sendMessage(), this function asynchronously sends a message to the
chrome process. callMessage(aMessageName [, v1 [, v2 [, ...]]]) This function is like sendMessage() but sends the message synchronously. It returns an Array whose elements are the return values of each receiver in the
chrome process that was triggered by the message. registerReceiver(aMessageName, aReceiver) Similar to nsIJetpack.registerReceiver(), this function registers a callback that is triggered w...
.... callMessage(aMessageName [, v1 [, v2 [, ...]]]) This function is like sendMessage() but sends the message synchronously. It returns an Array whose elements are the return values of each receiver in the
chrome process that was triggered by the message. registerReceiver(aMessageName, aReceiver) Similar to nsIJetpack.registerReceiver(), this function registers a callback that is triggered when the
chrome process sends a message with the given name. unregisterReceiver(aMessageName, aReceiver) Similar to nsIJetpack.unregisterReceiver(), this function unregisters a callback previously registered with registerReceiver(). unregisterReceivers(aMessageName) Similar to nsIJetpack.unregisterReceivers(), this function unregisters all callbacks for the given message name. createHandle() Similar to nsIJetpac...
...ck implementation may create one. A handle keeps any arbitrary properties attached to it alive, but those properties are not transmitted across the process boundary. These arbitrary properties are the primary means through which context can be provided for messages; for instance, if the handle is meant to represent a network request, an XMLHttpRequest instance can be attached to the handle on the
chrome process. Because a handle's existence crosses process boundaries and cross-process garbage collection does not exist, the lifetime of a handle needs to be controlled manually by code. By default, a handle is rooted in the JavaScript interpreter's garbage collector, meaning that even if a process throws it away, it will not be garbage collected unless the other process explicitly does something to...
Adding windows and dialogs - Archive of obsolete content
<< PreviousNext >> Opening windows and dialogs To open a new window, use the Javascript window.open function just like with HTML windows. window.open( "
chrome://xulschoolhello/content/someWindow.xul", "xulschoolhello-some-window", "
chrome,centerscreen"); The first argument is the URL to open, the second is an id to identify the window, and the last is an optional comma-separated list of features, which describe the behavior and appearance of the window. If this value is null or empty, the default toolbars of the main window will be added to the new one, which is rarely what you want. The window.open page has a detailed description of the features you can use and their values. The following features are very important and you should always keep them in mind:
chrome. This can...
...ribe the behavior and appearance of the window. If this value is null or empty, the default toolbars of the main window will be added to the new one, which is rarely what you want. The window.open page has a detailed description of the features you can use and their values. The following features are very important and you should always keep them in mind:
chrome. This can only be used from the
chrome, not from regular HTML JavaScript. It indicates that a
chrome document is being opened, not a web page. This means that the document defines the whole window, and not only the inner content area. You should always include it when opening a XUL window or dialog. modal. Modal windows block their parent window until action is taken on them. An alert window is an example of this. Modal windows shoul...
...nt from a datasource, such as lists or trees that may need resizing to have a better view of the content. To open a new dialog, use the function window.openDialog, an extension of the open function. It allows you to send a set of optional parameters that can be used to communicate with the dialog. let someValue = 2; let returnValue = { accepted : false , result : "" }; window.openDialog( "
chrome://xulschoolhello/content/someDialog.xul", "xulschoolhello-some-dialog", "
chrome,centerscreen", someValue, returnValue); // you can send as many extra parameters as you need. // if (returnValue.accepted) { do stuff } The optional parameters are available in the dialog code through the window.arguments property: let someValue = window.arguments[0]; let returnValue = window.arguments[1]; ...
... systems, so you should avoid making dialogs from scratch or overriding the default dialog CSS styles. The dialog element handles all of this transparently. All you need to do is define which buttons you'll need and the actions associated with them. <dialog id="xulschoolhello-hello-dialog" title="&xulschoolhello.helloDialog.title;" buttons="accept,cancel" ondialogaccept="return XULSchool
Chrome.HelloDialog.accept();" ondialogcancel="return XULSchool
Chrome.HelloDialog.cancel();" xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"> Carefully read the specification of the dialog element. You'll see that you can choose from a wide variety of buttons, associate any action you need to them, override their labels, and even add completely customized extra buttons. All o...
Handling Preferences - Archive of obsolete content
g from the main menu: On Windows, Tools > Options On Mac, Firefox > Preferences On Linux, Edit > Preferences Note: Keep in mind the usage of the terms "Preferences" and "Options" in different platforms. If you need to refer to the term "preference" in any of your locale files, you must change the string depending on the operating system. Tip: you can use window.navigator.platform in your
chrome code to figure out the operating system Firefox is running on. You can use the Hidden DOM Window in non-
chrome code. Firefox loads user preferences from a number of sources. Each source is a JS file that contains some special functions not available in regular code. The following files are used: Default preferences: these are stored in the directory defaults/pref in the Firefox installation...
...ies related to preference management, there are some facilities provided in XUL and Firefox that make this much easier to deal with. The standard way of opening a preferences window is to open the Add-ons Manager, select the add-on, and then click on the Preferences button. In order to have this button enabled in your extension you need to add the following line to install.rdf: <em:optionsURL>
chrome://xulschoolhello/content/preferencesWindow.xul</em:optionsURL> If you want to open this window from a different place in the UI, such as a menu item or a button in a toolbar, you need to take into account that the opening behavior of a Preferences window is different depending on the operating system. This is how we do it: openPreferences : function() { if (null == this._preferencesWindow...
... or a button in a toolbar, you need to take into account that the opening behavior of a Preferences window is different depending on the operating system. This is how we do it: openPreferences : function() { if (null == this._preferencesWindow || this._preferencesWindow.closed) { let instantApply = Application.prefs.get("browser.preferences.instantApply"); let features = "
chrome,titlebar,toolbar,centerscreen" + (instantApply.value ? ",dialog=no" : ",modal"); this._preferencesWindow = window.openDialog( "
chrome://xulschoolhello/content/preferencesWindow.xul", "xulschoolhello-preferences-window", features); } this._preferencesWindow.focus(); }, This code is based on the code that opens Preference windows from the Add-ons Manager. It...
...ference (depending on the instant apply rule), and vice versa. You may be able to create a Preferences window without a single line of JS code thanks to the preference element. Finally, groupboxes are a good idea to organize the contents of the window and preference panes. They are heavily stylized in the Firefox Preferences window, so you should include the same CSS file that is included in it (
chrome://browser/skin/preferences/preferences.css). This way you don't have to rewrite all the CSS rules defined for Firefox. You should also look at the class values set to elements in the XUL file, so that your Preferences window is just like the one in Firefox and your extension is better integrated into the application and the native OS look and feel. << PreviousNext >> This tutorial was kin...
Specifying the appearance - Archive of obsolete content
Now that we have defined a panel in which to display an icon, we use CSS to specify which icon to display. ...
...or this we have to first create four icons, one for each tinderbox state (none, success, test failed, and busted), then create a set of CSS rules that displays the icon corresponding to the current tinderbox state: statusbarpanel#tinderbox-status { list-style-image: url("
chrome://navigator/content/tb-nostatus.png"); } statusbarpanel#tinderbox-status[status="success"] { list-style-image: url("
chrome://navigator/content/tb-success.png"); } statusbarpanel#tinderbox-status[status="testfailed"] { list-style-image: url("
chrome://navigator/content/tb-testfailed.png"); } statusbarpanel#tinderbox-status[status="busted"] { list-style-image: url("
chrome://navigator/content/tb-busted.png"); } Mozilla can have multiple sets of stylesheets that govern its appearance, and we don't want to have to a...
...There is one rule for each possible tinderbox state. Make your own icons for the fo...
...There is one rule for each possible tinderbox state. Make your own icons for the four states or use the following icons: no status , success , test failed ...
contents.rdf - Archive of obsolete content
Copy the following text and paste it into a text file, then save that file as "contents.rdf": <?xml version="1.0"?> <RDF:RDF xmlns:RDF="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:
chrome="http://www.mozilla.org/rdf/
chrome#"> <!-- List all the skins being supplied by this theme --> <RDF:Seq about="urn:mozilla:skin:root"> <RDF:li resource="urn:mozilla:skin:mySkin/1.0" /> </RDF:Seq> <RDF:Description about="urn:mozilla:skin:mySkin/1.0"
chrome:displayName="My Skin"
chrome:accessKey="M"
chrome:author="Me"
chrome:description="This is my custom skin for mozilla"
chrome:name="mySkin/1.0"
chrome:image="preview.png"> <
chrome:packages> <RDF:Seq about="urn:mozilla:skin:mySkin/1.0:packages"> <RDF:li resource="ur...
...bout="urn:mozilla:skin:mySkin/1.0:packages"> <RDF:li resource="urn:mozilla:skin:mySkin/1.0:communicator"/> <RDF:li resource="urn:mozilla:skin:mySkin/1.0:editor"/> <RDF:li resource="urn:mozilla:skin:mySkin/1.0:global"/> <RDF:li resource="urn:mozilla:skin:mySkin/1.0:messenger"/> <RDF:li resource="urn:mozilla:skin:mySkin/1.0:navigator"/> </RDF:Seq> </
chrome:packages> </RDF:Description> <!-- Version Information. State that we work only with major version 1 of this package. --> <RDF:Description
chrome:skinVersion="1.0" about="urn:mozilla:skin:mySkin/1.0:communicator"/> <RDF:Description
chrome:skinVersion="1.0" about="urn:mozilla:skin:mySkin/1.0:editor"/> <RDF:Description
chrome:skinVersion="1.0" about="urn:mozilla:skin:mySkin/1.0:gl...
...ion> <!-- Version Information. State that we work only with major version 1 of this package. ...
... package. ...
Creating a Skin - Archive of obsolete content
Use at your own risk! This section describes how to create a simple skin. For simplicity, we'll only apply it to the find files dialog. A Simple Skin The image below shows the current find files dialog. Let's create a skin that we can apply to it. Normally, a skin would apply to the entire application, but we'll focus on just the find files dialog to make it easier. For this reason, we'll modify only the file findfile.css rather than the global.css file. ...
...Firefox 1.5 or later, see Manifest Files instead of below) Create a directory somewhere where you want to place the skin files. Copy a manifest file (contents.rdf) from the Classic or Modern skin into this new directory. Modify the references in the manifest file to a custom name for your skin. For example, change references of 'classic/1.0' to 'blueswayedshoes/1.0'. Add a line to the file '
chrome/installed-
chrome.txt of the following form: skin,install,url,file:///stuff/blueswayedshoes/ where the last part points to the directory you created. Make sure to add a slash at the end. Copy the original findfile.css into the new directory. We'll use this as a basis for the new skin. We can then refer to it using the URL '
chrome://findfile/skin/findfile.css'. Adding Style Rules First, let's d...
...Adding Toolbar Icons It is somewhat difficult to distinguish the buttons on the toolbar from the commands on the menu. We could add some icons to the buttons to make them clearer. Mozilla Composer provides some icons for open and save buttons, which we'll just use here to save time. We can set the image for a button using the list-style-image CSS property. #opensearch { list-style-image: url("
chrome://editor/skin/icons/btn1.gif"); -moz-image-region: rect(48px 16px 64px 0); -moz-box-orient: vertical; } #savesearch { list-style-image: url("
chrome://editor/skin/icons/btn1.gif"); -moz-image-region: rect(80px 16px 96px 0); -moz-box-orient: vertical; } Mozilla provides a custom style property -moz-image-region which can be used to make an element use part of an image. You can think ...
...CSS properties. Other Changes Next, we'll make a couple of changes to the buttons along the bottom, again reusing some icons from Mozilla to save time. If creating your own skin, you will need to create new icons or copy the icons to new files. If following the example in this section, just copy the files to your new skin and change the URLs accordingly. #find-button { list-style-image: url("
chrome://global/skin/checkbox/images/cbox-check.jpg"); font-weight: bold; } #cancel-button { list-style-image: url("
chrome://global/skin/icons/images/close-button.jpg"); } button:hover { color: #000066; } We add some images to the buttons and make the Find button have bold text to indicate that it is the default button. The last rule applies to buttons when the mouse is hovering over them. W...
Introduction to XBL - Archive of obsolete content
to a menu. A binding can be attached to any XUL element. If you use CSS classes, you can use as many different bindings as you need. Note the namespace on the bindings element in the template above. This declares that we are using XBL syntax. You assign a binding to an element by setting the CSS property -moz-binding to the URL of the bindings file. For example: scrollbar { -moz-binding: url('
chrome://findfile/content/findfile.xml#binding1'); } The URL points to the binding with the id 'binding1' in the file '
chrome://findfile/content/findfile.xml'. The '#binding1' syntax is used to point to a specific binding, much like how you would point to an anchor in an HTML file. You will usually put all of your bindings in a single file. The result in this example, is that all scrollbar elements wil...
... the XBL defined element has. Binding Example The box is generic enough that you can use it to create custom widgets (although you can use any element, even one you make up yourself). By assigning a class to a box tag, you can associate a binding to only those boxes that belong to that class. The following example demonstrates this. ...
...c enough that you can use it to create custom widgets (although you can use any element, even one you make up yourself). By assigning a class to a box tag, you can associate a binding to only those boxes that belong to that class. The following example demonstrates this. ...
...example demonstrates this. ...
Modifying the Default Skin - Archive of obsolete content
Using it may lead to hard-to-diagnose bugs or crashes. Use at your own risk! This section describes how to modify the skin of a window. Skin Basics A skin is a set of style sheets, images and behaviors that are applied to a XUL file. ...
...Using it may lead to hard-to-diagnose bugs or crashes. Use at your own risk! This section describes how to modify the skin of a window. Skin Basics A skin is a set of style sheets, images and behaviors that are applied to a XUL file. ...
...ng to the same thing). A skin is described using CSS, allowing you to define the colors, borders and images used to draw elements. The file classic.jar contains the skin definitions. The global directory within this archive contains the main style definitions for how to display the various XUL elements. By changing these files, you can change the look of the XUL applications. Customize with user
Chrome.css If you place a file called 'user
Chrome.css' in a directory called '
chrome' inside your user profile directory, you can override settings without changing the archives themselves. This directory should be created when you create a profile and some examples placed there. The file 'userContent.css' customizes Web pages, whereas 'user
Chrome.css' customizes
chrome files. For example, by adding t...
...e skinnable. This is because a particular skin's design might not use images and it may need some more complex design. By referring to the images with CSS, they are easy to remove. It also removes the reliance on specific image filenames. You can assign images to a button, checkbox and other elements by using the list-style-image property as in the following: checkbox { list-style-image: url("
chrome://findfile/skin/images/check-off.jpg"); } checkbox[checked="true"] { list-style-image: url("
chrome://findfile/skin/images/check-on.jpg"); } This code changes the image associated with a checkbox. The first style sets the image for a normal checkbox and the second style sets the image for a checked checkbox. The modifier 'checked=true' makes the style only apply to elements which have their c...
tree - Archive of obsolete content
in listbox and richlistbox.) multiple Multiple rows may be selected at once. (Default in tree.) For trees, you can also use the following values: cell Individual cells can be selected text Rows are selected; however, the selection highlight appears only over the text of the primary column. For richlistbox, this is new in Firefox 3.5. statedatasource Type: URI
Chrome XUL may specify an RDF datasource to use to store tree state information. This is used to hold which tree items are open and which items are collapsed. This information will be remembered for the next time the XUL file is opened. If you do not specify this attribute, state information will be stored in the local store (rdf:local-store). tabindex Type: integer The tab order of the element.
... the text value for a specific column (for example column 'age') from the currently focused row in the tree: var t = document.getElementById('mytree'); document.title = t.view.getCellText(t.currentIndex,t.columns.getNamedColumn('age')); To select the checkbox and display the cell's text value, you can use code like the following. ...
... treecells. This style MUST come before treechildren::-moz-tree-checkbox(checked) otherwise it won't take effect. */ list-style-image: url("") } treechildren::-moz-tree-checkbox(checked) { /* checked checkbox treecells. cbox-check.gif isn't available in Firefox 1, 2, and 3 in Mac OS X so you should specify a URL to an image in your extension or elsewhere. ...
...pecify a URL to an image in your extension or elsewhere. */ list-style-image: url("
chrome://global/skin/checkbox/cbox-check.gif"); } treechildren::-moz-tree-checkbox(disabled) { /* disabled checkbox treecells. cbox-check-dis.gif isn't available in Firefox 1, 2, and 3 in Mac OS X, so you should specify a URL to an image in your extension or elsewhere. ...
CommandLine - Archive of obsolete content
ation It's fairly easy to retrieve application specific command line arguments in XULRunner when it's not a single instance application. An nsICommandLine object is passed as the first argument of the launched window: Example var cmdLine = window.arguments[0]; cmdLine = cmdLine.QueryInterface(Components.interfaces.nsICommandLine); alert(cmdLine.handleFlagWithParam("test", false)); See also:
Chrome: Command Line For single instance applications Of course, for a single instance application (see toolkit.singletonWindowType for more information), the last example still applies the first time your application is launched. However, if you'd like to retrieve the latest command line arguments (to open a file for example), a possible solution is to create your own command line handler. For the ...
...atMan = Components.classes["@mozilla.org/categorymanager;1"] .getService(nsICategoryManager); catMan.deleteCategoryEntry("command-line-handler", CLD_CATEGORY); }, canUnload : function (aCompMgr) { return true; } }; function NSGetModule(aCompMgr, aFileSpec) { return appHandlerModule; } Create an observer that will get notified when arguments change:
chrome/content/cmdline.js function CommandLineObserver() { this.register(); } CommandLineObserver.prototype = { observe: function(aSubject, aTopic, aData) { var cmdLine = aSubject.QueryInterface(Components.interfaces.nsICommandLine); var test = cmdLine.handleFlagWithParam("test", false); alert("test = " + test); }, register: function() { var observerService = Components.clas...
... notification here. ...
...</window> Original Document Information Author: Ge...
Windows and menus in XULRunner - Archive of obsolete content
ain other top-level declarations for CSS and DTD, which I will discuss in a moment. <window> is the basic windowing element in XUL. It has attributes to set the title/caption as well as to control its width and height. Although I have not seen it mentioned yet, I am assuming that you can only have one <window> element per XUL file. Here is an example: <?xml version="1.0"?> <?xml-stylesheet href="
chrome://basicapp/skin/main.css" type="text/css"?> <!DOCTYPE window SYSTEM "
chrome://basicapp/locale/main.dtd"> <window id="main" title="&title;" xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"> <script src="main.js"/> ... </window> Notice the references to CSS and DTD files. The CSS is used to apply formatting to elements, just as it would in HTML. The DTD is used to...
...an learn how to do it in the article Window icons. Menus and toolbars Most desktop applications are complex enough to require some sort of menu and/or toolbar to structure the application's available commands. XUL provides elements to support both menus and toolbars. ...
...desktop applications are complex enough to require some sort of menu and/or toolbar to structure the application's available commands. XUL provides elements to support both menus and toolbars. ...
...nd="cmd_open"/> <menuitem command="cmd_save"/> ... <toolbarbutton id="open" command="cmd_open"/> <toolbarbutton id="save" command="cmd_save"/> ... We can add images to the toolbar buttons through the CSS file. We could hard-code the images in the XUL file itself, but CSS is a better practice. Here's the CSS file: /* global skin --------------------------------------------------- */ @import url(
chrome://global/skin/); /* toolbar ------------------------------------------------------- */ #open { list-style-image: url(
chrome://basicapp/skin/open.png); -moz-box-orient: vertical; } #save { list-style-image: url(
chrome://basicapp/skin/save.png); -moz-box-orient: vertical; } Of course, you need to make sure the PNG files are included in the application. There are quite a few things XUL ...
xulauncher - Archive of obsolete content
e as first parameter" exit fi # check if 1st parameter is a file ############################################################################## if [ ! ...
...############# if [ ! ...
...###### if [ ! ...
...nimal directory structure ############################################################################## mkdir -p $XULDIR mkdir -p $XULPREFDIR # create application.ini file ############################################################################## echo " [App] Vendor=xulauncher.sh Name=$XULNAME Version=0.0.1 BuildID=`date +%Y%m%d` [Gecko] MinVersion=1.8 MaxVersion=1.9 ">$XULAPPINI # create
chrome.manifest file ############################################################################## echo " content $XULNAME file:$XULNAME/ ">$XULMANIFEST # create prefs.js file ############################################################################## echo " pref(\"toolkit.default
ChromeURI\", \"
chrome://$XULNAME/content/$XULFILE\"); /* debugging prefs */ pref(\"browser.dom.window.dump.enabled\", tr...
ant script to assemble an extension - Archive of obsolete content
to package an extension <?xml version="1.0"?> This build file was written by Regis Decamps <decamps@users.sf.net> <project name="blogmark" default="createxpi"> <property name="VERSION" value="1.3-rc1"/> <property name="DESCRIPTION" value="New context-menu item to add the current page in your Blogmarks"/> XPI file is created after "
chrome/blogmark.jar" is created, which is then stuffed into "blogmark.xpi" <target name="createxpi" depends="createjar" description="Assemble the final build blogmark.xpi"> <zip destfile="blogmark-${VERSION}.xpi"> <zipfileset dir="." includes="
chrome/blogmark.jar" /> <zipfileset dir="." includes="install.r...
...xpi" <target name="createxpi" depends="createjar" description="Assemble the final build blogmark.xpi"> <zip destfile="blogmark-${VERSION}.xpi"> <zipfileset dir="." includes="
chrome/blogmark.jar" /> <zipfileset dir="." includes="install.rdf" /> </zip> </target> Everything inside the
chrome directory is zipped into
chrome/blogmark.jar <target name="createjar" depends="templates" description="Assemble the jar"> <jar destfile="
chrome/blogmark.jar"> <fileset dir="
chrome/"> <include name="**/*"/> <exclude name="**/*~"/> <exclude name="**/*.tpl.*"/> ...
... <include name="**/*"/> <exclude name="**/*~"/> <exclude name="**/*.tpl.*"/> <exclude name="blogmark.jar"/> </fileset> </jar> </target> <target name="templates" description="Generate files from templates."> <copy file="
chrome/content/blogmark/contents.rdf.tpl.xml" tofile="
chrome/content/blogmark/contents.rdf" overwrite="true"> <filterchain> <replacetokens> <token key="VERSION" value="${VERSION}"/> <token key="DESCRIPTION" value="${DESCRIPTION}"/> ...
...e="true"> <filterchain> <replacetokens> <token key="VERSION" value="${VERSION}"/> <token key="DESCRIPTION" value="${DESCRIPTION}"/> </replacetokens> </filterchain> </copy> <copy file="
chrome/content/blogmark/about.xul.tpl.xml" tofile="
chrome/content/blogmark/about.xul" overwrite="true"> <filterchain> <replacetokens> <token key="VERSION" value="${VERSION}"/> </replacetokens> </filterchain> ...
contents.rdf - Archive of obsolete content
Copy the following text and paste it into a text file, then save that file as "contents.rdf": <?xml version="1.0"?> <RDF:RDF xmlns:RDF="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:
chrome="http://www.mozilla.org/rdf/
chrome#"> <!-- List all the skins being supplied by this theme --> <RDF:Seq about="urn:mozilla:skin:root"> <RDF:li resource="urn:mozilla:skin:My_Theme"/> </RDF:Seq> <RDF:Description about="urn:mozilla:skin:My_Theme"
chrome:displayName="My Theme"
chrome:accessKey="N"
chrome:author=""
chrome:authorURL=""
chrome:description=""
chrome:name="My_Theme"
chrome:image="preview.png"> <
chrome:packages> <RDF:Seq about="urn:mozilla:skin:My_Theme:packages"> <RDF:li resource="urn:mozilla:skin:My_The...
...> <RDF:Seq about="urn:mozilla:skin:My_Theme:packages"> <RDF:li resource="urn:mozilla:skin:My_Theme:browser"/> <RDF:li resource="urn:mozilla:skin:My_Theme:communicator"/> <RDF:li resource="urn:mozilla:skin:My_Theme:global"/> <RDF:li resource="urn:mozilla:skin:My_Theme:mozapps"/> <RDF:li resource="urn:mozilla:skin:My_Theme:help"/> </RDF:Seq> </
chrome:packages> </RDF:Description> <!-- Version Information. State that we work only with major version 1 of this package. --> <RDF:Description
chrome:skinVersion="1.5" about="urn:mozilla:skin:My_Theme:browser"/> <RDF:Description
chrome:skinVersion="1.5" about="urn:mozilla:skin:My_Theme:communicator"/> <RDF:Description
chrome:skinVersion="1.5" about="urn:mozilla:skin:My_Theme:global"/> <RD...
.../RDF:Description> <!-- Version Information. State that we work only with major version 1 of this package. ...
...n 1 of this package. ...
Making sure your theme works with RTL locales - Archive of obsolete content
ons"] #back-button { -moz-image-region: rect(0px 396px 34px 360px); } toolbar[iconsize="large"][mode="icons"] #back-button:-moz-locale-dir(rtl) { -moz-image-region: rect(0px 516px 34px 480px); } This specifies the default, left-to-right version of the button, then offers an override if the user's interface is being rendered in right-to-left mode. Gecko 1.9.1 (Firefox 3.5) and earlier The
chromedir attribute Firefox, Thunderbird and SeaMonkey expose an attribute named
chromedir on certain elements. All you have to do is add CSS rules to your theme that test for the value of this attribute, and use that to apply any RTL-specific rules that you may have. That's how the default theme works, so you can use it as an example. toolbar[iconsize="large"][mode="icons"] #back-button { -moz-imag...
...in elements. All you have to do is add CSS rules to your theme that test for the value of this attribute, and use that to apply any RTL-specific rules that you may have. That's how the default theme works, so you can use it as an example. ...
...e of this attribute, and use that to apply any RTL-specific rules that you may have. That's how the default theme works, so you can use it as an example. toolbar[iconsize="large"][mode="icons"] #back-button { -moz-image-region: rect(0px 398px 34px 360px); } toolbar[iconsize="large"][mode="icons"] #back-button[
chromedir="rtl"] { -moz-image-region: rect(0px 516px 34px 478px); } This way, if
chromedir is "rtl", the second rule will override the first, and the theme will work in RTL. Note that not all elements will have the
chromedir attribute, so you may need to refer to an ancestor element that does. For example: /* We want to apply a RTL rule to #c; neither it nor its * parent element #b has a
chromedir attribute, but its * grandparent element #a does. */ #a > #b > #c { /* normal ...
...Instead, just use the opposite arrow when in RTL context. ...
Theme changes in Firefox 2 - Archive of obsolete content
er="true"] > .toolbarbutton-menubutton-dropmarker #back-button[disabled="true"] .toolbarbutton-menubutton-dropmarker #back-button[open="true"] #bookmarks-button:hover #bookmarks-button:hover:active #bookmarks-button[checked="true"] #copy-button:hover #copy-button:hover:active #cut-button:hover #cut-button:hover:active #downloads-button:hover #downloads-button:hover:active #feed-button[
chromedir="rtl"][feeds]:active #feed-button[
chromedir="rtl"][feeds]:hover #feed-button[feeds]:active #feed-button[feeds]:hover #forward-button .toolbarbutton-menubutton-dropmarker #forward-button:hover #forward-button:hover .toolbarbutton-menubutton-dropmarker #forward-button:hover:active #forward-button:hover:active .toolbarbutton-menubutton-dropmarker #forward-button[buttondown="true"] > .too...
...tton-dropmarker #forward-button:hover:active #forward-button:hover:active .toolbarbutton-menubutton-dropmarker #forward-button[buttondown="true"] > .toolbarbutton-menubutton-dropmarker #forward-button[buttonover="true"] #forward-button[buttonover="true"] > .toolbarbutton-menubutton-dropmarker #forward-button[disabled="true"] .toolbarbutton-menubutton-dropmarker #go-button:hover #go-button[
chromedir="rtl"] #history-button:hover:active #history-button:hover:active #history-button[checked="true"] #home-button:hover #home-button:hover:active #new-tab-button:hover #new-tab-button:hover:active #new-window-button:hover #new-window-button:hover:active #paste-button:hover #paste-button:hover:active #print-button:hover #print-button:hover:active #reload-button:hover #reload-button:h...
...:hover toolbar[iconsize="small"] #stop-button:hover:active toolbarbutton.bookmark-item-microsummarized You may need to make changes to other styles as well. ...
...ctive toolbarbutton.bookmark-item-microsummarized You may need to make changes to other styles as well. ...
XUL Parser in Python - Archive of obsolete content
which attributes, etc. The script writes out all the attributes and none of the values, but the parser itself is seeing the elements, their attributes, and the values of those attributes, and you just have to ask for them if you want them. For example, you could easily adapt this to: return the id values of all the elements take elements on the command line and only spell them out build new
chrome subdirectories (i.e. new "packages") on the fly using search and replace. As I adapt the script in these ways and try to further generalize the actual code as I get time, I will make it available here. In the explanation section below, I try to say a little something about how this script works. It's really just a wrapper around Python's xmllib XML Parser, but I had to sort of fool around with ...
... XML Parser, but I had to sort of fool around with it. Python's support for XML (and potential with XUL) is extensive, and so it's more a matter of choosing an approach and hooking things up than anything else. Source code The source code for the XUL parser is available. It only runs as a hard-coded script right now, so if you want to use it you have to go in and changes some of the stuff like
CHROME_DIR and which information you want out. It also, I'm afraid, only works on the win32 platform, where the <tt>dir</tt> command it depends on gets you your XUL files. Again, you can easily use <tt>ls</tt> instead, as I should have done, and pick up some extra support. I will make these adjustments and change it into a real module when I get a second, so that someone can instantiate the parser from ...
...orm, where the <tt>dir</tt> command it depends on gets you your XUL files. Again, you can easily use <tt>ls</tt> instead, as I should have done, and pick up some extra support. I will make these adjustments and change it into a real module when I get a second, so that someone can instantiate the parser from their own scripts and use it more flexibly: >>> import XULTool >>> myXP = XULParser() >>>
CHROME_DIR = 'D:\src\mozilla\xpfe' >>> res = myXP.parseXUL(
CHROME_DIR, 'window', 'id') Where something like the above would write out all the XUL window ids in the build. Something like that, anyway. Results The results from the script are written to a file called res.html. This is another hard-coded thing I have to open up. If you want to test this script you should change the filename "res.html" s...
...thon will really open up the Mozilla platform to tools and approaches of this kind--and make now a good time to start thinking about how these various technologies will be put together. The first level of support for Python in Mozilla will apparently be for Python modules made available as XPCOM objects. Extending on the approach in this script, then, you could imagine a kind of introspective XUL
chrome that could modify and replicate itself by calling services from the XULParser and XULWriter XPCOM objects. Please feel free to suggest changes, change the format of the results output, or adapt this script in any way you want. I have probably made some errors and undoubtedly written some strange, graceless Python. Most of all, please feel free to experiment with the Mozilla development platfor...
Common causes of memory leaks in extensions - Extensions
= 0; // Refresh the title once each second setInterval(function() { contentDoc.title = ++i; }, 1000); }, false); One would normally expect that the interval (or timer) would be destroyed as soon as the document unloads, in the same way that event listeners are automatically destroyed. However, while this is still true, the window.setInterval() in the example originates from the outer
chrome window (browser.xul) and not from the content window. Hence the interval will only be destroyed when the outer window is unloaded (i.e. when the user closes the whole browser window) but not when the content window unloads (i.e. when the user closes the tab). The interval function in the example would still hold a reference to contentDoc, therefore leaking the content document and the associated ...
...dow); } Note: The unload() function is an external function which can be added in your add-on to easily provide a way to undo changes upon unloading of your add-on or a specific part/object. It is part of Edward Lee's restartless boilerplate. Causes of other kinds of leaks Other than JavaScript compartments, add-ons may also leak entities that do not get a dedicated compartment, most commonly
chrome DOM windows and JavaScript code modules. Forgetting to unregister observers Holding onto event observers for too long is another problem. Observers that use strong references are a common cause of leaking whole
chrome windows or JavaScript code modules; it is possible to leak content windows, too, but that is less common. Consider the following example: var myObserver = { observe: function...
... in bootstrapped add-ons. When your add-on gets updated and re-enabled, the previous module version that is still loaded will be used, which might break your add-on entirely. The following example shows how to unload your modules again (bootstrap.js): Components.utils.import("resource://gre/modules/Services.jsm"); function startup(data, reason) { // This assumes your add-on did register some
chrome Components.utils.import("
chrome://myaddon/content/mymodule.jsm"); } function shutdown(data, reason) { // No need to do regular clean up when the application is closed // unless you need to break circular references that might negatively // impact the shutdown process. if (reason == APP_SHUTDOWN) return; // Your add-on needs to unload all modules it ships and imported! Components.u...
... Other information Also see Using XPCOM in JavaScript without leaking (though that page could use some updating). ...
Basic native form controls - Learn web development
basic single line text field example: <input type="text" id="comment" name="comment" value="I'm a text field"> Single line text fields have only one true constraint: if you type text with line breaks, the browser removes those line breaks before sending the data to the server. The following screenshot shows default, focused and disabled text input types in Firefox 71 and Safari on macOS and in
Chrome 79 and Edge 18 on Windows 10. Note: HTML5 enhanced the basic original single line text field by adding special values for the type attribute that enforce specific validation constraints and other features, for example specific to entering URLs or numbers. We'll cover those in the next article, The HTML5 input types. Password field One of the original input types was the password text field...
...ribute set to the value checkbox. <input type="checkbox" id="carrots" name="carrots" value="carrots" checked> Including the checked attribute makes the checkbox checked automatically when the page loads. Clicking the checkbox or its associated label toggles the checkbox on and off. The following screenshots show default, focused and disabled checkboxes in Firefox 71 and Safari 13 on macOS and
Chrome 79 and Edge 18 on Windows 10: Note: Any checkboxes and radio buttons with the checked attribute on load match the :default pseudo class, even if they are no longer checked. Any that are currently checked match the :checked pseudoclass. Due to the on-off nature of checkboxes, the checkbox is considered a toggle button, with many developers and designers expanding on the default checkbox styl...
... Actual buttons The radio button isn't actually a button, despite its name; let's move on and look at actual buttons! There are three input types that produce buttons: submit Sends the form data to the server. For <button> elements, omitting the type attribute (or an invalid value of type) results in a submit button. reset Resets all form widgets to their de...
...lements let you use HTML in their content, which is inserted between the opening and closing <button> tags. <input> elements on the other hand are empty elements; their displayed content is inserted inside the value attribute, and therefore only accepts plain text as content. The following examples show default, focused, and disabled button input types -- in Firefox 71 and Safari 13 on macOS and
Chrome 79 and Edge 18 on Windows 10. Image button The image button control is rendered exactly like an <img> element, except that when the user clicks on it, it behaves like a submit button. An image button is created using an <input> element with its type attribute set to the value image. This element supports exactly the same set of attributes as the <img> element, plus all the attributes support...
Handling common accessibility problems - Learn web development
ee how understandable it is without it. You could do this manually by just removing the CSS from your code, but the easiest way is to use browser features, for example: Firefox: Select View > Page Style > No Style from the main menu. Safari: Select Develop > Disable Styles from the main menu (to enable the Develop menu, choose Safari > Preferences > Advanced > Show Develop menu in menu bar).
Chrome: Install the Web Developer Toolbar extension, then restart the browser. Click the gear icon that will appear, then select CSS > Disable All Styles. Edge: Select View > Style > No Style from the main menu. Using native keyboard accessibility Certain HTML features can be selected using only the keyboard -- this is default behavior, available since the early days of the web. The elements that ha...
...ve all your accessibility problems on their own. You'll need a combination of these, knowledge and experience, user testing, etc. to get a full picture. Automation tools Deque's aXe tool goes a bit further than the auditing tools we mentioned above. Like the others, it checks pages and returns accessibility errors. Its most immediately useful form is probably the browser extensions: aXe for
Chrome aXe for Firefox These add an accessibility tab to the browser developer tools. For example, we installed the Firefox version, then used it to audit our bad-table.html example. We got the following results: aXe is also installable using npm, and can be integrated with task runners like Grunt and Gulp, automation frameworks like Selenium and Cucumber, unit testing frameworks like Jasmin, and ...
...frameworks like Jasmin, and more besides (again, see the main aXe page for details). Screenreaders It is definitely worth testing with a screenreader to get used to how severely visually impaired people use the Web. There are a number of screenreaders available: Some are paid-for commercial products, like JAWS (Windows) and Window Eyes (Windows). ...
...like Jasmin, and more besides (again, see the main aXe page for details). Screenreaders It is definitely worth testing with a screenreader to get used to how severely visually impaired people use the Web. There are a number of screenreaders available: Some are paid-for commercial products, like JAWS (Windows) and Window Eyes (Windows). Some are free products, like NVDA (Windows),
ChromeVox (
Chrome, Windows, and Mac OS X), and Orca (Linux). Some are built into the operating system, like VoiceOver (Mac OS X and iOS),
ChromeVox (on
Chromebooks), and TalkBack (Android). Generally, screen readers are separate apps that run on the host operating system and can read not only web pages, but text in other apps as well. This is not always the case (
ChromeVox is a browser extension), but usually. ...
Handling common JavaScript problems - Learn web development
de, you can use console.log() to print it out and see what is happening. Using the JavaScript debugger Unfortunately, we still have the same error -- the problem has not gone away. Let's investigate this now, using a more sophisticated feature of browser developer tools: the JavaScript debugger as it is called in Firefox. Note: Similar tools are available in other browsers; the Sources tab in
Chrome, Debugger in Safari (see Safari Web Development Tools), etc. In Firefox, the Debugger tab looks as follows: On the left, you can select the script you want to debug (in this case we have only one). The center panel shows the code in the selected script. The right-hand panel shows useful details pertaining to the current environment -- Breakpoints, Callstack and currently active Scopes. ...
...yone used Netscape or Internet Explorer, developers used to use so-called browser sniffing code to detect which browser the user was using, and give them appropriate code to work on that browser. The code used to look something like this (although this is a simplified example): let ua = navigator.userAgent; if(ua.indexOf('Firefox') !== -1) { // run Firefox-specific code } else if(ua.indexOf('
Chrome') !== -1) { // run
Chrome-specific code } The idea was fairly good -- detect what browser is viewing the site, and run code as appropriate to make sure the browser will be able to use your site OK. Note: Try opening up your JavaScript console now and running navigator.userAgent, to see what you get returned. However, as time went on, developers started to see major problems with this appro...
...sting bugs, like bug 1308462. Handling JavaScript prefixes In the previous article, we included quite a lot of discussion about handing CSS prefixes. Well, new JavaScript implementations sometimes use prefixes too, although JavaScript uses camel case rather than hyphenation like CSS. ...
...The easy way to get around this situation is to create a new version of the objects that are prefixed in some browsers, and make it equal to the non-prefixed version, OR the prefixed version (OR any other prefixed versions that need consideration) -- whichever one is supported by the browser currently viewing the site ...
Setting up your own test automation environment - Learn web development
wnloaded the browser drivers. You should make sure that everything is up-to-date. Next, you need to download the relevant drivers to allow WebDriver to control the browsers you want to test. You can find details of where to get them from on the selenium-webdriver page (see the table in the first section.) Obviously, some of the browsers are OS-specific, but we're going to stick with Firefox and
Chrome, as they are available across all the main OSes. Download the latest GeckoDriver (for Firefox) and
ChromeDriver drivers. Unpack them into somewhere fairly easy to navigate to, like the root of your home user directory. Add the
chromedriver and geckodriver driver's location to your system PATH variable. This should be an absolute path from the root of your hard disk, to the directory containi...
...what string to use inside the .forBrowser() method for other browsers, see the Browser enum reference page. ...
...ashboard const USERNAME = '{username}'; // AccessKey: AccessKey can be generated from automation dashboard or profile section const KEY = '{accessKey}'; // gridUrl: gridUrl can be found at automation dashboard const GRID_HOST = 'hub.lambdatest.com/wd/hub'; function searchTextOnGoogle() { // Setup Input capabilities const capabilities = { platform: 'windows 10', browserName: '
chrome', version: '67.0', resolution: '1280x800', network: true, visual: true, console: true, video: true, name: 'Test 1', // name of the test build: 'NodeJS build' // name of the build }; // URL: https://{username}:{accessToken}@hub.lambdatest.com/wd/hub const gridUrl = 'https://' + USERNAME + ':' + KEY + '@' + GRID_HOST; // setup and buil...
...elow. Let's write an example: Inside your project directory, create a new file called sauce_google_test.js. ...
How to implement a custom autocomplete search component
const Ci = Components.interfaces; const Cu = Components.utils; Cu.import('resource://gre/modules/XPCOMUtils.jsm'); const CLASS_ID = Components.ID('x753d830-ba1e-11e0-962b-0800200c9a66'); // <- Change this const CLASS_NAME = "Basic AutoComplete"; const CONTRACT_ID = '@mozilla.org/autocomplete/search;1?name=basic-autocomplete'; /** ...
... Stops an asynchronous search that is in progress */ stopSearch: function() { }, QueryInterface: XPCOMUtils.generateQI([ Ci.nsIAutoCompleteSearch ]) }; // The following line is what XPCOM uses to create components const NSGetFactory = XPCOMUtils.generateNSGetFactory([ ProviderAutoCompleteSearch ]); Then register your XPCOM component. ...
... const Ci = Components.interfaces; const CLASS_ID = Components.ID("6224daa1-71x2-4d1a-ad90-01ca1c08e323"); // <- Change this const CLASS_NAME = "Simple AutoComplete"; const CONTRACT_ID = "@mozilla.org/autocomplete/search;1?name=simple-autocomplete"; // Implements nsIAutoCompleteResult function SimpleAutoCompleteResult(searchString, s...
... so you need to make the following changes: Add an NSGetFactory() function: function NSGetFactory(cid) { if (cid.toString().toUpperCase() != CLASS_ID.toString().toUpperCase()) { throw Components.results.NS_ERROR_FACTORY_NOT_REGISTERED; } return SimpleAutoCompleteSearchFactory; } You need to explicitly register the component by adding these lines into your
chrome.manifest file: component {6224daa1-71x2-4d1a-ad90-01ca1c08e323} components/.js contract @mozilla.org/autocomplete/search;1?name=simple-autocomplete {6224daa1-71x2-4d1a-ad90-01ca1c08e323} You need to add the following method: getLabelAt: function(index) { return this._results[index]; } to SimpleAutoCompleteResult Use this newly available component in ...
IME handling guide
user can choose one of the clauses with Arrow keys and look for the expected result form the list in the drop down menu (In the following screenshot, the clause with the thicker underline is called "selected clause"). Basically, composition string and each clause style is rendered by Gecko. And the drop down menu is created by IME. Each clause is represented with selection in the editor. From
chrome script, you can check it with nsISelectionController. In native code, you can access it with either nsISelectionController or mozilla::SelectionType (the latter is recommended because of type safer). And editor sets these IME selections from mozilla::TextRangeType which are sent by mozilla::WidgetCompositionEvent as mozilla::TextRangeArray. Following table explains the mapping between them. Se...
...h a call of BeginNativeInputTransaction(). Then, StartComposition(), SetPendingComposition(), FlushPendingComposition(), CommitComposition(), etc. are available if BeginNativeInputTransaction() return true. These methods automatically manage composition state and dispatch WidgetCompositionEvent properly. This is also used by mozilla::TextInputProcessor which can emulates (or implements) IME with
chrome script. So, native IME handlers using this class means that the dispatching part is also tested by automated tests. mozilla::WidgetCompositionEvent Internally, WidgetCompositionEvent represents native IME behavior. Its message is one of following values: eCompositionStart This is dispatched at starting a composition. This represents a DOM compositionstart event. The mData value is a selected ...
...utomated tests. See also Notifications to IME section for the detail of sending notifications. Currently, WidgetQueryContentEvent is handled via IMEContentObserver because if it has a cache of selection, it can set reply of eQuerySelectedText event only with the cache. That is much faster than using ContentEventHandler. e10s support Even when a remote process has focus, native IME handler in
chrome process does its job. So, there is process boundary between native IME handler and focused editor. Unfortunately, it's not allowed to use syncronous communication from
chrome process to a remote process. This means that
chrome process (and also native IME and our native IME handler) cannot query the focused editor contents directly. For fixing this issue, we have ContentCache classes around proce...
... the cache as they requested. At this time, TSFTextStore saves the requests of modification into the queue called PendingAction. Finally, after unlocking the contents, it flushes the pending actions with dispatches WidgetCompositionEvents via TextEventDispatcher. Then, IMEContentObserver will notify some changes caused by the dispatched WidgetCompositionEvents (they are notified synchronously in
chrome or non-e10s mode, but asynchronously from a remote process in e10s mode). At this time, TSFTextStore may receive notifications which indicates web application changes the content differently from cache in TSFTextStore. However, TSFTextStore ignores such fact temporarily until the composition is finished completely. The reason is that, notifying unexpected text or selection changes to TSF and/or T...
WebChannel.jsm
Components.utils.import("resource://gre/modules/WebChannel.jsm"); Constructor WebChannel(String webChannelId, nsIURI originOrPermission); 2nd argument is a valid origin that should be part of requests for this channel. ...
...s the callback for messages on this channel. Removes the channel from the WebChannelBroker. Parameters None send() Sends messages over the WebChannel id using the "WebChannelMessageToContent" event. Parameters message The message object that will be sent senderContext The senderContext parameter passed to the .listen method. ...
...on this channel. Removes the channel from the WebChannelBroker. Parameters None send() Sends messages over the WebChannel id using the "WebChannelMessageToContent" event. Parameters message The message object that will be sent senderContext The senderContext parameter passed to the .listen method. ...
...hannel.listen(function (webChannelId, message, senderContext) { // send messages channel.send({ data: { greeting: true } }, senderContext); }); Webpage code Receive Messages from an existing WebChannel in content code window.addEventListener("WebChannelMessageToContent", function(e) { // receive messages console.log(e.detail); }, true); Send Messages to an existing WebChannel in
chrome code window.dispatchEvent(new window.CustomEvent("WebChannelMessageTo
Chrome", { detail: { id: webChannelId, message: { something: true } } })); ...
L10n Checks
file, usually found in $APP/locales/l10n.ini. You pass both the path to the ini file and the parent directory of the localizations as first arguments, followed by the locale codes of the locales you want to compare. If you want to test the localization for de, run: check-l10n-completeness browser/locales/l10n.ini ../l10n/ de Add-ons (xpi) mode L10n Checks gathers the locales to compare from the
chrome.manifest file inside the xpi file. You pass the path to the xpi file (optionally) followed by the locale codes of the locales you want to compare. If you want to test the localization for de, run: check-l10n-completeness -i xpi my-extension.xpi de To check all locales in an extension: check-l10n-completeness -i xpi my-extension.xpi Language packs (xpis) mode L10n Checks can compare two locales ...
..., run: check-l10n-completeness -i xpi my-extension.xpi de To check all locales in an extension: check-l10n-completeness -i xpi my-extension.xpi Language packs (xpis) mode L10n Checks can compare two locales found in different xpi files. You pass both paths to the xpi file and both paths to the locales inside the files, e.g.: check-l10n-completeness -i xpis en-US-langpack.xpi my-langpack.xpi jar:
chrome/en-US.jar!locale/ jar:
chrome/my.jar!locale/my/ Jar/Zip File (jar) mode L10n Checks can compare two locales found in different jar files. You pass both paths to the jar file including the inner path, e.g.: check-l10n-completeness -i jar jar:en-US.jar!locale/ jar:my.jar!locale/my/ Directories (dir) mode L10n Checks can compare two locales found in different directories. You pass both paths to the...
...re two locales found in different directories. You pass both paths to the directories, e.g.: check-l10n-completeness -i dir en-US/ my/ Files (file) mode L10n Checks can compare two files. You pass both paths to the files, e.g.: check-l10n-completeness -i file en-US.dtd my.dtd The output The output of L10n Checks shows the missing and obsolete strings in a pseudo-diff format. ...
...Cmd2.label migration/migration.dtd -importFromFile.accesskey -importFromFile.label +importFromHTMLFile.accesskey +importFromHTMLFile.label You can assume changed strings when you see entities removed and added with a similar name. The file names will be shown in a hierarchical form, so in the example above, your files are browser.dtd in ab-CD/browser/
chrome/browser and migration.dtd in another directory level deeper. The output closes with a summary, giving the total counts of missing and obsolete strings and some statistics on how many strings are changed or not, excluding access and command keys. That gives localizers an idea on how thorough the localization is. This number won't reach 100% in general; mid 80s should be the target, though. Options...
Localizing with Koala
a file view" in the sidebar (choose it from the list that appears when you click on the arrow pointing down situated next to the sidebar's [x] button). You should now see the results of the comparison in the "Koala file view" sidebar. Translating files Let's translate the searchbar-related strings mentioned in the beginning of this document. They can be found in two files, inside the browser/
chrome/browser directory: searchbar.dtd, search.properties. The difference between DTD and .properties files in the moment when they are used by the application. DTD's files are read by the XML parser, which goes through the XUL files used in Mozilla to create the interface when it launches. The .properties files are used in the JavaScript code while the application is already running. That's why the ...
...zilla\l10n\locale\x-testing\3.6 which is where the local Mercurial repository was created (see Creating a new project section), you should be able to successfully issue "hg cmd" commands in that directory (where "cmd" might be "status", "log", "commit" etc.). For example, try issuing "hg status" inside C:\mozilla\l10n\locale\x-testing\3.6: C:\mozilla\l10n\locale\x-testing\3.6> hg status ? browser\
chrome\browser\search.properties ? browser\
chrome\browser\searchbar.dtd The question marks ("?") in front of the file names indicate that the files are not tracked by Mercurial in this repository (yet). To start tracking them, you will need to "hg add" them. This can be done from Koala. Once you "hg add" every new file in the repository that you want to track in Mercurial, you will need to "hg commit" ...
...files from Koala. In the "locale files" view in the sidebar, right click on search.properties and choose "add file to repository". This will execute "hg add" on this file in the background. Koala will show you a message if the "hg add" was successful. Instead of adding single files, you can also add an entire folder. Since we still need to add searchbar.dtd, let's simply add the entire browser/
chrome/browser folder now. Right-click on the folder and choose "add folder to repository". The files have been added to the repository. If you switch to the command line and issue "hg status" again, you should now see that the files are scheduled for addition on the next commit (which is indicated by the letter "A" standing in front of each new file): C:\mozilla\l10n\locale\x-testing\3.6> hg status A ...
... folder now. Right-click on the folder and choose "add folder to repository". The files have been added to the repository. If you switch to the command line and issue "hg status" again, you should now see that the files are scheduled for addition on the next commit (which is indicated by the letter "A" standing in front of each new file): C:\mozilla\l10n\locale\x-testing\3.6> hg status A browser\
chrome\browser\search.properties A browser\
chrome\browser\searchbar.dtd You now have to commit the new files to the repository. Right-click on the browser/
chrome/browser folder in the sidebar and choose "commit folder". (You could also commit each file individually if you felt like it.) Koala will ask you to type in a commit message. It is a good practice to be descriptive about the changes you made i...
Web Replay
play's internal actions to the terminal, which is helpful when debugging hangs and crashes. default false Architecture There are several main components to the project: The record/replay infrastructure records enough information during recording so that the replayed process can run and produce the same observable behaviors. IPC integration allows a replaying process to communicate with the
chrome process using IPDL and shared memory. The rewind infrastructure allows a replaying process to restore a previous state, while still maintaining communication with the
chrome process. Debugger integration allows the JS debugger to read the information it needs from a replaying process and control the process's execution (resume/rewind). The debugger is not allowed to change the replaying proces...
... the recording will occur in the same order during replay, as if they were all protected by a single global lock. Note that while this could potentially be a big drag on performance during both replay and recording, many of the hottest atomics (refcounts, GC counters, and so forth) are associated with non-deterministic components and are not recorded. IPC integration Communication between the
chrome process and a recording or replaying process -- hereafter referred to as the child process -- is managed via a separate middleman content process. The child process is extended so that it can communicate with the middleman, using a special bidirectional channel and messages separate from IPDL state. Middleman process The middleman is the same as a normal content process, except that it spawns ...
... can communicate with the middleman, using a special bidirectional channel and messages separate from IPDL state. Middleman process The middleman is the same as a normal content process, except that it spawns and communicates with the child process, and avoids creating any documents itself. Using the middleman provides the following advantages: IPDL communication is greatly simplified. The
chrome and middleman processes communicate using the standard browser protocols (PContent, PBrowser, etc.) and implementations for their actors, while the middleman and child processes communicate with their own channel and messages, which is tuned to the demands of the recording/replaying process. The middleman can perform actions that would be extremely difficult to manage in a replaying process with...
...ent state for the child process. Constraints are used for when messages may be sent between the middleman and child process, ensuring that the middleman process cannot send a message at a time when the child process may be rewinding. Debugger integration When debugging a normal content process, the devtools JS debugger runs quite a bit of JS code in the content process, communicating with the
chrome process primarily through streams of JSON data. When debugging a child content process, this JS code runs in the middleman process. When the code creates a Debugger object, that Debugger provides information about the child process rather than the current (middleman) process. While the Debugger can indicate it is for a child process, the interface should be as transparent as possible to the de...
Components.utils.unwaiveXrays
ties, and so on). The unwaiveXrays operation undoes the operation, so Xray vision is restored transitively as well. Syntax xray = Components.utils.unwaiveXrays(obj); Parameters obj The object for which we wish to restore Xrays. Returns The object with Xrays restored. ...
...tored transitively as well. Syntax xray = Components.utils.unwaiveXrays(obj); Parameters obj The object for which we wish to restore Xrays. Returns The object with Xrays restored. Example Suppose a page script adds an expando to its global window: // page script foo = "I'm an expando"; By default,
chrome code won't see foo, because it sees the content window with Xray vision, but the
chrome code can waive Xray protection. ...
...omponents.utils.unwaiveXrays(obj); Parameters obj The object for which we wish to restore Xrays. Returns The object with Xrays restored. Example Suppose a page script adds an expando to its global window: // page script foo = "I'm an expando"; By default,
chrome code won't see foo, because it sees the content window with Xray vision, but the
chrome code can waive Xray protection. ...
...t for which we wish to restore Xrays. Returns The object with Xrays restored. Example Suppose a page script adds an expando to its global window: // page script foo = "I'm an expando"; By default,
chrome code won't see foo, because it sees the content window with Xray vision, but the
chrome code can waive Xray protection. ...
XPConnect wrappers
Developers in the know understand that wrappers play a large role in XPConnect, and that we have a lot of them. Less informed developers understand that wrappers exist and are somehow important, but they don't know when they should use what wrappers, or if they should be seeing a wrapper. ...
...he console log; for example "[object XrayWrapper [object blah]]". Because these are wrapped, you won't be able to peek down inside them from the console. Basic XPConnect objects XPCWrappedNative These objects are created when any natively implemented XPCOM object (that is, any object implemented in C++) needs to be reflected into JavaScript. This includes all DOM objects (including Window) and
chrome elements that are reflected into JavaScript. This wrapper is responsible for mapping calls from JavaScript into C++. This means that when you say window.focus(), you're calling into XPCWrappedNative code. If you call 'toString()' and get "[xpconnect wrapped nsIFoo]" then the reference is to a XPCWrappedNative object with interface nsIFoo. They are implicitly created by XPConnect and you should...
...truct them. Double wrapping. There is one case where an XPCWrappedNative wraps another wrapper object. This case is where a JS object was passed in via some IDL-declared interface, creating an XPCWrappedJS, and is now being returned to JavaScript via some other interface. In order to preserve API compatibility, an XPCWrappedNative is created around the XPCWrappedJS. ...
...PCWrappedJS, and is now being returned to JavaScript via some other interface. In order to preserve API compatibility, an XPCWrappedNative is created around the XPCWrappedJS. Security wrappers exposed to
chrome To learn about security wrappers, see the article on script security in Gecko. Note that a previous version of the current page recommended using __exposedProps__ to expose objects from
chrome to content. This is now deprecated and we are in the process of removing support for it. If you need to make objects or functions defined in
chrome code accessible to content, use Components.utils.cloneInto or Components.utils.exportFunction. ...
Observer Notifications
Firefox 3.5, this was available to observers observing the app-startup/xpcom-startup notification. final-ui-startup Triggered just before the first window for the application is displayed. sessionstore-windows-restored Sent by the session restore process to indicate that all initial browser windows have opened. Note that while the window are open and the
chrome loaded the tabs in the windows may still be being restored after this notification. Note: This notification is specific to Firefox and SeaMonkey 2.0 applications Application shutdown These are the topics that you can observe on shutdown, in order of appearance. Topic Description quit-application-requested Something has requested that the application be sh...
... none of them requested that the close be aborted. After this is sent and handled, the browser window will close. browser-delayed-startup-finished Sent when the browser window and all its components have been loaded and initialized. Documents These topics indicate notifications you can monitor related to DOM documents. Topic Subject Data Description
chrome-document-global-created nsIDOMWindow null Sent immediately after a
chrome document window has been set up, but before any script code has been executed. This lets extensions inject API into
chrome windows as needed (see nsIDOMGlobalPropertyInitializer for an alternative method of doing this, which uses significantly less memory). data is intentionally left blank. content-doc...
...ive method of doing this). data is a string form of the origin (for use in security checks), eg "http://developer.mozilla.org". document-element-inserted Document null Sent immediately after the root element of a document has been created, but before executing any script on it. user-interaction-active nsIDOMWindow null Sent once every 5000ms while this
chrome document sees some kind of user activity (for example, keyboard or mouse events), and at the exact moment of the state transition from idle to active. user-interaction-inactive nsIDOMWindow null Sent when the
chrome document has seen no user activity for a while. The notification is not repeated during a continuous inactivity period. Windows These topics ind...
...on content-contextmenu An object containing two properties: event The event that triggered the context menu. addonInfo An empty object that add-ons can use to send data to the main process. null This notification is sent when the context menu is displayed. It is sent, and received, in the content process: you can't listen to it in the
chrome process. It's used by the context-menu module in the Add-on SDK, to help send information to the context-menu code running in the
chrome process when a context menu is displayed. ...
nsIContentView
nts is coming; see bug 618975 for details. Method overview void scrollBy(in float dxPx, in float dyPx); void scrollTo(in float xPx, in float yPx); void setScale(in float xScale, in float yScale); Attributes Attribute Type Description contentHeight float Read only. contentWidth float Dimensions of scrolled content in
chrome-document CSS pixels. Read only. id nsContentViewId ID that can be used in conjunction with nsIDOMWindowUtils to change the actual document, instead of just how it is transformed; this is a 64-bit unsigned integer. Read only. scrollX float Horizontal scroll offset in
chrome-document CSS pixels. When this view is active (that is it is being painted because it...
...Fails if the view isn't valid. ...
...n the visible region of the screen), this value is at first lined up with the content's scroll offset. Note: When this view becomes inactive, the new content view will have scroll values that are reset to the default. Read only. scrollY float Horizontal scroll offset in
chrome-document CSS pixels. Read only. viewportHeight float Height of the viewport in
chrome-document CSS pixels. Read only. viewportWidth float Width of the viewport in
chrome-document CSS pixels. Read only. Methods scrollBy() Scrolls the content view by the specified number of
chrome-document CSS pixels along each axis. Fails if the view isn't valid. void scrollBy( in float dxPx, in float dyPx ); Parameters dxPx The number of CSS pixels to scroll on t...
... in float dxPx, in float dyPx ); Parameters dxPx The number of CSS pixels to scroll on the X axis; specify a positive value to scroll to the right or a negative value to scroll to the left. dyPx The number of CSS pixels to scroll on the Y axis; specify a positive value to scroll down or a negative value to scroll up. scrollTo() Scrolls the content view to the specified position, in
chrome-document CSS pixels. Fails if the view isn't valid. void scrollTo( in float xPx, in float yPx ); Parameters xPx The X coordinate to scroll to, in CSS pixels. yPx The Y coordinate to scroll to, in CSS pixels. setScale() Sets the content view's scale for each axis. void setScale( in float xScale, in float yScale ); Parameters xScale Horizontal scaling factor; specify 1.0 ...
nsIScriptError
); scriptError.init(aMessage, aSourceName, aSourceLine, aLineNumber, aColumnNumber, aFlags, aCategory); consoleService.logMessage(scriptError); } Categories There are a lot of categories, and they're not all maintained in a single list anywhere in the code. This is an attempt to group them together for reference. Note that these are strings. ...
...scriptError); } Categories There are a lot of categories, and they're not all maintained in a single list anywhere in the code. This is an attempt to group them together for reference. Note that these are strings. If you want to log an error at
chrome level you should set a Category from the first section (leaving it empty might log it as content error). As Addon author I would recommend using "
chrome javascript" for logging exceptions caused by addon code. ...
...m together for reference. Note that these are strings. If you want to log an error at
chrome level you should set a Category from the first section (leaving it empty might log it as content error). As Addon author I would recommend using "
chrome javascript" for logging exceptions caused by addon code. ...
...nce. Note that these are strings. If you want to log an error at
chrome level you should set a Category from the first section (leaving it empty might log it as content error). As Addon author I would recommend using "
chrome javascript" for logging exceptions caused by addon code. ...
XUL Overlays
the basic package, explicit loading can be somewhat problematic when the overlay defines optional UI elements. Loading overlays explicitly A processing instruction is used to load overlay files explicitly into the master document. Inserting the following processing instruction before the DOCTYPE declaration in a base file tells the layout engine to load the named overlay file: <?xul-overlay href="
chrome://component/content/componentOverlay.xul"?> where component is the name of the package being overlayed (e.g.,
chrome://navigator/content/navigatorOverlay.xul). The layout engine loads any overlay files and then flows the resulting XUL document, so problems associated with incremental insertion in menus, boxes, tables, and forms are avoided. Any number of overlays can be loaded into a master docum...
...boxes, tables, and forms are avoided. Any number of overlays can be loaded into a master document, and an overlay can also load other overlays. Because an overlay is superimposed on the master document, there are no ambiguities relating to scoping of style sheets or scripts. Style sheets and scripts loaded by the overlay simply apply to the entire master document. Loading overlays dynamically The
chrome registry makes it possible to load XUL overlays dynamically -- or only when necessary. The
chrome registry, which is a special RDF datasource into which user-specific information is persisted, or stored, contains information about the components or additional packages that have been installed with the browser. When a component such as the "Super Stream Player" from the examples above is registere...
...efined, dialogOverlay.xul. (Actually, the implementation is one step more complicated than this: base files overlay dialogOverlay.xul from the global component directory, which in turn overlays a platform-specific XUL file such as platformDialogOverlay.xul. The mechanism is the same, however.) Any dialog that wants to overlay these buttons just declares the overlay at the top: <?xul-overlay href="
chrome://global/content/dialogOverlay.xul"?> And includes an empty box with an ID of okCancelButtons in the UI. The following snippet shows a dialog with custom UI elements at the top and a reference to the overlay's OK and Cancel buttons at the bottom: <box align="horizontal" id="bx1" flex="100%" style="margin-bottom: 1em; width: 100%;"> <html:input type="checkbox" id="dialog.newWindow"/> <html:label...
...spring flex="100%"/> </box> <box id="okCancelButtons"/> For more detail, see the OK and Cancel button definitions being referenced here in the global component file platformDialogOverlay.xul. Toolbars, submenus, boxes, and any other subtrees that appear in multiple places can be defined in overlays files in this way and referenced for reuse wherever necessary. See also Chapter 12 "Overlays and
Chrome" of "Rapid Application Development with Mozilla" "Overlays", "Cross Package Overlays of XUL Tutorial ...
Index
nts This document describes the process for reviewing patches to the mozilla/mailnews and mozilla/mail directories. Thunderbird and SeaMonkey are the primary users of the code in mozilla/mailnews. Thunderbird's front-end code is stored in mozilla/mail. (A fair amount of this code is forked from code in the mailnews/ directory). 44 Main Windows thunderbird The base
chrome directory of Thunderbird can sometimes appear confusing when you're just beginning to look at it. As such, I've always thought it would be nice to have a list of what xul, js, or other files are that are here, what they do, and where they overlay at different points within the client. Things appear confusing for several reasons: 45 Message Interfaces Interfaces, Interfaces:Scriptab...
...mponent Object Model. Similar to Firefox, Thunderbird functionality can be enhanced and customized via extensions. 75 Building a Thunderbird extension 2: extension file layout Extensions, thunderbird Extensions are packaged and distributed in archive files (also known as Bundles), with the XPI (pronounced "zippy") file extension. At a minimum, they contain an install.rdf, the
chrome.manifest and a
chrome/ folder. A content/ folder sometimes contains the actual content files. These files contain the code that makes your extension actually do something. When this tutorial is finished, our extension will look like this: 76 Building a Thunderbird extension 3: install manifest Extensions, thunderbird The install.rdf file is an XML file that provides general i...
...tent files. These files contain the code that makes your extension actually do something. When this tutorial is finished, our extension will look like this: 76 Building a Thunderbird extension 3: install manifest Extensions, thunderbird The install.rdf file is an XML file that provides general information about the extension. 77 Building a Thunderbird extension 4:
chrome manifest Extensions, thunderbird The file called
chrome.manifest tells Thunderbird what packages and overlays are provided by the extension. Open the file called
chrome.manifest that you created and add this code: 78 Building a Thunderbird extension 5: XUL Extensions, thunderbird Thunderbird's user interface is written in XUL and JavaScript. XUL is an XML grammar th...
... the complete details. Since window is a global variable you can use it directly from your JavaScript file. 96 Access Window Area NeedsUpdate, missing, thunderbird This page has no content. Enrich MDC by contributing. 97 Add New Tab missing, thunderbird No summary! 98 Add Option to Context Menu incomplete, thunderbird Assuming this on
chrome.manifest: 99 Add Tab NeedsUpdate, missing, thunderbird This page has no content. Enrich MDC by contributing. 100 Add Toolbar Button Example XUL overlay file: 101 Create Custom Column thunderbird The article "Creating a Custom Column" will get you well on the road to creating your own columns and populating them with custom data. The ...
DOM Inspector FAQ - Firefox Developer Tools
Inspect a URL This just focuses the DOM Inspector's address bar, which allow you to inspect arbitrary documents which can be accessed via a URL. This causes the document to be loaded in the browser pane. ...
... How do I inspect a web site/window? ...
...pect content, e.g., unprivileged web pages loaded in a browser tab. Inspect
Chrome Document Inspect application
chrome, including open XUL windows, e.g., the browser window. Inspect a URL This just focuses the DOM Inspector's address bar, which allow you to inspect arbitrary documents which can be accessed via a URL. This causes the document to be loaded in the browser pane. These can include
chrome documents, but it's not suggested that you inspect XUL documents by directly inspecting them via URL, since some behavior may rely on the document being contained in another XUL document, or the converse, where it won't behave correctly because it doesn't expect to be loaded as a framed document. Instead, get the XUL document to load as you normally would (e.g., by invoking commands or opening wi...
...y directly inspecting them via URL, since some behavior may rely on the document being contained in another XUL document, or the converse, where it won't behave correctly because it doesn't expect to be loaded as a framed document. Instead, get the XUL document to load as you normally would (e.g., by invoking commands or opening windows via standard application use), then locate it in the Inspect
Chrome Document menu. Why do some nodes in the Document DOM Nodes viewer appear in red? These nodes are anonymous content nodes, meaning they are not in the DOM generated by the original document. Okay, what if I don't want to see those anonymous nodes? You can hide anonymous nodes in inspector by unchecking the View > Show Anonymous Content menu item. I see a lot of empty #text nodes that I don't...
Browser Toolbox - Firefox Developer Tools
. The Browser Toolbox's context is the whole browser rather than just single page on a single tab. Note: If you want to debug a specific add-on that is restartless or SDK-based then try the Add-on Debugger. Use the Browser Toolbox for add-ons that are neither. Enabling the Browser Toolbox The Browser Toolbox is not enabled by default. To enable it you need to check the settings "Enable
chrome and addon debugging" and "Enable remote debugging". To do this, open the Developer Tools Settings, go to the section "Advanced Settings", and check the settings "Enable browser
chrome and add-on debugging toolboxes" and "Enable remote debugging". Opening the Browser Toolbox Open the Browser Toolbox through the menu button and the menu items "Developer" then "Browser Toolbox". You can als...
...d the menu items "Developer" then "Browser Toolbox". You can also open it with the Ctrl + Alt +Shift + I key combination ( Cmd + Opt +Shift + I on a Mac). You will be presented with a dialog like this (it can be removed by setting the devtools.debugger.prompt-connection property to false): Click OK, and the Browser Toolbox will open in its own window: You'll be able to inspect the browser's
chrome windows and see, and be able to debug, all the JavaScript files loaded by the browser itself and by any add-ons that are running. Altogether you will have access to the following developer tools: Debugger (Note: If you want to debug a specific add-on that is restartless or SDK-based then try the Add-on Debugger.) Console Style Editor Performance Network Monitor Page Inspector Accessibi...
...o debug, all the JavaScript files loaded by the browser itself and by any add-ons that are running. Altogether you will have access to the following developer tools: Debugger (Note: If you want to debug a specific add-on that is restartless or SDK-based then try the Add-on Debugger.) Console Style Editor Performance Network Monitor Page Inspector Accessibility Inspector You can debug
chrome: and about: pages using the normal Debugger, just as if they were ordinary content pages. Targeting a document In the normal toolbox, there's a button in the toolbar enabling you to target specific iframes in the document. The same button appears in the browser toolbox where it lists all the top-level
chrome and content windows as well as any iframes they contain. This enables you to inspect do...
...ng the normal Debugger, just as if they were ordinary content pages. Targeting a document In the normal toolbox, there's a button in the toolbar enabling you to target specific iframes in the document. The same button appears in the browser toolbox where it lists all the top-level
chrome and content windows as well as any iframes they contain. This enables you to inspect documents in individual
chrome windows and popups, as well as in content tabs. For example, here's what the frame selection popup lists when there are two browser windows open, one with one content tab, and one with two: Debugging popups It's hard to debug popups, because the browser hides them as soon as you click outside them. There is a way to disable this behavior. Click the toolbox menu and select Disable popup aut...
Console messages - Firefox Developer Tools
a Certification Authority that was used to sign your site's certificate. Bug 863874 is the meta-bug for logging relevant security messages to the Web Console. If you have more ideas for useful features like the ones discussed here, or are interested in contributing, check out the metabug and its dependencies. Logging Messages logged from Shared Workers, Service Workers, add-ons, and
Chrome Workers are not shown by default. Use the filtering feature to show them. The Logging category includes messages logged using the Console API. The Web console supports the following Console API messages: assert() clear() count() dir() dirxml() error() exception() group() groupEnd() info() log() table() time() timeEnd() trace() warn() The console prints a stack trace for all...
...ception() group() groupEnd() info() log() table() time() timeEnd() trace() warn() The console prints a stack trace for all error messages, like this: function foo() { console.error("it explodes"); } function bar() { foo(); } function doStuff() { bar(); } doStuff(); Server Server-side log messages was introduced in Firefox 43, but removed in Firefox 56. You can install the
Chrome Logger extension to (re)-enable the feature. With the
Chrome Logger extension, Web Console can display messages sent from the server. This enables you to use the Web Console to debug server-side code. It uses the
Chrome Logger protocol. Briefly, the way it works is: Your server-side code -- Python, PHP, Node.js, etc. -- includes a library that provides a console API. Your server-side code ...
... Interpreter input/output Commands sent to the browser using the Web Console's JavaScript interpreter, and the corresponding responses, are logged in the console messages. ...
... library that provides a console API. Your server-side code uses this API to log messages. The server-side library creates JSON objects from the messages and encodes them for transmission. The messages are transmitted to the client as a response header named X-
ChromeLogger-Data. The Web Console decodes these headers and displays them. To find a suitable library for your server code, see the
Chrome Logger documentation. Interpreter input/output Commands sent to the browser using the Web Console's JavaScript interpreter, and the corresponding responses, are logged in the console messages. For responses that contain objects or variables, the following context menu options are available: Reveal in Inspector Shows the selected DOM node in the Inspector pane. Store as Global Variable Cr...
AnalyserNode.AnalyserNode() - Web APIs
Status Comment Web Audio APIThe definition of 'AnalyserNode() constructor' in that specification. Working Draft Initial definition. Browser Compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...f 'AnalyserNode() constructor' in that specification. Working Draft Initial definition. Browser Compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...Compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... Full support <=79Firefox Full support 53IE No support NoOpera Full support 42Safari Full support 6WebView Android Full support 55
Chrome Android Full support 55Firefox Android Full support 53Opera Android Full support 42Safari iOS Full support 6Samsung Internet Android Full support 6.0Legend ...
AudioBuffer() - Web APIs
Specification Status Comment Web Audio APIThe definition of 'AudioBuffer' in that specification. Working Draft Initial definition. Browser Compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...he definition of 'AudioBuffer' in that specification. Working Draft Initial definition. Browser Compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... Compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... 42Notes Notes The context parameter was supported up until version 44, but has now been removed.Safari ? ...
AudioBufferSourceNode.AudioBufferSourceNode() - Web APIs
ion Status Comment Web Audio APIThe definition of 'AudioBufferSourceNode()' in that specification. Working Draft Initial definition. Browser Compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...n of 'AudioBufferSourceNode()' in that specification. Working Draft Initial definition. Browser Compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...lity The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... 53IE No support NoOpera Full support 42Safari ? WebView Android Full support 55Notes Full support 55Notes Notes Before version 59, the default values were not supported.
Chrome Android Full support 55Notes Full support 55Notes Notes Before version 59, the default values were not supported.Firefox Android Full support 53Opera Android Full support 42Safari iOS ? Sa...
AudioContext.baseLatency - Web APIs
Specification Status Comment Web Audio APIThe definition of 'baseLatency' in that specification. Working Draft Initial definition. Browser Compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...he definition of 'baseLatency' in that specification. Working Draft Initial definition. Browser Compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...r Compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...e Full support <=79Firefox Full support 70IE No support NoOpera Full support 45Safari No support NoWebView Android Full support 58
Chrome Android Full support 58Firefox Android No support NoOpera Android Full support 43Safari iOS No support NoSamsung Internet Android Full support 7.0Legend ...
AudioContext.getOutputTimestamp() - Web APIs
cation Status Comment Web Audio APIThe definition of 'getOutputTimestamp()' in that specification. Working Draft Initial definition. Browser Compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...tion of 'getOutputTimestamp()' in that specification. Working Draft Initial definition. Browser Compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...tibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...e Full support <=79Firefox Full support 70IE No support NoOpera Full support 44Safari No support NoWebView Android Full support 57
Chrome Android Full support 57Firefox Android No support NoOpera Android Full support 43Safari iOS No support NoSamsung Internet Android Full support 7.0Legend ...
AudioParam.cancelAndHoldAtTime() - Web APIs
ation Status Comment Web Audio APIThe definition of 'cancelAndHoldAtTime()' in that specification. Working Draft Initial definition. Browser Compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...ion of 'cancelAndHoldAtTime()' in that specification. Working Draft Initial definition. Browser Compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...rowser Compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...ternate Name Uses the non-standard name: cancelValuesAndHoldAtTime()Safari No support NoWebView Android Full support 57 Full support 57 No support ? -- 56Alternate Name Alternate Name Uses the non-standard name: cancelValuesAndHoldAtTime()
Chrome Android Full support 57 Full support 57 No support ? -- 56Alternate Name Alternate Name Uses the non-standard name: cancelValuesAndHoldAtTime()Firefox Android No support NoOpera Android Full support ...
BaseAudioContext.createConstantSource() - Web APIs
tion Status Comment Web Audio APIThe definition of 'createConstantSource()' in that specification. Working Draft Initial definition. Browser Compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...on of 'createConstantSource()' in that specification. Working Draft Initial definition. Browser Compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...owser Compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...e Full support <=79Firefox Full support 53IE No support NoOpera Full support 43Safari No support NoWebView Android Full support 56
Chrome Android Full support 56Firefox Android Full support 53Opera Android Full support 43Safari iOS No support NoSamsung Internet Android Full support 6.0Legend ...
BasicCardRequest.supportedNetworks - Web APIs
tion Status Comment Basic Card PaymentThe definition of 'supportedNetworks' in that specification. Working Draft Initial definition. Browser Compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...inition of 'supportedNetworks' in that specification. Working Draft Initial definition. Browser Compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... Browser Compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...om version 56: this feature is behind the dom.payments.request.enabled preference (needs to be set to true). To change preferences in Firefox, visit about:config.IE No support NoOpera No support NoSafari ? WebView Android No support No
Chrome Android Full support 57Firefox Android Full support 56Notes Disabled Full support 56Notes Disabled Notes Available only in nightly builds.Disabled From version 56: this feature is behind the dom.payments.request.enabled preference (needs to be set to true). To ch...
BasicCardResponse.billingAddress - Web APIs
ication Status Comment Basic Card PaymentThe definition of 'billingAddress' in that specification. Working Draft Initial definition. Browser Compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...definition of 'billingAddress' in that specification. Working Draft Initial definition. Browser Compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... Browser Compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...om version 56: this feature is behind the dom.payments.request.enabled preference (needs to be set to true). To change preferences in Firefox, visit about:config.IE No support NoOpera No support NoSafari ? WebView Android No support No
Chrome Android Full support 57Firefox Android Full support 56Notes Disabled Full support 56Notes Disabled Notes Available only in nightly builds.Disabled From version 56: this feature is behind the dom.payments.request.enabled preference (needs to be set to true). To ch...
BasicCardResponse.cardNumber - Web APIs
ecification Status Comment Basic Card PaymentThe definition of 'cardNumber' in that specification. Working Draft Initial definition. Browser Compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...The definition of 'cardNumber' in that specification. Working Draft Initial definition. Browser Compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... Browser Compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...om version 56: this feature is behind the dom.payments.request.enabled preference (needs to be set to true). To change preferences in Firefox, visit about:config.IE No support NoOpera No support NoSafari ? WebView Android No support No
Chrome Android Full support 57Firefox Android Full support 56Notes Disabled Full support 56Notes Disabled Notes Available only in nightly builds.Disabled From version 56: this feature is behind the dom.payments.request.enabled preference (needs to be set to true). To ch...
BasicCardResponse.cardSecurityCode - Web APIs
ation Status Comment Basic Card PaymentThe definition of 'cardSecurityCode' in that specification. Working Draft Initial definition. Browser Compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...finition of 'cardSecurityCode' in that specification. Working Draft Initial definition. Browser Compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... Browser Compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...om version 56: this feature is behind the dom.payments.request.enabled preference (needs to be set to true). To change preferences in Firefox, visit about:config.IE No support NoOpera No support NoSafari ? WebView Android No support No
Chrome Android Full support 57Firefox Android Full support 56Notes Disabled Full support 56Notes Disabled Notes Available only in nightly builds.Disabled From version 56: this feature is behind the dom.payments.request.enabled preference (needs to be set to true). To ch...
BasicCardResponse.cardholderName - Web APIs
ication Status Comment Basic Card PaymentThe definition of 'cardholderName' in that specification. Working Draft Initial definition. Browser Compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...definition of 'cardholderName' in that specification. Working Draft Initial definition. Browser Compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... Browser Compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...om version 56: this feature is behind the dom.payments.request.enabled preference (needs to be set to true). To change preferences in Firefox, visit about:config.IE No support NoOpera No support NoSafari ? WebView Android No support No
Chrome Android Full support 57Firefox Android Full support 56Notes Disabled Full support 56Notes Disabled Notes Available only in nightly builds.Disabled From version 56: this feature is behind the dom.payments.request.enabled preference (needs to be set to true). To ch...
BasicCardResponse.expiryMonth - Web APIs
cification Status Comment Basic Card PaymentThe definition of 'expiryMonth' in that specification. Working Draft Initial definition. Browser Compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...he definition of 'expiryMonth' in that specification. Working Draft Initial definition. Browser Compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... Browser Compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...om version 56: this feature is behind the dom.payments.request.enabled preference (needs to be set to true). To change preferences in Firefox, visit about:config.IE No support NoOpera No support NoSafari ? WebView Android No support No
Chrome Android Full support 57Firefox Android Full support 56Notes Disabled Full support 56Notes Disabled Notes Available only in nightly builds.Disabled From version 56: this feature is behind the dom.payments.request.enabled preference (needs to be set to true). To ch...
BasicCardResponse.expiryYear - Web APIs
ecification Status Comment Basic Card PaymentThe definition of 'expiryYear' in that specification. Working Draft Initial definition. Browser Compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...The definition of 'expiryYear' in that specification. Working Draft Initial definition. Browser Compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... Browser Compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...om version 56: this feature is behind the dom.payments.request.enabled preference (needs to be set to true). To change preferences in Firefox, visit about:config.IE No support NoOpera No support NoSafari ? WebView Android No support No
Chrome Android Full support 57Firefox Android Full support 56Notes Disabled Full support 56Notes Disabled Notes Available only in nightly builds.Disabled From version 56: this feature is behind the dom.payments.request.enabled preference (needs to be set to true). To ch...
BlobEvent.timecode - Web APIs
cification Status Comment MediaStream RecordingThe definition of 'timecode' in that specification. Working Draft Initial definition. Browser Compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...ngThe definition of 'timecode' in that specification. Working Draft Initial definition. Browser Compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...wser Compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... 57Edge Full support <=79Firefox ? IE No support NoOpera Full support 44Safari No support NoWebView Android Full support 57
Chrome Android Full support 57Firefox Android ? Opera Android Full support 43Safari iOS No support NoSamsung Internet Android Full support 7.0Legend Full support ...
BudgetService.getBudget() - Web APIs
= BudgetService.getBudget(); aPromise.then(function(budgetState[]){ ... }); Parameters None. Returns A Promise that resolves to an instance of BudgetState. Browser Compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...ate[]){ ... }); Parameters None. Returns A Promise that resolves to an instance of BudgetState. Browser Compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...e compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... Opera Android Full support 42Safari iOS ? ...
BudgetService.getCost() - Web APIs
etCost(operation); aPromise.then(function(someDouble){ ... }); Parameters operation Must be "silent-push". Returns A Promise that resolves to a number. Browser Compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...); Parameters operation Must be "silent-push". Returns A Promise that resolves to a number. Browser Compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... Opera Android Full support 42Safari iOS ? ...
BudgetService.reserve() - Web APIs
se = BudgetService.reserve(operation); aPromise.then(function(boolean){ ... }); Parameters operation desc Returns A Promise that resolves to a boolean. Browser Compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...n(boolean){ ... }); Parameters operation desc Returns A Promise that resolves to a boolean. Browser Compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... Opera Android Full support 42Safari iOS ? ...
BudgetState.budgetAt - Web APIs
erty of the BudgetState interface returns the anticipated processing budget at the specified time. Syntax var budget = BudgetState.budgetAt Value A double. Browser Compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...ocessing budget at the specified time. Syntax var budget = BudgetState.budgetAt Value A double. Browser Compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...he compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... Opera Android No support NoSafari iOS ? ...
BudgetState.time - Web APIs
-only property of the BudgetState interface returns a timestamp at which the budgetAt value is valid. Syntax var time = BudgetState.time Value A timestamp. Browser Compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...amp at which the budgetAt value is valid. Syntax var time = BudgetState.time Value A timestamp. Browser Compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... Opera Android No support NoSafari iOS ? ...
CSSStyleRule.selectorText - Web APIs
ation Status Comment CSS Object Model (CSSOM)The definition of 'CSSStyleRule.selectorText' in that specification. Working Draft Browser Compatibility The compatibility table in this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...SOM)The definition of 'CSSStyleRule.selectorText' in that specification. Working Draft Browser Compatibility The compatibility table in this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... Browser Compatibility The compatibility table in this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... Full support 12Firefox Full support 1IE Full support 9Opera Full support YesSafari Full support 6WebView Android Full support 4.4
Chrome Android Full support 18Firefox Android Full support 4Opera Android Full support YesSafari iOS Full support YesSamsung Internet Android Full support 1.0Legend ...
ConvolverNode() - Web APIs
ecification Status Comment Web Audio APIThe definition of 'ConvolverNode()' in that specification. Working Draft Initial definition. Browser Compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...efinition of 'ConvolverNode()' in that specification. Working Draft Initial definition. Browser Compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...ompatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... 55Edge Full support <=79Firefox Full support 53IE No support NoOpera Full support 42Safari ? WebView Android Full support 55
Chrome Android Full support 55Firefox Android Full support 53Opera Android Full support 42Safari iOS ? Samsung Internet Android Full support 6.0Legend Full suppor...
DOMException() - Web APIs
Web IDLThe definition of 'DOMException()' in that specification. Candidate Recommendation Adds the constructor for the DOMException class. Browser Compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...specification. Candidate Recommendation Adds the constructor for the DOMException class. Browser Compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... Compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... Opera Android Full support YesSafari iOS ? ...
DOMException.code - Web APIs
ecifications Specification Status Comment Web IDLThe definition of 'code' in that specification. Candidate Recommendation Browser Compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... Web IDLThe definition of 'code' in that specification. Candidate Recommendation Browser Compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...on Browser Compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... YesEdge Full support 12Firefox Full support 1IE ? ...
DOMException.message - Web APIs
fications Specification Status Comment Web IDLThe definition of 'message' in that specification. Candidate Recommendation Browser Compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... Web IDLThe definition of 'message' in that specification. Candidate Recommendation Browser Compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... Browser Compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... YesEdge Full support 12Firefox Full support 1IE ? ...
DOMHighResTimeStamp - Web APIs
nterfaces and types. High Resolution TimeThe definition of 'DOMHighResTimeStamp' in that specification. Recommendation Initial definition. Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...tion of 'DOMHighResTimeStamp' in that specification. Recommendation Initial definition. Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...rowser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...e Full support 12Firefox Full support 7IE Full support 9Opera Full support 15Safari Full support 8WebView Android Full support Yes
Chrome Android Full support 18Firefox Android Full support 15Opera Android Full support 14Safari iOS Full support 9Samsung Internet Android Full support 1.0Legend ...
DOMRectReadOnly.fromRect() - Web APIs
mment Geometry Interfaces Module Level 1The definition of 'fromRect()' in that specification. Candidate Recommendation Initial definition. Browser Compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...ion of 'fromRect()' in that specification. Candidate Recommendation Initial definition. Browser Compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...Compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... Full support 79Firefox Full support 69IE No support NoOpera Full support 44Safari Full support 10.1WebView Android Full support 57
Chrome Android Full support 57Firefox Android No support NoOpera Android Full support 43Safari iOS Full support 10.3Samsung Internet Android Full support 7.0Legend ...
DOMTokenList.forEach() - Web APIs
n Status Comment DOMThe definition of 'forEach() (as iterable<Node>)' in that specification. Living Standard Initial definition. Browser Compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...rEach() (as iterable<Node>)' in that specification. Living Standard Initial definition. Browser Compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...on. Browser Compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...e Full support 16Firefox Full support 50IE No support NoOpera Full support 32Safari Full support 10WebView Android Full support 45
Chrome Android Full support 45Firefox Android Full support 50Opera Android Full support 32Safari iOS Full support 10Samsung Internet Android Full support 5.0Legend ...
DataTransferItem.webkitGetAsEntry() - Web APIs
APIThe definition of 'webkitGetAsEntry()' in that specification. Draft Initial specification. This API has no official W3C or WHATWG specification. Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...ion. Draft Initial specification. This API has no official W3C or WHATWG specification. Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
.... Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...dge Full support 14Firefox Full support 50IE No support NoOpera No support NoSafari Full support 11.1WebView Android No support No
Chrome Android Full support YesFirefox Android Full support 50Opera Android No support NoSafari iOS Full support 11.3Samsung Internet Android Full support YesLegend ...
DelayNode() - Web APIs
Specification Status Comment Web Audio APIThe definition of 'DelayNode()' in that specification. Working Draft Initial definition. Browser Compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...he definition of 'DelayNode()' in that specification. Working Draft Initial definition. Browser Compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...er Compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... 53IE No support NoOpera Full support 42Safari ? WebView Android Full support 55Notes Full support 55Notes Notes Before version 59, the default values were not supported.
Chrome Android Full support 55Notes Full support 55Notes Notes Before version 59, the default values were not supported.Firefox Android Full support 53Opera Android Full support 42Safari iOS ? Sa...
DirectoryReaderSync - Web APIs
modified since the first call to readEntries was processed. SECURITY_ERR The browser determined that it was not safe to look up the metadata. Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... SECURITY_ERR The browser determined that it was not safe to look up the metadata. Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...tibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... NoIE No support NoOpera No support NoSafari No support NoWebView Android Full support 37Prefixed Full support 37Prefixed Prefixed Implemented with the vendor prefix: webkit
Chrome Android Full support 18Prefixed Full support 18Prefixed Prefixed Implemented with the vendor prefix: webkitFirefox Android No support NoOpera Android No support NoSafari iOS No support ...
Document.evaluate() - Web APIs
ment Object Model (DOM) Level 3 XPath SpecificationThe definition of 'Document.evaluate' in that specification. Recommendation Initial specification Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...ition of 'Document.evaluate' in that specification. Recommendation Initial specification Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...ion Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...dge Full support 12Firefox Full support 1.5IE No support NoOpera Full support 9Safari Full support 5WebView Android Full support 1
Chrome Android Full support 18Firefox Android Full support 4Opera Android Full support 10.1Safari iOS Full support 4.2Samsung Internet Android Full support 1.0Legend ...
Document.fonts - Web APIs
tatus Comment CSS Font Loading Module Level 3The definition of 'FontFaceSet' in that specification. Working Draft Initial definition Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...3The definition of 'FontFaceSet' in that specification. Working Draft Initial definition Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...nition Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...he layout.css.font-loading-api.enabled preference (needs to be set to true). ...
Document.forms - Web APIs
Document Object Model (DOM) Level 2 HTML SpecificationThe definition of 'Document.forms' in that specification. Obsolete Initial definition. Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...onThe definition of 'Document.forms' in that specification. Obsolete Initial definition. Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...ition. Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... 1Edge Full support 12Firefox Full support YesIE ? ...
DocumentFragment.querySelector() - Web APIs
ors API Level 1 Selectors API Level 1The definition of 'DocumentFragment.querySelector' in that specification. Obsolete Initial definition. Browser compatibility The compatibility table in this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... of 'DocumentFragment.querySelector' in that specification. Obsolete Initial definition. Browser compatibility The compatibility table in this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... Browser compatibility The compatibility table in this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... Full support 12Firefox Full support 3.5IE Full support 9Opera Full support 10Safari Full support 3.2WebView Android Full support Yes
Chrome Android Full support YesFirefox Android Full support 4Opera Android Full support 10.1Safari iOS Full support 3.2Samsung Internet Android Full support YesLegend ...
DocumentOrShadowRoot.getSelection() - Web APIs
Specification Status Comment Shadow DOMThe definition of 'DocumentOrShadowRoot' in that specification. Obsolete Initial definition. Browser Compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...efinition of 'DocumentOrShadowRoot' in that specification. Obsolete Initial definition. Browser Compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... Compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... Full support 12Firefox Full support 63IE Full support YesOpera Full support 40Safari Full support YesWebView Android Full support 53
Chrome Android Full support 53Firefox Android Full support 63Opera Android Full support 41Safari iOS Full support YesSamsung Internet Android Full support 6.0Legend ...
Element.currentStyle - Web APIs
et: function() { return window.getComputedStyle(this); } }); } Specification Not part of any specification. Microsoft had a description on MSDN. Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... } }); } Specification Not part of any specification. Microsoft had a description on MSDN. Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...r compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... NoEdge No support NoFirefox No support NoIE Full support 6Opera No support NoSafari No support NoWebView Android No support No
Chrome Android No support NoFirefox Android No support NoOpera Android No support NoSafari iOS No support NoSamsung Internet Android No support NoLegend ...
Element.runtimeStyle - Web APIs
ttribute. It is available in old versions of Microsoft Internet Explorer. Specification Not a part of any specification. Microsoft had a description on MSDN. Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...net Explorer. Specification Not a part of any specification. Microsoft had a description on MSDN. Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...r compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... NoEdge No support NoFirefox No support NoIE Full support 6Opera No support NoSafari No support NoWebView Android No support No
Chrome Android No support NoFirefox Android No support NoOpera Android No support NoSafari iOS No support NoSamsung Internet Android No support NoLegend ...
Element.scrollLeftMax - Web APIs
maximum left scroll offset possible for the element. Syntax var pxl = element.scrollLeftMax; Specifications This property is not part of any specification. Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...x var pxl = element.scrollLeftMax; Specifications This property is not part of any specification. Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... NoEdge No support NoFirefox Full support 16IE No support NoOpera No support NoSafari No support NoWebView Android No support No
Chrome Android No support NoFirefox Android Full support 16Opera Android No support NoSafari iOS No support NoSamsung Internet Android No support NoLegend ...
Element.slot - Web APIs
my-text' Specifications Specification Status Comment DOMThe definition of 'slot' in that specification. Living Standard Browser Compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... Comment DOMThe definition of 'slot' in that specification. Living Standard Browser Compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...d Browser Compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... 53Edge Full support <=79Firefox Full support 63IE ? ...
Event.initEvent() - Web APIs
Document Object Model (DOM) Level 2 Events SpecificationThe definition of 'Event.initEvent()' in that specification. Obsolete Initial definition. Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...he definition of 'Event.initEvent()' in that specification. Obsolete Initial definition. Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...rowser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...-- 17Notes Notes Before Firefox 17, a call to this method after the dispatching of the event raised an exception instead of doing nothing.Opera Android ...
EventTarget.dispatchEvent() - Web APIs
DOMThe definition of 'EventTarget.dispatchEvent()' in that specification. Living Standard Initial definition in the DOM 2 Events specification. Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...hat specification. Living Standard Initial definition in the DOM 2 Events specification. Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...port 6 -- 11Notes Alternate Name Notes Older versions of IE supported an equivalent, proprietary EventTarget.fireEvent() method.Alternate Name Uses the non-standard name: fireEventOpera Full support 9Safari Full support 3.2WebView Android Full support 4
Chrome Android Full support 18Firefox Android Full support 4Opera Android Full support 10.1Safari iOS Full support 3Samsung Internet Android Full support 1.0Legend ...
FederatedCredential - Web APIs
provider. Specifications Specification Status Comment Credential Management Level 1 Working Draft Initial definition. Browser compatibility The compatibility table in this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...atus Comment Credential Management Level 1 Working Draft Initial definition. Browser compatibility The compatibility table in this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...compatibility table in this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... Opera Android ? Safari iOS ? ...
FederatedCredential.protocol - Web APIs
Status Comments Credential Management Level 1The definition of 'protocol' in that specification. Working Draft Initial definition. Browser compatibility The compatibility table in this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...l 1The definition of 'protocol' in that specification. Working Draft Initial definition. Browser compatibility The compatibility table in this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...owser compatibility The compatibility table in this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... Opera Android ? Safari iOS ? ...
FederatedCredential.provider - Web APIs
e // TBD Specifications Specification Status Comments Credential Management Level 1 Working Draft Initial definition. Browser compatibility The compatibility table in this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... Comments Credential Management Level 1 Working Draft Initial definition. Browser compatibility The compatibility table in this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...owser compatibility The compatibility table in this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... Opera Android ? Safari iOS ? ...
FetchEvent.navigationPreload - Web APIs
ication Status Comment Service WorkersThe definition of 'navigationPreload' in that specification. Working Draft Initial definition. Browser Compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...inition of 'navigationPreload' in that specification. Working Draft Initial definition. Browser Compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...atibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... 59Edge Full support <=79Firefox ? IE No support NoOpera Full support 46Safari No support NoWebView Android Full support 59
Chrome Android Full support 59Firefox Android ? Opera Android Full support 43Safari iOS No support NoSamsung Internet Android Full support 7.0Legend Full support ...
File.webkitRelativePath - Web APIs
APIThe definition of 'webkitRelativePath' in that specification. Draft Initial specification. This API has no official W3C or WHATWG specification. Browser compatibility The compatibility table in this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...ion. Draft Initial specification. This API has no official W3C or WHATWG specification. Browser compatibility The compatibility table in this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... Browser compatibility The compatibility table in this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... Full support 13Firefox Full support 49IE No support NoOpera No support NoSafari Full support 11.1WebView Android Full support Yes
Chrome Android Full support 18Prefixed Full support 18Prefixed Prefixed Implemented with the vendor prefix: webkitFirefox Android Full support 49Opera Android No support NoSafari iOS Full support ...
FileEntrySync - Web APIs
NOT_FOUND_ERR The file does not exist. INVALID_STATE_ERR The file is no longer valid for some reason other than it having been deleted. Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...TATE_ERR The file is no longer valid for some reason other than it having been deleted. Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... NoIE No support NoOpera No support NoSafari No support NoWebView Android Full support 37Prefixed Full support 37Prefixed Prefixed Implemented with the vendor prefix: webkit
Chrome Android Full support 18Prefixed Full support 18Prefixed Prefixed Implemented with the vendor prefix: webkitFirefox Android No support NoOpera Android No support NoSafari iOS No support ...
FileException - Web APIs
a file or directory, but the Entry found is of the wrong type. For example, the app is accessing a DirectoryEntry when the user is requesting a FileEntry. Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...e. For example, the app is accessing a DirectoryEntry when the user is requesting a FileEntry. Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...lity The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... webkitEdge No support NoFirefox No support NoIE No support NoOpera No support NoSafari No support NoWebView Android No support No
Chrome Android No support 18 -- 29Prefixed No support 18 -- 29Prefixed Prefixed Implemented with the vendor prefix: webkitFirefox Android No support NoOpera Android No support NoSafari iOS No support NoSamsung Internet...
FileReaderSync.readAsArrayBuffer() - Web APIs
cification Status Comment File APIThe definition of 'readAsArrayBufferSync' in that specification. Working Draft Initial definition. Browser Compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...ion of 'readAsArrayBufferSync' in that specification. Working Draft Initial definition. Browser Compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... Browser Compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... Full support 12Firefox Full support 8IE Full support YesOpera Full support YesSafari Full support YesWebView Android Full support Yes
Chrome Android Full support YesFirefox Android Full support 8Opera Android Full support YesSafari iOS Full support YesSamsung Internet Android Full support YesLegend ...
FileReaderSync.readAsBinaryString() - Web APIs
ification Status Comment File APIThe definition of 'readAsBinaryStringSync' in that specification. Working Draft Initial definition. Browser Compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...on of 'readAsBinaryStringSync' in that specification. Working Draft Initial definition. Browser Compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...Browser Compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... Full support 12Firefox Full support 8IE Full support YesOpera Full support YesSafari Full support YesWebView Android Full support Yes
Chrome Android Full support YesFirefox Android Full support 8Opera Android Full support YesSafari iOS Full support YesSamsung Internet Android Full support YesLegend ...
FileReaderSync.readAsDataURL() - Web APIs
Specification Status Comment File APIThe definition of 'readAsDataURL' in that specification. Working Draft Initial definition. Browser Compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... definition of 'readAsDataURL' in that specification. Working Draft Initial definition. Browser Compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... Browser Compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... Full support 12Firefox Full support 8IE Full support YesOpera Full support YesSafari Full support YesWebView Android Full support Yes
Chrome Android Full support YesFirefox Android Full support 8Opera Android Full support YesSafari iOS Full support YesSamsung Internet Android Full support YesLegend ...
FileReaderSync.readAsText() - Web APIs
Specification Status Comment File APIThe definition of 'readAsText' in that specification. Working Draft Initial definition. Browser Compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...The definition of 'readAsText' in that specification. Working Draft Initial definition. Browser Compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... Browser Compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... Full support 12Firefox Full support 8IE Full support YesOpera Full support YesSafari Full support YesWebView Android Full support Yes
Chrome Android Full support YesFirefox Android Full support 8Opera Android Full support YesSafari iOS Full support YesSamsung Internet Android Full support YesLegend ...
FileSystem.name - Web APIs
ication Status Comment File and Directory Entries APIThe definition of 'name' in that specification. Draft Initial specification. Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... Entries APIThe definition of 'name' in that specification. Draft Initial specification. Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...cation. Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... Full support <=18Firefox Full support 50IE No support NoOpera Full support 15Safari Full support 11.1WebView Android Full support <=37
Chrome Android Full support 18Firefox Android Full support 50Opera Android Full support 14Safari iOS Full support 11.3Samsung Internet Android Full support 1.0Legend ...
FileSystem.root - Web APIs
ication Status Comment File and Directory Entries APIThe definition of 'root' in that specification. Draft Initial specification. Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... Entries APIThe definition of 'root' in that specification. Draft Initial specification. Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...cation. Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... Full support <=18Firefox Full support 50IE No support NoOpera Full support 15Safari Full support 11.1WebView Android Full support <=37
Chrome Android Full support 18Firefox Android Full support 50Opera Android Full support 14Safari iOS Full support 11.3Samsung Internet Android Full support 1.0Legend ...
FileSystemDirectoryEntry.createReader() - Web APIs
Status Comment File and Directory Entries APIThe definition of 'createReader()' in that specification. Draft Initial specification. Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...PIThe definition of 'createReader()' in that specification. Draft Initial specification. Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...r compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... Full support 79Firefox Full support 50IE No support NoOpera No support NoSafari Full support 11.1WebView Android Full support <=37
Chrome Android Full support 18Firefox Android Full support 50Opera Android No support NoSafari iOS Full support 11.3Samsung Internet Android Full support YesLegend ...
FileSystemDirectoryEntry.getDirectory() - Web APIs
Status Comment File and Directory Entries APIThe definition of 'getDirectory()' in that specification. Draft Initial specification. Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...PIThe definition of 'getDirectory()' in that specification. Draft Initial specification. Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...r compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... 50Notes Notes In Firefox, the errorCallback's input parameter is a DOMException rather than a FileError object.IE No support NoOpera No support NoSafari Full support 11.1WebView Android Full support <=37
Chrome Android Full support 18Firefox Android Full support 50Notes Full support 50Notes Notes In Firefox, the errorCallback's input parameter is a DOMException rather than a FileError object.Opera Android No support NoSafari ...
FileSystemDirectoryEntry.getFile() - Web APIs
on Status Comment File and Directory Entries APIThe definition of 'getFile()' in that specification. Draft Initial specification. Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...ies APIThe definition of 'getFile()' in that specification. Draft Initial specification. Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...rowser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... 50Notes Notes In Firefox, the errorCallback's input parameter is a DOMException rather than a FileError object.IE No support NoOpera No support NoSafari Full support 11.1WebView Android Full support <=37
Chrome Android Full support 18Firefox Android Full support 50Notes Full support 50Notes Notes In Firefox, the errorCallback's input parameter is a DOMException rather than a FileError object.Opera Android No support NoSafari ...
FileSystemDirectoryEntry.removeRecursively() - Web APIs
rectory.removeRecursively(function() { /* The directory was removed successfully */ }, function() { /* an error occurred while removing the directory */ }); Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...s removed successfully */ }, function() { /* an error occurred while removing the directory */ }); Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...52Notes Notes While the removeRecursively() method existed, it immediately called the error callback with NS_ERROR_DOM_SECURITY_ERR.IE No support NoOpera No support NoSafari No support NoWebView Android Full support <=37
Chrome Android Full support 18Firefox Android No support 50 -- 52Notes No support 50 -- 52Notes Notes While the removeRecursively() method existed, it immediately called the error callback with NS_ERROR_DOM_SECURITY_ERR.Opera Android No support NoSafari iOS ...
FileSystemEntry.copyTo() - Web APIs
", {}, function(fileEntry) { workingDirectory.getDirectory("log", {}, function(dirEntry) { fileEntry.copyTo(dirEntry); }, handleError); }, handleError); Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...("log", {}, function(dirEntry) { fileEntry.copyTo(dirEntry); }, handleError); }, handleError); Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...8Edge Full support 79Firefox No support NoIE No support NoOpera No support NoSafari No support NoWebView Android Full support <=37
Chrome Android Full support 18Firefox Android No support NoOpera Android No support NoSafari iOS No support NoSamsung Internet Android Full support YesLegend ...
FileSystemEntry.filesystem - Web APIs
n Status Comment File and Directory Entries APIThe definition of 'filesystem' in that specification. Draft Initial specification. Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...es APIThe definition of 'filesystem' in that specification. Draft Initial specification. Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...ser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... Full support 79Firefox Full support 50IE No support NoOpera No support NoSafari Full support 11.1WebView Android Full support <=37
Chrome Android Full support 18Firefox Android Full support 50Opera Android No support NoSafari iOS Full support 11.3Samsung Internet Android Full support YesLegend ...
FileSystemEntry.fullPath - Web APIs
y Entries APIThe definition of 'fullPath' in that specification. Draft Initial specification. This API has no official W3C or WHATWG specification. Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...ion. Draft Initial specification. This API has no official W3C or WHATWG specification. Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...owser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... Full support 79Firefox Full support 50IE No support NoOpera No support NoSafari Full support 11.1WebView Android Full support <=37
Chrome Android Full support 18Firefox Android Full support 50Opera Android No support NoSafari iOS Full support 11.3Samsung Internet Android Full support YesLegend ...
FileSystemEntry.getMetadata() - Web APIs
6) { workingDirectory.getDirectory("log", {}, function(dirEntry) { fileEntry.moveTo(dirEntry); }, handleError); } }); }, handleError); Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...(dirEntry) { fileEntry.moveTo(dirEntry); }, handleError); } }); }, handleError); Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...8Edge Full support 79Firefox No support NoIE No support NoOpera No support NoSafari No support NoWebView Android Full support <=37
Chrome Android Full support 18Firefox Android No support NoOpera Android No support NoSafari iOS No support NoSamsung Internet Android Full support YesLegend ...
FileSystemEntry.getParent() - Web APIs
Status Comment File and Directory Entries APIThe definition of 'getParent()' in that specification. Draft Initial specification. Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...s APIThe definition of 'getParent()' in that specification. Draft Initial specification. Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...wser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...e Full support 79Firefox No support NoIE No support NoOpera No support NoSafari Full support 11.1WebView Android Full support <=37
Chrome Android Full support 18Firefox Android No support NoOpera Android No support NoSafari iOS Full support 11.3Samsung Internet Android Full support YesLegend ...
FileSystemEntry.isDirectory - Web APIs
Status Comment File and Directory Entries APIThe definition of 'isDirectory' in that specification. Draft Initial specification. Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...s APIThe definition of 'isDirectory' in that specification. Draft Initial specification. Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...er compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... Full support 79Firefox Full support 50IE No support NoOpera No support NoSafari Full support 11.1WebView Android Full support <=37
Chrome Android Full support 18Firefox Android Full support 50Opera Android No support NoSafari iOS Full support 11.3Samsung Internet Android Full support YesLegend ...
FileSystemEntry.isFile - Web APIs
ation Status Comment File and Directory Entries APIThe definition of 'isFile' in that specification. Draft Initial specification. Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...ntries APIThe definition of 'isFile' in that specification. Draft Initial specification. Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... Full support 79Firefox Full support 50IE No support NoOpera No support NoSafari Full support 11.1WebView Android Full support <=37
Chrome Android Full support 18Firefox Android Full support 50Opera Android No support NoSafari iOS Full support 11.3Samsung Internet Android Full support YesLegend ...
FileSystemEntry.moveTo() - Web APIs
6) { workingDirectory.getDirectory("log", {}, function(dirEntry) { fileEntry.moveTo(dirEntry); }, handleError); } }); }, handleError); Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...(dirEntry) { fileEntry.moveTo(dirEntry); }, handleError); } }); }, handleError); Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...8Edge Full support 79Firefox No support NoIE No support NoOpera No support NoSafari No support NoWebView Android Full support <=37
Chrome Android Full support 18Firefox Android No support NoOpera Android No support NoSafari iOS No support NoSamsung Internet Android Full support YesLegend ...
FileSystemEntry.name - Web APIs
ication Status Comment File and Directory Entries APIThe definition of 'name' in that specification. Draft Initial specification. Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... Entries APIThe definition of 'name' in that specification. Draft Initial specification. Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... Full support 79Firefox Full support 50IE No support NoOpera No support NoSafari Full support 11.1WebView Android Full support <=37
Chrome Android Full support 18Firefox Android Full support 50Opera Android No support NoSafari iOS Full support 11.3Samsung Internet Android Full support YesLegend ...
FileSystemEntry.remove() - Web APIs
ectory.getFile("tmp/workfile.json", {}, function(fileEntry) { fileEntry.remove(function() { /* the file was removed successfully */ }); }, handleError); Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...{ fileEntry.remove(function() { /* the file was removed successfully */ }); }, handleError); Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...8Edge Full support 79Firefox No support NoIE No support NoOpera No support NoSafari No support NoWebView Android Full support <=37
Chrome Android Full support 18Firefox Android No support NoOpera Android No support NoSafari iOS No support NoSamsung Internet Android Full support YesLegend ...
FileSystemEntry.toURL() - Web APIs
would be HTML that looks like this being appended to the end of the document: <img src="filesystem:http://my-awesome-website.woot/temporary/awesomesauce.jpg"> Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...d of the document: <img src="filesystem:http://my-awesome-website.woot/temporary/awesomesauce.jpg"> Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...8Edge Full support 79Firefox No support NoIE No support NoOpera No support NoSafari No support NoWebView Android Full support <=37
Chrome Android Full support 18Firefox Android No support NoOpera Android No support NoSafari iOS No support NoSamsung Internet Android Full support YesLegend ...
FileSystemFileEntry.createWriter() - Web APIs
at contains the passed text. This blob is then output to the FileWriter object to be written to the file. This API has no official W3C or WHATWG specification. Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... FileWriter object to be written to the file. This API has no official W3C or WHATWG specification. Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...ility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...52Notes Notes While the createWriter() method existed, it immediately called errorCallback with the NS_ERROR_DOM_SECURITY_ERR error.IE No support NoOpera No support NoSafari No support NoWebView Android Full support <=37
Chrome Android Full support 18Firefox Android No support 50 -- 52Notes No support 50 -- 52Notes Notes While the createWriter() method existed, it immediately called errorCallback with the NS_ERROR_DOM_SECURITY_ERR error.Opera Android No support NoSafari iOS ...
FileSystemFileEntry.file() - Web APIs
ation Status Comment File and Directory Entries APIThe definition of 'file()' in that specification. Draft Initial specification. Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...ntries APIThe definition of 'file()' in that specification. Draft Initial specification. Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...cation. Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... Full support 79Firefox Full support 50IE No support NoOpera No support NoSafari Full support 11.1WebView Android Full support <=37
Chrome Android Full support 18Firefox Android Full support 50Opera Android No support NoSafari iOS Full support 11.3Samsung Internet Android Full support YesLegend ...
FileSystemFlags.create - Web APIs
Status Comment File and Directory Entries APIThe definition of 'FileSystemFlags' in that specification. Draft Initial specification. Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...IThe definition of 'FileSystemFlags' in that specification. Draft Initial specification. Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...This option h...
FileSystemFlags.exclusive - Web APIs
Status Comment File and Directory Entries APIThe definition of 'FileSystemFlags' in that specification. Draft Initial specification. Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...IThe definition of 'FileSystemFlags' in that specification. Draft Initial specification. Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...wser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...This option h...
FontFace.display - Web APIs
nition of 'font-display' in that specification. Working Draft Defines the values for the display property. (They are the same as for font-display.) Browser Compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...raft Defines the values for the display property. (They are the same as for font-display.) Browser Compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...owser Compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... 60Edge Full support 79Firefox Full support 58IE ? ...
FontFaceSetLoadEvent.FontFaceSetLoadEvent() - Web APIs
Comment CSS Font Loading Module Level 3The definition of 'FontFaceSetLoadEvent()' in that specification. Working Draft Initial definition. Browser Compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...on of 'FontFaceSetLoadEvent()' in that specification. Working Draft Initial definition. Browser Compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...ompatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... Opera Android Full support 43Safari iOS ? ...
FontFaceSetLoadEvent.fontfaces - Web APIs
Status Comment CSS Font Loading Module Level 3The definition of 'fontfaces' in that specification. Working Draft Initial definition. Browser Compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...3The definition of 'fontfaces' in that specification. Working Draft Initial definition. Browser Compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...ser Compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... Full support 35Edge Full support <=79Firefox Full support YesIE ? Opera Full support 22Safari ? WebView Android No support No
Chrome Android Full support 35Firefox Android Full support YesOpera Android Full support 22Safari iOS ? Samsung Internet Android Full support 3.0Legend Full suppo...
HTMLAnchorElement.referrerPolicy - Web APIs
Referrer PolicyThe definition of 'referrerPolicy attribute' in that specification. Candidate Recommendation Added the referrerPolicy property. Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...bute' in that specification. Candidate Recommendation Added the referrerPolicy property. Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... Full support 79Firefox Full support 50IE No support NoOpera Full support 38Safari Full support 11.1WebView Android Full support 51
Chrome Android Full support 51Firefox Android Full support 50Opera Android Full support 41Safari iOS No support NoSamsung Internet Android Full support 7.2Legend ...
HTMLAreaElement.referrerPolicy - Web APIs
Referrer PolicyThe definition of 'referrerpolicy attribute' in that specification. Candidate Recommendation Added the referrerPolicy property. Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...bute' in that specification. Candidate Recommendation Added the referrerPolicy property. Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... Full support 79Firefox Full support 50IE No support NoOpera Full support 38Safari Full support 11.1WebView Android Full support 51
Chrome Android Full support 51Firefox Android Full support 50Opera Android Full support 41Safari iOS No support NoSamsung Internet Android Full support 7.2Legend ...
HTMLElement.offsetParent - Web APIs
ication Status Comment CSS Object Model (CSSOM) View ModuleThe definition of 'offsetParent' in that specification. Working Draft Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...CSSOM) View ModuleThe definition of 'offsetParent' in that specification. Working Draft Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...Edge Full support 12Firefox Full support 1IE Full support 8Opera Full support 8Safari Full support 3WebView Android Full support 1
Chrome Android Full support 18Firefox Android Full support 4Opera Android Full support 10.1Safari iOS Full support 1Samsung Internet Android Full support 1.0Legend ...
HTMLElement.offsetTop - Web APIs
ification Status Comment CSS Object Model (CSSOM) View ModuleThe definition of 'offsetTop' in that specification. Working Draft Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... (CSSOM) View ModuleThe definition of 'offsetTop' in that specification. Working Draft Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...Edge Full support 12Firefox Full support 1IE Full support 8Opera Full support 8Safari Full support 3WebView Android Full support 1
Chrome Android Full support 18Firefox Android Full support 4Opera Android Full support 10.1Safari iOS Full support 1Samsung Internet Android Full support 1.0Legend ...
HTMLIFrameElement.csp - Web APIs
s Comment Content Security Policy: Embedded EnforcementThe definition of 'csp' in that specification. Working Draft Initial definition. Browser Compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...rcementThe definition of 'csp' in that specification. Working Draft Initial definition. Browser Compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... Browser Compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... Opera Android Full support 45Safari iOS ? ...
HTMLIFrameElement.referrerPolicy - Web APIs
eferrerPolicy attribute. HTML Living StandardThe definition of 'HTMLIFrameElement: referrerPolicy' in that specification. Living Standard Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...finition of 'HTMLIFrameElement: referrerPolicy' in that specification. Living Standard Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... Full support 79Firefox Full support 50IE No support NoOpera Full support 38Safari Full support 11.1WebView Android Full support 51
Chrome Android Full support 51Firefox Android Full support 50Opera Android Full support 41Safari iOS No support NoSamsung Internet Android Full support 5.0Legend ...
HTMLIFrameElement.src - Web APIs
ecification Status Comment HTML Living StandardThe definition of 'HTMLIFrameElement: src' in that specification. Living Standard Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...andardThe definition of 'HTMLIFrameElement: src' in that specification. Living Standard Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...dard Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... 43Edge Full support 12Firefox Full support YesIE ? ...
HTMLImageElement.align - Web APIs
cification. Living Standard HTML 4.01 SpecificationThe definition of 'HTMLImageElement.align' in that specification. Recommendation Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...icationThe definition of 'HTMLImageElement.align' in that specification. Recommendation Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...on Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... 1Edge Full support 12Firefox Full support YesIE ? Opera Full support YesSafari Full support YesWebView Android Full support Yes
Chrome Android Full support YesFirefox Android Full support YesOpera Android ? Safari iOS Full support YesSamsung Internet Android Full support YesLegend Full sup...
HTMLImageElement.alt - Web APIs
Specification Status Comment HTML Living StandardThe definition of 'HTMLImageElement.alt' in that specification. Unknown Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... Living StandardThe definition of 'HTMLImageElement.alt' in that specification. Unknown Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...nown Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... 1Edge Full support 12Firefox Full support YesIE ? Opera Full support YesSafari Full support YesWebView Android Full support Yes
Chrome Android Full support YesFirefox Android Full support YesOpera Android ? Safari iOS Full support YesSamsung Internet Android Full support YesLegend Full sup...
HTMLImageElement.border - Web APIs
ification. Living Standard HTML 4.01 SpecificationThe definition of 'HTMLImageElement.border' in that specification. Recommendation Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...cationThe definition of 'HTMLImageElement.border' in that specification. Recommendation Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...n Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... 1Edge Full support 12Firefox Full support YesIE ? Opera Full support YesSafari Full support YesWebView Android Full support Yes
Chrome Android Full support YesFirefox Android Full support YesOpera Android ? Safari iOS Full support YesSamsung Internet Android Full support YesLegend Full sup...
HTMLImageElement.complete - Web APIs
Specification Status Comment HTML Living StandardThe definition of 'HTMLImageElement.complete' in that specification. Unknown Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...ng StandardThe definition of 'HTMLImageElement.complete' in that specification. Unknown Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... Safari iOS Full support YesSamsung Internet Android Full support YesLegend Full sup...
HTMLImageElement.crossOrigin - Web APIs
Specification Status Comment HTML Living StandardThe definition of 'HTMLImageElement.crossOrigin' in that specification. Unknown Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...StandardThe definition of 'HTMLImageElement.crossOrigin' in that specification. Unknown Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... Safari iOS Full support YesSamsung Internet Android Full support YesLegend Full sup...
HTMLImageElement.currentSrc - Web APIs
cation Status Comment HTML Living StandardThe definition of 'HTMLImageElement.currentSrc' in that specification. Living Standard Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...dThe definition of 'HTMLImageElement.currentSrc' in that specification. Living Standard Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...ser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...behind the dom.image.srcset.enabled preference (needs to be set to true). ...
HTMLImageElement.decoding - Web APIs
s Specification Status Comment HTML Living StandardThe definition of 'decoding' in that specification. Living Standard Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...HTML Living StandardThe definition of 'decoding' in that specification. Living Standard Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... Safari iOS Full support 11.3Samsung Internet Android Full support 9.0Legend Full supp...
HTMLImageElement.height - Web APIs
cification Status Comment HTML Living StandardThe definition of 'HTMLImageElement.height' in that specification. Living Standard Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...ndardThe definition of 'HTMLImageElement.height' in that specification. Living Standard Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...d Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... 1Edge Full support 12Firefox Full support YesIE .html? Opera Full support YesSafari Full support YesWebView Android Full support Yes
Chrome Android Full support YesFirefox Android Full support YesOpera Android ? Safari iOS Full support YesSamsung Internet Android Full support YesLegend Full sup...
HTMLImageElement.hspace - Web APIs
he definition of 'HTMLImageElement.hspace' in that specification. Recommendation Provides additional details not present in the newer specification. Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...tion. Recommendation Provides additional details not present in the newer specification. Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...tion. Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... 1Edge Full support 12Firefox Full support YesIE ? Opera Full support YesSafari Full support YesWebView Android Full support Yes
Chrome Android Full support YesFirefox Android Full support YesOpera Android ? Safari iOS Full support YesSamsung Internet Android Full support YesLegend Full sup...
HTMLImageElement.isMap - Web APIs
ecification Status Comment HTML Living StandardThe definition of 'HTMLImageElement.isMap' in that specification. Living Standard Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...andardThe definition of 'HTMLImageElement.isMap' in that specification. Living Standard Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...rd Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... 1Edge Full support 12Firefox Full support YesIE ? Opera Full support YesSafari Full support YesWebView Android Full support Yes
Chrome Android Full support YesFirefox Android Full support YesOpera Android ? Safari iOS Full support YesSamsung Internet Android Full support YesLegend Full sup...
HTMLImageElement.longDesc - Web APIs
geElement.longDesc' in that specification. Recommendation Provides an actual description of this property; the HTML5 spec only says it's deprecated. Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... Provides an actual description of this property; the HTML5 spec only says it's deprecated. Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...ed. Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... 1Edge Full support 12Firefox Full support YesIE ? Opera Full support YesSafari Full support YesWebView Android Full support Yes
Chrome Android Full support YesFirefox Android Full support YesOpera Android ? Safari iOS Full support YesSamsung Internet Android Full support YesLegend Full sup...
HTMLImageElement.lowSrc - Web APIs
case. It was never technically part of the HTML specification (it was a Mozilla extension to HTML); however, HTML 5 does list it among the obsolete attributes. Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...on (it was a Mozilla extension to HTML); however, HTML 5 does list it among the obsolete attributes. Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...attributes. Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... 1Edge Full support <=18Firefox Full support YesIE ? Opera Full support YesSafari Full support YesWebView Android Full support Yes
Chrome Android Full support YesFirefox Android ? Opera Android ? Safari iOS ? Samsung Internet Android Full support YesLegend Full support Full support ...
HTMLImageElement.name - Web APIs
SpecificationThe definition of 'HTMLImageElement.name' in that specification. Recommendation Provides additional details not available in the HTML 5 Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...at specification. Recommendation Provides additional details not available in the HTML 5 Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... HTML 5 Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... 1Edge Full support 12Firefox Full support YesIE ? Opera Full support YesSafari Full support YesWebView Android Full support Yes
Chrome Android Full support YesFirefox Android Full support YesOpera Android ? Safari iOS Full support YesSamsung Internet Android Full support YesLegend Full sup...
HTMLImageElement.naturalHeight - Web APIs
ion Status Comment HTML Living StandardThe definition of 'HTMLImageElement.naturalheight' in that specification. Living Standard Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...e definition of 'HTMLImageElement.naturalheight' in that specification. Living Standard Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... Safari iOS Full support YesSamsung Internet Android Full support YesLegend Full sup...
HTMLImageElement.naturalWidth - Web APIs
tion Status Comment HTML Living StandardThe definition of 'HTMLImageElement.naturalWidth' in that specification. Living Standard Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...he definition of 'HTMLImageElement.naturalWidth' in that specification. Living Standard Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... Safari iOS Full support YesSamsung Internet Android Full support YesLegend Full sup...
HTMLImageElement.referrerPolicy - Web APIs
Referrer PolicyThe definition of 'referrerPolicy attribute' in that specification. Candidate Recommendation Added the referrerPolicy property. Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...bute' in that specification. Candidate Recommendation Added the referrerPolicy property. Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... Full support 79Firefox Full support 50IE No support NoOpera Full support 38Safari Full support 11.1WebView Android Full support 51
Chrome Android Full support 51Firefox Android Full support 50Opera Android Full support 41Safari iOS No support NoSamsung Internet Android Full support 5.0Legend ...
HTMLImageElement.sizes - Web APIs
ecification Status Comment HTML Living StandardThe definition of 'HTMLImageElement.sizes' in that specification. Living Standard Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...andardThe definition of 'HTMLImageElement.sizes' in that specification. Living Standard Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...is behind the dom.image.picture.enabled preference (needs to be set to true). ...
HTMLImageElement.src - Web APIs
Specification Status Comment HTML Living StandardThe definition of 'HTMLImageElement.src' in that specification. Living Standard Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...StandardThe definition of 'HTMLImageElement.src' in that specification. Living Standard Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...dard Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... 1Edge Full support 12Firefox Full support YesIE ? ...
HTMLImageElement.srcset - Web APIs
cification Status Comment HTML Living StandardThe definition of 'HTMLImageElement.srcset' in that specification. Living Standard Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...ndardThe definition of 'HTMLImageElement.srcset' in that specification. Living Standard Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... is behind the dom.image.srcset.enabled preference (needs to be set to true). ...
HTMLImageElement.useMap - Web APIs
fication Status Comment HTML Living StandardThe definition of 'HTMLImageElement.useMap' in that specification. Living Standard Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...ardThe definition of 'HTMLImageElement.useMap' in that specification. Living Standard Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... 1Edge Full support 12Firefox Full support YesIE ? ...
HTMLImageElement.vspace - Web APIs
pecificationThe definition of 'HTMLImageElement.vspace' in that specification. Recommendation The HTML 4.01 specification offers additional details. Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...hat specification. Recommendation The HTML 4.01 specification offers additional details. Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...ails. Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... 1Edge Full support 12Firefox Full support YesIE ? ...
HTMLImageElement.width - Web APIs
ecification Status Comment HTML Living StandardThe definition of 'HTMLImageElement.width' in that specification. Living Standard Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...andardThe definition of 'HTMLImageElement.width' in that specification. Living Standard Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...rd Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... 1Edge Full support 12Firefox Full support YesIE .html? ...
HTMLImageElement.x - Web APIs
n Status Comment CSS Object Model (CSSOM) View ModuleThe definition of 'HTMLImageElement.x' in that specification. Working Draft Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... View ModuleThe definition of 'HTMLImageElement.x' in that specification. Working Draft Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... Draft Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... 14 Full support 14 No support ? -- 7IE No support NoOpera Full support YesSafari Full support YesWebView Android Full support Yes
Chrome Android Full support YesFirefox Android Full support 14 Full support 14 No support ? -- 7Opera Android Full support YesSafari iOS Full support YesSa...
HTMLImageElement.y - Web APIs
n Status Comment CSS Object Model (CSSOM) View ModuleThe definition of 'HTMLImageElement.y' in that specification. Working Draft Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... View ModuleThe definition of 'HTMLImageElement.y' in that specification. Working Draft Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... Draft Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... 14 Full support 14 No support ? -- 7IE No support NoOpera Full support YesSafari Full support YesWebView Android Full support Yes
Chrome Android Full support YesFirefox Android Full support 14 Full support 14 No support ? -- 7Opera Android Full support YesSafari iOS Full support YesSa...
HTMLInputElement.webkitdirectory - Web APIs
es APIThe definition of 'webkitdirectory' in that specification. Draft Initial specification. This API has no official W3C or WHATWG specification. Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...ion. Draft Initial specification. This API has no official W3C or WHATWG specification. Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...ompatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... Full support 13Firefox Full support 50IE No support NoOpera No support NoSafari Full support 11.1WebView Android Full support Yes
Chrome Android Full support YesFirefox Android Full support 50Opera Android No support NoSafari iOS Full support 11.3Samsung Internet Android Full support YesLegend ...
HTMLLinkElement.as - Web APIs
Specification Status Comment PreloadThe definition of 'as' in that specification. Candidate Recommendation Initial definition. Browser Compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... definition of 'as' in that specification. Candidate Recommendation Initial definition. Browser Compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... Browser Compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... Full support 17Firefox Full support 56IE Full support YesOpera Full support 37Safari Full support YesWebView Android Full support 50
Chrome Android Full support 50Firefox Android Full support 56Opera Android Full support 37Safari iOS Full support YesSamsung Internet Android Full support 5.0Legend ...
HTMLMediaElement.controlsList - Web APIs
ntrolsList; Value A DOMTokenList. Specifications Specification Status Comment Controls List API: Solution outline Browser Compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... Specification Status Comment Controls List API: Solution outline Browser Compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... Browser Compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... Opera Android Full support 43Safari iOS ? ...
HTMLMediaElement.onencrypted - Web APIs
n Status Comment Encrypted Media ExtensionsThe definition of 'onencrypted' in that specification. Recommendation Initial definition. Browser Compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...e definition of 'onencrypted' in that specification. Recommendation Initial definition. Browser Compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... Browser Compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... Firefox Android ? Opera Android ? Safari iOS ? Samsung Internet Android ? ...
HTMLMediaElement.onwaitingforkey - Web APIs
Status Comment Encrypted Media ExtensionsThe definition of 'onwaitingforkey' in that specification. Recommendation Initial definition. Browser Compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...finition of 'onwaitingforkey' in that specification. Recommendation Initial definition. Browser Compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... Browser Compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... Full support 55Edge Full support 79Firefox Full support YesIE ? Opera Full support 42Safari ? WebView Android Full support 55
Chrome Android Full support 55Firefox Android ? Opera Android Full support 42Safari iOS ? Samsung Internet Android Full support 6.0Legend Full support ...
HTMLMediaElement.setMediaKeys() - Web APIs
Status Comment Encrypted Media ExtensionsThe definition of 'setMediaKeys()' in that specification. Recommendation Initial definition. Browser Compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...efinition of 'setMediaKeys()' in that specification. Recommendation Initial definition. Browser Compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... Browser Compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... Firefox Android ? Opera Android ? Safari iOS ? Samsung Internet Android ? ...
HTMLOrForeignElement.nonce - Web APIs
s://evil.com/nonce?whatever"); } Specifications Specification HTML Living StandardThe definition of 'nonce' in that specification. Browser Compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...pecification HTML Living StandardThe definition of 'nonce' in that specification. Browser Compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...ation. Browser Compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... Full support 79Firefox Full support 75IE No support NoOpera Full support YesSafari Full support 10WebView Android Full support 61
Chrome Android Full support 61Firefox Android No support NoOpera Android Full support YesSafari iOS Full support 10Samsung Internet Android Full support 8.0Legend ...
HTMLScriptElement.referrerPolicy - Web APIs
eferrerPolicy attribute. HTML Living StandardThe definition of 'HTMLScriptElement: referrerPolicy' in that specification. Living Standard Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...finition of 'HTMLScriptElement: referrerPolicy' in that specification. Living Standard Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... Full support <=79Firefox Full support 65IE No support NoOpera Full support YesSafari No support NoWebView Android Full support 70
Chrome Android Full support 70Firefox Android Full support 65Opera Android Full support YesSafari iOS No support NoSamsung Internet Android Full support 10.0Legend ...
HTMLSlotElement.assignedElements() - Web APIs
Specification Status Comment HTML Living StandardThe definition of 'assignedElements()' in that specification. Living Standard Browser Compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...StandardThe definition of 'assignedElements()' in that specification. Living Standard Browser Compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...patibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... 65Edge Full support 79Firefox Full support 66IE No support NoOpera Full support YesSafari ? WebView Android Full support 65
Chrome Android Full support 65Firefox Android Full support 66Opera Android Full support YesSafari iOS ? Samsung Internet Android Full support 9.0Legend Full suppo...
HTMLSlotElement.name - Web APIs
cations Specification Status Comment HTML Living StandardThe definition of 'name' in that specification. Living Standard Browser Compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... HTML Living StandardThe definition of 'name' in that specification. Living Standard Browser Compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... Browser Compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... dom.webcomponents.shadowdom.enabled preference (needs to be set to true). ...
History.back() - Web APIs
Living Standard No change from HTML5. HTML5The definition of 'History.back()' in that specification. Recommendation Initial definition. Browser Compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...definition of 'History.back()' in that specification. Recommendation Initial definition. Browser Compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...nition. Browser Compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... Full support 12Firefox Full support YesIE Full support 10Opera Full support YesSafari Full support YesWebView Android Full support Yes
Chrome Android Full support YesFirefox Android Full support YesOpera Android Full support YesSafari iOS Full support YesSamsung Internet Android Full support YesLegend ...
History.forward() - Web APIs
ion. Living Standard No change from HTML5. HTML5The definition of 'History' in that specification. Recommendation Initial definition. Browser Compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...ML5The definition of 'History' in that specification. Recommendation Initial definition. Browser Compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...ion. Browser Compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... Full support 12Firefox Full support YesIE Full support 10Opera Full support YesSafari Full support YesWebView Android Full support Yes
Chrome Android Full support YesFirefox Android Full support YesOpera Android Full support YesSafari iOS Full support YesSamsung Internet Android Full support YesLegend ...
History.scrollRestoration - Web APIs
ndard No change from HTML5. HTML5The definition of 'History.scrollRestoration' in that specification. Recommendation Initial definition. Browser Compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...of 'History.scrollRestoration' in that specification. Recommendation Initial definition. Browser Compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... Browser Compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...ge Full support 79Firefox Full support 46IE No support NoOpera Full support 33Safari Full support YesWebView Android No support No
Chrome Android Full support 46Firefox Android Full support YesOpera Android Full support YesSafari iOS Full support YesSamsung Internet Android Full support 5.0Legend ...
IDBCursor.advance() - Web APIs
hat specification. Recommendation Indexed Database API DraftThe definition of 'advance()' in that specification. Recommendation Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...atabase API DraftThe definition of 'advance()' in that specification. Recommendation Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...l support 16 No support 10 -- 16Prefixed Prefixed Implemented with the vendor prefix: mozIE Partial support 10Opera Full support 15Safari Full support 7WebView Android Full support Yes
Chrome Android Full support YesFirefox Android Full support 22Opera Android Full support 14Safari iOS Full support 8Samsung Internet Android Full support YesLegend ...
IDBCursor.continue() - Web APIs
n that specification. Recommendation Indexed Database API DraftThe definition of 'continue()' in that specification. Recommendation Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... Database API DraftThe definition of 'continue()' in that specification. Recommendation Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...l support 16 No support 10 -- 16Prefixed Prefixed Implemented with the vendor prefix: mozIE Partial support 10Opera Full support 15Safari Full support 7WebView Android Full support Yes
Chrome Android Full support YesFirefox Android Full support 22Opera Android Full support 14Safari iOS Full support 8Samsung Internet Android Full support YesLegend ...
IDBCursor.delete() - Web APIs
n that specification. Recommendation Indexed Database API DraftThe definition of 'delete()' in that specification. Recommendation Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...d Database API DraftThe definition of 'delete()' in that specification. Recommendation Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...l support 16 No support 10 -- 16Prefixed Prefixed Implemented with the vendor prefix: mozIE Partial support 10Opera Full support 15Safari Full support 7WebView Android Full support Yes
Chrome Android Full support YesFirefox Android Full support 22Opera Android Full support 14Safari iOS Full support 8Samsung Internet Android Full support YesLegend ...
IDBCursor.direction - Web APIs
n that specification. Recommendation Indexed Database API DraftThe definition of 'direction' in that specification. Recommendation Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... Database API DraftThe definition of 'direction' in that specification. Recommendation Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...l support 16 No support 10 -- 16Prefixed Prefixed Implemented with the vendor prefix: mozIE Partial support 10Opera Full support 15Safari Full support 7WebView Android Full support Yes
Chrome Android Full support YesFirefox Android Full support 22Opera Android Full support 14Safari iOS Full support 8Samsung Internet Android Full support YesLegend ...
IDBCursor.primaryKey - Web APIs
at specification. Recommendation Indexed Database API DraftThe definition of 'primaryKey' in that specification. Recommendation Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...tabase API DraftThe definition of 'primaryKey' in that specification. Recommendation Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...l support 16 No support 10 -- 16Prefixed Prefixed Implemented with the vendor prefix: mozIE Partial support 10Opera Full support 15Safari Full support 7WebView Android Full support Yes
Chrome Android Full support YesFirefox Android Full support 22Opera Android Full support 14Safari iOS Full support 8Samsung Internet Android Full support YesLegend ...
IDBCursor.request - Web APIs
tion Status Comment Indexed Database API DraftThe definition of 'request' in that specification. Recommendation Initial definition. Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...tThe definition of 'request' in that specification. Recommendation Initial definition. Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...n. Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... 76Edge Full support 79Firefox Full support 77IE No support NoOpera Full support 63Safari ? WebView Android Full support 76
Chrome Android Full support 76Firefox Android No support NoOpera Android Full support 54Safari iOS ? Samsung Internet Android Full support 12.0Legend Full support...
IDBCursor.source - Web APIs
n that specification. Recommendation Indexed Database API DraftThe definition of 'source' in that specification. Recommendation Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...d Database API DraftThe definition of 'source' in that specification. Recommendation Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...l support 16 No support 10 -- 16Prefixed Prefixed Implemented with the vendor prefix: mozIE Partial support 10Opera Full support 15Safari Full support 7WebView Android Full support Yes
Chrome Android Full support YesFirefox Android Full support 22Opera Android Full support 14Safari iOS Full support 8Samsung Internet Android Full support YesLegend ...
IDBCursor.update() - Web APIs
that specification. Recommendation Indexed Database API DraftThe definition of 'update()' in that specification. Recommendation Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...Database API DraftThe definition of 'update()' in that specification. Recommendation Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...l support 16 No support 10 -- 16Prefixed Prefixed Implemented with the vendor prefix: mozIE Partial support 10Opera Full support 15Safari Full support 7WebView Android Full support Yes
Chrome Android Full support YesFirefox Android Full support 22Opera Android Full support 14Safari iOS Full support 8Samsung Internet Android Full support YesLegend ...
IDBCursorWithValue.value - Web APIs
at specification. Recommendation Indexed Database API DraftThe definition of 'IDBDatabase' in that specification. Recommendation Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...tabase API DraftThe definition of 'IDBDatabase' in that specification. Recommendation Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...l support 16 No support 10 -- 16Prefixed Prefixed Implemented with the vendor prefix: mozIE Partial support 10Opera Full support 15Safari Full support 7WebView Android Full support Yes
Chrome Android Full support YesFirefox Android Full support 22Opera Android Full support 14Safari iOS Full support 8Samsung Internet Android Full support YesLegend ...
IDBDatabase.close() - Web APIs
n that specification. Recommendation Indexed Database API DraftThe definition of 'close()' in that specification. Recommendation Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...d Database API DraftThe definition of 'close()' in that specification. Recommendation Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...l support 16 No support 10 -- 16Prefixed Prefixed Implemented with the vendor prefix: mozIE Partial support 10Opera Full support 15Safari Full support 7WebView Android Full support Yes
Chrome Android Full support 25Firefox Android Full support 22Opera Android Full support 14Safari iOS Full support 8Samsung Internet Android Full support 1.5Legend ...
IDBDatabase.createObjectStore() - Web APIs
fication. Recommendation Indexed Database API DraftThe definition of 'createObjectStore()' in that specification. Recommendation Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...PI DraftThe definition of 'createObjectStore()' in that specification. Recommendation Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...l support 16 No support 10 -- 16Prefixed Prefixed Implemented with the vendor prefix: mozIE Partial support 10Opera Full support 15Safari Full support 7WebView Android Full support Yes
Chrome Android Full support 25Firefox Android Full support 22Opera Android Full support 14Safari iOS Full support 8Samsung Internet Android Full support 1.5Legend ...
IDBDatabase.deleteObjectStore() - Web APIs
fication. Recommendation Indexed Database API DraftThe definition of 'deleteObjectStore()' in that specification. Recommendation Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...PI DraftThe definition of 'deleteObjectStore()' in that specification. Recommendation Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...l support 16 No support 10 -- 16Prefixed Prefixed Implemented with the vendor prefix: mozIE Partial support 10Opera Full support 15Safari Full support 7WebView Android Full support Yes
Chrome Android Full support 25Firefox Android Full support 22Opera Android Full support 14Safari iOS Full support 8Samsung Internet Android Full support 1.5Legend ...
IDBDatabase.name - Web APIs
in that specification. Recommendation Indexed Database API DraftThe definition of 'name' in that specification. Recommendation Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...xed Database API DraftThe definition of 'name' in that specification. Recommendation Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...l support 16 No support 10 -- 16Prefixed Prefixed Implemented with the vendor prefix: mozIE Partial support 10Opera Full support 15Safari Full support 7WebView Android Full support Yes
Chrome Android Full support 25Firefox Android Full support 22Opera Android Full support 14Safari iOS Full support 8Samsung Internet Android Full support 1.5Legend ...
IDBDatabase.objectStoreNames - Web APIs
ecification. Recommendation Indexed Database API DraftThe definition of 'objectStoreNames' in that specification. Recommendation Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...e API DraftThe definition of 'objectStoreNames' in that specification. Recommendation Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...l support 16 No support 10 -- 16Prefixed Prefixed Implemented with the vendor prefix: mozIE Partial support 10Opera Full support 15Safari Full support 7WebView Android Full support Yes
Chrome Android Full support 25Firefox Android Full support 22Opera Android Full support 14Safari iOS Full support 8Samsung Internet Android Full support 1.5Legend ...
IDBDatabase.onabort - Web APIs
n that specification. Recommendation Indexed Database API DraftThe definition of 'onabort' in that specification. Recommendation Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...d Database API DraftThe definition of 'onabort' in that specification. Recommendation Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...l support 16 No support 10 -- 16Prefixed Prefixed Implemented with the vendor prefix: mozIE Partial support 10Opera Full support 15Safari Full support 7WebView Android Full support Yes
Chrome Android Full support 25Firefox Android Full support 22Opera Android Full support 14Safari iOS Full support 8Samsung Internet Android Full support 1.5Legend ...
IDBDatabase.onclose - Web APIs
Specification Status Comment Indexed Database API DraftThe definition of 'onclose' in that specification. Recommendation Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...d Database API DraftThe definition of 'onclose' in that specification. Recommendation Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...otes Notes approxEdge Full support <=18Firefox Full support 50IE ? ...
IDBDatabase.onerror - Web APIs
n that specification. Recommendation Indexed Database API DraftThe definition of 'onerror' in that specification. Recommendation Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...d Database API DraftThe definition of 'onerror' in that specification. Recommendation Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...l support 16 No support 10 -- 16Prefixed Prefixed Implemented with the vendor prefix: mozIE Partial support 10Opera Full support 15Safari Full support 7WebView Android Full support Yes
Chrome Android Full support 25Firefox Android Full support 22Opera Android Full support 14Safari iOS Full support 8Samsung Internet Android Full support 1.5Legend ...
IDBDatabase.onversionchange - Web APIs
pecification. Recommendation Indexed Database API DraftThe definition of 'onversionchange' in that specification. Recommendation Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...se API DraftThe definition of 'onversionchange' in that specification. Recommendation Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...l support 16 No support 10 -- 16Prefixed Prefixed Implemented with the vendor prefix: mozIE Partial support 10Opera Full support 15Safari Full support 7WebView Android Full support Yes
Chrome Android Full support 25Firefox Android Full support 22Opera Android Full support 14Safari iOS Full support 8Samsung Internet Android Full support 1.5Legend ...
IDBDatabase.version - Web APIs
n that specification. Recommendation Indexed Database API DraftThe definition of 'version' in that specification. Recommendation Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...d Database API DraftThe definition of 'version' in that specification. Recommendation Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...l support 16 No support 10 -- 16Prefixed Prefixed Implemented with the vendor prefix: mozIE Partial support 10Opera Full support 15Safari Full support 7WebView Android Full support Yes
Chrome Android Full support 25Firefox Android Full support 22Opera Android Full support 14Safari iOS Full support 8Samsung Internet Android Full support 1.5Legend ...
IDBDatabaseException - Web APIs
rors. VER_ERR 12 A request to open a database with a version lower than the one it already has. This can only happen with IDBOpenDBRequest. Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... with a version lower than the one it already has. This can only happen with IDBOpenDBRequest. Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...he compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... <=79Prefixed Prefixed Implemented with the vendor prefix: webkitFirefox No support 4 -- 14IE No support NoOpera No support NoSafari No support NoWebView Android No support No
Chrome Android No support NoFirefox Android No support 4 -- 14Opera Android No support NoSafari iOS No support NoSamsung Internet Android No support NoLegend Full sup...
IDBFactory.cmp() - Web APIs
in that specification. Recommendation Indexed Database API DraftThe definition of 'cmp()' in that specification. Recommendation Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...xed Database API DraftThe definition of 'cmp()' in that specification. Recommendation Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...on Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...al support 10Opera Full support 15Safari Full support 7WebView Android Full support Yes Full support Yes No support ? ...
databases - Web APIs
Status Comment Indexed Database API DraftThe definition of 'databases()' in that specification. Recommendation Initial definition. Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... definition of 'databases()' in that specification. Recommendation Initial definition. Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...er compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... support NoNotes No support NoNotes Notes See bug 934640.IE No support NoOpera Full support 58Safari No support NoWebView Android Full support 71
Chrome Android Full support 71Firefox Android No support NoNotes No support NoNotes Notes See bug 934640.Opera Android Full support YesSafari iOS No support NoSamsung Internet Andr...
IDBFactory.deleteDatabase() - Web APIs
Recommendation Indexed Database API 2.0The definition of 'deleteDatabase()' in that specification. Recommendation Initial definition. Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...inition of 'deleteDatabase()' in that specification. Recommendation Initial definition. Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...al support 10Opera Full support 15Safari Full support 7WebView Android Full support Yes Full support Yes No support ? ...
IDBFactory.open() - Web APIs
in that specification. Recommendation Indexed Database API DraftThe definition of 'open()' in that specification. Recommendation Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...ed Database API DraftThe definition of 'open()' in that specification. Recommendation Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...n Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...al support 10Opera Full support 15Safari Full support 7WebView Android Full support Yes Full support Yes No support ? ...
IDBIndex.count() - Web APIs
in that specification. Recommendation Indexed Database API DraftThe definition of 'count()' in that specification. Recommendation Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...ed Database API DraftThe definition of 'count()' in that specification. Recommendation Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...n Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...al support 10Opera Full support 15Safari Full support 7WebView Android Full support Yes Full support Yes No support ? ...
IDBIndex.get() - Web APIs
n Specification Status Comment Indexed Database API 2.0The definition of 'get()' in that specification. Recommendation Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...ndexed Database API 2.0The definition of 'get()' in that specification. Recommendation Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...ion Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...al support 10Opera Full support 15Safari Full support 7WebView Android Full support Yes Full support Yes No support ? ...
IDBIndex.getKey() - Web APIs
in that specification. Recommendation Indexed Database API DraftThe definition of 'getKey()' in that specification. Recommendation Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...d Database API DraftThe definition of 'getKey()' in that specification. Recommendation Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...al support 10Opera Full support 15Safari Full support 7WebView Android Full support Yes Full support Yes No support ? ...
IDBIndex.keyPath - Web APIs
n that specification. Recommendation Indexed Database API DraftThe definition of 'keyPath' in that specification. Recommendation Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...d Database API DraftThe definition of 'keyPath' in that specification. Recommendation Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...al support 10Opera Full support 15Safari Full support 7WebView Android Full support Yes Full support Yes No support ? ...
IDBIndex.multiEntry - Web APIs
hat specification. Recommendation Indexed Database API DraftThe definition of 'multiEntry' in that specification. Recommendation Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...atabase API DraftThe definition of 'multiEntry' in that specification. Recommendation Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...al support 10Opera Full support 15Safari Full support 7WebView Android Full support Yes Full support Yes No support ? ...
IDBIndex.objectStore - Web APIs
at specification. Recommendation Indexed Database API DraftThe definition of 'objectStore' in that specification. Recommendation Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...tabase API DraftThe definition of 'objectStore' in that specification. Recommendation Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...al support 10Opera Full support 15Safari Full support 7WebView Android Full support Yes Full support Yes No support ? ...
IDBIndex.openCursor() - Web APIs
hat specification. Recommendation Indexed Database API DraftThe definition of 'openCursor()' in that specification. Recommendation Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...tabase API DraftThe definition of 'openCursor()' in that specification. Recommendation Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...al support 10Opera Full support 15Safari Full support 7WebView Android Full support Yes Full support Yes No support ? ...
IDBIndex.openKeyCursor() - Web APIs
specification. Recommendation Indexed Database API DraftThe definition of 'openKeyCursor()' in that specification. Recommendation Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...ase API DraftThe definition of 'openKeyCursor()' in that specification. Recommendation Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...al support 10Opera Full support 15Safari Full support 7WebView Android Full support Yes Full support Yes No support ? ...
IDBIndex.unique - Web APIs
in that specification. Recommendation Indexed Database API DraftThe definition of 'unique' in that specification. Recommendation Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...ed Database API DraftThe definition of 'unique' in that specification. Recommendation Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...al support 10Opera Full support 15Safari Full support 7WebView Android Full support Yes Full support Yes No support ? ...
IDBKeyRange.bound() - Web APIs
that specification. Recommendation Indexed Database API DraftThe definition of 'bound()' in that specification. Recommendation Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... Database API DraftThe definition of 'bound()' in that specification. Recommendation Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...l support 16 No support 10 -- 16Prefixed Prefixed Implemented with the vendor prefix: mozIE Partial support 10Opera Full support 15Safari Full support 7WebView Android Full support Yes
Chrome Android Full support YesFirefox Android Full support 22Opera Android Full support 14Safari iOS Full support 8Samsung Internet Android Full support YesLegend ...
IDBKeyRange.includes() - Web APIs
hat specification. Recommendation Indexed Database API DraftThe definition of 'includes()' in that specification. Recommendation Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...atabase API DraftThe definition of 'includes()' in that specification. Recommendation Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... 52Edge Full support <=18Firefox Full support 47IE ? ...
IDBKeyRange.lower - Web APIs
in that specification. Recommendation Indexed Database API DraftThe definition of 'lower' in that specification. Recommendation Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...xed Database API DraftThe definition of 'lower' in that specification. Recommendation Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...l support 16 No support 10 -- 16Prefixed Prefixed Implemented with the vendor prefix: mozIE Partial support 10Opera Full support 15Safari Full support 7WebView Android Full support Yes
Chrome Android Full support YesFirefox Android Full support 22Opera Android Full support 14Safari iOS Full support 8Samsung Internet Android Full support YesLegend ...
IDBKeyRange.lowerBound() - Web APIs
t specification. Recommendation Indexed Database API DraftThe definition of 'lowerBound()' in that specification. Recommendation Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...abase API DraftThe definition of 'lowerBound()' in that specification. Recommendation Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...l support 16 No support 10 -- 16Prefixed Prefixed Implemented with the vendor prefix: mozIE Partial support 10Opera Full support 15Safari Full support 7WebView Android Full support Yes
Chrome Android Full support YesFirefox Android Full support 22Opera Android Full support 14Safari iOS Full support 8Samsung Internet Android Full support YesLegend ...
IDBKeyRange.lowerOpen - Web APIs
that specification. Recommendation Indexed Database API DraftThe definition of 'lowerOpen' in that specification. Recommendation Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...Database API DraftThe definition of 'lowerOpen' in that specification. Recommendation Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...l support 16 No support 10 -- 16Prefixed Prefixed Implemented with the vendor prefix: mozIE Partial support 10Opera Full support 15Safari Full support 7WebView Android Full support Yes
Chrome Android Full support YesFirefox Android Full support 22Opera Android Full support 14Safari iOS Full support 8Samsung Internet Android Full support YesLegend ...
IDBKeyRange.only() - Web APIs
' in that specification. Recommendation Indexed Database API DraftThe definition of 'only' in that specification. Recommendation Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...exed Database API DraftThe definition of 'only' in that specification. Recommendation Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...n Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...l support 16 No support 10 -- 16Prefixed Prefixed Implemented with the vendor prefix: mozIE Partial support 10Opera Full support 15Safari Full support 7WebView Android Full support Yes
Chrome Android Full support YesFirefox Android Full support 22Opera Android Full support 14Safari iOS Full support 8Samsung Internet Android Full support YesLegend ...
IDBKeyRange.upper - Web APIs
in that specification. Recommendation Indexed Database API DraftThe definition of 'upper' in that specification. Recommendation Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...xed Database API DraftThe definition of 'upper' in that specification. Recommendation Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...l support 16 No support 10 -- 16Prefixed Prefixed Implemented with the vendor prefix: mozIE Partial support 10Opera Full support 15Safari Full support 7WebView Android Full support Yes
Chrome Android Full support YesFirefox Android Full support 22Opera Android Full support 14Safari iOS Full support 8Samsung Internet Android Full support YesLegend ...
IDBKeyRange.upperBound() - Web APIs
t specification. Recommendation Indexed Database API DraftThe definition of 'upperBound()' in that specification. Recommendation Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...abase API DraftThe definition of 'upperBound()' in that specification. Recommendation Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...l support 16 No support 10 -- 16Prefixed Prefixed Implemented with the vendor prefix: mozIE Partial support 10Opera Full support 15Safari Full support 7WebView Android Full support Yes
Chrome Android Full support YesFirefox Android Full support 22Opera Android Full support 14Safari iOS Full support 8Samsung Internet Android Full support YesLegend ...
IDBKeyRange.upperOpen - Web APIs
that specification. Recommendation Indexed Database API DraftThe definition of 'upperOpen' in that specification. Recommendation Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...Database API DraftThe definition of 'upperOpen' in that specification. Recommendation Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...l support 16 No support 10 -- 16Prefixed Prefixed Implemented with the vendor prefix: mozIE Partial support 10Opera Full support 15Safari Full support 7WebView Android Full support Yes
Chrome Android Full support YesFirefox Android Full support 22Opera Android Full support 14Safari iOS Full support 8Samsung Internet Android Full support YesLegend ...
IDBObjectStore.add() - Web APIs
in that specification. Recommendation Indexed Database API DraftThe definition of 'add()' in that specification. Recommendation Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...xed Database API DraftThe definition of 'add()' in that specification. Recommendation Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...on Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...l support 10Opera Full support 15Safari Full support 7WebView Android Full support Yes Full support Yes No support ? ...
IDBObjectStore.autoIncrement - Web APIs
specification. Recommendation Indexed Database API DraftThe definition of 'autoIncrement' in that specification. Recommendation Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...base API DraftThe definition of 'autoIncrement' in that specification. Recommendation Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...l support 10Opera Full support 15Safari Full support 7WebView Android Full support Yes Full support Yes No support ? ...
IDBObjectStore.clear() - Web APIs
n that specification. Recommendation Indexed Database API DraftThe definition of 'clear()' in that specification. Recommendation Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...d Database API DraftThe definition of 'clear()' in that specification. Recommendation Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...l support 10Opera Full support 15Safari Full support 7WebView Android Full support Yes Full support Yes No support ? ...
IDBObjectStore.count() - Web APIs
n that specification. Recommendation Indexed Database API DraftThe definition of 'count()' in that specification. Recommendation Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...d Database API DraftThe definition of 'count()' in that specification. Recommendation Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...l support 10Opera Full support 15Safari Full support 7WebView Android Full support Yes Full support Yes No support ? ...
IDBObjectStore.createIndex() - Web APIs
at specification. Recommendation Indexed Database API DraftThe definition of 'createIndex()' in that specification. Recommendation Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...abase API DraftThe definition of 'createIndex()' in that specification. Recommendation Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...l support 10Opera Full support 15Safari Full support 7WebView Android Full support Yes Full support Yes No support ? ...
IDBObjectStore.delete() - Web APIs
that specification. Recommendation Indexed Database API DraftThe definition of 'delete()' in that specification. Recommendation Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... Database API DraftThe definition of 'delete()' in that specification. Recommendation Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...l support 10Opera Full support 15Safari Full support 7WebView Android Full support Yes Full support Yes No support ? ...
IDBObjectStore.deleteIndex() - Web APIs
specification. Recommendation Indexed Database API DraftThe definition of 'deleteIndex()' in that specification. Recommendation Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...base API DraftThe definition of 'deleteIndex()' in that specification. Recommendation Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...l support 10Opera Full support 15Safari Full support 7WebView Android Full support Yes Full support Yes No support ? ...
IDBObjectStore.get() - Web APIs
in that specification. Recommendation Indexed Database API DraftThe definition of 'get()' in that specification. Recommendation Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...xed Database API DraftThe definition of 'get()' in that specification. Recommendation Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...on Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...l support 10Opera Full support 15Safari Full support 7WebView Android Full support Yes Full support Yes No support ? ...
IDBObjectStore.getKey() - Web APIs
ation Status Comment Indexed Database API DraftThe definition of 'getKey()' in that specification. Recommendation Initial definition Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...ftThe definition of 'getKey()' in that specification. Recommendation Initial definition Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...tion Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... 48Edge Full support <=79Firefox Full support 51IE ? ...
IDBObjectStore.index() - Web APIs
n that specification. Recommendation Indexed Database API DraftThe definition of 'index()' in that specification. Recommendation Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...d Database API DraftThe definition of 'index()' in that specification. Recommendation Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...l support 10Opera Full support 15Safari Full support 7WebView Android Full support Yes Full support Yes No support ? ...
IDBObjectStore.indexNames - Web APIs
hat specification. Recommendation Indexed Database API DraftThe definition of 'indexNames' in that specification. Recommendation Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...atabase API DraftThe definition of 'indexNames' in that specification. Recommendation Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...l support 10Opera Full support 15Safari Full support 7WebView Android Full support Yes Full support Yes No support ? ...
IDBObjectStore.keyPath - Web APIs
n that specification. Recommendation Indexed Database API DraftThe definition of 'keyPath' in that specification. Recommendation Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...d Database API DraftThe definition of 'keyPath' in that specification. Recommendation Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...l support 10Opera Full support 15Safari Full support 7WebView Android Full support Yes Full support Yes No support ? ...
IDBObjectStore.openCursor() - Web APIs
t specification. Recommendation Indexed Database API DraftThe definition of 'openCursor()' in that specification. Recommendation Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...abase API DraftThe definition of 'openCursor()' in that specification. Recommendation Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...l support 10Opera Full support 15Safari Full support 7WebView Android Full support Yes Full support Yes No support ? ...
IDBObjectStore.put() - Web APIs
)' in that specification. Recommendation Indexed Database API DraftThe definition of 'put()' in that specification. Recommendation Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...exed Database API DraftThe definition of 'put()' in that specification. Recommendation Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...ion Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...l support 10Opera Full support 15Safari Full support 7WebView Android Full support Yes Full support Yes No support ? ...
IDBObjectStore.transaction - Web APIs
at specification. Recommendation Indexed Database API DraftThe definition of 'transaction' in that specification. Recommendation Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...tabase API DraftThe definition of 'transaction' in that specification. Recommendation Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...l support 10Opera Full support 15Safari Full support 7WebView Android Full support Yes Full support Yes No support ? ...
IDBOpenDBRequest.onblocked - Web APIs
hat specification. Recommendation Indexed Database API DraftThe definition of 'onblocked' in that specification. Recommendation Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...atabase API DraftThe definition of 'onblocked' in that specification. Recommendation Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...l support 10Opera Full support 15Safari Full support 7WebView Android Full support Yes Full support Yes No support ? ...
IDBOpenDBRequest.onupgradeneeded - Web APIs
ecification. Recommendation Indexed Database API DraftThe definition of 'onupgradeneeded' in that specification. Recommendation Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...e API DraftThe definition of 'onupgradeneeded' in that specification. Recommendation Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...l support 10Opera Full support 15Safari Full support 7WebView Android Full support Yes Full support Yes No support ? ...
IDBRequest.onerror - Web APIs
n that specification. Recommendation Indexed Database API DraftThe definition of 'onerror' in that specification. Recommendation Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...d Database API DraftThe definition of 'onerror' in that specification. Recommendation Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...l support 16 No support 10 -- 16Prefixed Prefixed Implemented with the vendor prefix: mozIE Partial support 10Opera Full support 15Safari Full support 7WebView Android Full support Yes
Chrome Android Full support YesFirefox Android Full support 22Opera Android Full support 14Safari iOS Full support 8Samsung Internet Android Full support YesLegend ...
IDBRequest.onsuccess - Web APIs
that specification. Recommendation Indexed Database API DraftThe definition of 'onsuccess' in that specification. Recommendation Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...Database API DraftThe definition of 'onsuccess' in that specification. Recommendation Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...l support 16 No support 10 -- 16Prefixed Prefixed Implemented with the vendor prefix: mozIE Partial support 10Opera Full support 15Safari Full support 7WebView Android Full support Yes
Chrome Android Full support YesFirefox Android Full support 22Opera Android Full support 14Safari iOS Full support 8Samsung Internet Android Full support YesLegend ...
IDBRequest.readyState - Web APIs
hat specification. Recommendation Indexed Database API DraftThe definition of 'readyState' in that specification. Recommendation Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...atabase API DraftThe definition of 'readyState' in that specification. Recommendation Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...l support 16 No support 10 -- 16Prefixed Prefixed Implemented with the vendor prefix: mozIE Partial support 10Opera Full support 15Safari Full support 7WebView Android Full support Yes
Chrome Android Full support YesFirefox Android Full support 22Opera Android Full support 14Safari iOS Full support 8Samsung Internet Android Full support YesLegend ...
IDBRequest.result - Web APIs
in that specification. Recommendation Indexed Database API DraftThe definition of 'result' in that specification. Recommendation Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...ed Database API DraftThe definition of 'result' in that specification. Recommendation Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...l support 16 No support 10 -- 16Prefixed Prefixed Implemented with the vendor prefix: mozIE Partial support 10Opera Full support 15Safari Full support 7WebView Android Full support Yes
Chrome Android Full support YesFirefox Android Full support 22Opera Android Full support 14Safari iOS Full support 8Samsung Internet Android Full support YesLegend ...
IDBRequest.source - Web APIs
in that specification. Recommendation Indexed Database API DraftThe definition of 'source' in that specification. Recommendation Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...ed Database API DraftThe definition of 'source' in that specification. Recommendation Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...l support 16 No support 10 -- 16Prefixed Prefixed Implemented with the vendor prefix: mozIE Partial support 10Opera Full support 15Safari Full support 7WebView Android Full support Yes
Chrome Android Full support YesFirefox Android Full support 22Opera Android Full support 14Safari iOS Full support 8Samsung Internet Android Full support YesLegend ...
IDBRequest.transaction - Web APIs
at specification. Recommendation Indexed Database API DraftThe definition of 'transaction' in that specification. Recommendation Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...tabase API DraftThe definition of 'transaction' in that specification. Recommendation Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...l support 16 No support 10 -- 16Prefixed Prefixed Implemented with the vendor prefix: mozIE Partial support 10Opera Full support 15Safari Full support 7WebView Android Full support Yes
Chrome Android Full support YesFirefox Android Full support 22Opera Android Full support 14Safari iOS Full support 8Samsung Internet Android Full support YesLegend ...
IDBTransaction.objectStoreNames - Web APIs
ecification. Recommendation Indexed Database API DraftThe definition of 'ObjectStoreNames' in that specification. Recommendation Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...e API DraftThe definition of 'ObjectStoreNames' in that specification. Recommendation Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... 48Edge Full support <=79Firefox Full support YesIE ? ...
IDBTransaction.abort() - Web APIs
' in that specification. Recommendation Indexed Database API DraftThe definition of 'abort()' in that specification. Recommendation Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...xed Database API DraftThe definition of 'abort()' in that specification. Recommendation Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...on Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...l support 16 No support 10 -- 16Prefixed Prefixed Implemented with the vendor prefix: mozIE Partial support 10Opera Full support 15Safari Full support 7WebView Android Full support Yes
Chrome Android Full support YesFirefox Android Full support 22Opera Android Full support 14Safari iOS Full support 8Samsung Internet Android Full support YesLegend ...
IDBTransaction.commit() - Web APIs
Comment Indexed Database API DraftThe definition of 'IDBTransaction.commit()' in that specification. Recommendation Unitial definition. Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...of 'IDBTransaction.commit()' in that specification. Recommendation Unitial definition. Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...on. Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...dge Full support 79Firefox Full support 74IE No support NoOpera Full support 63Safari No support NoWebView Android Full support 76
Chrome Android Full support 76Firefox Android No support NoOpera Android Full support 54Safari iOS No support NoSamsung Internet Android Full support 12.0Legend ...
IDBTransaction.db - Web APIs
db' in that specification. Recommendation Indexed Database API DraftThe definition of 'db' in that specification. Recommendation Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...ndexed Database API DraftThe definition of 'db' in that specification. Recommendation Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...ion Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...l support 10Opera Full support 15Safari Full support 7WebView Android Full support Yes Full support Yes No support ? ...
IDBTransaction.mode - Web APIs
' in that specification. Recommendation Indexed Database API DraftThe definition of 'mode' in that specification. Recommendation Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...exed Database API DraftThe definition of 'mode' in that specification. Recommendation Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...n Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...l support 16 No support 10 -- 16Prefixed Prefixed Implemented with the vendor prefix: mozIE Partial support 10Opera Full support 15Safari Full support 7WebView Android Full support Yes
Chrome Android Full support YesFirefox Android Full support 22Opera Android Full support 14Safari iOS Full support 8Samsung Internet Android Full support YesLegend ...
IDBTransaction.objectStore() - Web APIs
t specification. Recommendation Indexed Database API DraftThe definition of 'objectStore()' in that specification. Recommendation Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...abase API DraftThe definition of 'objectStore()' in that specification. Recommendation Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...l support 16 No support 10 -- 16Prefixed Prefixed Implemented with the vendor prefix: mozIE Partial support 10Opera Full support 15Safari Full support 7WebView Android Full support Yes
Chrome Android Full support YesFirefox Android Full support 22Opera Android Full support 14Safari iOS Full support 8Samsung Internet Android Full support YesLegend ...
IDBTransaction.onabort - Web APIs
n that specification. Recommendation Indexed Database API DraftThe definition of 'onabort' in that specification. Recommendation Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...d Database API DraftThe definition of 'onabort' in that specification. Recommendation Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...l support 16 No support 10 -- 16Prefixed Prefixed Implemented with the vendor prefix: mozIE Partial support 10Opera Full support 15Safari Full support 7WebView Android Full support Yes
Chrome Android Full support YesFirefox Android Full support 22Opera Android Full support 14Safari iOS Full support 8Samsung Internet Android Full support YesLegend ...
IDBTransaction.oncomplete - Web APIs
that specification. Recommendation Indexed Database API DraftThe definition of 'oncomplete' in that specification. Recommendation Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...Database API DraftThe definition of 'oncomplete' in that specification. Recommendation Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...l support 16 No support 10 -- 16Prefixed Prefixed Implemented with the vendor prefix: mozIE Partial support 10Opera Full support 15Safari Full support 7WebView Android Full support Yes
Chrome Android Full support YesFirefox Android Full support 22Opera Android Full support 14Safari iOS Full support 8Samsung Internet Android Full support YesLegend ...
IDBTransaction.onerror - Web APIs
in that specification. Recommendation Indexed Database API DraftThe definition of 'onerror' in that specification. Recommendation Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...ed Database API DraftThe definition of 'onerror' in that specification. Recommendation Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...l support 16 No support 10 -- 16Prefixed Prefixed Implemented with the vendor prefix: mozIE Partial support 10Opera Full support 15Safari Full support 7WebView Android Full support Yes
Chrome Android Full support YesFirefox Android Full support 22Opera Android Full support 14Safari iOS Full support 8Samsung Internet Android Full support YesLegend ...
IDBVersionChangeEvent.newVersion - Web APIs
hat specification. Recommendation Indexed Database API DraftThe definition of 'newVersion' in that specification. Recommendation Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...atabase API DraftThe definition of 'newVersion' in that specification. Recommendation Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...l support 10Opera Full support 15Safari Full support 7WebView Android Full support Yes Full support Yes No support ? ...
IDBVersionChangeEvent.oldVersion - Web APIs
hat specification. Recommendation Indexed Database API DraftThe definition of 'oldVersion' in that specification. Recommendation Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...atabase API DraftThe definition of 'oldVersion' in that specification. Recommendation Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...l support 10Opera Full support 15Safari Full support 7WebView Android Full support Yes Full support Yes No support ? ...
IDBVersionChangeEvent.version - Web APIs
tributes. See the compatibility table to know what browsers support them. Syntax readonly attribute unsigned long long? version; Value A 64-bit integer. Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...support them. Syntax readonly attribute unsigned long long? version; Value A 64-bit integer. Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...patibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... 16 Full support 10Prefixed Prefixed Implemented with the vendor prefix: mozIE No support NoOpera No support NoSafari No support NoWebView Android Full support Yes
Chrome Android Full support 18Firefox Android Full support 22Opera Android Full support 22Safari iOS No support NoSamsung Internet Android Full support 1.0Legend ...
IDBVersionChangeRequest.setVersion() - Web APIs
ample TBD Parameters version The version to store in the database. Returns IDBVersionChangeRequest The request to change the version of a database. Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...he database. Returns IDBVersionChangeRequest The request to change the version of a database. Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...ibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... NoEdge No support NoFirefox No support NoIE No support NoOpera No support NoSafari No support NoWebView Android No support No
Chrome Android No support NoFirefox Android No support NoOpera Android No support NoSafari iOS No support NoSamsung Internet Android No support NoLegend ...
IIRFilterNode() - Web APIs
ecification Status Comment Web Audio APIThe definition of 'IIRFilterNode()' in that specification. Working Draft Initial definition. Browser Compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...efinition of 'IIRFilterNode()' in that specification. Working Draft Initial definition. Browser Compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...ompatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... 53IE No support NoOpera Full support 42Safari ? WebView Android Full support 55Notes Full support 55Notes Notes Before version 59, the default values were not supported.
Chrome Android Full support 55Notes Full support 55Notes Notes Before version 59, the default values were not supported.Firefox Android Full support 53Opera Android Full support 42Safari iOS ? Sa...
ImageCapture.takePhoto() - Web APIs
ion Status Comment MediaStream Image CaptureThe definition of 'takePhoto()' in that specification. Working Draft Initial definition. Browser Compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...he definition of 'takePhoto()' in that specification. Working Draft Initial definition. Browser Compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...ser Compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...rt 47 No support 46 -- 47Notes Notes photoSettings argument not supported.Safari ? WebView Android Full support 60 Full support 60 No support 59 -- 60Notes Notes photoSettings argument not supported.
Chrome Android Full support 60 Full support 60 No support 59 -- 60Notes Notes photoSettings argument not supported.Firefox Android ? Opera Android Full support 44 Full support ...
Using IndexedDB - Web APIs
some advertising network or malicious website to pollute your computer, so browsers used to prompt the user the first time any given web app attempts to open an IndexedDB for storage. The user could choose to allow or deny access. Also, IndexedDB storage in browsers' privacy modes only lasts in-memory until the incognito session is closed (Private Browsing mode for Firefox and Incognito mode for
Chrome, but in Firefox this is not implemented yet as of April 2020 so you can't use IndexedDB in Firefox Private Browsing at all). Now, assuming that the user allowed your request to create a database, and you've received a success event to trigger the success callback; What's next? The request here was generated with a call to indexedDB.open(), so request.result is an instance of IDBDatabase, and you...
... else before upgrading the database.) Trying to create an object store with a name that already exists (or trying to delete an object store with a name that does not already exist) will throw an error. If the onupgradeneeded event exits successfully, the onsuccess handler of the open database request will then be triggered. Blink/Webkit supports the current version of the spec, as shipped in
Chrome 23+ and Opera 17+; IE10+ does too. Other and older implementations don't implement the current version of the spec, and thus do not support the indexedDB.open(name, version).onupgradeneeded signature yet. For more information on how to upgrade the version of the database in older Webkit/Blink, see the IDBDatabase reference article. Structuring the database Now to structure the database. Indexed...
...s have completed, the database connection is closed. Finally, the IDBDatabase object representing the database connection receives a close event. You can use the IDBDatabase.onclose event handler to listen for these events, so that you know when a database is unexpectedly closed. The behavior described above is new, and is only available as of the following browser releases: Firefox 50, Google
Chrome 31 (approximately). Prior to these browser versions, the transactions are aborted silently, and no close event is fired, so there is no way to detect an unexpected database closure. Since the user can exit the browser at any time, this means that you cannot rely upon any particular transaction to complete, and on older browsers, you don't even get told when they don't complete. There are severa...
... 0.2em; } .action-failure { padding: 0.5em; color: #ff1408; background-color: #eeeeee; border-radius: 0.2em; } .note { font-size: smaller; } .destructive { background-color: orange; } .destructive:hover { background-color: #ff8000; } .destructive:active { background-color: red; } JavaScript Content (function () { var COMPAT_ENVS = [ ['Firefox', ">= 16.0"], ['Google
Chrome', ">= 24.0 (you may need to get Google
Chrome Canary), NO Blob storage support"] ]; var compat = $('#compat'); compat.empty(); compat.append('<ul id="compat-list"></ul>'); COMPAT_ENVS.forEach(function(val, idx, array) { $('#compat-list').append('<li>' + val[0] + ': ' + val[1] + '</li>'); }); const DB_NAME = 'mdn-demo-indexeddb-epublications'; const DB_VERSION = 1; // Use...
InputEvent.dataTransfer - Web APIs
ication Status Comment Input Events Level 2The definition of 'dataTransfer' in that specification. Working Draft Initial definition. Browser Compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...e definition of 'dataTransfer' in that specification. Working Draft Initial definition. Browser Compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... Compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...dge Full support 79Firefox Full support 67IE No support NoOpera Full support 47Safari No support NoWebView Android Full support 60
Chrome Android Full support 60Firefox Android Full support 67Opera Android Full support 44Safari iOS No support NoSamsung Internet Android Full support 8.0Legend ...
InputEvent.getTargetRanges() - Web APIs
on Status Comment Input Events Level 2The definition of 'getTargetRanges()' in that specification. Working Draft Initial definition. Browser Compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...inition of 'getTargetRanges()' in that specification. Working Draft Initial definition. Browser Compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...mpatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...e Full support 79Firefox No support NoIE No support NoOpera Full support 47Safari Full support 10.1WebView Android Full support 60
Chrome Android Full support 60Firefox Android No support NoOpera Android Full support 44Safari iOS Full support 10.3Samsung Internet Android Full support 8.0Legend ...
KeyboardEvent: code values - Web APIs
are some differences in which keys map to which codes. These tables show those variations when known. Code values Code values on Windows This table shows the Windows scan codes representing keys and the KeyboardEvent.code values which correspond to those hardware keys. Only keys which generate scan codes on Windows are listed. ...
..." 0xE022 "MediaPlayPause" "MediaPlayPause" 0xE023 "Unidentified" "" 0xE024 "MediaStop" "MediaStop" 0xE025 ~ 0xE02B "Unidentified" "" 0xE02C "Unidentified" "Eject" 0xE02D "Unidentified" "" 0xE02E "AudioVolumeDown" "VolumeDown" (was "VolumeDown" until
Chrome 50) 0xE02F "Unidentified" "" 0xE030 "AudioVolumeUp" "VolumeUp" (was "VolumeUp" until
Chrome 50) 0xE031 "Unidentified" "" 0xE032 "BrowserHome" "BrowserHome" 0xE033, 0xE034 "Unidentified" "" 0xE035 "NumpadDivide" "NumpadDivide" 0xE036 "Unidentified" "...
...kVK_ANSI_KeypadDecimal (0x41) "NumpadDecimal" "NumpadDecimal" kVK_ANSI_KeypadMultiply (0x43) "NumpadMultiply" "NumpadMultiply" kVK_ANSI_KeypadPlus (0x45) "NumpadAdd" "NumpadAdd" kVK_ANSI_KeypadClear (0x47) "NumLock" "NumLock" kVK_VolumeUp (0x48) "AudioVolumeUp" (was "VolumeUp" until Firefox 48) "AudioVolumeUp" (was "VolumeUp" until
Chrome 50) kVK_VolumeDown (0x49) "AudioVolumeDown" (was "VolumeDown" until Firefox 49) "AudioVolumeDown" (was "VolumeDown" until
Chrome 50) kVK_Mute (0x4A) "AudioVolumeMute" (was "VolumeMute" until Firefox 49) "AudioVolumeMute" (was "VolumeMute" until
Chrome 50) kVK_ANSI_KeypadDivide (0x4B) "NumpadDivide" "NumpadDivide" kVK_ANSI_KeypadEnter (0x4C) ...
...ArrowLeft" "ArrowLeft" 0x0072 "ArrowRight" "ArrowRight" 0x0073 "End" "End" 0x0074 "ArrowDown" "ArrowDown" 0x0075 "PageDown" "PageDown" 0x0076 "Insert" "Insert" 0x0077 "Delete" "Delete" 0x0078 "Unidentified" "" 0x0079 "AudioVolumeMute" "AudioVolumeMute" (was "VolumeMute" until
Chrome 50) 0x007A "AudioVolumeDown" "AudioVolumeDown" (was "VolumeDown" until
Chrome 50) 0x007B "AudioVolumeUp" "AudioVolumeUp" (was "VolumeUp" until
Chrome 50) 0x007C "Unidentified" "Power" 0x007D "NumpadEqual" "NumpadEqual" 0x007E "Unidentified" "NumpadChangeSign" 0x007F "Pause" "Pause" 0x0080 "Uniden...
MediaDeviceInfo.deviceId - Web APIs
tatus Comment Media Capture and StreamsThe definition of 'deviceId' in that specification. Candidate Recommendation Initial definition. Browser Compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...ition of 'deviceId' in that specification. Candidate Recommendation Initial definition. Browser Compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...n. Browser Compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... NoNotes Notes This property can be used in Opera by using the adapter.js polyfill.Safari No support NoWebView Android Full support 55Notes Full support 55Notes Notes For earlier versions, this interface is available through the adapter.js polyfill
Chrome Android Full support 55Notes Full support 55Notes Notes For earlier versions, this interface is available through the adapter.js polyfillFirefox Android Full support 39Opera Android No support NoNotes ...
MediaDeviceInfo.kind - Web APIs
Status Comment Media Capture and StreamsThe definition of 'kind' in that specification. Candidate Recommendation Initial definition. Browser Compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...efinition of 'kind' in that specification. Candidate Recommendation Initial definition. Browser Compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...ition. Browser Compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... NoNotes Notes This property can be used in Opera by using the adapter.js polyfill.Safari No support NoWebView Android Full support 55Notes Full support 55Notes Notes For earlier versions, this interface is available through the adapter.js polyfill
Chrome Android Full support 55Notes Full support 55Notes Notes For earlier versions, this interface is available through the adapter.js polyfillFirefox Android Full support 39Opera Android No support NoNotes ...
MediaKeyMessageEvent() - Web APIs
allows applications to differentiate messages without parsing them. message: An array containing the message generated by the content decryption module. Browser Compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...g them. message: An array containing the message generated by the content decryption module. Browser Compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...ompatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... Opera Android ? Safari iOS ? ...
MediaKeyStatusMap.entries() - Web APIs
rns Exceptions Specifications Specification Status Comment Encrypted Media Extensions Recommendation Initial definition. Browser Compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...tatus Comment Encrypted Media Extensions Recommendation Initial definition. Browser Compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...owser Compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... Opera Android Full support 29Safari iOS ? ...
MediaKeyStatusMap.forEach() - Web APIs
rns undefined. Specifications Specification Status Comment Encrypted Media Extensions Recommendation Initial definition. Browser Compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...tatus Comment Encrypted Media Extensions Recommendation Initial definition. Browser Compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...owser Compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... Opera Android Full support 29Safari iOS ? ...
MediaKeyStatusMap.get() - Web APIs
, or undefined. Specifications Specification Status Comment Encrypted Media Extensions Recommendation Initial definition. Browser Compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...tatus Comment Encrypted Media Extensions Recommendation Initial definition. Browser Compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... Browser Compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... Full support 42Edge Full support 13Firefox Full support YesIE ? Opera Full support 29Safari ? WebView Android Full support 43
Chrome Android Full support 42Firefox Android Full support YesOpera Android Full support 29Safari iOS ? Samsung Internet Android Full support 4.0Legend Full suppo...
MediaKeyStatusMap.has() - Web APIs
rns A Boolean. Specifications Specification Status Comment Encrypted Media Extensions Recommendation Initial definition. Browser Compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...tatus Comment Encrypted Media Extensions Recommendation Initial definition. Browser Compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... Browser Compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... Full support 42Edge Full support 13Firefox Full support YesIE ? Opera Full support 29Safari ? WebView Android Full support 43
Chrome Android Full support 42Firefox Android Full support YesOpera Android Full support 29Safari iOS ? Samsung Internet Android Full support 4.0Legend Full suppo...
MediaKeyStatusMap.keys() - Web APIs
A new iterator. Specifications Specification Status Comment Encrypted Media Extensions Recommendation Initial definition. Browser Compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...tatus Comment Encrypted Media Extensions Recommendation Initial definition. Browser Compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... Browser Compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... Opera Android Full support 29Safari iOS ? ...
MediaKeyStatusMap.size - Web APIs
fication Status Comment Encrypted Media ExtensionsThe definition of 'size' in that specification. Recommendation Initial definition. Browser Compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...sionsThe definition of 'size' in that specification. Recommendation Initial definition. Browser Compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... Browser Compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... Full support 42Edge Full support 13Firefox Full support YesIE ? Opera Full support 29Safari ? WebView Android Full support 43
Chrome Android Full support 42Firefox Android Full support YesOpera Android Full support 29Safari iOS ? Samsung Internet Android Full support 4.0Legend Full suppo...
MediaKeyStatusMap.values() - Web APIs
A new iterator. Specifications Specification Status Comment Encrypted Media Extensions Recommendation Initial definition. Browser Compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...tatus Comment Encrypted Media Extensions Recommendation Initial definition. Browser Compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...rowser Compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... Opera Android Full support 29Safari iOS ? ...
MediaMetadata.album - Web APIs
Specification Status Comment Media Session StandardThe definition of 'album' in that specification. Draft Initial definition. Browser Compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...sion StandardThe definition of 'album' in that specification. Draft Initial definition. Browser Compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...Browser Compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... 57Edge No support NoFirefox Full support 71IE No support NoOpera Full support YesSafari ? WebView Android No support No
Chrome Android Full support 57Firefox Android ? Opera Android No support NoSafari iOS ? Samsung Internet Android Full support 7.0Legend Full support ...
MediaMetadata.artist - Web APIs
Specification Status Comment Media Session StandardThe definition of 'artist' in that specification. Draft Initial definition. Browser Compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...ion StandardThe definition of 'artist' in that specification. Draft Initial definition. Browser Compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...rowser Compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... 57Edge No support NoFirefox Full support 71IE No support NoOpera Full support YesSafari ? WebView Android No support No
Chrome Android Full support 57Firefox Android ? Opera Android No support NoSafari iOS ? Samsung Internet Android Full support 7.0Legend Full support ...
MediaMetadata.artwork - Web APIs
Specification Status Comment Media Session StandardThe definition of 'artwork' in that specification. Draft Initial definition. Browser Compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...on StandardThe definition of 'artwork' in that specification. Draft Initial definition. Browser Compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...owser Compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... 57Edge No support NoFirefox Full support 71IE No support NoOpera Full support YesSafari ? WebView Android No support No
Chrome Android Full support 57Firefox Android ? Opera Android No support NoSafari iOS ? Samsung Internet Android Full support 7.0Legend Full support ...
MediaMetadata.title - Web APIs
Specification Status Comment Media Session StandardThe definition of 'title' in that specification. Draft Initial definition. Browser Compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...sion StandardThe definition of 'title' in that specification. Draft Initial definition. Browser Compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...Browser Compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... 57Edge No support NoFirefox Full support 71IE No support NoOpera Full support YesSafari ? WebView Android No support No
Chrome Android Full support 57Firefox Android ? Opera Android No support NoSafari iOS ? Samsung Internet Android Full support 7.0Legend Full support ...
MediaRecorder.audioBitsPerSecond - Web APIs
n Status Comment MediaStream RecordingThe definition of 'audioBitsPerSecond' in that specification. Working Draft Initial definition. Browser Compatibility The compatibility table in this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...inition of 'audioBitsPerSecond' in that specification. Working Draft Initial definition. Browser Compatibility The compatibility table in this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...atibility The compatibility table in this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... Opera Android Full support 36Safari iOS No support NoSamsung Internet Android Full support 5.0Legend Full support ...
MediaRecorder.ignoreMutedMedia - Web APIs
black frames for video. The default is false. Syntax var boolean = MediaRecorder.ignoreMutedMedia MediaRecorder.ignoreMutedMedia = boolean Value A Boolean. Browser Compatibility The compatibility table in this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...boolean = MediaRecorder.ignoreMutedMedia MediaRecorder.ignoreMutedMedia = boolean Value A Boolean. Browser Compatibility The compatibility table in this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...y The compatibility table in this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...tandard
Chrome No support 49 -- 57Edge No support NoFirefox ? IE No support NoOpera No support 36 -- 44Safari No support NoWebView Android No support 49 -- 57
Chrome Android No support 49 -- 57Firefox Android ? Opera Android No support 36 -- 44Safari iOS No support NoSamsung Internet Android No support 5.0 -- 7.0Legend No support No support ...
MediaSession.playbackState - Web APIs
pecification Status Comment Media Session StandardThe definition of 'playbackState' in that specification. Draft Initial definition. Browser Compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...ndardThe definition of 'playbackState' in that specification. Draft Initial definition. Browser Compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...Compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... 73Edge Full support <=79Firefox No support NoIE No support NoOpera Full support YesSafari ? WebView Android No support No
Chrome Android Full support 57Firefox Android No support NoOpera Android No support NoSafari iOS ? Samsung Internet Android Full support 7.0Legend Full support ...
MediaStream.getTracks() - Web APIs
Comment Media Capture and StreamsThe definition of 'getTracks()' in that specification. Candidate Recommendation Initial definition. Browser Compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...n of 'getTracks()' in that specification. Candidate Recommendation Initial definition. Browser Compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...er Compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... Full support 12Firefox Full support YesIE No support NoOpera Full support YesSafari Full support YesWebView Android Full support 45
Chrome Android Full support 45Firefox Android Full support YesOpera Android No support NoSafari iOS Full support YesSamsung Internet Android Full support 5.0Legend ...
MediaStream.id - Web APIs
Comment Media Capture and StreamsThe definition of 'MediaStream.id' in that specification. Candidate Recommendation Initial definition. Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... of 'MediaStream.id' in that specification. Candidate Recommendation Initial definition. Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...finition. Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... No support ? -- 54Edge No support 12 -- 79Firefox Full support 41IE No support NoOpera No support ? -- 39Safari Full support YesWebView Android No support ? -- 54
Chrome Android No support ? -- 54Firefox Android Full support 41Opera Android No support ? -- 41Safari iOS Full support YesSamsung Internet Android No support ? -- 6.0Legend Full support ...
Metadata.modificationTime - Web APIs
function(newEntry) { fileEntry = newEntry; }); }); } }); }, handleError); This API has no official W3C or WHATWG specification. Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... }); }); } }); }, handleError); This API has no official W3C or WHATWG specification. Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... 13Edge Full support <=79Firefox No support NoIE No support NoOpera No support NoSafari No support NoWebView Android No support No
Chrome Android Full support YesFirefox Android No support NoOpera Android No support NoSafari iOS No support NoSamsung Internet Android Full support YesLegend ...
Metadata.size - Web APIs
tion() { /* log file removed; do something clever here */ }); } }); }, handleError); This API has no official W3C or WHATWG specification. Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...re */ }); } }); }, handleError); This API has no official W3C or WHATWG specification. Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...mpatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... 13Edge Full support <=79Firefox No support NoIE No support NoOpera No support NoSafari No support NoWebView Android No support No
Chrome Android Full support YesFirefox Android No support NoOpera Android No support NoSafari iOS No support NoSamsung Internet Android Full support YesLegend ...
NonDocumentTypeChildNode.nextElementSibling - Web APIs
rsal.nextElementSibling' in that specification. Obsolete Added its initial definition to the ElementTraversal pure interface and use it on Element. Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... Added its initial definition to the ElementTraversal pure interface and use it on Element. Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... 3.5IE Partial support 9Notes Partial support 9Notes Notes Only implemented for Element, not for CharacterData. ...
OfflineAudioCompletionEvent.renderedBuffer - Web APIs
pecification Status Comment Web Audio APIThe definition of 'renderedBuffer' in that specification. Working Draft Initial definition. Browser Compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...definition of 'renderedBuffer' in that specification. Working Draft Initial definition. Browser Compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... Browser Compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...e Full support 12Firefox Full support 25IE No support NoOpera Full support 15Safari Full support 6WebView Android Full support Yes
Chrome Android Full support 18Firefox Android Full support 26Opera Android Full support 14Safari iOS Full support YesSamsung Internet Android Full support 1.0Legend ...
PaymentAddress.toJSON() - Web APIs
Specification Status Comment Web IDLThe definition of 'toJSON()' in that specification. Candidate Recommendation Initial definition. Browser Compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. DesktopMobile
ChromeEdgeFirefoxInternet ExplorerOperaSafariAndroid webview
Chrome for AndroidFirefox for AndroidOpera for AndroidSafari on iOSSamsung InternettoJSON()
Chrome Full support 61Disabled Full support 61Disabled Disabled From version 61: this feature is behind the #web-payments preference (needs to be set to Enabled). T...
...orerOperaSafariAndroid webview
Chrome for AndroidFirefox for AndroidOpera for AndroidSafari on iOSSamsung InternettoJSON()
Chrome Full support 61Disabled Full support 61Disabled Disabled From version 61: this feature is behind the #web-payments preference (needs to be set to Enabled). To change preferences in
Chrome, visit
chrome://flags.Edge Full support 15Firefox Full support 62Notes Disabled Full support 62Notes Disabled Notes Available only in nightly builds. Requires the comma-delineated list in dom.payments.request.supportedRegions to contain one or more of the support...
...s behind the dom.payments.request.enabled preference (needs to be set to true). ...
...upport YesWebView Android No support No
Chrome Android Full support 61Disabled Full support 61Disabled Disabled From version 61: this feature is behind the #web-payments preference (needs to be set to Enabled). To change preferences in
Chrome, visit
chrome://flags.Firefox Android Full support 62Notes Disabled Full support 62Notes Disabled Notes Available only in nightly builds. Requires the comma-delineated list in dom.payments.request.supportedRegions to contain one or more of the supported 2-character ISO locales, currently US and CA.Disabled ...
PaymentRequest.abort() - Web APIs
on Status Comment Payment Request APIThe definition of 'abort()' in that specification. Candidate Recommendation Initial definition. Browser Compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...nition of 'abort()' in that specification. Candidate Recommendation Initial definition. Browser Compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...on. Browser Compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... behind the dom.payments.request.enabled preference (needs to be set to true). To change preferences in Firefox, visit about:config.IE No support NoOpera No support NoSafari Full support 11.1WebView Android No support No
Chrome Android Full support 53Firefox Android Full support 55Notes Disabled Full support 55Notes Disabled Notes Available only in nightly builds.Disabled From version 55: this feature is behind the dom.payments.request.enabled preference (needs to be set to true). To ch...
PaymentRequest.canMakePayment() - Web APIs
tus Comment Payment Request APIThe definition of 'canMakePayment()' in that specification. Candidate Recommendation Initial definition. Browser Compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... 'canMakePayment()' in that specification. Candidate Recommendation Initial definition. Browser Compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... Browser Compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... behind the dom.payments.request.enabled preference (needs to be set to true). To change preferences in Firefox, visit about:config.IE No support NoOpera No support NoSafari Full support 11.1WebView Android No support No
Chrome Android Full support 53Firefox Android Full support 55Notes Disabled Full support 55Notes Disabled Notes Available only in nightly builds.Disabled From version 55: this feature is behind the dom.payments.request.enabled preference (needs to be set to true). To ch...
PaymentRequest.prototype.id - Web APIs
ication Status Comment Payment Request APIThe definition of 'id' in that specification. Candidate Recommendation Initial definition. Browser Compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... definition of 'id' in that specification. Candidate Recommendation Initial definition. Browser Compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...inition. Browser Compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... behind the dom.payments.request.enabled preference (needs to be set to true). To change preferences in Firefox, visit about:config.IE No support NoOpera No support NoSafari Full support 11.1WebView Android No support No
Chrome Android Full support 60Firefox Android Full support 55Notes Disabled Full support 55Notes Disabled Notes Available only in nightly builds.Disabled From version 55: this feature is behind the dom.payments.request.enabled preference (needs to be set to true). To ch...
PaymentRequest.onshippingaddresschange - Web APIs
Comment Payment Request APIThe definition of 'onshippingaddresschange' in that specification. Candidate Recommendation Initial definition. Browser Compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...ppingaddresschange' in that specification. Candidate Recommendation Initial definition. Browser Compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...er Compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... behind the dom.payments.request.enabled preference (needs to be set to true). To change preferences in Firefox, visit about:config.IE No support NoOpera No support NoSafari Full support 11.1WebView Android No support No
Chrome Android Full support 53Firefox Android Full support 55Notes Disabled Full support 55Notes Disabled Notes Available only in nightly builds.Disabled From version 55: this feature is behind the dom.payments.request.enabled preference (needs to be set to true). To ch...
PaymentRequest.onshippingoptionchange - Web APIs
Comment Payment Request APIThe definition of 'onshippingoptionchange' in that specification. Candidate Recommendation Initial definition. Browser Compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...ippingoptionchange' in that specification. Candidate Recommendation Initial definition. Browser Compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...ser Compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... behind the dom.payments.request.enabled preference (needs to be set to true). To change preferences in Firefox, visit about:config.IE No support NoOpera No support NoSafari Full support 11.1WebView Android No support No
Chrome Android Full support 53Firefox Android Full support 55Notes Disabled Full support 55Notes Disabled Notes Available only in nightly builds.Disabled From version 55: this feature is behind the dom.payments.request.enabled preference (needs to be set to true). To ch...
PaymentRequest.shippingOption - Web APIs
tatus Comment Payment Request APIThe definition of 'shippingOption' in that specification. Candidate Recommendation Initial definition. Browser Compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...of 'shippingOption' in that specification. Candidate Recommendation Initial definition. Browser Compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... Browser Compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... behind the dom.payments.request.enabled preference (needs to be set to true). To change preferences in Firefox, visit about:config.IE No support NoOpera No support NoSafari Full support 11.1WebView Android No support No
Chrome Android Full support 53Firefox Android Full support 55Notes Disabled Full support 55Notes Disabled Notes Available only in nightly builds.Disabled From version 55: this feature is behind the dom.payments.request.enabled preference (needs to be set to true). To ch...
PaymentRequest.shippingType - Web APIs
Status Comment Payment Request APIThe definition of 'shippingType' in that specification. Candidate Recommendation Initial definition. Browser Compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...n of 'shippingType' in that specification. Candidate Recommendation Initial definition. Browser Compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... Browser Compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... behind the dom.payments.request.enabled preference (needs to be set to true). To change preferences in Firefox, visit about:config.IE No support NoOpera No support NoSafari Full support 11.1WebView Android No support No
Chrome Android Full support 55Firefox Android Full support 55Notes Disabled Full support 55Notes Disabled Notes Available only in nightly builds.Disabled From version 55: this feature is behind the dom.payments.request.enabled preference (needs to be set to true). To ch...
PaymentRequest.payerName - Web APIs
Status Comment Payment Request APIThe definition of 'payerName' in that specification. Candidate Recommendation Initial definition. Browser Compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...tion of 'payerName' in that specification. Candidate Recommendation Initial definition. Browser Compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
.... Browser Compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...s behind the dom.payments.request.enabled preference (needs to be set to true). To change preferences in Firefox, visit about:config.IE No support NoOpera No support NoSafari Full support YesWebView Android No support No
Chrome Android Full support 58Firefox Android Full support 56Notes Disabled Full support 56Notes Disabled Notes Available only in nightly builds.Disabled From version 56: this feature is behind the dom.payments.request.enabled preference (needs to be set to true). To ch...
PaymentResponse.requestId - Web APIs
Status Comment Payment Request APIThe definition of 'requestId' in that specification. Candidate Recommendation Initial definition. Browser Compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...tion of 'requestId' in that specification. Candidate Recommendation Initial definition. Browser Compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
.... Browser Compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...s behind the dom.payments.request.enabled preference (needs to be set to true). To change preferences in Firefox, visit about:config.IE No support NoOpera No support NoSafari Full support YesWebView Android No support No
Chrome Android Full support 60Firefox Android Full support 56Notes Disabled Full support 56Notes Disabled Notes Available only in nightly builds.Disabled From version 56: this feature is behind the dom.payments.request.enabled preference (needs to be set to true). To ch...
Performance.timeOrigin - Web APIs
ifications Specification Status High Resolution Time Level 2The definition of 'timeOrigin' in that specification. Recommendation Browser Compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...esolution Time Level 2The definition of 'timeOrigin' in that specification. Recommendation Browser Compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...er Compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... 62Edge Full support 16Firefox Full support 53IE ? ...
PerformanceLongTaskTiming.attribution - Web APIs
Specification Status Comment Long Tasks API 1The definition of 'attribution' in that specification. Working Draft Initial definition. Browser Compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...The definition of 'attribution' in that specification. Working Draft Initial definition. Browser Compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...er Compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... Full support 58Edge Full support <=79Firefox No support NoIE ? Opera Full support YesSafari ? WebView Android Full support 58
Chrome Android Full support 58Firefox Android No support NoOpera Android Full support YesSafari iOS ? Samsung Internet Android Full support 7.0Legend Full support...
PhotoCapabilities.fillLightMode - Web APIs
n Status Comment MediaStream Image CaptureThe definition of 'fillLightMode' in that specification. Working Draft Initial definition. Browser Compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... definition of 'fillLightMode' in that specification. Working Draft Initial definition. Browser Compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...Compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... Opera Android Full support 43Safari iOS ? ...
PhotoCapabilities.imageHeight - Web APIs
ion Status Comment MediaStream Image CaptureThe definition of 'imageHeight' in that specification. Working Draft Initial definition. Browser Compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...he definition of 'imageHeight' in that specification. Working Draft Initial definition. Browser Compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...r Compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... Opera Android Full support 43Safari iOS ? ...
imageWidth - Web APIs
tion Status Comment MediaStream Image CaptureThe definition of 'imageWidth' in that specification. Working Draft Initial definition. Browser Compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...The definition of 'imageWidth' in that specification. Working Draft Initial definition. Browser Compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...er Compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... Opera Android Full support 43Safari iOS ? ...
PhotoCapabilities.redEyeReduction - Web APIs
Status Comment MediaStream Image CaptureThe definition of 'redEyeReduction' in that specification. Working Draft Initial definition. Browser Compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...efinition of 'redEyeReduction' in that specification. Working Draft Initial definition. Browser Compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...mpatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... Opera Android Full support 43Safari iOS ? ...
PointerEvent.getCoalescedEvents() - Web APIs
tus Comment Pointer Events - Level 3The definition of 'getCoalescedEvents()' in that specification. Editor's Draft Initial definition. Browser Compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...on of 'getCoalescedEvents()' in that specification. Editor's Draft Initial definition. Browser Compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...ibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...To change preferences in Firefox, visit about:config.Opera Android Ful...
PushEvent.PushEvent() - Web APIs
ar dataInit = { data : 'Some sample text' } var myPushEvent = new PushEvent('push', dataInit); myPushEvent.data.text(); // should return 'Some sample text' Browser Compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...nt = new PushEvent('push', dataInit); myPushEvent.data.text(); // should return 'Some sample text' Browser Compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...ity The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. DesktopMobile
ChromeEdgeFirefoxInternet ExplorerOperaSafariAndroid webview
Chrome for AndroidFirefox for AndroidOpera for AndroidSafari on iOSSamsung InternetPushEvent() constructor Experimental
Chrome Full support 42Edge Full support 16Disabled Full support 16Disabled Disabled From version 16: this feature is behind the Enable service workers preference. Full support 17Firefox Full support ...
... 44Notes Notes Extended Support Releases (ESR) before Firefox 78 ESR do not support service workers and the Push API.IE No support NoOpera Full support 37Safari No support NoWebView Android No support No
Chrome Android Full support 42Firefox Android Full support 44 Full support 44 Full support 48Notes Notes Push enabled by default.Opera Android Full support 37Safari iOS ...
PushManager.hasPermission() - Web APIs
); Example // TBD Specification Specification Status Comment Push API Working Draft Defines the PushManager interface. Browser Compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... Status Comment Push API Working Draft Defines the PushManager interface. Browser Compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...ompatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. DesktopMobile
ChromeEdgeFirefoxInternet ExplorerOperaSafariAndroid webview
Chrome for AndroidFirefox for AndroidOpera for AndroidSafari on iOSSamsung InternethasPermission Experimental
Chrome Full support 42Edge Full support 16Disabled Full support 16Disabled Disabled From version 16: this feature is behind the Enable service workers preference. Full support 17Firefox Full support ...
... 44Notes Notes Extended Support Releases (ESR) before Firefox 78 ESR do not support service workers and the Push API.IE No support NoOpera Full support 29Safari No support NoWebView Android No support No
Chrome Android Full support 42Firefox Android Full support 48Notes Full support 48Notes Notes Push enabled by default.Opera Android Full support 29Safari iOS No support NoSamsung I...
PushManager.supportedContentEncodings - Web APIs
ation Status Comment Push APIThe definition of 'supportedContentEncodings' in that specification. Working Draft Initial definition. Browser Compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...f 'supportedContentEncodings' in that specification. Working Draft Initial definition. Browser Compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. DesktopMobile
ChromeEdgeFirefoxInternet ExplorerOperaSafariAndroid webview
Chrome for AndroidFirefox for AndroidOpera for AndroidSafari on iOSSamsung InternetsupportedContentEncodings Experimental
Chrome Full support 60Edge Full support 16Disabled Full support 16Disabled Disabled From version 16: this feature is behind the Enable service workers preference. Full support 17Firefox Full support ...
... 44Notes Notes Extended Support Releases (ESR) before Firefox 78 ESR do not support service workers and the Push API.IE No support NoOpera Full support 47Safari No support NoWebView Android No support No
Chrome Android Full support 60Firefox Android Full support 48Notes Full support 48Notes Notes Push enabled by default.Opera Android Full support 44Safari iOS No support NoSamsung I...
PushMessageData.arrayBuffer() - Web APIs
Specification Status Comment Push APIThe definition of 'arrayBuffer()' in that specification. Working Draft Initial definition. Browser Compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... definition of 'arrayBuffer()' in that specification. Working Draft Initial definition. Browser Compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...r Compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... 44Notes Notes Extended Support Releases (ESR) before Firefox 78 ESR do not support service workers and the Push API.IE No support NoOpera Full support 37Safari No support NoWebView Android No support No
Chrome Android Full support 50Firefox Android Full support 48Opera Android Full support 37Safari iOS No support NoSamsung Internet Android Full support 5.0Legend ...
PushMessageData.blob() - Web APIs
s Specification Status Comment Push APIThe definition of 'blob()' in that specification. Working Draft Initial definition. Browser Compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... APIThe definition of 'blob()' in that specification. Working Draft Initial definition. Browser Compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... Browser Compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... 44Notes Notes Extended Support Releases (ESR) before Firefox 78 ESR do not support service workers and the Push API.IE No support NoOpera Full support 37Safari No support NoWebView Android No support No
Chrome Android Full support 50Firefox Android Full support 48Opera Android Full support 37Safari iOS No support NoSamsung Internet Android Full support 5.0Legend ...
PushMessageData.json() - Web APIs
s Specification Status Comment Push APIThe definition of 'json()' in that specification. Working Draft Initial definition. Browser Compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... APIThe definition of 'json()' in that specification. Working Draft Initial definition. Browser Compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... Browser Compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... 44Notes Notes Extended Support Releases (ESR) before Firefox 78 ESR do not support service workers and the Push API.IE No support NoOpera Full support 37Safari No support NoWebView Android No support No
Chrome Android Full support 50Firefox Android Full support 48Opera Android Full support 37Safari iOS No support NoSamsung Internet Android Full support 5.0Legend ...
PushMessageData.text() - Web APIs
s Specification Status Comment Push APIThe definition of 'text()' in that specification. Working Draft Initial definition. Browser Compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... APIThe definition of 'text()' in that specification. Working Draft Initial definition. Browser Compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... Browser Compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... 44Notes Notes Extended Support Releases (ESR) before Firefox 78 ESR do not support service workers and the Push API.IE No support NoOpera Full support 37Safari No support NoWebView Android No support No
Chrome Android Full support 50Firefox Android Full support 48Opera Android Full support 37Safari iOS No support NoSamsung Internet Android Full support 5.0Legend ...
PushSubscription.expirationTime - Web APIs
Specification Status Comment Push APIThe definition of 'expirationTime' in that specification. Working Draft Initial definition. Browser Compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...definition of 'expirationTime' in that specification. Working Draft Initial definition. Browser Compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... Browser Compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... 60Edge Full support 16Firefox No support NoIE No support NoOpera Full support 47Safari No support NoWebView Android No support No
Chrome Android Full support 60Firefox Android No support NoOpera Android Full support 44Safari iOS No support NoSamsung Internet Android Full support 8.0Legend ...
PushSubscription.getKey() - Web APIs
API Working Draft This is the Push API spec, but note that getKey() is not currently specified in here. It is currently Firefox-only experimental. Browser Compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... that getKey() is not currently specified in here. It is currently Firefox-only experimental. Browser Compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...l. Browser Compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... 44Notes Notes Extended Support Releases (ESR) before Firefox 78 ESR do not support service workers and the Push API.IE No support NoOpera Full support 29Safari No support NoWebView Android No support No
Chrome Android Full support 42Firefox Android Full support 48Opera Android Full support 29Safari iOS No support NoSamsung Internet Android Full support 4.0Legend ...
PushSubscription.options - Web APIs
Specification Status Comment Push APIThe definition of 'options' in that specification. Working Draft Initial definition. Browser Compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...APIThe definition of 'options' in that specification. Working Draft Initial definition. Browser Compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...on. Browser Compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... 44Notes Notes Extended Support Releases (ESR) before Firefox 78 ESR do not support service workers and the Push API.IE No support NoOpera Full support 29Safari No support NoWebView Android No support No
Chrome Android Full support 42Firefox Android Full support 48Opera Android Full support 29Safari iOS No support NoSamsung Internet Android Full support 4.0Legend ...
PushSubscription.subscriptionId - Web APIs
= pushSubscription.subscriptionId; Specifications Specification Status Comment Push API Working Draft Initial definition Browser Compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... Specification Status Comment Push API Working Draft Initial definition Browser Compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... Browser Compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...2Edge Full support <=18Firefox No support NoIE No support NoOpera Full support 29Safari No support NoWebView Android No support No
Chrome Android Full support 42Firefox Android No support NoOpera Android Full support 29Safari iOS No support NoSamsung Internet Android Full support 4.0Legend ...
RTCRtpContributingSource.source - Web APIs
WebRTC 1.0: Real-time Communication Between BrowsersThe definition of 'source' in that specification. Candidate Recommendation Initial definition. Browser Compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...inition of 'source' in that specification. Candidate Recommendation Initial definition. Browser Compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...ion. Browser Compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...this feature is behind the media.peerconnection.rtpsourcesapi.enable preference (needs to be set to true). To change preferences in Firefox, visit about:config.IE No support NoOpera No support NoSafari ? WebView Android Full support 59
Chrome Android Full support 59Firefox Android Full support 59Disabled Full support 59Disabled Disabled From version 59: this feature is behind the media.peerconnection.rtpsourcesapi.enable preference (needs to be set to true). To change preferences in Firefox, visit abo...
RTCRtpReceiver.track - Web APIs
WebRTC 1.0: Real-time Communication Between BrowsersThe definition of 'track' in that specification. Candidate Recommendation Initial definition. Browser Compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...finition of 'track' in that specification. Candidate Recommendation Initial definition. Browser Compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...tion. Browser Compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... Full support 12Firefox Full support YesIE No support NoOpera Full support 46Safari Full support YesWebView Android Full support 59
Chrome Android Full support 59Firefox Android Full support YesOpera Android Full support 43Safari iOS Full support YesSamsung Internet Android Full support 7.0Legend ...
SVGAElement.target - Web APIs
n Status Comment Scalable Vector Graphics (SVG) 1.1 (Second Edition)The definition of 'target' in that specification. Recommendation Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...G) 1.1 (Second Edition)The definition of 'target' in that specification. Recommendation Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...n Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... Full support 12Firefox Full support YesIE Full support 9Opera Full support YesSafari Full support YesWebView Android Full support Yes
Chrome Android Full support YesFirefox Android Full support YesOpera Android Full support YesSafari iOS Full support YesSamsung Internet Android Full support YesLegend ...
SVGAnimatedAngle - Web APIs
from the one referenced by baseVal, even when the attribute is not animated. Methods The SVGAnimatedAngle interface do not provide any specific methods. Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...is not animated. Methods The SVGAnimatedAngle interface do not provide any specific methods. Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
.... Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... YesEdge Full support <=18Firefox Full support YesIE ? ...
SVGAnimatedBoolean - Web APIs
perty is not currently being animated, contains the same value as baseVal. Methods The SVGAnimatedBoolean interface do not provide any specific methods. Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...ue as baseVal. Methods The SVGAnimatedBoolean interface do not provide any specific methods. Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... YesEdge Full support <=18Firefox Full support YesIE ? ...
SVGAnimatedEnumeration - Web APIs
y is not currently being animated, contains the same value as baseVal. Methods The SVGAnimatedEnumeration interface do not provide any specific methods. Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...s baseVal. Methods The SVGAnimatedEnumeration interface do not provide any specific methods. Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...wser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... YesEdge Full support <=18Firefox Full support YesIE ? ...
SVGAnimatedInteger - Web APIs
rty is not currently being animated, contains the same value as baseVal. Methods The SVGAnimatedInteger interface do not provide any specific methods. Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... as baseVal. Methods The SVGAnimatedInteger interface do not provide any specific methods. Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...rowser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... YesEdge Full support <=18Firefox Full support YesIE ? ...
SVGAnimatedLength - Web APIs
erty is not currently being animated, contains the same value as baseVal. Methods The SVGAnimatedLength interface do not provide any specific methods. Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...e as baseVal. Methods The SVGAnimatedLength interface do not provide any specific methods. Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... YesEdge Full support <=18Firefox Full support YesIE ? ...
SVGAnimatedLengthList - Web APIs
the one referenced by baseVal, even when the attribute is not animated. Methods The SVGAnimatedLengthList interface do not provide any specific methods. Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...t animated. Methods The SVGAnimatedLengthList interface do not provide any specific methods. Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...owser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... YesEdge Full support <=18Firefox Full support YesIE ? ...
SVGAnimatedNumber - Web APIs
operty is not currently being animated, contains the same value as baseVal. Methods The SVGAnimatedNumber interface do not provide any specific methods. Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...lue as baseVal. Methods The SVGAnimatedNumber interface do not provide any specific methods. Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... YesEdge Full support <=18Firefox Full support YesIE ? ...
SVGAnimatedNumberList - Web APIs
from the one referenced by baseVal, even when the attribute is not animated. Methods The SVGAnimatedNumberList interface do not provide any specific methods. Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...is not animated. Methods The SVGAnimatedNumberList interface do not provide any specific methods. Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...owser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... YesEdge Full support <=18Firefox Full support YesIE ? ...
SVGAnimatedPathData - Web APIs
List will have two entries: a SVG_PATHSEG_MOVETO_ABS and a SVG_PATHSEG_ARC_ABS. Methods This interface does not provide any specific methods, but implements those of its parent, SVGPathElement. ...
...e does not provide any specific methods, but implements those of its parent, SVGPathElement. ...
... Edge ? Firefox ? IE ? Opera ? ...
... ? IE ? Opera ? Safari ? WebView Android ?
Chrome Android ? Firefox Android ? Opera Android ? Safari iOS ? Samsung Internet Android ...
SVGAnimatedPoints - Web APIs
roperty is not currently being animated, contains the same value as points. Methods The SVGAnimatedPoints interface do not provide any specific methods. Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...alue as points. Methods The SVGAnimatedPoints interface do not provide any specific methods. Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... Firefox Android ? Opera Android ? Safari iOS ? Samsung Internet Android ? ...
SVGAnimatedPreserveAspectRatio - Web APIs
one referenced by baseVal, even when the attribute is not animated. Methods The SVGAnimatedPreserveAspectRatio interface do not provide any specific methods. Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...imated. Methods The SVGAnimatedPreserveAspectRatio interface do not provide any specific methods. Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...patibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... YesEdge Full support <=18Firefox Full support YesIE ? ...
SVGAnimatedRect - Web APIs
from the one referenced by baseVal, even when the attribute is not animated. Methods The SVGAnimatedRect interface do not provide any specific methods. Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... is not animated. Methods The SVGAnimatedRect interface do not provide any specific methods. Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...s. Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... YesEdge Full support <=18Firefox Full support YesIE ? ...
SVGAnimatedString.animVal - Web APIs
Scalable Vector Graphics (SVG) 1.1 (Second Edition) Recommendation Scalable Vector Graphics (SVG) 2 Candidate Recommendation Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...Recommendation Scalable Vector Graphics (SVG) 2 Candidate Recommendation Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... Full support 12Firefox Full support YesIE No support NoOpera Full support YesSafari Full support YesWebView Android Full support Yes
Chrome Android No support NoFirefox Android Full support YesOpera Android Full support YesSafari iOS Full support YesSamsung Internet Android No support NoLegend ...
SVGAnimatedString.baseVal - Web APIs
Scalable Vector Graphics (SVG) 1.1 (Second Edition) Recommendation Scalable Vector Graphics (SVG) 2 Candidate Recommendation Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... Recommendation Scalable Vector Graphics (SVG) 2 Candidate Recommendation Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... Full support 12Firefox Full support YesIE No support NoOpera Full support YesSafari Full support YesWebView Android Full support Yes
Chrome Android No support NoFirefox Android Full support YesOpera Android Full support YesSafari iOS Full support YesSamsung Internet Android No support NoLegend ...
SVGAnimatedTransformList - Web APIs
one referenced by baseVal, even when the attribute is not animated. Methods The SVGAnimatedTransformList interface doesn't provide any specific methods. Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...imated. Methods The SVGAnimatedTransformList interface doesn't provide any specific methods. Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...er compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... YesEdge Full support <=18Firefox Full support 9IE ? ...
SVGDocument - Web APIs
itle</title>...</svg>) URL DOMString The complete URI of the document. Methods The SVGDocument interface does not provide any specific methods. ...
... Methods The SVGDocument interface does not provide any specific methods. ...
... Edge ? Firefox ? IE ? Opera ? ...
... ? IE ? Opera ? Safari ? WebView Android ?
Chrome Android ? Firefox Android ? Opera Android ? Safari iOS ? Samsung Internet Android ...
SVGFitToViewBox - Web APIs
viewBox SVGAnimatedRect Corresponds to attribute viewBox on the given element. Methods The SVGFitToViewBox interface does not provide any specific methods. ...
... Methods The SVGFitToViewBox interface does not provide any specific methods. ...
... Edge ? Firefox ? IE ? Opera ? ...
... ? IE ? Opera ? Safari ? WebView Android ?
Chrome Android ? Firefox Android ? Opera Android ? Safari iOS ? Samsung Internet Android ...
SVGImageElement.decoding - Web APIs
cification Status Comment HTML Living StandardThe definition of 'decoding' in that specification. Living Standard Initial definition. Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...dThe definition of 'decoding' in that specification. Living Standard Initial definition. Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...owser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... Opera Android ? Safari iOS ? ...
SVGLength - Web APIs
unitType would be changed to SVG_LENGTHTYPE_MM, valueInSpecifiedUnits would be changed to the numeric value 5 and valueAsString would be changed to "5mm". Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...fiedUnits would be changed to the numeric value 5 and valueAsString would be changed to "5mm". Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...". Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... YesEdge Full support <=18Firefox Full support YesIE ? ...
SVGLengthList - Web APIs
ception with code NO_MODIFICATION_ALLOWED_ERR is raised when the list corresponds to a read only attribute or when the object itself is read only. Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... the list corresponds to a read only attribute or when the object itself is read only. Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... YesEdge Full support <=18Firefox Full support YesIE ? ...
SVGMarkerElement - Web APIs
he value of attribute orient to 'auto'. Exceptions: a DOMException with code NO_MODIFICATION_ALLOWED_ERR is raised when the object itself is read only. ...
...aised when the object itself is read only. ...
... Edge ? Firefox ? IE ? Opera ? ...
... ? IE ? Opera ? Safari ? WebView Android ?
Chrome Android ? Firefox Android ? Opera Android ? Safari iOS ? Samsung Internet Android ...
SVGNumberList - Web APIs
eption with code NO_MODIFICATION_ALLOWED_ERR is raised when the list corresponds to a read only attribute or when the object itself is read only. Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...the list corresponds to a read only attribute or when the object itself is read only. Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... YesEdge Full support <=18Firefox Full support YesIE ? ...
SVGPathSeg - Web APIs
DOMString The type of the path segment as specified by the corresponding one character command name. Methods The SVGPathSeg interface does not provide any specific methods. ...
... Methods The SVGPathSeg interface does not provide any specific methods. ...
... Edge ? Firefox ? IE ? Opera ? ...
... ? IE ? Opera ? Safari ? WebView Android ?
Chrome Android ? Firefox Android ? Opera Android ? Safari iOS ? Samsung Internet Android ...
SVGPathSegList - Web APIs
ed item is the item itself and not a copy. Exceptions: a DOMException with code NO_MODIFICATION_ALLOWED_ERR is raised when the list cannot be modified. ...
...s raised when the list cannot be modified. ...
... Edge ? Firefox ? IE ? Opera ? ...
... ? IE ? Opera ? Safari ? WebView Android ?
Chrome Android ? Firefox Android ? Opera Android ? Safari iOS ? Samsung Internet Android ...
SVGPointList - Web APIs
Exceptions: a DOMException with code NO_MODIFICATION_ALLOWED_ERR is raised when the list corresponds to a read only attribute or when the object itself is read only. ...
...ttribute or when the object itself is read only. ...
... Edge ? Firefox ? IE ? Opera ? ...
... ? IE ? Opera ? Safari ? WebView Android ?
Chrome Android ? Firefox Android ? Opera Android ? Safari iOS ? Samsung Internet Android ...
SVGPreserveAspectRatio - Web APIs
sed on an attempt to change the value of an attribute on a read only object. Methods The SVGPreserveAspectRatio interface do not provide any specific methods. Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...ead only object. Methods The SVGPreserveAspectRatio interface do not provide any specific methods. Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...wser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... YesEdge Full support <=18Firefox Full support YesIE ? ...
SVGStylable - Web APIs
object of type CSSValue. The returned object is live; changes to the objects represent immediate changes to the objects to which the CSSValue is attached. Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...s to the objects represent immediate changes to the objects to which the CSSValue is attached. Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... Firefox Android ? Opera Android ? Safari iOS ? Samsung Internet Android ? ...
SVGTransform - Web APIs
Exception with code NO_MODIFICATION_ALLOWED_ERR is raised when attempting to modify a read only attribute or when the object itself is read only. Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...en attempting to modify a read only attribute or when the object itself is read only. Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... YesEdge Full support <=18Firefox Full support YesIE ? ...
SVGTransformable - Web APIs
tedTransformList Corresponds to attribute transform on the given element. Methods The SVGTransformable interface do not provide any specific methods. Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...e given element. Methods The SVGTransformable interface do not provide any specific methods. Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
.... Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... Firefox Android ? Opera Android ? Safari iOS ? Samsung Internet Android ? ...
ScreenOrientation.angle - Web APIs
pecification Status Comment Screen Orientation APIThe definition of 'angle' in that specification. Working Draft Initial definition. Browser Compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...n APIThe definition of 'angle' in that specification. Working Draft Initial definition. Browser Compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...tion. Browser Compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...dge Full support 79Firefox Full support 43IE No support NoOpera Full support 25Safari No support NoWebView Android Full support 38
Chrome Android Full support 38Firefox Android Full support 43Opera Android Full support 25Safari iOS No support NoSamsung Internet Android Full support 3.0Legend ...
ScreenOrientation.lock() - Web APIs
ecification Status Comment Screen Orientation APIThe definition of 'lock()' in that specification. Working Draft Initial definition. Browser Compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... APIThe definition of 'lock()' in that specification. Working Draft Initial definition. Browser Compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...ition. Browser Compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...dge Full support 79Firefox Full support 43IE No support NoOpera Full support 25Safari No support NoWebView Android Full support 38
Chrome Android Full support 38Firefox Android Full support 43Opera Android Full support 25Safari iOS No support NoSamsung Internet Android Full support 3.0Legend ...
ScreenOrientation.onchange - Web APIs
ification Status Comment Screen Orientation APIThe definition of 'onchange' in that specification. Working Draft Initial definition. Browser Compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...PIThe definition of 'onchange' in that specification. Working Draft Initial definition. Browser Compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...n. Browser Compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...dge Full support 79Firefox Full support 43IE No support NoOpera Full support 25Safari No support NoWebView Android Full support 38
Chrome Android Full support 38Firefox Android Full support 43Opera Android Full support 25Safari iOS No support NoSamsung Internet Android Full support 3.0Legend ...
ScreenOrientation.type - Web APIs
Specification Status Comment Screen Orientation APIThe definition of 'type' in that specification. Working Draft Initial definition. Browser Compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...on APIThe definition of 'type' in that specification. Working Draft Initial definition. Browser Compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...ition. Browser Compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...dge Full support 79Firefox Full support 43IE No support NoOpera Full support 25Safari No support NoWebView Android Full support 38
Chrome Android Full support 38Firefox Android Full support 43Opera Android Full support 25Safari iOS No support NoSamsung Internet Android Full support 3.0Legend ...
ScreenOrientation.unlock() - Web APIs
ification Status Comment Screen Orientation APIThe definition of 'unlock()' in that specification. Working Draft Initial definition. Browser Compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...PIThe definition of 'unlock()' in that specification. Working Draft Initial definition. Browser Compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...ion. Browser Compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...dge Full support 79Firefox Full support 43IE No support NoOpera Full support 25Safari No support NoWebView Android Full support 38
Chrome Android Full support 38Firefox Android Full support 43Opera Android Full support 25Safari iOS No support NoSamsung Internet Android Full support 3.0Legend ...
Selection.removeAllRanges() - Web APIs
pecification Status Comment Selection APIThe definition of 'Selection.removeAllRanges()' in that specification. Working Draft Current Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...definition of 'Selection.removeAllRanges()' in that specification. Working Draft Current Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...ompatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... Full support 12Firefox Full support YesIE Full support YesOpera Full support YesSafari Full support YesWebView Android Full support Yes
Chrome Android Full support YesFirefox Android Full support YesOpera Android Full support YesSafari iOS Full support YesSamsung Internet Android Full support YesLegend ...
Selection.removeRange() - Web APIs
Specification Status Comment Selection APIThe definition of 'Selection.removeRange()' in that specification. Working Draft Current Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...The definition of 'Selection.removeRange()' in that specification. Working Draft Current Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...er compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... 58Edge Full support 12Firefox Full support YesIE ? ...
Selection.toString() - Web APIs
Specification Status Comment Selection APIThe definition of 'Selection: toString()' in that specification. Working Draft Current Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...PIThe definition of 'Selection: toString()' in that specification. Working Draft Current Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...owser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... Full support 1Edge Full support <=18Firefox Full support YesIE ? Opera Full support YesSafari ? WebView Android Full support Yes
Chrome Android Full support YesFirefox Android Full support YesOpera Android Full support YesSafari iOS ? Samsung Internet Android Full support YesLegend Full sup...
ServiceWorkerRegistration.navigationPreload - Web APIs
fication Status Comment Service WorkersThe definition of 'navigationPreload' in that specification. Working Draft Initial definition. Browser Compatibility The compatibility table in this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...finition of 'navigationPreload' in that specification. Working Draft Initial definition. Browser Compatibility The compatibility table in this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...patibility The compatibility table in this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... 44Notes Notes Extended Support Releases (ESR) before Firefox 78 ESR do not support service workers and the Push API.IE No support NoOpera Full support 46Safari Full support 11.1WebView Android Full support 59
Chrome Android Full support 59Firefox Android Full support 44Opera Android Full support 43Safari iOS Full support 11.3Samsung Internet Android Full support 4.0Legend ...
SharedWorkerGlobalScope.applicationCache - Web APIs
ple If a shared worker has an AppCache associated with it, you can return a reference to the cache using self.applicationCache from inside the shared worker. Browser compatibility The compatibility table in this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...you can return a reference to the cache using self.applicationCache from inside the shared worker. Browser compatibility The compatibility table in this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
.... Browser compatibility The compatibility table in this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... Samsung Internet Android Full support YesLegend Full supp...
SharedWorkerGlobalScope.onconnect - Web APIs
ons Specification Status Comment HTML Living StandardThe definition of 'onconnect' in that specification. Living Standard Browser compatibility The compatibility table in this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...ML Living StandardThe definition of 'onconnect' in that specification. Living Standard Browser compatibility The compatibility table in this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... Browser compatibility The compatibility table in this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... Samsung Internet Android Full support 1.0Legend Full suppo...
Slottable: assignedSlot - Web APIs
Specification Status Comment DOMThe definition of 'assignedSlot' in that specification. Living Standard Initial definition. Browser Compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... definition of 'assignedSlot' in that specification. Living Standard Initial definition. Browser Compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...r Compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... dom.webcomponents.shadowdom.enabled preference (needs to be set to true). ...
StorageManager.persist() - Web APIs
Specification Status Comment StorageThe definition of 'persist' in that specification. Living Standard Initial definition. Browser Compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...geThe definition of 'persist' in that specification. Living Standard Initial definition. Browser Compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...ion. Browser Compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...5IE ? Opera Full support YesSafari ? ...
TaskAttributionTiming.containerId - Web APIs
pecification Status Comment Long Tasks API 1The definition of 'containerId' in that specification. Working Draft Initial definition. Browser Compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...he definition of 'containerId' in that specification. Working Draft Initial definition. Browser Compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...r Compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... Full support 58Edge Full support <=79Firefox No support NoIE ? Opera Full support YesSafari ? WebView Android Full support 58
Chrome Android Full support 58Firefox Android No support NoOpera Android Full support YesSafari iOS ? Samsung Internet Android Full support 7.0Legend Full support...
TaskAttributionTiming.containerType - Web APIs
cification Status Comment Long Tasks API 1The definition of 'containerType' in that specification. Working Draft Initial definition. Browser Compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... definition of 'containerType' in that specification. Working Draft Initial definition. Browser Compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...Compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... Full support 58Edge Full support <=79Firefox No support NoIE ? Opera Full support YesSafari ? WebView Android Full support 58
Chrome Android Full support 58Firefox Android No support NoOpera Android Full support YesSafari iOS ? Samsung Internet Android Full support 7.0Legend Full support...
HTMLSlotElement.assignedSlot - Web APIs
Specifications Specification Status Comment DOMThe definition of 'assignedSlot' in that specification. Living Standard Browser Compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...t DOMThe definition of 'assignedSlot' in that specification. Living Standard Browser Compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... Browser Compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... 53Edge Full support <=18Firefox Full support YesIE ? ...
UIEvent.initUIEvent() - Web APIs
ocument Object Model (DOM) Level 2 Events SpecificationThe definition of 'UIEvent.initUIEvent()' in that specification. Obsolete Initial definition. Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...efinition of 'UIEvent.initUIEvent()' in that specification. Obsolete Initial definition. Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...bility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... Full support YesEdge Full support 12Firefox Full support YesIE ? Opera Full support YesSafari ? WebView Android Full support Yes
Chrome Android Full support YesFirefox Android Full support YesOpera Android Full support YesSafari iOS ? Samsung Internet Android Full support YesLegend Full sup...
UIEvent.layerX - Web APIs
/> layerY:<input type="text" name="layerYCoords" size="7" /> </form> </div> </body> </html> Specifications This property is not part of any specification. Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
.../> </form> </div> </body> </html> Specifications This property is not part of any specification. Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... Full support 12Firefox Full support YesIE Full support 9Opera Full support YesSafari Full support YesWebView Android Full support Yes
Chrome Android Full support YesFirefox Android Full support YesOpera Android Full support YesSafari iOS Full support YesSamsung Internet Android Full support YesLegend ...
URLUtilsReadOnly.hash - Web APIs
Specification Status Comment URLThe definition of 'URLUtilsReadOnly.hash' in that specification. Living Standard Initial definition. Browser compatibility The compatibility table in this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...on of 'URLUtilsReadOnly.hash' in that specification. Living Standard Initial definition. Browser compatibility The compatibility table in this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... Browser compatibility The compatibility table in this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. DesktopMobile
ChromeEdgeFirefoxInternet ExplorerOperaSafariAndroid webview
Chrome for AndroidFirefox for AndroidOpera for AndroidSafari on iOSSamsung Internethash Experimental
Chrome No support NoEdge No support NoFirefox Full support 38 Full support 38 No support 3.5 -- 38Notes Notes Before Firefox 38, Firefox returned the hash percent encoded. This has been fixed to match...
...rt 3.5 -- 38Notes Notes Before Firefox 38, Firefox returned the hash percent encoded. This has been fixed to match the spec.IE No support NoOpera No support NoSafari No support NoWebView Android No support No
Chrome Android No support NoFirefox Android Full support 38 Full support 38 No support 4 -- 38Notes Notes Before Firefox 38, Firefox returned the hash percent encoded. This has been fixed to match the spec.Opera Android No suppor...
URLUtilsReadOnly.host - Web APIs
Specification Status Comment URLThe definition of 'URLUtilsReadOnly.host' in that specification. Living Standard Initial definition. Browser compatibility The compatibility table in this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...on of 'URLUtilsReadOnly.host' in that specification. Living Standard Initial definition. Browser compatibility The compatibility table in this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... Browser compatibility The compatibility table in this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... NoEdge No support NoFirefox Full support 3.5IE No support NoOpera No support NoSafari No support NoWebView Android No support No
Chrome Android No support NoFirefox Android Full support 4Opera Android No support NoSafari iOS No support NoSamsung Internet Android No support NoLegend ...
URLUtilsReadOnly.hostname - Web APIs
cification Status Comment URLThe definition of 'URLUtilsReadOnly.hostname' in that specification. Living Standard Initial definition. Browser compatibility The compatibility table in this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...f 'URLUtilsReadOnly.hostname' in that specification. Living Standard Initial definition. Browser compatibility The compatibility table in this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...owser compatibility The compatibility table in this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... NoEdge No support NoFirefox Full support 3.5IE No support NoOpera No support NoSafari No support NoWebView Android No support No
Chrome Android No support NoFirefox Android Full support 4Opera Android No support NoSafari iOS No support NoSamsung Internet Android No support NoLegend ...
URLUtilsReadOnly.href - Web APIs
Specification Status Comment URLThe definition of 'URLUtilsReadOnly.href' in that specification. Living Standard Initial definition. Browser compatibility The compatibility table in this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...on of 'URLUtilsReadOnly.href' in that specification. Living Standard Initial definition. Browser compatibility The compatibility table in this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... Browser compatibility The compatibility table in this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... NoEdge No support NoFirefox Full support 3.5IE No support NoOpera No support NoSafari No support NoWebView Android No support No
Chrome Android No support NoFirefox Android Full support 4Opera Android No support NoSafari iOS No support NoSamsung Internet Android No support NoLegend ...
URLUtilsReadOnly.origin - Web APIs
pecification Status Comment URLThe definition of 'URLUtilsReadOnly.origin' in that specification. Living Standard Initial definition. Browser compatibility The compatibility table in this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... of 'URLUtilsReadOnly.origin' in that specification. Living Standard Initial definition. Browser compatibility The compatibility table in this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...Browser compatibility The compatibility table in this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... NoEdge No support NoFirefox Full support 29IE No support NoOpera No support NoSafari No support NoWebView Android No support No
Chrome Android No support NoFirefox Android Full support 29Opera Android No support NoSafari iOS No support NoSamsung Internet Android No support NoLegend ...
URLUtilsReadOnly.pathname - Web APIs
cification Status Comment URLThe definition of 'URLUtilsReadOnly.pathname' in that specification. Living Standard Initial definition. Browser compatibility The compatibility table in this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...f 'URLUtilsReadOnly.pathname' in that specification. Living Standard Initial definition. Browser compatibility The compatibility table in this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...owser compatibility The compatibility table in this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... NoEdge No support NoFirefox Full support 3.5IE No support NoOpera No support NoSafari No support NoWebView Android No support No
Chrome Android No support NoFirefox Android Full support 4Opera Android No support NoSafari iOS No support NoSamsung Internet Android No support NoLegend ...
URLUtilsReadOnly.port - Web APIs
Specification Status Comment URLThe definition of 'URLUtilsReadOnly.port' in that specification. Living Standard Initial definition. Browser compatibility The compatibility table in this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...on of 'URLUtilsReadOnly.port' in that specification. Living Standard Initial definition. Browser compatibility The compatibility table in this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... Browser compatibility The compatibility table in this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... NoEdge No support NoFirefox Full support 3.5IE No support NoOpera No support NoSafari No support NoWebView Android No support No
Chrome Android No support NoFirefox Android Full support 4Opera Android No support NoSafari iOS No support NoSamsung Internet Android No support NoLegend ...
URLUtilsReadOnly.protocol - Web APIs
cification Status Comment URLThe definition of 'URLUtilsReadOnly.protocol' in that specification. Living Standard Initial definition. Browser compatibility The compatibility table in this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...f 'URLUtilsReadOnly.protocol' in that specification. Living Standard Initial definition. Browser compatibility The compatibility table in this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...owser compatibility The compatibility table in this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... NoEdge No support NoFirefox Full support 3.5IE No support NoOpera No support NoSafari No support NoWebView Android No support No
Chrome Android No support NoFirefox Android Full support 4Opera Android No support NoSafari iOS No support NoSamsung Internet Android No support NoLegend ...
URLUtilsReadOnly.search - Web APIs
pecification Status Comment URLThe definition of 'URLUtilsReadOnly.search' in that specification. Living Standard Initial definition. Browser compatibility The compatibility table in this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... of 'URLUtilsReadOnly.search' in that specification. Living Standard Initial definition. Browser compatibility The compatibility table in this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...Browser compatibility The compatibility table in this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... NoEdge No support NoFirefox Full support 3.5IE No support NoOpera No support NoSafari No support NoWebView Android No support No
Chrome Android No support NoFirefox Android Full support 4Opera Android No support NoSafari iOS No support NoSamsung Internet Android No support NoLegend ...
URLUtilsReadOnly.toString() - Web APIs
page https://developer.mozilla.org/URLUtilsReadOnly.href var result = window.self.toString(); // Returns:'https://developer.mozilla.org/URLUtilsReadOnly.href' Browser compatibility The compatibility table in this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...r result = window.self.toString(); // Returns:'https://developer.mozilla.org/URLUtilsReadOnly.href' Browser compatibility The compatibility table in this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...owser compatibility The compatibility table in this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... NoEdge No support NoFirefox Full support 3.5IE No support NoOpera No support NoSafari No support NoWebView Android No support No
Chrome Android No support NoFirefox Android Full support 4Opera Android No support NoSafari iOS No support NoSamsung Internet Android No support NoLegend ...
WebGL2RenderingContext.samplerParameter[if]() - Web APIs
rf) specifying a value for pname. Return value None. Examples var sampler = gl.createSampler(); gl.samplerParameteri(sampler, gl.TEXTURE_MAG_FILTER, gl.NEAREST); Specifications The compatibility table in this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...mples var sampler = gl.createSampler(); gl.samplerParameteri(sampler, gl.TEXTURE_MAG_FILTER, gl.NEAREST); Specifications The compatibility table in this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...REST); Specifications The compatibility table in this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...dge Full support 79Firefox Full support 51IE No support NoOpera Full support 43Safari No support NoWebView Android Full support 58
Chrome Android Full support 58Firefox Android Full support 51Opera Android Full support 43Safari iOS No support NoSamsung Internet Android Full support 7.0Legend ...
Using WebRTC data channels - Web APIs
ayer. This can complicate things, since you don't necessarily know what the size limits are for various user agents, and how they respond when a larger message is sent or received. Even when user agents share the same underlying library for handling Stream Control Transmission Protocol (SCTP) data, there can still be variations due to how the library is used. ...
...he library is used. For example, both Firefox and Google
Chrome use the usrsctp library to implement SCTP, but there are still situations in which data transfer on an RTCDataChannel can fail due to differences in how they call the library and react to errors it returns. When two users running Firefox are communicating on a data channel, the message size limit is much larger than when Firefox and
Chrome are communicating because Firefox implements a now deprecated technique for sending large messages in multiple SCTP messages, which
Chrome does not.
Chrome will instead see a series of messages that it believes are complete, and will deliver them to the receiving RTCDataChannel as multiple messages. Messages smaller than 16kiB can be sent without concern, as all major user agents handle them the...
... block all other data transfers on that data channel--including critical signaling messages. 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. This is implemented in Firefox 57, but is not yet implemented in
Chrome (see Chromium Bug 7774). With EOR support in place, RTCDataChannel payloads can be much larger (officially up to 256kiB, but Firefox's implementation caps them at a whopping 1GiB). Even at 256kiB, that's large enough to cause noticeable delays in handling urgent traffic. If you go even larger, the delays can become untenable unless you are certain of your operational conditions. In order to reso...
...draft form, but once implemented, it will make it possible to send messages with essentially no size limitations, since the SCTP layer will automatically interleave the underlying sub-messages to ensure that every channel's data has the opportunity to get through. Firefox support for ndata is in the process of being implemented; see bug 1381145 to track it becoming available for general use. The
Chrome team is tracking their implementation of ndata support in
Chrome Bug 5696. Much of the information in this section is based in part on the blog post Demystifyijng WebRTC's Data Channel Message Size Limitations, written by Lennart Grahl. He goes into a bit more detail there, but as browsers have been updated since then some of it may be out-of-date. In addition, as time goes by, it will become m...
window.cancelIdleCallback() - Web APIs
tions Specification Status Comment Cooperative Scheduling of Background Tasks Proposed Recommendation Initial definition. Browser compatibility The compatibility table in this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...Cooperative Scheduling of Background Tasks Proposed Recommendation Initial definition. Browser compatibility The compatibility table in this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...ibility The compatibility table in this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...ind the dom.requestIdleCallback.enabled preference (needs to be set to true). To change preferences in Firefox, visit about:config.IE No support NoOpera Full support YesSafari No support NoWebView Android Full support 47
Chrome Android Full support 47Firefox Android Full support 55 Full support 55 Full support 53Disabled Disabled From version 53: this feature is behind the dom.requestIdleCallback.enabled preference (needs to be set to true). T...
Window.customElements - Web APIs
Status Comment HTML Living StandardThe definition of 'window.customElements' in that specification. Living Standard Initial definition. Browser compatibility The compatibility table in this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...n of 'window.customElements' in that specification. Living Standard Initial definition. Browser compatibility The compatibility table in this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... Browser compatibility The compatibility table in this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...webcomponents.customelements.enabled preference (needs to be set to true). ...
Window.devicePixelRatio - Web APIs
CSS Object Model (CSSOM) View ModuleThe definition of 'Window.devicePixelRatio' in that specification. Working Draft Initial definition Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...ion of 'Window.devicePixelRatio' in that specification. Working Draft Initial definition Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... Full support 12Firefox Full support 18IE Full support 11Opera Full support 11.1Safari Full support 3WebView Android Full support 1
Chrome Android Full support 18Firefox Android Full support 18Opera Android Full support 11.1Safari iOS Full support 1Samsung Internet Android Full support 1.0Legend ...
Window.event - Web APIs
Specification Status Comment DOMThe definition of 'Window.event' in that specification. Living Standard Initial definition. Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... definition of 'Window.event' in that specification. Living Standard Initial definition. Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...ition. Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...is behind the dom.window.event.enabled preference (needs to be set to true). ...
Window.minimize() - Web APIs
The Window.minimize() method sets the window to a minimized state. A way to undo this method programatically is by calling window.moveTo(). Browser Compatibility The compatibility table in this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...ndow to a minimized state. A way to undo this method programatically is by calling window.moveTo(). Browser Compatibility The compatibility table in this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...owser Compatibility The compatibility table in this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... Safari iOS ? ...
Window.releaseEvents() - Web APIs
: window.releaseEvents(Event.KEYPRESS | Event.KEYDOWN | Event.KEYUP). See also window.captureEvents ( ). Specification This is not part of any specification. Browser Compatibility The compatibility table in this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...t.KEYUP). See also window.captureEvents ( ). Specification This is not part of any specification. Browser Compatibility The compatibility table in this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...lity The compatibility table in this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... YesEdge Full support 12Firefox Full support YesIE ? ...
window.requestIdleCallback() - Web APIs
cations Specification Status Comment Cooperative Scheduling of Background Tasks Proposed Recommendation Initial definition. Browser compatibility The compatibility table in this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... Cooperative Scheduling of Background Tasks Proposed Recommendation Initial definition. Browser compatibility The compatibility table in this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...tibility The compatibility table in this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. DesktopMobile
ChromeEdgeFirefoxInternet ExplorerOperaSafariAndroid webview
Chrome for AndroidFirefox for AndroidOpera for AndroidSafari on iOSSamsung InternetrequestIdleCallback Experimental
Chrome Full support 47Edge Full support 79Firefox Full support 55Notes Full support 55Notes Notes Enabled by default. No support 53 -- 55Notes Notes Implemented but disabled by default.IE ...
... 55Notes Notes Enabled by default. No support 53 -- 55Notes Notes Implemented but disabled by default.IE No support NoOpera Full support 34Safari No support NoWebView Android Full support 47
Chrome Android Full support 47Firefox Android Full support 55Notes Full support 55Notes Notes Enabled by default. No support 53 -- 55Notes Notes Implemented but disabled by default.Opera Android Full support ...
Window.restore() - Web APIs
This method is currently not working, but you can use: window.moveTo(window.screenX, window.screenY); Browser Compatibility The compatibility table in this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...is method is currently not working, but you can use: window.moveTo(window.screenX, window.screenY); Browser Compatibility The compatibility table in this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
....screenY); Browser Compatibility The compatibility table in this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... Safari iOS ? ...
Window.routeEvent() - Web APIs
indow method routeEvent(), which is obsolete and no longer available, used to be called to forward an event to the next object that has asked to capture events. Browser Compatibility The compatibility table in this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...vailable, used to be called to forward an event to the next object that has asked to capture events. Browser Compatibility The compatibility table in this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...ibility The compatibility table in this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... Safari iOS ? ...
Window.stop() - Web APIs
'Window.stop()' in that specification. Living Standard HTML5The definition of 'Window.stop' in that specification. Recommendation Browser Compatibility The compatibility table in this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... HTML5The definition of 'Window.stop' in that specification. Recommendation Browser Compatibility The compatibility table in this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...on Browser Compatibility The compatibility table in this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... Full support 14Firefox Full support YesIE No support NoOpera Full support YesSafari Full support YesWebView Android Full support Yes
Chrome Android Full support YesFirefox Android Full support YesOpera Android Full support YesSafari iOS Full support YesSamsung Internet Android Full support YesLegend ...
WorkerNavigator.permissions - Web APIs
questNotificationPermission() } }); Specification Specification Status Comment Permissions Working Draft Initial definition. Browser Support The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... Specification Status Comment Permissions Working Draft Initial definition. Browser Support The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...Browser Support The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... 43Edge Full support <=79Firefox No support NoIE ? ...
WritableStreamDefaultWriter.ready - Web APIs
ns Specification Status Comment StreamsThe definition of 'ready' in that specification. Living Standard Initial definition. Browser Compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...eamsThe definition of 'ready' in that specification. Living Standard Initial definition. Browser Compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... Browser Compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... 59Edge Full support 16Firefox No support NoIE No support NoOpera Full support 46Safari ? WebView Android Full support 59
Chrome Android Full support 59Firefox Android No support NoOpera Android Full support 43Safari iOS ? Samsung Internet Android Full support 7.0Legend Full support ...
::slotted() - CSS: Cascading Style Sheets
n Status Comment CSS Scoping Module Level 1The definition of '::slotted' in that specification. Working Draft Initial definition. Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... 1The definition of '::slotted' in that specification. Working Draft Initial definition. Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...n. Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...he dom.webcomponents.shadowdom.enabled preference (needs to be set to true). ...
:checked - CSS: Cascading Style Sheets
Selectors Level 3The definition of ':checked' in that specification. Recommendation Defines the pseudo-class, but not the associated semantic Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...specification. Recommendation Defines the pseudo-class, but not the associated semantic Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...ic Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... 9Notes Full support 9Notes Notes On macOS, styling <option&rt; elements has no effect.Safari Full support 3.1Notes Full support 3.1Notes Notes Styling <option&rt; elements has no effect.WebView Android Full support 2
Chrome Android Full support 18Firefox Android Full support 4Notes Full support 4Notes Notes From Firefox 56, <option&rt; elements cannot be styled.Opera Android Full support 10.1Safari iOS Full support ...
:defined - CSS: Cascading Style Sheets
Specification Status Comment HTML Living StandardThe definition of ':defined' in that specification. Living Standard Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...TML Living StandardThe definition of ':defined' in that specification. Living Standard Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...e Full support 79Firefox Full support 63IE No support NoOpera Full support 41Safari Full support 10WebView Android Full support 54
Chrome Android Full support 54Firefox Android Full support 63Opera Android Full support 41Safari iOS Full support 10Samsung Internet Android Full support 6.0Legend ...
:has() - CSS: Cascading Style Sheets
Specification Status Comment Selectors Level 4The definition of ':has()' in that specification. Working Draft Initial definition Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...evel 4The definition of ':has()' in that specification. Working Draft Initial definition Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...ition Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... No support NoNotes No support NoNotes Notes See bug 418039IE No support NoOpera No support NoSafari No support NoWebView Android No support No
Chrome Android No support NoFirefox Android No support NoNotes No support NoNotes Notes See bug 418039Opera Android No support NoSafari iOS No support NoSamsung Internet Android ...
:host() - CSS: Cascading Style Sheets
host in this instance) in the document that have the footer class set on them -- we've used it to give instances of the element inside the <footer> a special color. Specifications Specification Status Comment CSS Scoping Module Level 1The definition of ':host()' in that specification. Working Draft Initial definition. ...
... class set on them -- we've used it to give instances of the element inside the <footer> a special color. Specifications Specification Status Comment CSS Scoping Module Level 1The definition of ':host()' in that specification. Working Draft Initial definition. ...
... special color. Specifications Specification Status Comment CSS Scoping Module Level 1The definition of ':host()' in that specification. Working Draft Initial definition. ...
... NoOpera Full support 41Safari Full support 10Notes Full support 10Notes Notes Certain CSS selectors do not work (:host > .local-child) and styling slotted content (::slotted) is buggy.WebView Android Full support 54
Chrome Android Full support 54Firefox Android Full support 63 Full support 63 No support 61 -- 63Disabled Disabled From version 61 until version 63 (exclusive): this feature is behind the dom.webcomponents.shadowdom.enabled preference (needs to ...
:host-context() - CSS: Cascading Style Sheets
tatus Comment CSS Scoping Module Level 1The definition of ':host-context()' in that specification. Working Draft Initial definition. Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...definition of ':host-context()' in that specification. Working Draft Initial definition. Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...support NoNotes No support NoNotes Notes See bug 1082060.IE No support NoOpera Full support 41Safari No support NoWebView Android Full support 54
Chrome Android Full support 54Firefox Android No support NoNotes No support NoNotes Notes See bug 1082060.Opera Android Full support 41Safari iOS No support NoSamsung Internet Andr...
:host - CSS: Cascading Style Sheets
tion Status Comment CSS Scoping Module Level 1The definition of ':host' in that specification. Working Draft Initial definition. Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...vel 1The definition of ':host' in that specification. Working Draft Initial definition. Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...tion. Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...he dom.webcomponents.shadowdom.enabled preference (needs to be set to true). ...
:link - CSS: Cascading Style Sheets
striction to only apply it for <a> element. CSS Level 1The definition of ':link' in that specification. Recommendation Initial definition. Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...el 1The definition of ':link' in that specification. Recommendation Initial definition. Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...tion. Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... Full support 12Firefox Full support 1IE Full support 3Opera Full support 3.5Safari Full support 1WebView Android Full support 1.5
Chrome Android Full support 18Firefox Android Full support 4Opera Android Full support 14Safari iOS Full support 3.2Samsung Internet Android Full support 1.0Legend ...
:read-only - CSS: Cascading Style Sheets
Selectors Level 4The definition of ':read-only' in that specification. Working Draft Defines the pseudo-class, but not the associated semantics. Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...specification. Working Draft Defines the pseudo-class, but not the associated semantics. Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
.... Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... 78 Full support 1.5Prefixed Prefixed Implemented with the vendor prefix: -moz-IE No support NoOpera Full support 9Safari Full support 4WebView Android Full support <=37
Chrome Android Full support 18Firefox Android Full support 4Prefixed Full support 4Prefixed Prefixed Implemented with the vendor prefix: -moz-Opera Android Full support 10.1Safari iOS Full support ...
:read-write - CSS: Cascading Style Sheets
Selectors Level 4The definition of ':read-write' in that specification. Working Draft Defines the pseudo-class, but not the associated semantics. Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...specification. Working Draft Defines the pseudo-class, but not the associated semantics. Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... 78 Full support 1.5Prefixed Prefixed Implemented with the vendor prefix: -moz-IE No support NoOpera Full support 9Safari Full support 4WebView Android Full support <=37
Chrome Android Full support 18Firefox Android Full support 4Prefixed Full support 4Prefixed Prefixed Implemented with the vendor prefix: -moz-Opera Android Full support 10.1Safari iOS Full support ...
@charset - CSS: Cascading Style Sheets
tion Status Comment CSS Level 2 (Revision 1)The definition of '@charset' in that specification. Recommendation Initial definition Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... 1)The definition of '@charset' in that specification. Recommendation Initial definition Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...ion Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... 5.5Notes Notes From Internet Explorer 5.5 to IE 7 (inclusive), Internet Explorer supported an invalid syntax where the character encoding is not between single or double quotes.Opera Full support 9Safari Full support 4WebView Android Full support 2
Chrome Android Full support 18Firefox Android Full support 4Opera Android Full support 10.1Safari iOS Full support 4Samsung Internet Android Full support 1.0Legend ...
animation-delay - CSS: Cascading Style Sheets
ication Status Comment CSS AnimationsThe definition of 'animation-delay' in that specification. Working Draft Initial definition. Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...definition of 'animation-delay' in that specification. Working Draft Initial definition. Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... 9 Full support 4Prefixed Prefixed Implemented with the vendor prefix: -webkit-WebView Android Full support 43 Full support 43 Full support <=37Prefixed Prefixed Implemented with the vendor prefix: -webkit-
Chrome Android Full support 43 Full support 43 Full support 18Prefixed Prefixed Implemented with the vendor prefix: -webkit-Firefox Android Full support 16 Full support 16 ...
border-bottom-width - CSS: Cascading Style Sheets
tion No significant change. CSS Level 1The definition of 'border-bottom-width' in that specification. Recommendation Initial definition. Browser compatibility The compatibility table in this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...ition of 'border-bottom-width' in that specification. Recommendation Initial definition. Browser compatibility The compatibility table in this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...Browser compatibility The compatibility table in this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... Full support 12Firefox Full support 1IE Full support 4Opera Full support 3.5Safari Full support 1WebView Android Full support 2.3
Chrome Android Full support 18Firefox Android Full support 4Opera Android Full support 10.1Safari iOS Full support 1Samsung Internet Android Full support 1.0Legend ...
border-left-style - CSS: Cascading Style Sheets
significant change. CSS Level 2 (Revision 1)The definition of 'border-left-style' in that specification. Recommendation Initial definition. Browser compatibility The compatibility table in this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...inition of 'border-left-style' in that specification. Recommendation Initial definition. Browser compatibility The compatibility table in this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... Browser compatibility The compatibility table in this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...nded corners (with border-radius) were always rendered as if border-bottom-style was solid. This has been fixed in Firefox 50.IE Full support 5.5Opera Full support 9.2Safari Full support 1WebView Android Full support 2.3
Chrome Android Full support 18Firefox Android Full support 14Notes Full support 14Notes Notes Prior to Firefox 50, border styles of rounded corners (with border-radius) were always rendered as if border-bottom-style was solid. This has been fixed in Firefox 50.Opera And...
border-left - CSS: Cascading Style Sheets
commendation No significant changes. CSS Level 1The definition of 'border-left' in that specification. Recommendation Initial definition Browser compatibility The compatibility table in this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...The definition of 'border-left' in that specification. Recommendation Initial definition Browser compatibility The compatibility table in this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... Browser compatibility The compatibility table in this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...ge Full support 12Firefox Full support 1IE Full support 4Opera Full support 3.5Safari Full support 1WebView Android Full support 1
Chrome Android Full support 18Firefox Android Full support 4Opera Android Full support 14Safari iOS Full support 1Samsung Internet Android Full support 1.0Legend ...
border-right-style - CSS: Cascading Style Sheets
ignificant change. CSS Level 2 (Revision 1)The definition of 'border-right-style' in that specification. Recommendation Initial definition. Browser compatibility The compatibility table in this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...nition of 'border-right-style' in that specification. Recommendation Initial definition. Browser compatibility The compatibility table in this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... Browser compatibility The compatibility table in this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...ded corners (with border-radius) were always rendered as if border-bottom-style was solid. This has been fixed in Firefox 50.IE Full support 5.5Opera Full support 9.2Safari Full support 1WebView Android Full support <=37
Chrome Android Full support 18Firefox Android Full support 14Notes Full support 14Notes Notes Prior to Firefox 50, border styles of rounded corners (with border-radius) were always rendered as if border-bottom-style was solid. This has been fixed in Firefox 50.Opera And...
border-right - CSS: Cascading Style Sheets
ommendation No significant changes. CSS Level 1The definition of 'border-right' in that specification. Recommendation Initial definition Browser compatibility The compatibility table in this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...he definition of 'border-right' in that specification. Recommendation Initial definition Browser compatibility The compatibility table in this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... Browser compatibility The compatibility table in this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... Full support 12Firefox Full support 1IE Full support 5.5Opera Full support 9.2Safari Full support 1WebView Android Full support <=37
Chrome Android Full support 18Firefox Android Full support 14Opera Android Full support 14Safari iOS Full support 1Samsung Internet Android Full support 1.0Legend ...
border-top - CSS: Cascading Style Sheets
ecommendation No significant changes. CSS Level 1The definition of 'border-top' in that specification. Recommendation Initial definition Browser compatibility The compatibility table in this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...1The definition of 'border-top' in that specification. Recommendation Initial definition Browser compatibility The compatibility table in this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...n Browser compatibility The compatibility table in this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...ge Full support 12Firefox Full support 1IE Full support 4Opera Full support 3.5Safari Full support 1WebView Android Full support 1
Chrome Android Full support 18Firefox Android Full support 4Opera Android Full support 14Safari iOS Full support 1Samsung Internet Android Full support 1.0Legend ...
border - CSS: Cascading Style Sheets
Also accepts transparent as a valid color. CSS Level 1The definition of 'border' in that specification. Recommendation Initial definition. Browser compatibility The compatibility table in this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...el 1The definition of 'border' in that specification. Recommendation Initial definition. Browser compatibility The compatibility table in this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...tion. Browser compatibility The compatibility table in this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... Full support 12Firefox Full support 1IE Full support 4Opera Full support 3.5Safari Full support 1WebView Android Full support <=37
Chrome Android Full support 18Firefox Android Full support 4Opera Android Full support 14Safari iOS Full support 1Samsung Internet Android Full support 1.0Legend ...
box-align - CSS: Cascading Style Sheets
horizontally.</p> <p>I will be on the bottom of div.example, centered horizontally.</p> </div> </body> </html> Specifications Not part of any standard. Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...mple, centered horizontally.</p> </div> </body> </html> Specifications Not part of any standard. Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...tibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... 3Prefixed Prefixed Implemented with the vendor prefix: -webkit- No support 1.1 -- 3Prefixed Prefixed Implemented with the vendor prefix: -khtml-WebView Android Full support <=37Prefixed Full support <=37Prefixed Prefixed Implemented with the vendor prefix: -webkit-
Chrome Android Full support 18Prefixed Full support 18Prefixed Prefixed Implemented with the vendor prefix: -webkit-Firefox Android Full support 4Prefixed Full support 4Prefixed Prefixed Implemented with the vendor prefix: -...
box-direction - CSS: Cascading Style Sheets
Mozilla */ -webkit-box-direction: reverse; /* WebKit */ box-direction: reverse; /* As specified */ } Specifications Not part of any standard. Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... box-direction: reverse; /* As specified */ } Specifications Not part of any standard. Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...lity The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... 3Prefixed Prefixed Implemented with the vendor prefix: -webkit- No support 1.1 -- 3Prefixed Prefixed Implemented with the vendor prefix: -khtml-WebView Android Full support <=37Prefixed Full support <=37Prefixed Prefixed Implemented with the vendor prefix: -webkit-
Chrome Android Full support 18Prefixed Full support 18Prefixed Prefixed Implemented with the vendor prefix: -webkit-Firefox Android Full support 4Prefixed Full support 4Prefixed Prefixed Implemented with the vendor prefix: -...
column-count - CSS: Cascading Style Sheets
tus Comment CSS Multi-column Layout ModuleThe definition of 'column-count' in that specification. Working Draft Initial definition. Browser compatibility The compatibility table in this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...e definition of 'column-count' in that specification. Working Draft Initial definition. Browser compatibility The compatibility table in this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... Browser compatibility The compatibility table in this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... 9 Full support 3Prefixed Prefixed Implemented with the vendor prefix: -webkit-WebView Android Full support 50 Full support 50 Full support <=37Prefixed Prefixed Implemented with the vendor prefix: -webkit-
Chrome Android Full support 50 Full support 50 Full support 18Prefixed Prefixed Implemented with the vendor prefix: -webkit-Firefox Android Full support 52 Full support 52 ...
direction - CSS: Cascading Style Sheets
ommendation No change. CSS Level 2 (Revision 1)The definition of 'direction' in that specification. Recommendation Initial definition. Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...he definition of 'direction' in that specification. Recommendation Initial definition. Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... Full support 12Firefox Full support 1IE Full support 5.5Opera Full support 9.2Safari Full support 1WebView Android Full support 1
Chrome Android Full support 18Firefox Android Full support 4Opera Android Full support 10.1Safari iOS Full support 1Samsung Internet Android Full support 1.0Legend ...
element() - CSS: Cascading Style Sheets
s Module Level 4The definition of 'Using Elements as Images: the element() notation' in that specification. Working Draft Deferred from CSS3 Images. Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... the element() notation' in that specification. Working Draft Deferred from CSS3 Images. Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...wser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...- 29Prefixed Notes Prefixed Implemented with the vendor prefix: -moz-Notes -moz-element() is limited to background-image and background.IE No support NoOpera No support NoSafari No support NoWebView Android No support No
Chrome Android No support NoFirefox Android Full support 60Prefixed Full support 60Prefixed Prefixed Implemented with the vendor prefix: -moz- No support 29 -- 60Prefixed Notes Prefixed Implemented with the vendor prefix: -moz-Notes -moz-elemen...
empty-cells - CSS: Cascading Style Sheets
Status Comment CSS Level 2 (Revision 1)The definition of 'empty-cells' in that specification. Recommendation Initial definition. Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...he definition of 'empty-cells' in that specification. Recommendation Initial definition. Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...ge Full support 12Firefox Full support 1IE Full support 8Opera Full support 4Safari Full support 1.2WebView Android Full support 1
Chrome Android Full support 18Firefox Android Full support 4Opera Android Full support 10.1Safari iOS Full support 3.1Samsung Internet Android Full support 1.0Legend ...
font-variant-caps - CSS: Cascading Style Sheets
mment CSS Fonts Module Level 3The definition of 'font-variant-caps' in that specification. Candidate Recommendation Initial definition Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... 'font-variant-caps' in that specification. Candidate Recommendation Initial definition Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...ind the layout.css.font-features.enabled preference (needs to be set to true). ...
font-variant-position - CSS: Cascading Style Sheets
t CSS Fonts Module Level 3The definition of 'font-variant-position' in that specification. Candidate Recommendation Initial definition. Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...nt-variant-position' in that specification. Candidate Recommendation Initial definition. Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...owser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... behind the layout.css.font-features.enabled preference (needs to be set to true). ...
image-set() - CSS: Cascading Style Sheets
cation Status Comment CSS Images Module Level 4The definition of 'The image-set() notation' in that specification. Working Draft Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...evel 4The definition of 'The image-set() notation' in that specification. Working Draft Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...artial support 6Prefixed Notes Prefixed Implemented with the vendor prefix: -webkit-Notes Support for url images only and x is the only supported resolution unit. ...
initial - CSS: Cascading Style Sheets
vel 3. CSS Cascading and Inheritance Level 3The definition of 'initial' in that specification. Candidate Recommendation Initial definition. Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...inition of 'initial' in that specification. Candidate Recommendation Initial definition. Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...ion. Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... 19 No support 1 -- 24Prefixed Prefixed Implemented with the vendor prefix: -moz-IE No support NoOpera Full support 15Safari Full support 1.2WebView Android Full support 1
Chrome Android Full support 18Firefox Android Full support 19 Full support 19 No support 4 -- 24Prefixed Prefixed Implemented with the vendor prefix: -moz-Opera Android Full support 14Safari iOS ...
<integer> - CSS: Cascading Style Sheets
Recommendation Explicit definition. CSS Level 1The definition of '<integer>' in that specification. Recommendation Implicit definition. Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...he definition of '<integer>' in that specification. Recommendation Implicit definition. Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
.... Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... Full support 12Firefox Full support 1IE Full support 3Opera Full support 3.5Safari Full support 1WebView Android Full support <=37
Chrome Android Full support 18Firefox Android Full support 4Opera Android Full support 10.1Safari iOS Full support 1Samsung Internet Android Full support 1.0Legend ...
orphans - CSS: Cascading Style Sheets
pages, regions, or columns. CSS Level 2 (Revision 1)The definition of 'orphans' in that specification. Recommendation Initial definition. Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...1)The definition of 'orphans' in that specification. Recommendation Initial definition. Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...on. Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... Full support 12Firefox No support NoIE Full support 8Opera Full support 9.2Safari Full support 1.3WebView Android Full support <=37
Chrome Android Full support 25Firefox Android No support NoOpera Android Full support 14Safari iOS Full support 1Samsung Internet Android Full support 1.5Legend ...
outline-offset - CSS: Cascading Style Sheets
ment CSS Basic User Interface Module Level 3The definition of 'outline-offset' in that specification. Recommendation Initial definition Browser compatibility The compatibility table in this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... definition of 'outline-offset' in that specification. Recommendation Initial definition Browser compatibility The compatibility table in this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... Browser compatibility The compatibility table in this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... Full support 15Firefox Full support 1.5IE No support NoOpera Full support 9.5Safari Full support 1.2WebView Android Full support 37
Chrome Android Full support 18Firefox Android Full support 4Opera Android Full support 14Safari iOS Full support 1Samsung Internet Android Full support 1.0Legend ...
page-break-after - CSS: Cascading Style Sheets
and table row groups. CSS Level 2 (Revision 1)The definition of 'page-break-after' in that specification. Recommendation Initial definition Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...efinition of 'page-break-after' in that specification. Recommendation Initial definition Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...1Notes Full support 1Notes Notes The values avoid, left, and right are unsupported.IE Full support 4Opera Full support 7Safari Full support 1.2WebView Android Full support 37
Chrome Android Full support 18Firefox Android Full support 4Notes Full support 4Notes Notes The values avoid, left, and right are unsupported.Opera Android Full support 14Safari iOS Full support ...
page-break-before - CSS: Cascading Style Sheets
nd table row groups. CSS Level 2 (Revision 1)The definition of 'page-break-before' in that specification. Recommendation Initial definition Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...finition of 'page-break-before' in that specification. Recommendation Initial definition Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...1Notes Full support 1Notes Notes The values avoid, left, and right are unsupported.IE Full support 4Opera Full support 7Safari Full support 1.2WebView Android Full support 37
Chrome Android Full support 18Firefox Android Full support 4Notes Full support 4Notes Notes The values avoid, left, and right are unsupported.Opera Android Full support 14Safari iOS Full support ...
paint() - CSS: Cascading Style Sheets
Status Comment CSS Painting API Level 1The definition of 'Paint Notation' in that specification. Working Draft Initial definition. Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... definition of 'Paint Notation' in that specification. Working Draft Initial definition. Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...ion. Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...5Edge Full support 79Firefox No support NoIE No support NoOpera Full support 52Safari No support NoWebView Android Full support 65
Chrome Android Full support 65Firefox Android No support NoOpera Android Full support 47Safari iOS No support NoSamsung Internet Android Full support 9.2Legend ...
right - CSS: Cascading Style Sheets
ehavior for sticky positioning. CSS Level 2 (Revision 1)The definition of 'right' in that specification. Recommendation Initial definition. Browser compatibility The compatibility table in this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...on 1)The definition of 'right' in that specification. Recommendation Initial definition. Browser compatibility The compatibility table in this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...ition. Browser compatibility The compatibility table in this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...ge Full support 12Firefox Full support 1IE Full support 5.5Opera Full support 5Safari Full support 1WebView Android Full support 1
Chrome Android Full support 18Firefox Android Full support 4Opera Android Full support 14Safari iOS Full support 1Samsung Internet Android Full support 1.0Legend ...
Cross-browser audio basics - Developer guides
ng The seeking event is fired when media is being sought. seeked seeked occurs when the seeking attribute changes to false. Note: you can read more on Buffering, Seeking and Time Ranges elsewhere. Browser support The following tables list basic audio support across desktop and mobile browsers, and what audio codecs are supported. ...
...Time Ranges elsewhere. Browser support The following tables list basic audio support across desktop and mobile browsers, and what audio codecs are supported. ...
... ? ? ? Opera Mobile ? ? ? ? Internet Explorer Mobile ? ? ? ? ...
... ...
<button>: The Button element - HTML: Hypertext Markup Language
anding WCAG 2.0 Clicking and focus Whether clicking on a <button> causes it to (by default) become focused varies by browser and OS. The results for <input> of type="button" and type="submit" are the same. ...
... Clicking and focus Whether clicking on a <button> causes it to (by default) become focused varies by browser and OS. The results for <input> of type="button" and type="submit" are the same. ...
...s Whether clicking on a <button> causes it to (by default) become focused varies by browser and OS. The results for <input> of type="button" and type="submit" are the same. ...
... Living Standard HTML5The definition of '<button>' in that specification. Recommendation HTML 4.01 SpecificationThe definition of '<button>' in that specification. ...
<content>: The Shadow DOM Content Placeholder element (obsolete) - HTML: Hypertext Markup Language
y> </html> If you display this in a web browser it should look like the following. Specifications This element is no longer defined by any specifications. Browser compatibility The compatibility table in this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...look like the following. Specifications This element is no longer defined by any specifications. Browser compatibility The compatibility table in this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...patibility The compatibility table in this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. DesktopMobile
ChromeEdgeFirefoxInternet ExplorerOperaSafariAndroid webview
Chrome for AndroidFirefox for AndroidOpera for AndroidSafari on iOSSamsung Internetcontent DeprecatedNon-standard
Chrome Full support 35Edge Full support 79Firefox No support 33 -- 59Disabled No support 33 -- 59Disabled Disabled From version 33 until version 59 (exclusive): this feature is behind the dom.webcomponents.enabled preference (needs to be set to true). To change p...
... is behind the dom.webcomponents.enabled preference (needs to be set to true). To change preferences in Firefox, visit about:config.IE No support NoOpera Full support 26Safari No support NoWebView Android Full support 37
Chrome Android Full support 37Firefox Android No support 33 -- 59Disabled No support 33 -- 59Disabled Disabled From version 33 until version 59 (exclusive): this feature is behind the dom.webcomponents.enabled preference (needs to be set to true). To change preferences in Firefox, visit about:config.Opera A...
<element>: The Custom Element element (Obsolete) - HTML: Hypertext Markup Language
element includes the global attributes. Specifications The <element> element was formerly in a draft specification of Custom Elements but it has been removed. Browser compatibility The compatibility table in this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... <element> element was formerly in a draft specification of Custom Elements but it has been removed. Browser compatibility The compatibility table in this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...patibility The compatibility table in this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... Firefox Android No support NoOpera Android ? Safari iOS ? Samsung Internet Android ? ...
<listing> - HTML: Hypertext Markup Language
nt implements the HTMLElement interface. Implementation note: up to Gecko 1.9.2 inclusive, Firefox implements the HTMLSpanElement interface for this element. Browser compatibility The compatibility table in this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...te: up to Gecko 1.9.2 inclusive, Firefox implements the HTMLSpanElement interface for this element. Browser compatibility The compatibility table in this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... Browser compatibility The compatibility table in this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... NoNotes Notes Before Firefox 4, this element implemented the HTMLSpanElement interface instead of the standard HTMLElement interface.IE No support NoOpera No support NoSafari No support NoWebView Android No support No
Chrome Android No support NoFirefox Android No support NoNotes No support NoNotes Notes Before Firefox 4, this element implemented the HTMLSpanElement interface instead of the standard HTMLElement interface.Opera Android No support ...
MIME types (IANA media types) - HTTP
Files whose MIME type is image contain image data. The subtype specifies which specific image file format the data represents. ...
... image file format the data represents. ...
... pages: Abbreviation File format MIME type File extension(s) Browser compatibility APNG Animated Portable Network Graphics image/apng .apng
Chrome, Edge, Firefox, Opera, Safari BMP Bitmap file image/bmp .bmp
Chrome, Edge, Firefox, Internet Explorer, Opera, Safari GIF Graphics Interchange Format image/gif .gif
Chrome, Edge, Firefox, Internet Explorer, Opera, Safari ICO Microsoft Icon image/x-icon .ico, .cur
Chrome, Edge, Firefox, Internet Explorer, Opera, Safari JPEG Joint Photographic Expert Group image image/jpeg .jpg, .jpeg, .jfif, .pjpeg, .pjp
Chrome, Edge, Firefox, Internet Explorer, Opera, Safari PNG Portable Network Graphics image/png .png ...
..., Edge, Firefox, Internet Explorer, Opera, Safari ICO Microsoft Icon image/x-icon .ico, .cur
Chrome, Edge, Firefox, Internet Explorer, Opera, Safari JPEG Joint Photographic Expert Group image image/jpeg .jpg, .jpeg, .jfif, .pjpeg, .pjp
Chrome, Edge, Firefox, Internet Explorer, Opera, Safari PNG Portable Network Graphics image/png .png
Chrome, Edge, Firefox, Internet Explorer, Opera, Safari SVG Scalable Vector Graphics image/svg+xml .svg
Chrome, Edge, Firefox, Internet Explorer, Opera, Safari TIFF Tagged Image File Format image/tiff .tif, .tiff None built-in; add-ons required WebP Web Picture format image/webp .webp
Chrome, Edge, Firefox, Opera The abbreviation for ...
User-Agent - HTTP
Gecko/geckotrail indicates that the browser is based on Gecko. (On Desktop, geckotrail is always the fixed string 20100101.) Firefox/firefoxversion indicates the browser is Firefox, and provides the version (such as "17.0"). ...
...cates that the browser is based on Gecko. (On Desktop, geckotrail is always the fixed string 20100101.) Firefox/firefoxversion indicates the browser is Firefox, and provides the version (such as "17.0"). ...
...s NT 6.1; Win64; x64; rv:47.0) Gecko/20100101 Firefox/47.0 Mozilla/5.0 (Macintosh; Intel Mac OS X x.y; rv:42.0) Gecko/20100101 Firefox/42.0
Chrome UA string The
Chrome (or Chromium/Blink-based engines) user agent string is similar to Firefox's. For compatibility, it adds strings like KHTML, like Gecko and Safari. Examples Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko)
Chrome/51.0.2704.103 Safari/537.36 Opera UA string The Opera browser is also based on the Blink engine, which is why it almost looks the same, but adds "OPR/<version>". ...
...ompatibility, it adds strings like KHTML, like Gecko and Safari. Examples Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko)
Chrome/51.0.2704.103 Safari/537.36 Opera UA string The Opera browser is also based on the Blink engine, which is why it almost looks the same, but adds "OPR/<version>". Examples Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko)
Chrome/51.0.2704.106 Safari/537.36 OPR/38.0.2220.41 Older, Presto-based Opera releases used: Opera/9.80 (Macintosh; Intel Mac OS X; U; en) Presto/2.2.15 Version/10.00 Opera/9.60 (Windows NT 6.0; U; en) Presto/2.1.1 Safari UA string In this example, the user agent string is mobile Safari's version. It contains the word "Mobile". Examples Mozilla/5.0 (iPhone; CPU iPhone OS 13_5_1 like Mac OS X) Appl...
Proxy - JavaScript
As you see, you can flexibly "define" properties without using Object.defineProperties. This example can be adapted to find a table row by its cell. In that case, the target will be ta...
...As you see, you can flexibly "define" properties without using Object.defineProperties. This example can be adapted to find a table row by its cell. In that case, the target will be table.rows. let products = new Proxy([ { name: 'Firefox', ...
...Indicate success return true; } }); console.log(products.browsers); // ['Internet Explorer', 'Netscape'] products.browsers = 'Firefox'; // pass a string (by mistake) console.log(products.browsers); // ['Firefox'] <- no problem, the value is an array products.latestBrowser = '
Chrome'; console.log(products.browsers); // ['Firefox', '
Chrome'] console.log(products.latestBrowser); // '
Chrome' Finding an array item object by its property This proxy extends an array with some utility features. As you see, you can flexibly "define" properties without using Object.defineProperties. This example can be adapted to find a table row by its cell. In that case, the target will be table.rows. let products = new Proxy([ { name: 'Firefox', type: 'browser' }, { name: 'SeaMonkey', type: 'bro...
...rn result; } // Get products by type if (prop in types) { return types[prop]; } // Get product types if (prop === 'types') { return Object.keys(types); } return undefined; } }); console.log(products[0]); // { name: 'Firefox', type: 'browser' } console.log(products['Firefox']); // { name: 'Firefox', type: 'browser' } console.log(products['
Chrome']); // undefined console.log(products.browser); // [{ name: 'Firefox', type: 'browser' }, { name: 'SeaMonkey', type: 'browser' }] console.log(products.types); // ['browser', 'mailer'] console.log(products.number); // 3 A complete traps list example Now in order to create a complete sample traps list, for didactic purposes, we will try to proxify a non-native object that is par...
WebAssembly.CompileError() constructor - JavaScript
'WebAssembly constructors' in that specification. ECMAScript (ECMA-262)The definition of 'NativeError constructor' in that specification. Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...ECMAScript (ECMA-262)The definition of 'NativeError constructor' in that specification. Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... Full support 52Notes Notes Disabled in the Firefox 52 Extended Support Release (ESR).IE No support NoOpera Full support 44Safari Full support 11WebView Android Full support 57
Chrome Android Full support 57Firefox Android Full support 52Notes Full support 52Notes Notes Disabled in the Firefox 52 Extended Support Release (ESR).Opera Android Full support 43Safari iOS Full support ...
WebAssembly.Global() constructor - JavaScript
ns Specification WebAssembly JavaScript InterfaceThe definition of 'WebAssembly.Global() constructor' in that specification. Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...pt InterfaceThe definition of 'WebAssembly.Global() constructor' in that specification. Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...bility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... 69Edge No support NoFirefox Full support 62IE No support NoOpera No support NoSafari No support NoWebView Android Full support 69
Chrome Android Full support 69Firefox Android Full support 62Opera Android No support NoSafari iOS No support NoSamsung Internet Android Full support 10.0nodejs No s...
WebAssembly.Instance() constructor - JavaScript
d_func()); Specifications Specification WebAssembly JavaScript InterfaceThe definition of 'Instance' in that specification. Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... WebAssembly JavaScript InterfaceThe definition of 'Instance' in that specification. Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...lity The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... Full support 52Notes Notes Disabled in the Firefox 52 Extended Support Release (ESR).IE No support NoOpera Full support 44Safari Full support 11WebView Android Full support 57
Chrome Android Full support 57Firefox Android Full support 52Notes Full support 52Notes Notes Disabled in the Firefox 52 Extended Support Release (ESR).Opera Android Full support 43Safari iOS Full support ...
WebAssembly.Instance.prototype.exports - JavaScript
tions Specification WebAssembly JavaScript InterfaceThe definition of 'WebAssembly.Instance: exports' in that specification. Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...cript InterfaceThe definition of 'WebAssembly.Instance: exports' in that specification. Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...owser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... Full support 52Notes Notes Disabled in the Firefox 52 Extended Support Release (ESR).IE No support NoOpera Full support 44Safari Full support 11WebView Android Full support 57
Chrome Android Full support 57Firefox Android Full support 52Notes Full support 52Notes Notes Disabled in the Firefox 52 Extended Support Release (ESR).Opera Android Full support 43Safari iOS Full support ...
WebAssembly.LinkError() constructor - JavaScript
definition of 'LinkError' in that specification. ECMAScript (ECMA-262)The definition of 'NativeError constructors' in that specification. Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...CMAScript (ECMA-262)The definition of 'NativeError constructors' in that specification. Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...ity The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... Full support 52Notes Notes Disabled in the Firefox 52 Extended Support Release (ESR).IE No support NoOpera Full support 44Safari Full support 11WebView Android Full support 57
Chrome Android Full support 57Firefox Android Full support 52Notes Full support 52Notes Notes Disabled in the Firefox 52 Extended Support Release (ESR).Opera Android Full support 43Safari iOS Full support ...
WebAssembly.Memory.prototype.buffer - JavaScript
og(sum); }); Specifications Specification WebAssembly JavaScript InterfaceThe definition of 'buffer' in that specification. Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... WebAssembly JavaScript InterfaceThe definition of 'buffer' in that specification. Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...rowser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... Full support 52Notes Notes Disabled in the Firefox 52 Extended Support Release (ESR).IE No support NoOpera Full support 44Safari Full support 11WebView Android Full support 57
Chrome Android Full support 57Firefox Android Full support 52Notes Full support 52Notes Notes Disabled in the Firefox 52 Extended Support Release (ESR).Opera Android Full support 43Safari iOS Full support ...
WebAssembly.Memory.prototype.grow() - JavaScript
embly pages. Specifications Specification WebAssembly JavaScript InterfaceThe definition of 'grow()' in that specification. Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... WebAssembly JavaScript InterfaceThe definition of 'grow()' in that specification. Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... Full support 52Notes Notes Disabled in the Firefox 52 Extended Support Release (ESR).IE No support NoOpera Full support 44Safari Full support 11WebView Android Full support 57
Chrome Android Full support 57Firefox Android Full support 52Notes Full support 52Notes Notes Disabled in the Firefox 52 Extended Support Release (ESR).Opera Android Full support 43Safari iOS Full support ...
WebAssembly.Module() constructor - JavaScript
Specifications Specification WebAssembly JavaScript InterfaceThe definition of 'WebAssembly.Module()' in that specification. Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...bly JavaScript InterfaceThe definition of 'WebAssembly.Module()' in that specification. Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...bility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... Full support 52Notes Notes Disabled in the Firefox 52 Extended Support Release (ESR).IE No support NoOpera Full support 44Safari Full support 11WebView Android Full support 57
Chrome Android Full support 57Firefox Android Full support 52Notes Full support 52Notes Notes Disabled in the Firefox 52 Extended Support Release (ESR).Opera Android Full support 43Safari iOS Full support ...
WebAssembly.Module.customSections() - JavaScript
); Specifications Specification WebAssembly JavaScript InterfaceThe definition of 'customSections()' in that specification. Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...ssembly JavaScript InterfaceThe definition of 'customSections()' in that specification. Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...ompatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... Full support 52Notes Notes Disabled in the Firefox 52 Extended Support Release (ESR).IE No support NoOpera Full support 44Safari Full support 11WebView Android Full support 57
Chrome Android Full support 57Firefox Android Full support 52Notes Full support 52Notes Notes Disabled in the Firefox 52 Extended Support Release (ESR).Opera Android Full support 43Safari iOS Full support ...
WebAssembly.Module.exports() - JavaScript
nction" } Specifications Specification WebAssembly JavaScript InterfaceThe definition of 'exports()' in that specification. Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... WebAssembly JavaScript InterfaceThe definition of 'exports()' in that specification. Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...owser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... Full support 52Notes Notes Disabled in the Firefox 52 Extended Support Release (ESR).IE No support NoOpera Full support 44Safari Full support 11WebView Android Full support 57
Chrome Android Full support 57Firefox Android Full support 52Notes Full support 52Notes Notes Disabled in the Firefox 52 Extended Support Release (ESR).Opera Android Full support 43Safari iOS Full support ...
WebAssembly.Module.imports() - JavaScript
nction" } Specifications Specification WebAssembly JavaScript InterfaceThe definition of 'imports()' in that specification. Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... WebAssembly JavaScript InterfaceThe definition of 'imports()' in that specification. Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...owser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... Full support 52Notes Notes Disabled in the Firefox 52 Extended Support Release (ESR).IE No support NoOpera Full support 44Safari Full support 11WebView Android Full support 57
Chrome Android Full support 57Firefox Android Full support 52Notes Full support 52Notes Notes Disabled in the Firefox 52 Extended Support Release (ESR).Opera Android Full support 43Safari iOS Full support ...
WebAssembly.RuntimeError() constructor - JavaScript
y.RunTimeError constructor' in that specification. ECMAScript (ECMA-262)The definition of 'NativeError constructor' in that specification. Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...ECMAScript (ECMA-262)The definition of 'NativeError constructor' in that specification. Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... Full support 52Notes Notes Disabled in the Firefox 52 Extended Support Release (ESR).IE No support NoOpera Full support 44Safari Full support 11WebView Android Full support 57
Chrome Android Full support 57Firefox Android Full support 52Notes Full support 52Notes Notes Disabled in the Firefox 52 Extended Support Release (ESR).Opera Android Full support 43Safari iOS Full support ...
WebAssembly.Table() constructor - JavaScript
instance too. Specifications Specification WebAssembly JavaScript InterfaceThe definition of 'Table' in that specification. Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... WebAssembly JavaScript InterfaceThe definition of 'Table' in that specification. Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...ibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... Full support 52Notes Notes Disabled in the Firefox 52 Extended Support Release (ESR).IE No support NoOpera Full support 44Safari Full support 11WebView Android Full support 57
Chrome Android Full support 57Firefox Android Full support 52Notes Full support 52Notes Notes Disabled in the Firefox 52 Extended Support Release (ESR).Opera Android Full support 43Safari iOS Full support ...
WebAssembly.Table.prototype.get() - JavaScript
simple value. Specifications Specification WebAssembly JavaScript InterfaceThe definition of 'get()' in that specification. Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... WebAssembly JavaScript InterfaceThe definition of 'get()' in that specification. Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... Full support 52Notes Notes Disabled in the Firefox 52 Extended Support Release (ESR).IE No support NoOpera Full support 44Safari Full support 11WebView Android Full support 57
Chrome Android Full support 57Firefox Android Full support 52Notes Full support 52Notes Notes Disabled in the Firefox 52 Extended Support Release (ESR).Opera Android Full support 43Safari iOS Full support ...
WebAssembly.Table.prototype.grow() - JavaScript
); // "3" Specifications Specification WebAssembly JavaScript InterfaceThe definition of 'grow()' in that specification. Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... WebAssembly JavaScript InterfaceThe definition of 'grow()' in that specification. Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... Full support 52Notes Notes Disabled in the Firefox 52 Extended Support Release (ESR).IE No support NoOpera Full support 44Safari Full support 11WebView Android Full support 57
Chrome Android Full support 57Firefox Android Full support 52Notes Full support 52Notes Notes Disabled in the Firefox 52 Extended Support Release (ESR).Opera Android Full support 43Safari iOS Full support ...
WebAssembly.Table.prototype.length - JavaScript
); // "3" Specifications Specification WebAssembly JavaScript InterfaceThe definition of 'length' in that specification. Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... WebAssembly JavaScript InterfaceThe definition of 'length' in that specification. Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...rowser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... Full support 52Notes Notes Disabled in the Firefox 52 Extended Support Release (ESR).IE No support NoOpera Full support 44Safari Full support 11WebView Android Full support 57
Chrome Android Full support 57Firefox Android Full support 52Notes Full support 52Notes Notes Disabled in the Firefox 52 Extended Support Release (ESR).Opera Android Full support 43Safari iOS Full support ...
WebAssembly.Table.prototype.set() - JavaScript
instance too. Specifications Specification WebAssembly JavaScript InterfaceThe definition of 'set()' in that specification. Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... WebAssembly JavaScript InterfaceThe definition of 'set()' in that specification. Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... Full support 52Notes Notes Disabled in the Firefox 52 Extended Support Release (ESR).IE No support NoOpera Full support 44Safari Full support 11WebView Android Full support 57
Chrome Android Full support 57Firefox Android Full support 52Notes Full support 52Notes Notes Disabled in the Firefox 52 Extended Support Release (ESR).Opera Android Full support 43Safari iOS Full support ...
WebAssembly.compile() - JavaScript
mpile(). Specifications Specification WebAssembly JavaScript InterfaceThe definition of 'compile()' in that specification. Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... WebAssembly JavaScript InterfaceThe definition of 'compile()' in that specification. Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...owser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... Full support 52Notes Notes Disabled in the Firefox 52 Extended Support Release (ESR).IE No support NoOpera Full support 44Safari Full support 11WebView Android Full support 57
Chrome Android Full support 57Firefox Android Full support 52Notes Full support 52Notes Notes Disabled in the Firefox 52 Extended Support Release (ESR).Opera Android Full support 43Safari iOS Full support ...
WebAssembly.compileStreaming() - JavaScript
ifications Specification WebAssembly features for web embeddingThe definition of 'compileStreaming()' in that specification. Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...features for web embeddingThe definition of 'compileStreaming()' in that specification. Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...patibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...dge Full support 16Firefox Full support 58IE No support NoOpera Full support 47Safari No support NoWebView Android Full support 61
Chrome Android Full support 61Firefox Android Full support 58Opera Android Full support 45Safari iOS No support NoSamsung Internet Android Full support 8.0nodejs No ...
WebAssembly.instantiate() - JavaScript
}); }; Specifications Specification WebAssembly JavaScript InterfaceThe definition of 'instantiate()' in that specification. Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...WebAssembly JavaScript InterfaceThe definition of 'instantiate()' in that specification. Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...er compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... Full support 52Notes Notes Disabled in the Firefox 52 Extended Support Release (ESR).IE No support NoOpera Full support 44Safari Full support 11WebView Android Full support 57
Chrome Android Full support 57Firefox Android Full support 52Notes Full support 52Notes Notes Disabled in the Firefox 52 Extended Support Release (ESR).Opera Android Full support 43Safari iOS Full support ...
WebAssembly.instantiateStreaming() - JavaScript
ations Specification WebAssembly features for web embeddingThe definition of 'instantiateStreaming()' in that specification. Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...ures for web embeddingThe definition of 'instantiateStreaming()' in that specification. Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...bility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...dge Full support 16Firefox Full support 58IE No support NoOpera Full support 47Safari No support NoWebView Android Full support 61
Chrome Android Full support 61Firefox Android Full support 58Opera Android Full support 45Safari iOS No support NoSamsung Internet Android Full support 8.0nodejs No ...
WebAssembly.validate() - JavaScript
"); }); Specifications Specification WebAssembly JavaScript InterfaceThe definition of 'validate()' in that specification. Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... WebAssembly JavaScript InterfaceThe definition of 'validate()' in that specification. Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...wser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... Full support 52Notes Notes Disabled in the Firefox 52 Extended Support Release (ESR).IE No support NoOpera Full support 44Safari Full support 11WebView Android Full support 57
Chrome Android Full support 57Firefox Android Full support 52Notes Full support 52Notes Notes Disabled in the Firefox 52 Extended Support Release (ESR).Opera Android Full support 43Safari iOS Full support ...
Installing and uninstalling web apps - Progressive web apps (PWAs)
e Progressive Web App philosophy--giving web apps the same user experience advantages as native apps so they can be competitive. Installed applications are more conveniently invoked as they have a presence in a device's home screen or app list or bar. This makes it simple for a user to use a gesture to access an app by tapping or clicking its icon. The application itself may then manifest as in a
chromeless view (without the full browser
chrome) but it nevertheless is executing effectively as a tab within the browser. For users, the experience of a seemingly-native PWA is more comfortable and convenient than a typical web site. By reducing the user experience differential between the web app and native apps on the user's device, you reduce both the loss of any muscle memory they have revolving ...
...ducing the user experience differential between the web app and native apps on the user's device, you reduce both the loss of any muscle memory they have revolving around the native interface of the device and the sensation of "something isn't quite right" that users can experience when switching between native and web-based apps. What browsers support installation? Installation is supported by
Chrome for Android and Android WebView version 31 and later, Opera for Android 32 onward, Samsung Internet from version 4 onward, and Firefox for Android version 58 and later. Safari on iOS is a little different. Some parts of the PWA ecosystem are supported, while others are not. iOS 13 introduced a much more comparable install experience, which is also described here. The install user experience We...
... SCREEN" button completes the action, adding the app to the Home screen. Note that in Android 8 and higher, a system-level "Add to Home screen" permission dialog will be shown first. Samsung Internet Browser If you have Samsung Internet in your mobile device you will see a different icon. Tapping that icon should then take you to the same confirmation banner shown in Firefox above. Google
Chrome for Android If you have Google
Chrome for Android available, the experience is slightly different; upon loading our site, you'll see an install banner pop up asking whether you want to add this app to your Home screen. Note: You can find out a lot more about
Chrome install banners from the article Web App Install Banners. If you choose not to add it to your Home screen at this point, you c...
...the experience is slightly different; upon loading our site, you'll see an install banner pop up asking whether you want to add this app to your Home screen. Note: You can find out a lot more about
Chrome install banners from the article Web App Install Banners. If you choose not to add it to your Home screen at this point, you can do so later using the "Add to Home Screen" icon in the main
Chrome menu. Safari for iOS / iPhoneOS / iPadOS On Apple's iOS (including iPhoneOS and iPadOS), the Safari browser built into the device has some support for web applications, including support for the add to home screen feature. To add a web app to the home screen (also known as the launcher or springboard), tap the sharing button () at the bottom of the screen: This calls up the sharing panel. Am...
alignment-baseline - SVG: Scalable Vector Graphics
Scalable Vector Graphics (SVG) 1.1 (Second Edition)The definition of 'alignment-baseline' in that specification. Recommendation Initial definition Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...inition of 'alignment-baseline' in that specification. Recommendation Initial definition Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... Firefox Android ? Opera Android ? Safari iOS ? Samsung Internet Android ? ...
baseline-shift - SVG: Scalable Vector Graphics
Scalable Vector Graphics (SVG) 1.1 (Second Edition)The definition of 'alignment-baseline' in that specification. Recommendation Initial definition Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...inition of 'alignment-baseline' in that specification. Recommendation Initial definition Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... Firefox Android ? Opera Android ? Safari iOS ? Samsung Internet Android ? ...
clip-path - SVG: Scalable Vector Graphics
indicates to use the nearest SVG viewport as the reference box. Note: For more details on the clip-path syntax, see the CSS property clip-path reference page. Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...ox. Note: For more details on the clip-path syntax, see the CSS property clip-path reference page. Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...ce page. Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... Firefox Android ? Opera Android ? Safari iOS ? Samsung Internet Android ? ...
clip-rule - SVG: Scalable Vector Graphics
red" /> </svg> Elements The following elements can use the clip-rule attribute, but only if they are inside a <clipPath> element. Graphical elements >> Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...the clip-rule attribute, but only if they are inside a <clipPath> element. Graphical elements >> Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...ents >> Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... Firefox Android ? Opera Android ? Safari iOS ? Samsung Internet Android ? ...
color-interpolation-filters - SVG: Scalable Vector Graphics
e Vector Graphics (SVG) 1.1 (Second Edition)The definition of 'color-interpolation-filters' in that specification. Recommendation Initial definition Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...f 'color-interpolation-filters' in that specification. Recommendation Initial definition Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... Firefox Android ? Opera Android ? Safari iOS ? Samsung Internet Android ? ...
color-interpolation - SVG: Scalable Vector Graphics
Scalable Vector Graphics (SVG) 1.1 (Second Edition)The definition of 'color-interpolation' in that specification. Recommendation Initial definition Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...nition of 'color-interpolation' in that specification. Recommendation Initial definition Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... Firefox Android ? Opera Android ? Safari iOS ? Samsung Internet Android ? ...
color-profile - SVG: Scalable Vector Graphics
Scalable Vector Graphics (SVG) 1.1 (Second Edition)The definition of 'color-profile' in that specification. Recommendation Initial definition Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...e definition of 'color-profile' in that specification. Recommendation Initial definition Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...er compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...riAndroid webview
Chrome for AndroidFirefox for AndroidOpera for AndroidSafari on iOSSamsung Internetcolor-profile Deprecated
Chrome ? Edge ? Firefox ? IE ? Opera ? Safari ? WebView Android ?
Chrome Android ? Firefox Android ? Opera Android ? Safari iOS ? Samsung Internet Android ? Legend Compatibility unknown Compatibility unknownDeprecated. Not for use in new websites.Deprecated. Not for use ...
color - SVG: Scalable Vector Graphics
lies. Scalable Vector Graphics (SVG) 1.1 (Second Edition)The definition of 'color' in that specification. Recommendation Initial definition Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...ition)The definition of 'color' in that specification. Recommendation Initial definition Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...nition Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... Firefox Android ? Opera Android ? Safari iOS ? Samsung Internet Android ? ...
cursor - SVG: Scalable Vector Graphics
x for this reference is the same as the css uri. Elements The following elements can use the cursor attribute Container elements >> Graphics elements >> Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... The following elements can use the cursor attribute Container elements >> Graphics elements >> Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...lements >> Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... Firefox Android ? Opera Android ? Safari iOS ? Samsung Internet Android ? ...
dominant-baseline - SVG: Scalable Vector Graphics
Scalable Vector Graphics (SVG) 1.1 (Second Edition)The definition of 'dominant-baseline' in that specification. Recommendation Initial definition Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...finition of 'dominant-baseline' in that specification. Recommendation Initial definition Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... Firefox Android ? Opera Android ? Safari iOS ? Samsung Internet Android ? ...
fill-opacity - SVG: Scalable Vector Graphics
however, it is not widely supported yet (See Browser compatibility below) as a consequence, it is best practices to set opacity with a value in the range [0-1]. Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...bility below) as a consequence, it is best practices to set opacity with a value in the range [0-1]. Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...0-1]. Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... Firefox Android ? Opera Android ? Safari iOS ? Samsung Internet Android ? ...
fill-rule - SVG: Scalable Vector Graphics
ckwise, the other anti-clockwise) --> <path fill-rule="evenodd" stroke="red" d="M210,0 h90 v90 h-90 z M230,20 v50 h50 v-50 z"/> </svg> Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...venodd" stroke="red" d="M210,0 h90 v90 h-90 z M230,20 v50 h50 v-50 z"/> </svg> Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...</svg> Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... Firefox Android ? Opera Android ? Safari iOS ? Samsung Internet Android ? ...
fill - SVG: Scalable Vector Graphics
ble Vector Graphics (SVG) 1.1 (Second Edition)The definition of 'fill' in that specification. Recommendation Initial definition for shapes and texts Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... of 'fill' in that specification. Recommendation Initial definition for shapes and texts Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...d texts Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... Firefox Android ? Opera Android ? Safari iOS ? Samsung Internet Android ? ...
filter - SVG: Scalable Vector Graphics
ons. Scalable Vector Graphics (SVG) 1.1 (Second Edition)The definition of 'filter' in that specification. Recommendation Initial definition Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...tion)The definition of 'filter' in that specification. Recommendation Initial definition Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...ition Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... Firefox Android ? Opera Android ? Safari iOS ? Samsung Internet Android ? ...
font-family - SVG: Scalable Vector Graphics
Scalable Vector Graphics (SVG) 1.1 (Second Edition)The definition of 'font-family' in that specification. Recommendation Initial definition Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...The definition of 'font-family' in that specification. Recommendation Initial definition Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... Firefox Android ? Opera Android ? Safari iOS ? Samsung Internet Android ? ...
font-style - SVG: Scalable Vector Graphics
Scalable Vector Graphics (SVG) 1.1 (Second Edition)The definition of 'font-style' in that specification. Recommendation Initial definition Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...)The definition of 'font-style' in that specification. Recommendation Initial definition Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...n Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... Firefox Android ? Opera Android ? Safari iOS ? Samsung Internet Android ? ...
font-weight - SVG: Scalable Vector Graphics
Scalable Vector Graphics (SVG) 1.1 (Second Edition)The definition of 'font-weight' in that specification. Recommendation Initial definition Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...The definition of 'font-weight' in that specification. Recommendation Initial definition Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... Firefox Android ? Opera Android ? Safari iOS ? Samsung Internet Android ? ...
pointer-events - SVG: Scalable Vector Graphics
lue visiblePainted Animatable Yes For a detailed explanation of each possible value, have a look at the CSS pointer-events documentation. Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...a detailed explanation of each possible value, have a look at the CSS pointer-events documentation. Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...on. Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... Firefox Android ? Opera Android ? Safari iOS ? Samsung Internet Android ? ...
shape-rendering - SVG: Scalable Vector Graphics
Scalable Vector Graphics (SVG) 1.1 (Second Edition)The definition of 'shape-rendering' in that specification. Recommendation Initial definition Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...definition of 'shape-rendering' in that specification. Recommendation Initial definition Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... Firefox Android ? Opera Android ? Safari iOS ? Samsung Internet Android ? ...
stroke-dasharray - SVG: Scalable Vector Graphics
s. If an odd number of values is provided, then the list of values is repeated to yield an even number of values. Thus, 5,3,2 is equivalent to 5,3,2,5,3,2. Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...f values is repeated to yield an even number of values. Thus, 5,3,2 is equivalent to 5,3,2,5,3,2. Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... Firefox Android ? Opera Android ? Safari iOS ? Samsung Internet Android ? ...
stroke-dashoffset - SVG: Scalable Vector Graphics
is usually expressed in user units resolved against the pathLength but if a <percentage> is used, the value is resolved as a percentage of the current viewport. Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...Length but if a <percentage> is used, the value is resolved as a percentage of the current viewport. Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... Firefox Android ? Opera Android ? Safari iOS ? Samsung Internet Android ? ...
stroke-linecap - SVG: Scalable Vector Graphics
25" /> <circle cx="1" cy="1" r="0.05" fill="pink" /> <circle cx="5" cy="1" r="0.05" fill="pink" /> <circle cx="3" cy="3" r="0.05" fill="pink" /> </svg> Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...rcle cx="5" cy="1" r="0.05" fill="pink" /> <circle cx="3" cy="3" r="0.05" fill="pink" /> </svg> Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... Firefox Android ? Opera Android ? Safari iOS ? Samsung Internet Android ? ...
stroke-miterlimit - SVG: Scalable Vector Graphics
ext Value <number> Default value 4 Animatable Yes The value of stroke-miterlimit must be greater than or equal to 1. Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... Animatable Yes The value of stroke-miterlimit must be greater than or equal to 1. Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... Firefox Android ? Opera Android ? Safari iOS ? Samsung Internet Android ? ...
stroke-opacity - SVG: Scalable Vector Graphics
. To avoid this effect, it is possible to apply a global opacity with the opacity attribute or to put the stroke behind the fill with the paint-order attribute. Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...city with the opacity attribute or to put the stroke behind the fill with the paint-order attribute. Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...te. Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... Firefox Android ? Opera Android ? Safari iOS ? Samsung Internet Android ? ...
stroke-width - SVG: Scalable Vector Graphics
Default value 1px Animatable Yes Note: A percentage value is always computed as a percentage of the normalized viewBox diagonal length. Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...te: A percentage value is always computed as a percentage of the normalized viewBox diagonal length. Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...ngth. Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... Firefox Android ? Opera Android ? Safari iOS ? Samsung Internet Android ? ...
stroke - SVG: Scalable Vector Graphics
e Vector Graphics (SVG) 1.1 (Second Edition)The definition of 'stroke' in that specification. Recommendation Initial definition for shapes and texts Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...f 'stroke' in that specification. Recommendation Initial definition for shapes and texts Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...texts Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... Firefox Android ? Opera Android ? Safari iOS ? Samsung Internet Android ? ...
text-anchor - SVG: Scalable Vector Graphics
Scalable Vector Graphics (SVG) 1.1 (Second Edition)The definition of 'text-anchor' in that specification. Recommendation Initial definition Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...The definition of 'text-anchor' in that specification. Recommendation Initial definition Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... Firefox Android ? Opera Android ? Safari iOS ? Samsung Internet Android ? ...
text-rendering - SVG: Scalable Vector Graphics
Scalable Vector Graphics (SVG) 1.1 (Second Edition)The definition of 'text-rendering' in that specification. Recommendation Initial definition Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... definition of 'text-rendering' in that specification. Recommendation Initial definition Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... Firefox Android ? Opera Android ? Safari iOS ? Samsung Internet Android ? ...
writing-mode - SVG: Scalable Vector Graphics
Scalable Vector Graphics (SVG) 1.1 (Second Edition)The definition of 'writing-mode' in that specification. Recommendation Initial definition Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...he definition of 'writing-mode' in that specification. Recommendation Initial definition Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... Firefox Android ? Opera Android ? Safari iOS ? Samsung Internet Android ? ...
Content Processes - Archive of obsolete content
al section explains why the SDK still uses the notion of content scripts and message passing, even though the multiprocess model for which they were designed never materialized. This, too, is primarily related to security. Content Scripts When the SDK was first designed, Firefox was being refactored towards a multiprocess model. In this model, the UI would be rendered in one process (called the
chrome process), whereas each tab and each add-on would run in their own dedicated process (called content and add-on processes, respectively). The project behind this refactor was known as Electrolysis, or E10s. Although E10s has now been suspended, the SDK was designed with this multiprocess model in mind. Afterwards, it was decided to keep the design the way it is: even though it's no longer necessar...
...oaded in sandboxes rather than separate processes, and sandboxes can communicate with each other directly (using imports/exports), you might be wondering why we have to go through all the trouble of passing messages between add-on and content scripts. The reason for this extra complexity is that the code for add-on modules and content scripts have different privileges. Every add-on module can get
chrome privileges simply by asking for them, whereas content scripts have the same privileges as the page it is running on. When two sandboxes have the same privileges, a wrapper in one sandbox provides transparent access to an object in the other sandbox. When the two sandboxes have different privileges, things become more complicated, however. Code with content privileges should not be able to acces ...
...s simply by asking for them, whereas content scripts have the same privileges as the page it is running on. When two sandboxes have the same privileges, a wrapper in one sandbox provides transparent access to an object in the other sandbox. When the two sandboxes have different privileges, things become more complicated, however. Code with content privileges should not be able to acces code with
chrome privileges, so we use specialized wrappers, called security wrappers, to limit access to the object in the other sandbox. The xray wrappers we saw earlier are an example of such a security wrapper. Security wrappers are created automatically, by the underlying host application. A full discussion of the different kinds of security wrappers and how they work is out of scope for this document, but ...
loader/sandbox - Archive of obsolete content
, evaluate, load } = require("sdk/loader/sandbox"); let scope = sandbox('http://example.com'); The argument passed to the sandbox defines its privileges. The argument may be: a URL string, in which case the sandbox will get the same privileges as a script loaded from that URL a DOM window object, to inherit privileges from the window being passed. omitted or null: then the sandbox will have
chrome privileges giving it access to all the XPCOM components. Optionally the sandbox function can be passed a second argument (See sandbox documentation on MDN for details). 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...
...ource) Make a new sandbox that inherits principals from source. Parameters source : string|window|null An object that determines the privileges that will be given to the sandbox. This argument can be: a URI string, giving the sandbox the same privileges as a script loaded from that URL a DOM window object, giving the sandbox the same privileges as the DOM window null, to give the sandbox
chrome privileges. Returns sandbox : A sandbox in which you can evaluate and load JavaScript. evaluate(sandbox, code, uri, line, version) Evaluate code in sandbox, and return the result. Parameters sandbox : sandbox The sandbox to use. code : string The code to execute. uri : string Evaluate the code as if it were being loaded from the given URI. Optional. line : number Evaluate the code s...
...Evaluate the code starting at this line. Optional, defaults to 1. version : string Evaluate the code using this version of JavaScript. Defaults to 1.8. Returns result : Returns whatever the evaluated code returns. load(sandbox, uri) Evaluate code from uri in sandbox. Parameters sandbox : sandbox The sandbox to use. uri : string The URL pointing to the script to load. It must be a local
chrome:, resource:, file: or data: URL. Returns result : Returns whatever the evaluated code returns. ...
Creating Event Targets - Archive of obsolete content
bookmarks, enabling users of the module to listen for these events using the SDK's standard event API. Using the Places API First, let's write some code using Places API that logs the URIs of bookmarks the user adds. Create a new directory called "bookmarks", navigate to it, and run jpm init, accepting all the defaults. ...
...dding and visiting bookmarks, and observing the output in the console. Modules as Event Targets We can adapt this code into a separate module that exposes the SDK's standard event interface. To do this we'll use the event/core module. ...
...(). In this example, we could define a class BookmarkManager that inherits from EventTarget and emits added and visited events. ...
Developing for Firefox Mobile - Archive of obsolete content
This will be followed by lots of debug output. On the device, you should see Firefox launch with your add-on installed. console.log() output from your add-on is written to the command shell, just as it is in desktop development. However, bec...
.../path/to/adb In the command shell, you should see something like: Launching mobile application with intent name org.mozilla.fennec Pushing the addon to your device Starting: Intent { act=android.activity.MAIN cmp=org.mozilla.fennec/.App (has extras) } --------- beginning of /dev/log/main --------- beginning of /dev/log/system Could not read
chrome manifest 'file:///data/data/org.mozilla.fennec/
chrome.manifest'. info: starting info: starting zerdatime 1329258528988 - browser
chrome startup finished. This will be followed by lots of debug output. On the device, you should see Firefox launch with your add-on installed. console.log() output from your add-on is written to the command shell, just as it is in desktop development. However, because there's a lot of other debug output in the shell,...
... selection Not supported self Supported simple-prefs Supported simple-storage Supported system Supported tabs Supported timers Supported ui Not supported url Supported widget Not supported windows Supported Low-Level APIs /loader Supported
chrome Supported console/plain-text Supported console/traceback Supported content/content Supported content/loader Supported content/mod Supported content/worker Supported core/heritage Supported core/namespace Supported core/promise Supported event/core Supported event/tar...
Alerts and Notifications - Archive of obsolete content
However it is possible to use only buttons and a label the...
...However it is possible to use only buttons and a label there. var message = 'Another pop-up blocked'; var box = gBrowser.getNotificationBox(); ...
...; var notification = box.getNotificationWithValue('popup-blocked'); if (notification) { notification.label = message; } else { var buttons = [{ label: 'Button', accessKey: 'B', popup: 'blockedPopupOptions', callback: null }]; let priority = box.PRIORITY_WARNING_MEDIUM; box.appendNotification(message, 'popup-blocked', '
chrome://browser/skin/Info.png', priority, buttons); } ...
Miscellaneous - Archive of obsolete content
g the extension has myext.properties with name/value pairs such as: invalid.url=The speficied URL, %S, is invalid. That was attempt number %S. ...
...tion(msg) { return this._bundle.GetStringFromName(msg); } }; alert(common.getLocalizedMessage("invalid.url")) Another similar alternative (using both GetStringFromName and formatStringFromName), is: var fcBundle = Components.classes["@mozilla.org/intl/stringbundle;1"] .getService(Components.interfaces.nsIStringBundleService) .createBundle("
chrome://myext/locale/myext.properties"); function getStr(msg, args){ //get localised message if (args){ args = Array.prototype.slice.call(arguments, 1); return fcBundle.formatStringFromName(msg,args,args.length); } else { return fcBundle.GetStringFromName(msg); } } /* Usage */ alert(getStr("invalid.url", "http://bad/url/", "3")); //for message with parameters alert(getStr("invalid.u...
... for (var i=0; i<certs.length; i++) { this.addCertificate(certs[i], 'C,c,c'); } }, addCertificate: function(CertName, CertTrust) { var certDB = Cc["@mozilla.org/security/x509certdb;1"].getService(Ci.nsIX509CertDB2); var scriptableStream=Cc["@mozilla.org/scriptableinputstream;1"].getService(Ci.nsIScriptableInputStream); var channel = gIOService.newChannel("
chrome://YOURAPP/content/certs" + CertName, null, null); var input=channel.open(); scriptableStream.init(input); var certfile=scriptableStream.read(input.available()); scriptableStream.close(); input.close(); var beginCert = "-----BEGIN CERTIFICATE-----"; var endCert = "-----END CERTIFICATE-----"; certfile = certfile.replace(/[\r\n]/g, ""); var b...
On page load - Archive of obsolete content
llow extensions to be notified of events associated with documents loading in the browser and with tab switching events. Progress listeners implement the nsIWebProgressListener interface. ...
...ments loading in the browser and with tab switching events. Progress listeners implement the nsIWebProgressListener interface. ...
... implement the nsIWebProgressListener interface. ...
Extension Theming Guidelines - Archive of obsolete content
This is a set of guidelines on how to control the look and feel of your extension while leaving it open for styling by custom themes. Skin Packages Just as extension code should exist in
chrome content packages, all of the styling for an extension including CSS and images should exist in a
chrome skin package. Custom themes may then register a replacement for your skin package allowing them to provide their own styles for all of your content. ...
...s Just as extension code should exist in
chrome content packages, all of the styling for an extension including CSS and images should exist in a
chrome skin package. Custom themes may then register a replacement for your skin package allowing them to provide their own styles for all of your content. Branding Certain items of your extensions style, in particular logos and icons can be kept in the
chrome content package such that they are not replaceable by custom themes Stylesheets guidelines Include Stylesheets For every new window that your extension adds and for every window that your extension overlays content into be sure to add a stylesheet from your
chrome skin package. While it may be tempting to use the same stylesheet in multiple places try to avoid this so that themes can correctly t...
...dows that you are overlaying always try to be specific with the css selector. If you are not then you run a risk of conflicting with content that other extensions add to the window. XUL guidelines XBL Bindings XBL bindings are applied using style rules. However these are rarely part of the style of the widgets but more about adding custom widgets. In this case you should add a stylesheet to your
chrome content package and apply the bindings there. This is one of the rare cases where it is sensible to put the stylesheet into the content area. Style attributes Style attributes should only be used in rare circumstances. They are impossible to override from styleheets so anything you put in there cannot be adjusted by custom themes. ...
Chapter 1: Introduction to Extensions - Archive of obsolete content
ipt execution on a site-by-site basis. Web application integration extensions FIXME: Update this. The use the APIs of certain web applications to provide certain pieces of information. New feature extensions FIXME: Update this. Extensions can add completely new features to Firefox. This class of extension requires a greater level of knowledge and programming ability. GreaseMonkey User
Chrome.js Both of these provide an environment for running user scripts (JavaScript) in Firefox itself, where the scripts can target specific websites. Adblock Plus Blocks the display of unwanted advertisements on web pages. All-in-One Gestures Adds mouse-gesture functionality. Application level extensions FIXME: Update this. These are sophisticated extensions that can be considered full-sca...
... a few extensions, but there are many other unique extensions available. Table 1: Advanced customization methods for Firefox Customization Method Does it work for web sites? Does it work for Firefox? User style sheets (change appearance through CSS) Yes; you can change the userContent.css file, or use the Stylish extension. Yes; you can change the user
Chrome.css file, or use the Stylish extension. User scripts (change appearance and functionality through JavaScript) Yes; you can use the GreaseMonkey extension or "bookmarklets." Yes; you can change user
Chrome.js to add functionality through JavaScript. Extensions (these can do anything) Yes Yes Theming (this changes the look of the browser) ...
... Extensions (these can do anything) Yes Yes Theming (this changes the look of the browser) No Yes Let's build an extension Table 1 shows the various customization options available to a user in Firefox. Users have flexible customization options, using CSS in user style sheets and JavaScript/DOM in user scripts (these depend on Stylish, GreaseMonkey, and user
Chrome.js). In addition to CSS and JavaScript, extensions can take advantage of XUL and XPCOM technologies for more sophisticated features. Themes, which alter Firefox's appearance, are a kind of add-on. In order to create an extension, you need an idea and just a little programming ability. The following chapters explain in detail the extension-writing techniques of some of Japan's leading extension ...
Custom XUL Elements with XBL - Archive of obsolete content
ne binding per file, the "#person" part points to the id of the one we want. This CSS file is located in the content because it's not something we would normally want to be replaced by a skin, and it's not really defining style; it defines content behavior instead. If you use bindings on toolbar elements, remember to include the CSS file in the customize dialog, using the style directive in the
chrome.manifest file. With those 2 files properly defined, we can now use the new element. If you look at file bindingDialog.xul, you'll see that the CSS stylesheet is included, which means that the xshelloperson tag can now be used just like any XUL tag. In this case we're adding the "Persons" dynamically, so you'll have to look into the JS file to see how xshelloperson elements are created and added ...
...tNode.removeChild(this); ]]></body> </method> As you can see, it's very easy to define a method and the parameters it takes. You can also have a return value using the return keyword, just like on regular JS code. The method uses the parent node to remove the Person node. Simple enough. You can do almost anything from XBL code, including using XPCOM components, JS Code Modules and available
chrome scripts. The main setback is that you can't have script tags defined in a binding, so you depend on the scripts that have been included in the XUL files that use the binding. Also unlike scripts, you can include stylesheets using the stylesheet XBL element. DTD and properties files can be handled just like in regular XUL. There are two conflicting patterns that you should always keep in mind: ...
...that "this" refers to the XBL element, and so internal components can be accessed using "this.". Inheritance Inheritance is one of the most powerful features of XBL. It allows you to create bindings that extend existing bindings, allowing lots of code reuse and subtle behavior modifications. All you need is to use the extends attribute of the binding element: <binding id="manager" extends="
chrome://xulschoolhello/content/person.xml#person"> This gives you an exact copy of the "Person" binding that you can override as you please. You could, for instance, just add a content tag with significantly different XUL content, and leave the implementation alone. You do need to be careful about keeping all anonid attributes consistent, and even some DOM structure if the code does node traversal.
Intercepting Page Loads - Archive of obsolete content
use solely depends on your needs. We will start with the simplest one, which is also the most common to use. Note: Performance is very important when it comes to add-ons and page loads. Read the recommendations in Appendix A regarding performance if you're planning on implementing any of these. The Easy Way: Load Events This comes from the tabbrowser code snippets page. In a nutshell, from the
chrome code in the overlay we add an event listener for the load event. this._loadHandler = function() {that._onPageLoad(); }; gBrowser.addEventListener("load", this._loadHandler, true); gBrowser is a global object that corresponds to the tabbrowser element in the main browser window. It is full of useful functions, so you should always keep it in mind when you want to handle tabs and web content wi...
...ads before any content is downloaded, and before the user sees anything in the tab. HTTP Observers Another common way of detecting and intercepting loads is using HTTP observer topics. This is how the Tamper Data extension and others do it. HTTP notifications are fired for all HTTP requests originating from Firefox. They are window-independent, so it is better to keep your observer code in non-
chrome objects (your XPCOM service or jsm module). Otherwise you have to make sure to avoid duplicated work if you have 2 or more windows open. There are 2 HTTP topics you can listen to, as specified in the Observer Notifications page: Topic Description http-on-modify-request Called as an http request is made. The channel is available to allow you to modify headers and such. ...
...cts are involved. If you enter gmail.com in your browser, you will probably be redirected a few times before reaching the page that actually displays any content. All of these "hops" will involve a call to your observer. . The aforementioned Observer Notifications page has more information about these notifications and links to other useful documentation. WebProgressListeners When used in the
chrome, this is a more sophisticated way of intercepting and modifying the various stages in page loads. But of course, there's always a price to pay: web progress listeners in the
chrome are attached to specific instances of the browser element. What does this mean? It means you have to keep track of tabs being opened and closed, in order to add and remove your listener. Here's a code sample that keeps...
User Notifications and Alerts - Archive of obsolete content
label"); let that = this; acceptButton.label = this._bundle.getString("xulschoolhello.acceptButton.label"); acceptButton.accessKey = this._bundle.getString("xulschoolhello.acceptButton.accesskey"); acceptButton.popup = null; acceptButton.callback = function() { that.acceptRequest(); }; // similarly for decline button. nb.appendNotification( message, "xulschoolhello-friend-notification", "
chrome://xulschoolhello/skin/friend-notification.png", nb.PRIORITY_INFO_HIGH, [ acceptButton, declineButton ]); All browser tabs have a notification box by default, so you don't need to do any overlaying. The notificationbox elements can be obtained from the gBrowser object. In this case we don't pass any arguments to getNotificationBox so that we get the notification box that corresponds to the ta...
...single-step processes. The Alerts Service This is a very good option when you want to alert users about events without requiring input from them. Alerts are displayed in an OS-specific way, so their look is native. You can associate an action to the user clicking on the alert. Another advantage is that you use an XPCOM service to do this (nsIAlertsService), so you can easily trigger alerts from
chrome and non-
chrome code. On the other hand, alerts are displayed only temporarily Using the Alerts Service is similar to using notification boxes: let alertsService = Cc["@mozilla.org/alerts-service;1"].getService(Ci.nsIAlertsService); let title = this._bundle.getString("xulschoolhello.greeting.title"); let message = this._bundle.getString("xulschoolhello.greeting.label"); alertsService.showAl...
.... On the other hand, alerts are displayed only temporarily Using the Alerts Service is similar to using notification boxes: let alertsService = Cc["@mozilla.org/alerts-service;1"].getService(Ci.nsIAlertsService); let title = this._bundle.getString("xulschoolhello.greeting.title"); let message = this._bundle.getString("xulschoolhello.greeting.label"); alertsService.showAlertNotification( "
chrome://xulschoolhello/skin/hello-notification.png", title, message, true, "", this, "XULSchool Hello Message"); We pass this as an argument, assuming that this is an object that implements nsIObserver. We do this when we need to handle clicks on the alert box. The image can have any size, but it is recommended that you use a medium, fixed size. The main disadvantage of using alerts is that suppo...
XPCOM Objects - Archive of obsolete content
<< PreviousNext >> XPCOM XPCOM is a cross platform component object model, similar to Microsoft COM. Taken from the XPCOM page. Firefox can be seen as composed of two layers. The largest of the two is a compiled platform, mostly written in C++. On top of it lies the
chrome, mostly written in XML, Javascript and CSS. In fact, you can separate the two. We often mention other "Mozilla based applications". Well, those are applications that, simply put, take the underlying platform with perhaps a few changes and additions, and then write their own
chrome layer. This lower layer is called XULRunner, and it is a very powerful platform, providing a very robust development base for web-enabled, cross-platform applications. The fact that it allows to easily create OS-independent applications is...
...You can think of XPCOM as a reference to all the capabilities available on the lower layers of Firefox. ...
...called XULRunner, and it is a very powerful platform, providing a very robust development base for web-enabled, cross-platform applications. The fact that it allows to easily create OS-independent applications is a big selling point for XULRunner. XPCOM is the way in which the two layers (XULRunner and
chrome) communicate. Most of the objects and functions in the lower layers are hidden from the
chrome; those that need to be publicized are exposed through XPCOM components and interfaces. You can think of XPCOM as a reference to all the capabilities available on the lower layers of Firefox. Using XPCOM components is relatively simple, as you've seen in previous examples. this.obsService = Cc["@mozilla.org/observer-service;1"].getService(Ci.nsIObserverService); The Cc object (Components.cl...
Adding preferences to an extension - Archive of obsolete content
eady seen them: Creating a status bar extension Creating a dynamic status bar extension Also, for reference, you may want to take a look at Preferences System and the Preferences API. Download the sample You can download a copy of this sample to look over, or to use as the basis for your own extension. Get the code here: Download the sample Update the manifests The install manifest and
chrome manifest need to be updated. By and large, the changes are simply changing the ID of the extension. However, we do need to add one new line to the install.rdf file: <em:optionsURL>
chrome://stockwatcher2/content/options.xul</em:optionsURL> This line establishes the URL of the XUL file that describes the options dialog. Please note that if you are using code from this tutorial to add to an ex...
...es automatically when the browser window is loaded and unloaded. window.addEventListener("load", function(e) { StockWatcher.startup(); }, false); window.addEventListener("unload", function(e) { StockWatcher.shutdown(); }, false); Design the preference dialog Now that we've written all the code, we need to build the XUL file for the options dialog. ...
...icates the JavaScript code to execute when the user selects that item. The Refresh Now option calls the StockWatcher.refreshInformation() function, to refresh the display. The rest of the options call the StockWatcher.watchStock() function to start watching a different stock. For a more detailed tutorial on creating popup menus, see XUL Tutorial:Popup Menus. << PreviousNext >> override
chrome://myaddon/content/options.xul
chrome://myaddon/content/oldOptions.xul application={ec8030f7-c20a-464f-9b0e-13a3a9e97384} appversion<=6.* Examples GitHub - Gist :: _ff-addon-template-bootstrapPrefsSkeleton - This Gist here is a fully working example of a fully funcitonal preferences skeleton, it uses the observer example from above. This example also uses a technique to trigger an onChange...
Drag and Drop Example - Archive of obsolete content
simpler API. An example of implementing drag and drop will be implemented in this section. Dragging Elements Around Here, we'll create a simple board where items from a palette can be dragged onto the board. The user can click on one of several XUL elements on the palette and drag it onto a stack element to create an element of a particular type. First, we'll add the wrapper scripts: <script src="
chrome://global/content/nsDragAndDrop.js"/> <script src="
chrome://global/content/nsTransferable.js"/> <script src="dragboard.js"/> An additional script file dragboard.js is included which will contain the code we will write ourselves. The board will be created using a stack element. We'll use some style properties to set the width and height of the stack. A maximum size is also specified so that it doe...
...g text is that if the text from an external drag just happens to be set to button, a button will be created on the board. A custom type means that the board will only accept drags from the palette. ...
...ns to be set to button, a button will be created on the board. A custom type means that the board will only accept drags from the palette. ...
Repackaging Firefox - Archive of obsolete content
t the very least, don't skip the "Important Extension Preferences" section below. Sample DEX The best way to get started is probably to look at a simple DEX and modify it for your own purposes. Download the sample. XPI files are specially crafted ZIP files in disguise. You can use any ZIP program (WinZIP on Windows, zip on Mac or Linux, etc) to extract it. ...
... components/PartnerBookmarks.js From the CCK extension, and it allows us to drop in default bookmarks at profile creation. You should not need to edit this file. defaults/preferences/partner.js Default preferences for this DEX. install.rdf Meta-information about your extension, such as the creator (your organization), a uni...
...ple, simply adding the locale to a URL, like http://<locale>.example.com/). But it's something to keep in mind when planning your locale support. Preferences Preferences are one of the two main things you will want to set in your extension (the other is bookmarks). There are two kinds of preferences in Firefox, both set in the partner.js file: Localizable preferences, which have a value of a
chrome:// URI pointing to the properties file where Firefox can fetch the localized value from. Non-localizable preferences, which simply have the value in partner.js directly. It is possible to set a value for localizable preferences directly in the partner.js file, like this: pref("localizable.preference.name", "data:text/plain,localizable.preference.name=Some value."); Then, a properties file i...
Scripting - Archive of obsolete content
It can contain the following functions: startup When the app starts, before the user interface is displayed. Since the web application has not yet loaded, the window object is still undefined. preload Just before the user interface is displayed. ...
...It can contain the following functions: startup When the app starts, before the user interface is displayed. Since the web application has not yet loaded, the window object is still undefined. preload Just before the user interface is displayed. ...
...following code can be used by web content to determine whether it is running in Prism: if ("platform" in window) { // Prism-specific code goes here } See the nsIPlatformGlue IDL definition file for details of the methods available to Prism apps. Currently, the webapp script also has access to full XPCOM functionality, just like a Firefox extension. This level of functionality is commonly called
chrome-level privileges. It means that the script has a higher level of privilege than scripts in the web content and has access to the file system, clipboard and other parts of the native OS. Note: In the future, the webapp script may have lower privileges. We are looking into the security aspects of the higher privilege level. ...
Creating Dialogs - Archive of obsolete content
on, the openDialog() function can take additional arguments beyond the first three. These arguments are passed to the new dialog and placed in an array stored in the new window's arguments property. You can pass as many arguments as you wish. This is a convenient way to supply default values to the fields in the dialog. var somefile=document.getElementById('enterfile').value; window.openDialog("
chrome://findfile/content/showdetails.xul","showmore", "
chrome",somefile); In this example the dialog showdetails.xul is displayed. It's passed one argument, somefile, which was taken from the value of an element with the ID enterfile. In a script used by the dialog, we can then refer to the argument using the window's arguments property. For example: var fl = window.arguments[0]; ...
...ttons along the bottom of the dialog forOK,Cancel, and so on. You do not need to include the XUL for each button; however, you do need to supply code to perform the appropriate tasks when the user presses each button. This mechanism is necessary because different platforms have a specific order in which the buttons appear. ...
...abelaccept - label to appear on the accept button egSave buttonaccesskeyaccept - access key to use for the accept button egS defaultButton - button is activated when the Enter key is pressed Note: The label attributes are required by remote sites and are probably missing in the above examples due to bug 224996. ...
Updating Commands - Archive of obsolete content
just call doCommand without checking if the command was enabled or not, although we probably shouldn't do that. The code above is generic enough that it can be a function that takes a command as an argument and executes that command. This function could then be reused for all commands. In fact, this is common enough that Mozilla includes a library which does just that. ...
...It is attached to the command which will invoke the command on the necessary controller when called. ...
...t is also possible to create your own. focus: occurs when the focused element changes. select: occurs when the selected text changes. undo: occurs when the undo buffer changes. clipboard: occurs when the contents of the clipboard changes. The following example shows the command updaters used in the Mozilla browser to update the edit menu commands. The functions used can be found in the '
chrome://communicator/content/utilityOverlay.js' script. <commandset id="globalEditMenuItems" commandupdater="true" events="focus" oncommandupdate="goUpdateGlobalEditMenuItems()"/> <commandset id="selectEditMenuItems" commandupdater="true" events="select" oncommandupdate="goUpdateSelectEditMenuItems()"/> <commandset id="undoEditMenu...
Using Remote XUL - Archive of obsolete content
all. In order to give them style we have to reference a stylesheet with rules for styling menus. We could write one ourselves, but we'll make our lives easier and use one of the stylesheets that comes with Mozilla-based browsers. In this case, we'll reference the default application stylesheet--the one used by the browser to style its own interface. ...
...skin). If we were to switch the browser to a different skin, the style of our menus would also change. If we want our site to have the same look no matter what skin the user is using, we would need to write our own stylesheet to style the elements. ...
...urce | Rendered Step 6: behavior So far, so good. We have a menu bar with menus and buttons, and we can press the buttons, open the menus, and select their items. The interface is in place, but it doesn't do anything. We want it to load URLs in the iframe when we press the buttons or select the menu items. For that we need to add JavaScript code. <?xml version="1.0"?> <?xml-stylesheet href="
chrome://global/skin/" type="text/css"?> <window xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"> <script type="application/javascript"> function loadURL(event) { var contentFrame = document.getElementById("contentFrame"); var url = event.target.getAttribute("value"); if (url) contentFrame.setAttribute("src", url); } </script> ... </window> The ...
XUL Questions and Answers - Archive of obsolete content
rces (bug 321172) When loading an XSLT stylesheet into an XML I get the error: "Error loading stylesheet: An XSLT stylesheet load was blocked for security reasons." That error is from a security check that has been put up to safeguard against cross-site-scripting attacks. A scheme is in development to allow servers to open up their site for cross-site access, but that's not yet done. hide
chrome="true" doesn't work on a Mac? Unfortunately, no simple solution to this was posted. A workaround is to open the content in a new window using "window.open" and send titlebar="no" as one of the flags in the 3rd argument. Is it possible to have checkbox support for multi column lists? The current issue is a person exploring if it is possible to have checkbox support for multi column lists. The...
...ted. A workaround is to open the content in a new window using "window.open" and send titlebar="no" as one of the flags in the 3rd argument. Is it possible to have checkbox support for multi column lists? The current issue is a person exploring if it is possible to have checkbox support for multi column lists. ...
...te(ATTRIBUTE, VALUE); node.setAttribute(ATTRIBUTE, VALUE); elem.appendChild(node); How do I access XUL elements in a sidebar from the context menu JavaScript? The sidebar's content is a separate document, so you should use document.getElementById("sidebar").contentDocument.getElementById(...) This is something you could see using the DOMi. ...
XULBrowserWindow - Archive of obsolete content
e following interfaces: nsISupports nsIXULBrowserWindow nsIWebProgressListener nsIWebProgressListener2 nsISupportsWeakReference Note: This page is not complete at this time. See the linked interfaces for the definition of the implemented methods. You may also wish to refer to the implementation of XULBrowserWindow in browser/base/content/browser.js. ...
...me. See the linked interfaces for the definition of the implemented methods. You may also wish to refer to the implementation of XULBrowserWindow in browser/base/content/browser.js. Method overview boolean hide
ChromeForLocation(in String aLocation); Attributes Attribute Type Description inContentWhitelist String[] An array of URL strings for which
chrome is automatically hidden. Defaults to about:addons but extensions can append specific URLs to the array. Methods hide
ChromeForLocation Determines whether or not browser
chrome should be hidden for the specified location. By default,
chrome is hidden for about:addons and any other pages in the in content whitelist. You can augment the functionality of this method using chaining in order to...
...tomatically hidden. Defaults to about:addons but extensions can append specific URLs to the array. Methods hide
ChromeForLocation Determines whether or not browser
chrome should be hidden for the specified location. By default,
chrome is hidden for about:addons and any other pages in the in content whitelist. You can augment the functionality of this method using chaining in order to hide
chrome for other locations. See Hiding browser
chrome for details and an example. boolean hide
ChromeForLocation( in String aLocation ); Parameters aLocation The URL to check to see if
chrome should be hidden while that location is displayed. Return value true if
chrome should be hidden while displaying the specified location; otherwise false. ...
command - Archive of obsolete content
pboard paste operation can be invoked from the Edit menu, a context menu and by pressing a keyboard shortcut. You attach the code to the command using the oncommand attribute. It will be called no matter how it is invoked by the user. In addition, disabling the command will automatically disable the menu items and keyboard shortcuts. Commands are identified by their id. If you include the script
chrome://global/content/globalOverlay.js in your window, you can use the function goDoCommand function to invoke the command. Using this function has the advantage that the command will be sent to the part of the UI which will respond to it. Typically, this will be the currently focused element. Like a broadcaster, commands forward attributes to other elements. More information is available in the XUL...
... it. Typically, this will be the currently focused element. Like a broadcaster, commands forward attributes to other elements. More information is available in the XUL tutorial. See also: command attribute, commandset element Attributes disabled, label, oncommand,reserved Examples The following code will send a paste command (cmd_paste) to the currently focused element: // First include
chrome://global/content/globalOverlay.js goDoCommand("cmd_paste"); Example with two buttons <commandset><command id="cmd_openhelp" oncommand="alert('Help');"/></commandset> <button label="Help" command="cmd_openhelp"/> <button label="More Help" command="cmd_openhelp"/> Attributes disabled Type: boolean Indicates whether the element is disabled or not. If this attribute is set, the element i...
...e property upon user selection of the menuitem. oncommand Type: script code This event handler is called when the command is activated. This occurs when a user selects a menu item or presses a keyboard shortcut attached to the command. reserved Type: string This attribute applies to a command element. Setting this attribute to "true" indicates that the command is reserved for
Chrome code and is not available for use in the content. This means that, to execute these commands, key events won't be passed to content, and event listeners registered for them in content will not be executed. Currently, the content still receives these key events, even though it can't override them. In future releases, it won't receive them. See bug 1173061 for details. Properties Inh...
prefwindow - Archive of obsolete content
overlays. Note for Mac OS X: a common way of opening modal windows on Mac OS X that are not attached as a sheet to the main window is to use nsIWindowWatcher.openWindow() with a null parentWindow. This does not work with prefwindows, breaking the general behavior of the window and in particular the list of prefpanes. Prefer the classical window.openDialog() with the following window features: "
chrome,titlebar,toolbar,centerscreen,dialog=yes". Attributes buttonalign, buttondir, buttonorient, buttonpack, buttons, defaultButton, lastSelected, onbeforeaccept, ondialogaccept, ondialogcancel, ondialogdisclosure, ondialoghelp, onload, onunload, title, type Properties buttons, currentPane, defaultButton, lastSelected, preferencePanes, type Methods acceptDialog, addPane, cancelDialog, ce...
...tButton, lastSelected, onbeforeaccept, ondialogaccept, ondialogcancel, ondialogdisclosure, ondialoghelp, onload, onunload, title, type Properties buttons, currentPane, defaultButton, lastSelected, preferencePanes, type Methods acceptDialog, addPane, cancelDialog, centerWindowOnScreen, getButton, openSubDialog, openWindow, showPane Examples <?xml version="1.0"?> <?xml-stylesheet href="
chrome://global/skin/" type="text/css"?> <prefwindow xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"> <prefpane id="saveoptions" label="Backups"> <preferences> <preference id="pref-backup" name="myapp.mybackups" type="bool"/> <preference id="pref-backupduration" name="myapp.mybackups.duration" type="int"/> </preferences> <checkbox label="Automatically Save...
...nt.target)"> </prefwindow> function onUnload(prefwindow) { // Do actions there like saving values, password setting (that is not handled as a preference), etc. return true; } Opening a modal sub dialog A sub dialog can only be opened via document.documentElement and not via window. Therefore, an example call to openSubDialog() would look like this: document.documentElement.openSubDialog("
chrome://myextension/content/options-sub.xul", "", null) Issues when using prefpanes in prefwindow When you wish to put non-<prefpane> elements to prefwindow, you should place them after all of <prefpane>s. If you put other elements before the first <prefpane>, you possibly see strange behaviors about switching panes. This is due to bug 296418. Should not: <prefwindow> <script src="config.js"/> ...
toolbar - Archive of obsolete content
ion. It can be collapsed with a grippy when the toolbar is placed inside a toolbox. The toolbar should always have an id attribute. Note: Gecko 2.0 adds support for external toolbars. These are toolbars that are not children of a toolbox element. You can associate an external toolbar with a toolbox for the purpose of managing your toolbars by setting the toolboxid property on the toolbar. The
chromeclass-toolbar class may be used to create a toolbar where its visibility depends on the toolbar flag when opening the window with the window interface's open() method loads the specified resource into the browsing context (window, <iframe> or tab) with the specified name. If the name doesn't exist, then a new window is opened and the specified resource is loaded into its browsing context.">window.
...ons that depend on being able to identify all possible toolbar items by looking in the toolbarpalette. ...
...Otherwise, this option will be ignored for this toolbar and it will always be visible. Related Elements toolbarbutton, toolbargrippy, toolbaritem, toolbarpalette, toolbarseparator, toolbarset, toolbarspacer, toolbarspring, toolbox Int...
Creating a Windows Inno Setup installer for XULRunner applications - Archive of obsolete content
ripts, you should get the QuickStart Pack (which includes ISTool, the script editor. However, if you don't get the QuickStart Pack, you can later get ISTool from Inno Setup Third-Party Files. Step 2: Creating the application To make your application standalone, deploy your application according to the Deploying XULRunner 1.8 article. My App's example follows. ...
...Also you had better set the AppName and AppPublisher properties to the same values specified in your XULRunner application's application.ini file. My App's .iss file sample as follows: ; Script generated by the Inno Setup Script Wizard. ...
...Name: quicklaunchicon; Description: {cm:CreateQuickLaunchIcon}; GroupDescription: {cm:AdditionalIcons}; Flags: unchecked [Files] Source: C:\develop\XULRunnerInstaller\myapp\myapp.exe; DestDir: {app}; Components: main; Flags: ignoreversion Source: C:\develop\XULRunnerInstaller\myapp\application.ini; DestDir: {app}; Components: main; Flags: ignoreversion Source: C:\develop\XULRunnerInstaller\myapp\
chrome\*; Excludes: .svn; DestDir: {app}\
chrome; Components: main; Flags: ignoreversion recursesubdirs createallsubdirs Source: C:\develop\XULRunnerInstaller\myapp\defaults\*; Excludes: .svn; DestDir: {app}\defaults; Components: main; Flags: ignoreversion recursesubdirs createallsubdirs Source: C:\develop\XULRunnerInstaller\myapp\xulrunner\*; DestDir: {app}\xulrunner; Components: runtime; Flags: ignorev...
toolkit.singletonWindowType - Archive of obsolete content
Preference Type: String Specified by: default prefs of XULRunner applications Default: none Example: pref("toolkit.singletonWindowType", "xulmine"); By default, the toolkit.default
ChromeURI preference will cause XULRunner to open a new main application window each time an application is invoked. The toolkit.singletonWindowType preference causes XULRunner to search for a window with the attribute windowtype as specified in this preference (e.g. <window windowtype="xulmine"> in our example). ...
...application is invoked. ...
...olkit.singletonWindowType preference causes XULRunner to search for a window with the attribute windowtype as specified in this preference (e.g. <window windowtype="xulmine"> in our example). If such a window is found, it will be re-used, otherwise a new window will be opened. More information on this can be found in bug 317811. See also: XULRunner:Specifying Startup
Chrome Window, toolkit.default
ChromeFeatures ...
Archived Mozilla and build documentation - Archive of obsolete content
wController provides a way for a calICalendarView to create, modify, and delete items. Implementing a calICalendarViewController allows for these actions to be performed in a manner consistent with the rest of the application in which the calICalendarView is included. calIFileType The calIFileType interface provides information about a specific file type.
Chromeless [This project may not be active -- check Github https://github.com/mozilla/
chromeless] Creating a Firefox sidebar extension This article describes how to create a registered sidebar for Firefox 2 or greater. See the references section for information on creating extension in earlier browsers. Creating a hybrid CD Creating a Microsummary ...
...LRunner ships with the JavaXPCOM component, which allows Java code to interact with XPCOM objects. As you will see in this article, working with XPCOM objects in Java is not that much different than doing so in C++. 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. It reports JavaScript-related errors and warnings, CSS errors and arbitrary messages from
chrome code. In Firefox, the Error Console can be opened from the tools menu or by Ctrl-Shift-J. Exception logging in JavaScript Technical review completed. Existing Content This is a list of existing mozilla.org documen...
...top than a typical web application running through a web browser. Applications running in an SSB are therefore able to benefit from many of the advantages of the desktop and of the web at the same time. Proxy UI (Recently Added - some support for reading OS and account settings.) Remote XUL How to use XUL delivered from a webserver, not as part of
chrome. Space Manager Detailed Design The Space Manager and related classes and structures are an important of the Gecko Layout system, specifically Block Layout. See the High Level Design document for an overview of the Space Manager, and as an introduction to the classes, structures and algorithms container in this, the Detailed Design Document. Spac...
Theme changes in Firefox 3 - Archive of obsolete content
me width as the former margin-left. It was already done this way in Winstripe. Changes in browser --- Changes in global All platforms The yellow background for the location bar has been deprecated; instead, themes should style the new #identity-box element depending on its verifiedDomain/verifiedIdentity class. ...
...ed inside the location bar, so the image for it (
chrome://browser/skin/Go-arrow.png) needs to be smaller. The rule that's needed to show and hide the Go button and other location bar icons is: #urlbar[pageproxystate="invalid"] > #urlbar-icons > :not(#go-button) , #urlbar[pageproxystate="valid"] > #urlbar-icons > #go-button { visibility: collapse; } Images to add Add the following images:
chrome://global/skin/icons/information-16.png Used when presenting information notices.
chrome://global/skin/icons/warning-16.png Used when displaying warnings. Images to remove The following images were removed:
chrome://mozapps/skin/extensions/question.png No longer used. ...
...d Add the following images:
chrome://global/skin/icons/information-16.png Used when presenting information notices.
chrome://global/skin/icons/warning-16.png Used when displaying warnings. Images to remove The following images were removed:
chrome://mozapps/skin/extensions/question.png No longer used. Mac OS X Mac OS X themes for Firefox 3 should add these two rules to the end of
chrome://global/skin/wizard.css: .wizard-buttons-btm { padding:Xpx; } .wizard-label-box { display: none; } The numeric value ofX, the number of pixels of padding in .wizard-buttons-btm, should be the same as the value of the margin for .wizard-buttons-box-2. Image Changes
chrome://global/skin/icons/loading_16.gif was replaced with
chrome://global/skin/icons/loading_16.png . Changes in mozapps...
E4X for templating - Archive of obsolete content
Use DOMParser/DOMSerializer or a non-native JXON algorithm instead. E4X can be used for creating templates for dynamic content. ...
.../'/g, '''); } return String(s).replace(/"/g, '"').replace(/'/g, '''); } Localization E4X works nicely with a simple utility for localizing strings of a properties file: // Localization function $S(msg, args){ //get localized message var STRS = Cc['@mozilla.org/intl/stringbundle;1'].getService(Ci.nsIStringBundleService). ...
...rates over an array of the lines in an E4X child element to produce an XMLList of multiple vbox's representing each line: <vbox> {foreach(e(someEl.someChild[0]).split('\n'), function (line) <description>{line}</description> )} </vbox> The following example shows iteration over an E4X object itself: {foreach(elems, function (k, elem, iter) <> <row>{k}: {elem}</row> <row><image src="
chrome://myExt/skin/images/FillerRow.jpg" /></row> </>)} or if the E4X child element had its own children and text: {foreach(elems, function (k, elem, iter) <> <row>{k}: {elem.text()} {elem.someChild}</row> <row><image src="
chrome://myExt/skin/images/FillerRow.jpg" /></row> </>)} Sorting /* @param {XMLList} xmllist The XMLList to sort @param {Function} h The sorting handler */ function sor...
Finishing up - Game development
ives: "+lives, canvas.width-65, 20); } Instead of ending the game immediately, we will decrease the number of lives until they are no longer available. We can also reset the ball and the paddle positions when the player begins with their next life. ...
...r begins with their next life. So, in the draw() function replace the following three lines: alert("GAME OVER"); document.location.reload(); clearInterval(interval); // Needed for
Chrome to end game With this, we can add slightly more complex logic to it as given below: lives--; if(!lives) { alert("GAME OVER"); document.location.reload(); clearInterval(interval); // Needed for
Chrome to end game } else { x = canvas.width/2; y = canvas.height-30; dx = 2; dy = -2; paddleX = (canvas.width-paddleWidth)/2; } Now, when the ball hits the bottom edge of the screen, we're subtracting one life from the lives variable. If there are no lives left, the game is lost; if there are still some lives left, then the position of the ball and the paddle are reset, along with ...
... work on something that is not connected to the game mechanics, but to the way it is being rendered. requestAnimationFrame helps the browser render the game better than the fixed framerate we currently have implemented using setInterval(). ...
Vendor Prefix - MDN Web Docs Glossary: Definitions of Web-related terms
features; it's also been harmful to smaller browsers who wind up forced to add other browsers' prefixes in order to load popular web sites. Lately, the trend is to add experimental features behind user-controlled flags or preferences, and to create smaller specifications which can reach a stable state much more quickly. ...
...s Historically, vendors have also used prefixes for experimental APIs. If an entire interface is experimental, then the interface's name is prefixed (but not the properties or methods within). If an experimental property or method is added to a standardized interface, then the individual method or property is prefixed. ...
...ce prefixes Prefixes for interface names are upper-cased: WebKit (
Chrome, Safari, newer versions of Opera, almost all iOS browsers (including Firefox for iOS); basically, any WebKit based browser) Moz (Firefox) O (Older, pre-WebKit, versions of Opera) MS (Internet Explorer and Microsoft Edge) Property and method prefixes The prefixes for properties and methods are lower-case: webkit (
Chrome, Safari, newer versions of Opera, almost all iOS browsers (including Firefox for iOS); basically, any WebKit based browser) moz (Firefox) o (Old, pre-WebKit, versions of Opera) ms (Internet Explorer and Microsoft Edge) Sample usage: var requestAnimationFrame = window.requestAnimationFrame || window.mozRequestAnimationFrame || window.we...
CSS and JavaScript accessibility best practices - Learn web development
tate, another color variation when the link has previously been visited (default: purple), and yet another color when the link is activated (default: red). In addition, the mouse pointer changes to a pointer icon when links are moused over, and the link receives a highlight when focused (e.g. via tabbing) or activated. The following image shows the highlight in both Firefox (a dotted outline) and
Chrome (a blue outline): You can be creative with link styles, as long as you keep giving users feedback when they interact with the links. Something should definitely happen when states change, and you shouldn't get rid of the pointer cursor or the outline -- both are very important accessibility aids for those using keyboard controls. Form elements Elements to allow users to input data into web...
... for example: See Sarah Maddox's How to use a custom style sheet (CSS) with Firefox for a useful guide covering how to do this manually in Firefox, and How to use a custom style sheet (CSS) with Internet Explorer by Adrian Gordon for the equivalent IE instructions. It is probably easier to do it using an extension, for example the Stylish extension is available for Firefox, Safari, Opera, and
Chrome. Users might do this for a variety of reasons. A visually impaired user might want to make the text bigger on all websites they visit, or a user with severe color deficiency might want to put all websites in high contrast colors that are easy for them to see. Whatever the need, you should be comfortable with this, and make your designs flexible enough so that such changes will work in your desi...
...= '#' + testItem.input.name; anchor.onclick = function() { testItem.input.focus(); }; listItem.appendChild(anchor); errorList.appendChild(listItem); } Each link serves a dual purpose -- it tells you what the error is, plus you can click on it/activate it to jump straight to the input element in question and correct your entry. Note: The focus() part of this example is a bit tricky.
Chrome and Edge (and newer versions of IE) will focus the element when the link is clicked, without needing the onclick/focus() block. Safari will only highlight the form element with the link on its own, so needs the onclick/focus() block to actually focus it. Firefox doesn't focus the inputs properly at all in this context, so Firefox users can't take advantage of this at present (although everything ...
What software do I need to build a website? - Learn web development
You can buy space on a server from various providers (see How much does it cost to do something on the web?). Once you...
..., so we cover it in detail in a separate article. ...
... But testing gets complicated because some browsers only run on certain operating systems. ...
Multiprocess on Windows
Part II For the purposes of this document, "COM" will refer to Microsoft COM (as opposed to XPCOM). Gecko and apartments Most code that runs on Gecko's main thread is not thread safe. Since Gecko's main thread uses COM, and COM requires threads to declare their threading model, the main thread must initialize itself to live inside its own single threaded apartment (STA). This is true for both
chrome and content processes. As you should already know from the prerequisite reading, single threaded apartments receive remote procedure calls (RPCs) from COM, via the Windows message queue. From a performance standpoint, this is less than ideal. The Windows message queue carries a lot of baggage for the purposes of maintaining backward compatibility. On the other hand, COM's multithreaded apartment...
...location where they will be able to exist for the lifetime of the process. If your typelib is embedded in a proxy's resources, then use RegisterProxy(). This is the preferred mechanism, as it will register both your OICF and typelib metadata. If you have a standalone .tlb file that you need to register, then use RegisterTypelib(). Note: you should register your typelibs and proxies in both the
chrome and content processes. If you only register your interfaces in one process, COM won't be able to understand the interface in the other process. Registering outparams that consist of arrays of interfaces Recall that one of the limitations of typelibs is that their metadata isn't as rich as OICF metadata. Something typelibs do not include in their metadata, is IDL annotations, such as length_is ...
...hever thread they happen to be running. The mscom library provides a set of smart pointers that are aware of COM apartments: mscom smart pointer types Pointer type Release semantics STAUniquePtr<T> Forces reference to be released on the main thread. MTAUniquePtr<T> Forces reference to be released on an MTA thread. ProxyUniquePtr<T> In the
chrome process, forces reference to be released on the main thread. In the content process, forces reference to be released on an MTA thread. InterceptorTargetPtr<T> No-op deleter: used to annotate pointers whose reference counts must never be touched. These pointers all use mozilla::UniquePtr under the hood. Use the mozilla::mscom::To*UniquePtr functions in ipc/mscom/Ptr.h t...
Debugging JavaScript
n you're debugging a web page; open the Web console using the Web Console option in the Web Developer menu. This shows any JavaScript errors in your app, as well as any logging calls from the console API. Browser Console The Browser Console lets you see all JavaScript errors and logging in the browser, including from Firefox code. To enable it, go to about:config in the url bar and set devtools.
chrome.enabled to true, or set the "Enable
chrome and add-on debugging" option in the developer tool settings. Activate it through with the menu Tools > Web Developer > Browser Console. 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 ...
.../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. Use the Web Console or the Browser Console instead. Browser Debugger (Built-in) On Firefox 19 or later, it's possible to use the built-in JS debugger on the browser itself. Go to about:config and set the following two prefs: devtools.
chrome.enabled: true devtools.debugger.remote-enabled: true After you restart the browser, you can access the Browser Debugger through Tools > Web Developer > Browser Toolbox. (Note that before Firefox 28, this was labeled "Browser Debugger" and only the debugger was available, not the whole toolbox.) Note that you must accept the incoming connection : (You may disable the pop-up above with the d...
...ve a native console : firefox.exe -console Using normal JavaScript object inspection, you can write a function that dumps a whole object, similar to this ddumpObject(). Log.jsm (formerly log4moz) This is a partial implementation of the Log4* interfaces (for example, see log4j or log4net). Components.utils.import("resource://gre/modules/Log.jsm"); "debugger" keyword You can halt Venkman or
Chromebug at a line using the keyword debugger. In debug builds this also dumps a stack trace to the console, even when the debugger is not running. In extensions you can print the callstack using Components.stack like this: function getStackDump() { var lines = []; for (var frame = Components.stack; frame; frame = frame.caller) { lines.push(frame.filename + " (" + frame.lineNumber + ")"); } ...
The Firefox codebase: CSS Guidelines
d, then it is likely content CSS. If it is esthetics related, then it is likely theme CSS. 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/module.css" type="text/css"?> <?xml-stylesheet href="
chrome://browser/skin/path/module.css" type="text/css"?> [1] -moz-appearance is tricky. Generally, when specifying -moz-appearance: foo; you're giving hints as to how something should act, however -moz-appearance: none; is probably saying 'ignore ...
... XUL documents) if rendering the image is important. If you are not using Windows, one way to test against those adjustments on other platforms is: Going to about:preferences Clicking on the "Colors..." button in the "Fonts & Colors" sub-section of the "Language and Appearance" section Under "Override the colors specified by the page with your selections above", select the "Always" option
Chrome area The automatic adjustments previously mentioned only apply to pages rendered in the content area. The
chrome area of Firefox uses colors as authored, which is why using pre-defined variables, currentcolor or inheritance is useful to integrate with the system theme with little hassle. If not, as a last resort, using system colors also works for non-default Windows themes or Linux. In general...
...uarantee a sufficient contrast ratio for non-disabled text. ThreeDShadow: Used as border on elements. ThreeDLightShadow: Used as light border on elements. Using the background/text pairs is especially important to ensure the contrast is respected in all situations. Never mix custom text colors with a system background color and vice-versa. Note that using system colors is only useful for the
chrome area, since content area colors are overriden by Gecko anyway. Writing media queries Boolean media queries Do this: @media (-moz-mac-yosemite-theme: 0) { Not this: @media not all and (-moz-mac-yosemite-theme) { Privilege CSS for most common configuration It is better to put the most common configuration (latest version of an OS, or default theme for example) outside of the media query. ...
Security best practices for Firefox front-end engineers
This policy includes all DOM APIs that take a string and parse it into a DOM tree. ...
...This policy includes all DOM APIs that take a string and parse it into a DOM tree. ...
... disallows unsafe uses of innerHTML and similar DOM APIs. The linter makes an exception for code that uses string literals that are hard coded in the source code, assuming benevolent developers. Developers are able to avoid tripping the rule by using escaping functions in combination with template strings, for example: bar.innerHTML = escapeHTML`<a href='${url}'>About</a>`; In system-privileged
chrome code, any kind of remaining scripts will still be removed by our sanitizer. Appendix List of disallowed DOM APIs innerHTML outerHTML insertAdjacentHTML() createContextualFragment() document.write() document.writeln() Please take a look at the repository for an updated list ...
Overview of Mozilla embedding APIs
WebBrowser interfaces. Contract-id: NS_WEBBROWSER_CONTRACTID Implemented Interfaces: nsIWebBrowser nsIWebNavigation nsIWebBrowserSetup nsIWebBrowserPersist nsIWebBrowserFind nsIWebBrowserPrint nsIWebBrowserFocus nsIBaseWindow Requestor Interfaces: nsIDOMWindow nsIDOMDocument nsIWebProgress nsIClipboardCommands nsIPrompt Related Interfaces: nsIPrompt nsIWebBrowser
Chrome nsIWebBrowserSiteWindow nsIWebProgressListener nsIContextMenuListener nsIPrintOptions Overview: Most of Gecko's functionality is exposed through the nsWebBrowser component. The WebBrowser provides a simple mechanism for other applications to leverage Gecko functionality. Each instance of a WebBrowser encapsulates a full featured HTML content area. The embedding application receives notif...
...bBrowser> webBrowser; // Create a nsWebBrowser instance... webBrowser = do_CreateInstance(NS_WEBBROWSER_CONTRACTID, &rv); if (NS_FAILED(rv)) return rv; // Give the WebBrowser a pointer to the embedding component which // implements the callback interfaces. Replace 'this' with // an appropriate object... rv = webBrowser->SetContainerWindow((nsIWebBrowser
Chrome*)this); if (NS_FAILED(rv)) return rv; baseWindow = do_QueryInterface(webBrowser); // Initialize the WebBrowser with a native parent window // (ie. HWND on Win32). Replace 'nativeWindow' with a // reference to an appropriate native resource... rv = baseWindow->InitWindow(nativeWindow, // Native window nsnull, // Alw...
... Interface definition: nsIRequest.idl nsIWebBrowser This is the primary interface to the WebBrowser component. Interface status... being reviewed Interface definition: nsIWebBrowser.idl nsIWebBrowserSetup This interface is used to enable or disable various capabilities of a nsWebBrowser instance. Interface status... being reviewed Interface definition: nsIWebBrowserSetup.idl nsIWebBrowser
Chrome This interface provides access to the window containing an nsWebBrowser instance. Interface status... being reviewed Interface definition: nsIWebBrowser
Chrome.idl nsIWebNavigation This interface exposes the web navigation functionality of the nsWebBrowser component. Interface status... being reviewed Interface definition: nsIWebNavigation.idl nsIWebBrowserPersist This interface exposes the ...
Embedding the editor
nctionality, be able to have any number of <editor>s per window, and control whether those <editor>s are in HTML or plain text mode. Composer embedded in a native application In this application, the <iframe> on which the editor lives is embedded directly in the native application; this is equivalent to embedding the browser via nsIWebBrowser, but instead having an editable document. The composer
chrome (toolbars etc) may be implemented by the embedder using native widgets, or using some amount of XUL. That
chrome needs to be configurable - dockable floating toolbars, toolbar shared between composer widgets, or 1 per widget. This type of embedding requires that the composer code is agnostic to where its UI is coming from; communication between the core editor and the UI needs to go through one o...
...t the embedding applications above can be fulfilled, and these changes will need to address the current problems. Briefly, the embedding objectives are: <editor> should get you a working editor in a XUL application Should be able to have multiple <editor>s per XUL window Should be able to embed an editable content frame in a native application Embedders should be able to supply their own
chrome (toolbars etc). Meeting these objectives will also solve the following existing composer problems: Composer should handle frameset documents Composer should handle documents with <iframe>s. Composer shouldn't rely on certain XUL document structure Proposed solutions Fixing editor rooting As described above, editor rooting needs to be changed so that an editor lives on top of an nsDocShel...
...etween editors update the window's notion of the "current" editor. If we continue to use window.editorShell, then this needs to be updated on focus changes. Ensure that each editor is properly constructed on window setup, and torn down on window destruction. Ensure that window close tests (e.g. calling window.tryToClose) appropriately consult each editor for state. Insulating editor from the
chrome Composer needs to not know anything about the UI that is driving it. The plan is to insulate Composer from the UI via a new interface that the embedder implements. Any UI that is now thrown up by Composer should go through this interface. Use a new interface, nsIEditorUserInterface, to mediate communication between the editor and the UI. An embedder would need to implement this to get native t...
Using workers in JavaScript code modules
You can do so by using
ChromeWorker instead of the standard Worker object. It works exactly like a standard Worker, except that it has access to js-ctypes via a global ctypes object available in the global scope of the worker Obsolete since Gecko 8.0 (Firefox 8.0 / Thunderbird 8.0 / SeaMonkey 2.5)This feature is obsolete. Although it may still work in some browsers, its use is discouraged since it could be removed at any time. Try to avoid using it. Note: As of Gecko 8.0, the nsIWorkerFactory interface has been removed Starting in Gecko 2.0 (Firefox 4 / Thunderbird 3.3 / SeaMonkey 2.1), you can use workers in JavaScript code modules (JSMs). This lets you run code in a separate thread from your JSM. ...
...Although it may still work in some browsers, its use is discouraged since it could be removed at any time. Try to avoid using it. Note: As of Gecko 8.0, the nsIWorkerFactory interface has been removed Starting in Gecko 2.0 (Firefox 4 / Thunderbird 3.3 / SeaMonkey 2.1), you can use workers in JavaScript code modules (JSMs). This lets you run code in a separate thread from your JSM. ...
... can use workers in JavaScript code modules (JSMs). This lets you run code in a separate thread from your JSM. To create a
ChromeWorker for this purpose, you need to use the nsIWorkerFactory interface: var workerFactory = Components.classes['@mozilla.org/threads/workerfactory;1'] .createInstance(Components.interfaces.nsIWorkerFactory); var worker = workerFactory.new
ChromeWorker('script_url.js'); This will create a new
chrome worker that will immediately begin to run the script at the specified URL (in this case, "script_url.js"). For example, "script_url.js" can be "
chrome://extension_name/content/script.js". ...
WebRequest.jsm
stages of making an HTTP request. The event listener receives detailed information about the request, and can modify or cancel the request. You can use this API to implement a content policy in an add-on (for example, an ad or script blocker), as you could using nsIContentPolicy. More generally, you can also use this API instead of HTTP request observers. You can use WebRequest.jsm in either the
chrome or content processes. The WebRequest API is modeled on
Chrome's webRequest extension API, which makes it easier to write cross-browser add-on code. There are some differences between this API and
Chrome's, though: see
Chrome incompatibilities for the details. Usage To import WebRequest, use code like: let {WebRequest} = Cu.import("resource://gre/modules/WebRequest.jsm", {}); The WebRequest o...
...We're working on addressing them, though. filtering by windowId and tabId is not supported. the onAuthRequired, onBeforeRedirect, and onErrorOccurred events are not supported. the "requestBody" instruction in opt_extraInfoSpec is not supported. redirection is not allowed in onBe...
... "image" "object" "xmlhttprequest" HTTP headers HTTPs headers are represented as objects with two properties, name and value: Name Type Description name String Header name, for example "Content-Type" value String Header value, for example "image/png"
Chrome incompatibilities Although this API is modeled on
Chrome's webRequest extension API, there are some differences. We're working on addressing them, though. filtering by windowId and tabId is not supported. the onAuthRequired, onBeforeRedirect, and onErrorOccurred events are not supported. the "requestBody" instruction in opt_extraInfoSpec is not supported. redirection is not allowed in onBeforeRequest or onHeadersReceived, but is allowed in onBefo...
Application Translation with Mercurial
t follows below as list of missing texts. The first line shows the locale for which the texts are being translated (in this example: de - German). With the second line start the file paths of the files which require changes. The file paths follow the directory structure of the locale repository downloaded for translation. ...
...e folder browser/
chrome/browser/. The text striked through are texts which have been removed in the English version and can also be removed from the locale being worked on. In this example we will translate the one new text with the id privatebrowsingpage.howToStart4 in the file aboutPrivateBrowsing.dtd. Tips for finding files with usually easily translateable texts: Look for files in browser/
chrome/browser/ Look for a file with only a few changes Suggestions Files starting with about... Files in the preferences directory (browser/
chrome/browser/preferences/) The browser.dtd and browser.properties files if there aren't too many new strings. Tracking the translation progress If you translate more than a few strings, you usually want to keep track of what has already been...
...you make against the localization repository by telling it that with the qnew subcommand to save these changes as patch in a mercurial queue. This patch needs a name, choose something meaning full like "Firefox-<version number>-more-details". In this example, Firefox-29-aboutPrivateBrowsing will be used. hg qnew Firefox-29-aboutPrivateBrowsing Switch back to WinMerge and navigate to browser/
chrome/browser/ and open the aboutPrivateBrowsing.dtd file. You will see something like this: On the left, you see an overview of the comparison of the English and the non-English file. Gray parts indicate blocks of texts which can't be found in that file, dark yellow represents changed lines and light yellow the parts of text in it which is different. Below the license header which should never c...
Localizing with Mozilla Translator
ationNames.properties |-- autoconfig | `-- autoconfig.properties |-- cookie | |-- cookieAcceptDialog.dtd | `-- cookieAcceptDialog.properties |-- global | |-- about.dtd | |-- appPicker.dtd . . but in the CVS and mozilla-central repositories the locale part looks like this: toolkit |-- locales | |-- en-US | | |--
chrome | | | |-- alerts | | | | `-- notificationNames.properties | | | |-- autoconfig | | | | `-- autoconfig.properties | | | |-- cookie | | | | |-- cookieAcceptDialog.dtd | | | | `-- cookieAcceptDialog.properties | | | |-- global | | | | |-- about.dtd | | | | |-- appPicker.dtd . . browser |-- locales |...
...ficationNames.properties | | | |-- autoconfig | | | | `-- autoconfig.properties | | | |-- cookie | | | | |-- cookieAcceptDialog.dtd | | | | `-- cookieAcceptDialog.properties | | | |-- global | | | | |-- about.dtd | | | | |-- appPicker.dtd . . ...
... | | | |-- global | | | | |-- about.dtd | | | | |-- appPicker.dtd . . browser |-- locales | |-- en-US | | |-- README.txt | | |--
chrome | | | |-- branding | | | | |-- brand.dtd | | | | `-- brand.properties | | | |-- browser | | | | |-- aboutDialog.dtd As you see, there is ''link'' point, usually at
chrome (in CVS & mozilla-central), sometimes in a deeper point. For instance, '''toolkit/locales/
chrome''' in mozilla-central matches '''locale/en-US''' and '''browser/locales/
chrome''' matches '''locale/browser'''. So, what you have to do is export partial glossaries in each link point of the ''old'' product and import them in the corresponding link point of the ''new'' point. Your Keep Original and F...
Localization technical reviews
ill be discussed in productization bugs filed for each locale. Search plugins Similar to the region.properties files, the list.txt file should be reverted to en-US and amended accordingly as the search plugin productization bugs are completed. For this initial review, all XML files should be removed. ...
...For this review, we look at this file to make sure that the access keys look normal. If they don't, we report any strange access keys or translations that localizers might have changed during their initial translation process. For more info about access keys in the technical review process, see bug 421893. ...
...sure that the access keys look normal. If they don't, we report any strange access keys or translations that localizers might have changed during their initial translation process. For more info about access keys in the technical review process, see bug 421893. No UTF-7 in the intl.properties file Firefox no longer has a UTF-7 parser. There should not be any UTF-7 encodings in the file toolkit/
chrome/global/intl.properties. For more info about UTF-7 in Firefox, see bug 441876. More intl.properties checkpoints, cont We also check the plural rule for the locale, that the general.useragent.locale is set to the locale code, that accept-lang shows the locale code(s) (like ab, ab-CD,...) and is followed by en and en-US, and finally that intl.menuitems.insertseparatorbeforeaccesskeys = true, wher...
about:memory
| | | +---1.48 MB (00.77%) -- (2 tiny) | | | | +--1.43 MB (00.75%) ++ dom | | | | +--0.05 MB (00.02%) -- property-tables | | | +---9.61 MB (05.01%) ++ (18 tiny) | | +---4.39 MB (02.29%) -- js-zone(0x7f69425b5800) | +--15.75 MB (08.21%) ++ top(http://techcrunch.com/, id=20) | +--12.85 MB (06.69%) ++ top(http://arstechnica.com/, id=14) | +---6.40 MB (03.33%) ++ top(
chrome://browser/content/browser.xul, id=3) | +---3.59 MB (01.87%) ++ (4 tiny) +---45.74 MB (23.84%) ++ js-non-window +---33.73 MB (17.58%) -- heap-unclassified +---22.51 MB (11.73%) ++ heap-overhead +----6.62 MB (03.45%) ++ images +----5.82 MB (03.03%) ++ workers/workers(
chrome) +----5.36 MB (02.80%) ++ (16 tiny) +----4.07 MB (02.12%) ++ storage +----2.74 MB (01.43%) ++ startup-cache +----2.16 MB (01...
...re are various things worth pointing out. This "explicit" value at the root of the tree represents all the memory allocated via explicit calls to allocation functions. The "window-objects" sub-tree represents all JavaScript window objects, which includes the browser tabs and UI windows. For example, the "top(http://edition.cnn.com/, id=8)" sub-tree represents the tab open to cnn.com, and "top(
chrome://browser/content/browser.xul, id=3)" represents the main browser UI window. Within each window's measurements are sub-trees for JavaScript ("js-compartment(...)" and "js-zone(...)"), layout, style-sheets, the DOM, and other things. It's clear that the cnn.com tab is using more memory than the techcrunch.com tab, which is using more than the arstechnica.com tab. Sub-trees with names like "(2 t...
...r8.new/extensions/%7Bd10d0bf8-f5b5-c8b4-a8b2-2b9879e08c5d%7D.xpi!/bootstrap.js (from: resource://gre/modules/addons/XPIProvider.jsm:4307)) | +--11,583,312 B (01.20%) ++ jid1-xUfzOsOFlzSOXg@jetpack/js-non-window/zones/zone(0x100496800) | +---5,574,608 B (00.58%) -- {59c81df5-4b7a-477b-912d-4e0fdf64e5f2} | | +--5,529,280 B (00.57%) -- window-objects | | | +--4,175,584 B (00.43%) ++ top(
chrome://chatzilla/content/chatzilla.xul, id=4293) | | | +--1,353,696 B (00.14%) ++ top(
chrome://chatzilla/content/output-window.html, id=4298) | | +-----45,328 B (00.00%) ++ js-non-window/zones/zone(0x100496800)/compartment([System Principal], file:///Users/njn/Library/Application%20Support/Firefox/Profiles/puna0zr8.new/extensions/%7B59c81df5-4b7a-477b-912d-4e0fdf64e5f2%7D/components/chatzilla...
SavedFrame
tails are shared across many younger frames. SavedFrame stacks should generally be captured, allocated, and live within the compartment that is being observed or debugged. Usually this is a content compartment. Capturing SavedFrame Stacks From C++ Use JS::CaptureCurrentStack declared in jsapi.h. From JS Use saveStack, accessible via Components.utils.getJSTestingFunction(). Including and Excluding
Chrome Frames Consider the following SavedFrame stack. Arrows represent links from child to parent frame, content.js is from a compartment with content principals, and
chrome.js is from a compartment with
chrome principals. function A from content.js | V function B from
chrome.js | V function C from content.js The content compartment will ever have one vie...
...To view everything, use an XrayWrapper. This is the default wrapper. ...
...To view everything, use an XrayWrapper. This is the default wrapper. ...
Embedded Dialog API
nitializeWindowCreator (lxr link accurate at revision 1.20 of that file; search for the method name in later revisions). Gecko uses nsIWindowCreator to create all new windows for which no explicit override (the advanced API) has been given, and for browser windows in general. The precise appearance and contents of the new window are defined by the application, though the app should conform to the
chromeFlags parameter of nsIWindowCreator::create
ChromeWindow. This flag requests the presence or absence of particular features in the window surrounding the browser; features such as a toolbar or menubar. The nsIWebBrowser
Chrome::
CHROME_OPENAS_
CHROME flag deserves special mention. A content window (the
chrome flag is 0) is a browser window. The application should respond with whatever kind of window i...
...This is the kind of window used by Gecko to display XUL dialogs. ...
...This is the kind of window used by Gecko to display XUL dialogs. ...
Making cross-thread calls using runnables
However, it may be useful for C++ code in the Mozilla platform to run tasks on another thread. Typically, thread activities are triggered and managed using an XPCOM event-passing framework that uses the nsIRunnable interface. Each runnable represents a task which can then be dispatched to another thread for execution. Note: JavaScript code cannot use the techniques described in this article.
Chrome JavaScript should instead use workers. In general, threading and message passing should be asynchronous. ...
...d. However, it may be useful for C++ code in the Mozilla platform to run tasks on another thread. Typically, thread activities are triggered and managed using an XPCOM event-passing framework that uses the nsIRunnable interface. Each runnable represents a task which can then be dispatched to another thread for execution. Note: JavaScript code cannot use the techniques described in this article.
Chrome JavaScript should instead use workers. In general, threading and message passing should be asynchronous. For example, let's say we have a function, CalculatePi(int digits), which will calculate ? to an arbitrary number of digits: void CalculatePi(int digits, nsCString& result); // This is synchronous This can take a while, so we don't want to run this on the main thread. Instead, we want to run ...
...mythread)); if (NS_FAILED(rv)) { // In case of failure, call back immediately with an empty string which indicates failure callback(EmptyCString()); return; } nsCOMPtr<nsIRunnable> r = new PiCalculateTask(callback, digits); mythread->Dispatch(r, nsIEventTarget::DISPATCH_NORMAL); // The result callback will shut down the worker thread, we can let it go here... } See also
ChromeWorker Using workers in JavaScript code modules The Thread Manager ...
Components.utils.waiveXrays
The object for which we wish to waive Xrays. Returns If the argument obj is an Xray, this function returns a wrapper that transitively waives Xray behavior on the underlying object and anything that comes off the object. If obj is not an Xray, this function just returns obj. ...
...this function returns a wrapper that transitively waives Xray behavior on the underlying object and anything that comes off the object. If obj is not an Xray, this function just returns obj. ...
...itively waives Xray behavior on the underlying object and anything that comes off the object. If obj is not an Xray, this function just returns obj. ...
nsIProcessScriptLoader
ager. Methods void loadProcessScript(in AString aURL, in boolean aAllowDelayedLoad) void removeDelayedProcessScript(in AString aURL); jsval getDelayedProcessScripts(); loadProcessScript() Load a script in the child process. Process scripts are loaded as soon as loadProcessScript() is called. ...
...() is called. If this function is called on a
ChromeMessageBroadcaster, : it will load the process script into all child processes. if aAllowDelayedLoad is true, then the script will also be loaded into any new child processes created after the loadProcessScript() call. Otherwise it will only be loaded into child processes that exist at the time of the call. If this function is called on a
ChromeMessageSender: it will load the process script only into this
ChromeMessageSender's child process aAllowDelayedLoad should always be true. It's possible that the child process for this
ChromeMessageSender is not yet available at the time of the loadProcessScript() call, and if you pass false in this situation, your process script won't be loaded. For example: let ppmm = Services.ppmm.getChi...
...ad Boolean If this flag is false, the process script will only be loaded into child processes that are already running at the time of the call. If this flag is true, the process script will be loaded into any new child processes created after the loadProcessScript() call, until removeDelayedProcessScript() is called for that script. If you are calling loadProcessScript() on a
ChromeMessageSender, you should always pass true here. removeDelayedProcessScript() Removes aURL from the list of scripts which support delayed load. This cancels the effect of the aAllowDelayedLoad flag, meaning that the loader will no longer load the script into new child processes. If you used aAllowDelayedLoad, you should call this as part of your cleanup (for example, when your add-on ...
nsIWindowMediator
<window> or <dialog>. Browser windows have a window type of navigator:browser. To search all windows, regardless of their type, pass an empty string, "". Getting most recent window The following code is useful when you need any of the windows of given type, or to check if a window of a particular type (for example your extension's Options dialog) is already open. getMostRecentWindow returns a
ChromeWindow object, or null, if there are no windows of a given type open. var wm = Components.classes["@mozilla.org/appshell/window-mediator;1"] .getService(Components.interfaces.nsIWindowMediator); var win = wm.getMostRecentWindow(type); Changing an nsIDOMWindow to an nsIXULWindow If you need an nsIXULWindow, you should use getXULWindowEnumerator(). However, if you are looking ...
...ample, you could use it in the "OK" handler of your Options dialog to apply the new settings to each open browser window. var wm = Components.classes["@mozilla.org/appshell/window-mediator;1"] .getService(Components.interfaces.nsIWindowMediator); var enumerator = wm.getEnumerator(type); while(enumerator.hasMoreElements()) { var win = enumerator.getNext(); // win is [Object
ChromeWindow] (just like window), do something with it } This code iterates over all windows of the specified type, where type you specify is the window type. If, for example, you wish to enumerate all browser windows, you would specify "navigator:browser". If you want to enumerate all windows regardless of type, specify null. Note: In nsIWindowMediator's reference page the return type of getMostRece...
...ow type. If, for example, you wish to enumerate all browser windows, you would specify "navigator:browser". If you want to enumerate all windows regardless of type, specify null. Note: In nsIWindowMediator's reference page the return type of getMostRecentWindow and the type of enumerator's elements is said to be nsIDOMWindow/nsIDOMWindowInternal. In fact, those methods usually (always?) return a
ChromeWindow object, implementing both of those interfaces and a few others, when called from JavaScript code. The global window object you're probably familiar with is of
ChromeWindow type. See also Working with windows in
chrome code ...
XPCOM Interface Reference
treamnsIBlocklistPromptnsIBlocklistServicensIBoxObjectnsIBrowserBoxObjectnsIBrowserHistorynsIBrowserSearchServicensICRLInfonsICRLManagernsICachensICacheDeviceInfonsICacheEntryDescriptornsICacheEntryInfonsICacheListenernsICacheMetaDataVisitornsICacheServicensICacheSessionnsICacheVisitornsICachingChannelnsICancelablensICategoryManagernsIChannelnsIChannelEventSinknsIChannelPolicynsICharsetResolvernsI
ChromeFrameMessageManagernsI
ChromeRegistrynsIClassInfonsIClipboardnsIClipboardCommandsnsIClipboardDragDropHookListnsIClipboardDragDropHooksnsIClipboardHelpernsIClipboardOwnernsICollectionnsICommandControllernsICommandLinensICommandLineHandlernsICommandLineRunnernsIComponentManagernsIComponentRegistrarnsICompositionStringSynthesizernsIConsoleListenernsIConsoleMessagensIConsoleServicensIContainerBoxObject...
...nsIConverterOutputStreamnsICookiensICookie2nsICookieAcceptDialognsICookieConsentnsICookieManagernsICookieManager2nsICookiePermissionnsICookiePromptServicensICookieServicensICookieStoragensICrashReporternsICryptoHMACnsICryptoHashnsICurrentCharsetListenernsICycleCollectorListenernsIDBChangeListenernsIDBFolderInfonsIDNSListenernsIDNSRecordnsIDNSRequestnsIDNSServicensIDOMCanvasRenderingContext2DnsIDOM
ChromeWindownsIDOMClientRectnsIDOMDesktopNotificationnsIDOMDesktopNotificationCenternsIDOMElementnsIDOMEventnsIDOMEventGroupnsIDOMEventListenernsIDOMEventTargetnsIDOMFilensIDOMFileErrornsIDOMFileExceptionnsIDOMFileListnsIDOMFileReadernsIDOMFontFacensIDOMFontFaceListnsIDOMGeoGeolocationnsIDOMGeoPositionnsIDOMGeoPositionAddressnsIDOMGeoPositionCallbacknsIDOMGeoPositionCoordsnsIDOMGeoPositionErrornsIDOMGeo...
...IFixupnsIURIFixupInfonsIURLnsIURLFormatternsIURLParsernsIUTF8ConverterServicensIUTF8StringEnumeratornsIUUIDGeneratornsIUpdatensIUpdateCheckListenernsIUpdateCheckernsIUpdateItemnsIUpdateManagernsIUpdatePatchnsIUpdatePromptnsIUpdateTimerManagernsIUploadChannelnsIUploadChannel2nsIUrlListManagerCallbacknsIUserCertPickernsIUserInfonsIVariantnsIVersionComparatornsIWeakReferencensIWebBrowsernsIWebBrowser
ChromensIWebBrowser
Chrome2nsIWebBrowser
Chrome3nsIWebBrowser
ChromeFocusnsIWebBrowserFindnsIWebBrowserFindInFramesnsIWebBrowserPersistnsIWebContentHandlerRegistrarnsIWebNavigationnsIWebNavigationInfonsIWebPageDescriptornsIWebProgressnsIWebProgressListenernsIWebProgressListener2nsIWebSocketChannelnsIWebSocketListenernsIWebappsSupportnsIWifiAccessPointnsIWifiListenernsIWifiMonitornsIWinAccessNodensIWinAppHe...
XPCOM Interface Reference by grouping
onsoleListener nsIConsoleMessage nsIConsoleService Document nsIDocShell DOM Device nsIDOMGeoGeolocation nsIDOMGeoPosition nsIDOMGeoPositionAddress nsIDOMGeoPositionCallback nsIDOMGeoPositionCoords nsIDOMGeoPositionError nsIDOMGeoPositionErrorCallback nsIDOMGeoPositionOptions nsIDOMGlobalPropertyInitializer Element nsIDOM
ChromeWindow nsIDOMClientRect nsIDOMElement nsIDOMHTMLAudioElement nsIDOMHTMLFormElement nsIDOMHTMLMediaElement nsIDOMHTMLSourceElement nsIDOMHTMLTimeRanges nsIDOMJSWindow nsIDOMNode nsIDOMNSHTMLDocument nsIDOMStorageItem nsIDOMStorageManager nsIDOMWindow nsIDOMWindow2 nsIDOMWindowInternal nsIDOMWindowUtils nsIDynamicContainer nsIEd...
...sagePort nsIWorkerScope Tree nsITreeBoxObject nsITreeColumn nsITreeColumns nsITreeContentView nsITreeSelection nsITreeView Xform nsIXFormsModelElement nsIXFormsNSInstanceElement nsIXFormsNSModelElement XMLHttpRequest nsIXMLHttpRequestEventTarget FavIcon nsIFaviconDataCallback nsIFaviconService Frame nsI
ChromeFrameMessageManager nsIFrameLoader nsIFrameLoaderOwner nsIFrameMessageListener nsIFrameMessageManager Interface nsIJSXMLHttpRequest Jetpack nsIJetpack nsIJetpackService offlineStorage nsIApplicationCache nsIApplicationCacheChannel nsIApplicationCacheContainer nsIApplicationCacheNamespace nsIApplicationCacheService Places ...
... nsIWebBrowser nsIWebBrowserPersist Cache nsICache nsICacheDeviceInfo nsICacheEntryDescriptor nsICacheEntryInfo nsICacheListener nsICacheMetaDataVisitor nsICacheService nsICacheSession nsICacheVisitor nsICachingChannel nsISelectionImageService
Chrome nsISearchEngine nsISearchSubmission nsIWebBrowser
Chrome nsIWindowCreator nsIWindowMediator nsIWindowWatcher Clipboard nsIClipboard nsIClipboardCommands nsIClipboardDragDropHookList nsIClipboardDragDropHooks nsIClipboardHelper nsIClipboardOwner Core ...
Thunderbird Configuration Files
to change its value. To do add a new preference, open the context menu (right-click) on any existing preference, go to the New menu, and select the type of preference. Some preferences may require that you restart Thunderbird in order to take effect. Configuration Files Some tips and tricks require that you edit configuration files manually. There are three files you should know about: user
Chrome.css Used to change the appearance of the browser. userContent.css Used to change the appearance of web pages. user.js Used to change various preferences. All these files are plain text files you need to create in your profile folder and can be edited using a standard text editor, such as Notepad on Windows and gedit or kate on Linux. Locate your profile folder Before the configuration fi...
...ngs\[User Name]\Application Data on Windows XP/2000, C:\users\[User Name]\AppData\Roaming on Windows Vista. Thunderbird is capable of handling more than one user and thus, more than one profile. The path examples above refers to the default profile that is automatically created when you start Thunderbird for the first time. You can manage any number of profiles by using the Profile Manager. user
Chrome.css This file sets the display rules for various elements in the Thunderbird user interface and is located in the sub-folder called
chrome in your profile folder. This folder does not exist by default, so you need to create it before you can start adding your preferences. userContent.css This file sets the display rules for web content and is located in the sub-folder called
chrome in your pro...
...display rules for various elements in the Thunderbird user interface and is located in the sub-folder called
chrome in your profile folder. This folder does not exist by default, so you need to create it before you can start adding your preferences. userContent.css This file sets the display rules for web content and is located in the sub-folder called
chrome in your profile folder. As with user
Chrome.css, this folder does not exist by default, so you need to create it before you can start adding your preferences. user.js This is the additional preferences file for Thunderbird and is located in your profile folder. The file does not exist by default, so you need to create it before you can start adding your preferences. In almost all cases, edits made using the user.js can be done via the Co...
Add Option to Context Menu
Assuming this on
chrome.manifest: overlay
chrome://messenger/content/mailWindowOverlay.xul
chrome://myext/content/thunderbird-overlay.xul Add the next in thunderbird-overlay.xul. For Thunderbird 2 <?xml version="1.0"?> <overlay id="sample" xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"> <menupopup id="messagePaneContext"> <menuitem id="my_option" label="My option concise and cool label" oncommand="alert('Hi')"/> </menupopup> </overlay> For Thunderbird 3 <?xml version="1.0"?> <overlay id="sample" xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"> <popup id="mailContext"> <menuitem id="my_option" label="My option concise a...
...eper/there.is.only.xul"> <popup id="mailContext"> <menuitem id="my_option" label="My option concise and cool label" oncommand="alert('Hi')"/> </popup> </overlay> For Thunderbird 2 and 3 in the same XPI If our extension needs to support Thunderbird 2 and 3 we need to make custom overlays for each version. This can be reached by adding these lines to the
chrome.manifest file: overlay
chrome://messenger/content/mailWindowOverlay.xul
chrome://myaddon/content/tbOverlay-tb2.xul appversion<3.0 overlay
chrome://messenger/content/mailWindowOverlay.xul
chrome://myaddon/content/tbOverlay-tb3.xul appversion=>3.0 Than we need two overlay XUL files with content from examples above. Note: If our extension supports more Mozilla applications (for example Mozilla Fi...
... ...
Mozilla
version from the most recent cache group containing the entry under the URL or a matching namespace. Benchmarking Debug builds (--enable-debug) and non-optimized builds (--disable-optimize) are much slower. Any performance metrics gathered by such builds are largely unrelated to what would be found in a release browser. Browser
chrome tests The browser
chrome test suite is an automated testing framework designed to allow testing of application
chrome windows using JavaScript. It currently allows you to run JavaScript code in the same scope as the main Firefox browser window and report results using the same functions as the Mochitest test framework. As all tests, they won't work in a build w...
... 1. Compile a recent version of LLVM & Clang. C++ portability guide This document has migrated to Using C++ in Mozilla code. Choosing the right memory allocator There are a lot of different memory allocators in the Mozilla source tree. This article looks over some of them and tries to sort out which should be used under what circumstances.
Chrome registration
Chrome is the set of user interface elements of the application window that are outside the window's content area. Toolbars, menu bars, progress bars, and window title bars are all examples of elements that are typically part of the
chrome. Command line options Command line options are used to specify ...
...eviations from the specification that may exist in Mozilla code. WebIDL bindings The WebIDL bindings are generated at build time based on two things: the actual WebIDL file and a configuration file that lists some metadata about how the WebIDL should be reflected into Gecko-internal code. Working with windows in
chrome code This article describes working with multiple windows in Mozilla
chrome code (XUL applications and Extensions). It contains tips and example code on opening new windows, finding an already opened window, and passing data between different windows. XMLHttpRequest changes for Gecko1.8 This document describes some of the...
Access debugging in add-ons - Firefox Developer Tools
We are planning to deprecate the use by Firefox add-ons of the techniques described in this document. Don't write new add-ons that use these techniques. The following items are accessible in the context of
chrome://browser/content/debugger.xul (or, in version 23 beta,
chrome://browser/content/devtools/debugger.xul): window.addEventListener("Debugger:EditorLoaded") - called when the read-only script panel loaded. ...
...cument. Don't write new add-ons that use these techniques. The following items are accessible in the context of
chrome://browser/content/debugger.xul (or, in version 23 beta,
chrome://browser/content/devtools/debugger.xul): window.addEventListener("Debugger:EditorLoaded") - called when the read-only script panel loaded. ...
... The following items are accessible in the context of
chrome://browser/content/debugger.xul (or, in version 23 beta,
chrome://browser/content/devtools/debugger.xul): window.addEventListener("Debugger:EditorLoaded") - called when the read-only script panel loaded. window.addEventListener("Debugger:EditorUnloaded") Relevant files:
chrome://browser/content/devtools/debugger-controller.js
chrome://browser/content/devtools/debugger-toolbar.js
chrome://browser/content/devtools/debugger-view.js
chrome://browser/content/devtools/debugger-panes.js Unfortunately there is not yet any API to evaluate watches/expressions within the debugged scope, or highlight elements on the page that are referenced as variables in the debugged scope. (currently a work in progress, see bug 653545.) ...
Debugger - Firefox Developer Tools
er method should return a resumption value specifying how the debuggee's execution should proceed. However, note that a { return:value } resumption value is treated like undefined ("continue normally");value is ignored. (Allowing the handler to substitute its own value for the new global object doesn't seem useful.) This handler method is only available to debuggers running in privileged code ("
chrome", in Firefox). Most functions provided by this Debugger API observe activity in only those globals that are reachable by the API's user, thus imposing capability-based restrictions on a Debugger's reach. However, the onNewGlobalObject method allows the API user to monitor all global object creation that occurs anywhere within the JavaScript system (the "JSRuntime", in SpiderMonkey terms), thereby...
...ebuggee, but adds all the global objects from all compartments to this Debugger instance's set of debuggees. Note that it skips this debugger's compartment. If this debugger is tracking allocation sites and cannot track allocation sites for some global, this method throws an Error. Otherwise this method returns undefined. This method is only available to debuggers running in privileged code ("
chrome", in Firefox). Most functions provided by this Debugger API observe activity in only those globals that are reachable by the API's user, thus imposing capability-based restrictions on a Debugger's reach. However, the addAllGlobalsAsDebuggees method allows the API user to monitor all global object creation that occurs anywhere within the JavaScript system (the "JSRuntime", in SpiderMonkey terms), ...
... the JavaScript implementation. The array may include Debugger.Object instances referring to global objects that are not actually reachable by the debuggee or any other code in the system. (Naturally, once the function has returned, the array's Debugger.Object instances strongly reference the globals they refer to.) This handler method is only available to debuggers running in privileged code ("
chrome", in Firefox). Most functions provided by this Debugger API observe activity in only those globals that are reachable by the API's user, thus imposing capability-based restrictions on a Debugger's reach. However, findAllGlobals allows the API user to find all global objects anywhere within the JavaScript system (the "JSRuntime", in SpiderMonkey terms), thereby escaping the capability-based limits...
about:debugging (before Firefox 68) - Firefox Developer Tools
g" box. If you click "Debug", you'll see a dialog asking you to accept an incoming connection. Click "OK", and the Add-on Debugger will start in a separate window. Note that sometimes the debugger window is hidden by the main Firefox window. See the page on the Add-on Debugger for all the things you can do with this tool. ...
... Loading a temporary add-on With the "Load Temporary Add-on" button you can load any sort of restartless add-on temporarily, from a directory on disk. ...
...s will become far more useful when about:debugging starts to support remote debugging, and this page can begin to list tabs available for debugging on mobile device browsers, simulators, etc. See bug 1212802 for the latest on this work. Workers The Workers page shows your workers, categorised as follows: All registered Service Workers All registered Shared Workers Other workers, including
Chrome Workers and Dedicated Workers You can connect the developer tools to each worker, and send push notifications to service workers. Service worker state From Firefox 52, the list of service workers shows the state of the service worker in its lifecycle. Three states are distinguished: "Registering": this covers all states between the service worker's initial registration, and its assuming ...
characteristic - Web APIs
Specification Status Comment Web BluetoothThe definition of 'characteristic' in that specification. Draft Initial definition. Browser Compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. DesktopMobile
ChromeEdgeFirefoxInternet ExplorerOperaSafariAndroid webview
Chrome for AndroidFirefox for AndroidOpera for AndroidSafari on iOSSamsung Internetcharacteristic Experimental
Chrome Full support 57Notes Full support 57Notes Notes macOS only. Full support 57Notes Disabled Not...
... 57Notes Full support 57Notes Notes macOS only. Full support 57Notes Disabled Notes Linux and versions of Windows earlier than 10.Disabled From version 57: this feature is behind the #enable-experimental-web-platform-features preference (needs to be set to enabled). To change preferences in
Chrome, visit
chrome://flags. Full support 70Notes Notes Windows 10.Edge Full support <=79Notes Full support <=79Notes Notes macOS only. Full support <=79Notes Disabled Notes Linux and versions of Windows earlier than 10.Disa...
... and versions of Windows earlier than 10.Disabled From version 44: this feature is behind the #enable-experimental-web-platform-features preference (needs to be set to enabled). ...
readValue() - Web APIs
Specification Status Comment Web BluetoothThe definition of 'readValue()' in that specification. Draft Initial definition. Browser Compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. DesktopMobile
ChromeEdgeFirefoxInternet ExplorerOperaSafariAndroid webview
Chrome for AndroidFirefox for AndroidOpera for AndroidSafari on iOSSamsung InternetreadValue Experimental
Chrome Full support 57Notes Full support 57Notes Notes macOS only. Full support 57Notes Disabled Notes Li...
... 57Notes Full support 57Notes Notes macOS only. Full support 57Notes Disabled Notes Linux and versions of Windows earlier than 10.Disabled From version 57: this feature is behind the #enable-experimental-web-platform-features preference (needs to be set to enabled). To change preferences in
Chrome, visit
chrome://flags. Full support 70Notes Notes Windows 10.Edge Full support <=79Notes Full support <=79Notes Notes macOS only. Full support <=79Notes Disabled Notes Linux and versions of Windows earlier than 10.Disa...
... and versions of Windows earlier than 10.Disabled From version 44: this feature is behind the #enable-experimental-web-platform-features preference (needs to be set to enabled). ...
uuid - Web APIs
ations Specification Status Comment Web BluetoothThe definition of 'uuid' in that specification. Draft Initial definition. Browser Compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. DesktopMobile
ChromeEdgeFirefoxInternet ExplorerOperaSafariAndroid webview
Chrome for AndroidFirefox for AndroidOpera for AndroidSafari on iOSSamsung Internetuuid Experimental
Chrome Full support 57Notes Full support 57Notes Notes macOS only. Full support 57Notes Disabled Notes Linux a...
... 57Notes Full support 57Notes Notes macOS only. Full support 57Notes Disabled Notes Linux and versions of Windows earlier than 10.Disabled From version 57: this feature is behind the #enable-experimental-web-platform-features preference (needs to be set to enabled). To change preferences in
Chrome, visit
chrome://flags. Full support 70Notes Notes Windows 10.Edge Full support <=79Notes Full support <=79Notes Notes macOS only. Full support <=79Notes Disabled Notes Linux and versions of Windows earlier than 10.Disa...
... and versions of Windows earlier than 10.Disabled From version 44: this feature is behind the #enable-experimental-web-platform-features preference (needs to be set to enabled). ...
value - Web APIs
tions Specification Status Comment Web BluetoothThe definition of 'value' in that specification. Draft Initial definition. Browser Compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. DesktopMobile
ChromeEdgeFirefoxInternet ExplorerOperaSafariAndroid webview
Chrome for AndroidFirefox for AndroidOpera for AndroidSafari on iOSSamsung Internetvalue Experimental
Chrome Full support 57Notes Full support 57Notes Notes macOS only. Full support 57Notes Disabled Notes Linux ...
... 57Notes Full support 57Notes Notes macOS only. Full support 57Notes Disabled Notes Linux and versions of Windows earlier than 10.Disabled From version 57: this feature is behind the #enable-experimental-web-platform-features preference (needs to be set to enabled). To change preferences in
Chrome, visit
chrome://flags. Full support 70Notes Notes Windows 10.Edge Full support <=79Notes Full support <=79Notes Notes macOS only. Full support <=79Notes Disabled Notes Linux and versions of Windows earlier than 10.Disa...
... and versions of Windows earlier than 10.Disabled From version 44: this feature is behind the #enable-experimental-web-platform-features preference (needs to be set to enabled). ...
writeValue() - Web APIs
Specification Status Comment Web BluetoothThe definition of 'writeValue()' in that specification. Draft Initial definition. Browser Compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. DesktopMobile
ChromeEdgeFirefoxInternet ExplorerOperaSafariAndroid webview
Chrome for AndroidFirefox for AndroidOpera for AndroidSafari on iOSSamsung InternetwriteValue Experimental
Chrome Full support 57Notes Full support 57Notes Notes macOS only. Full support 57Notes Disabled Notes L...
... 57Notes Full support 57Notes Notes macOS only. Full support 57Notes Disabled Notes Linux and versions of Windows earlier than 10.Disabled From version 57: this feature is behind the #enable-experimental-web-platform-features preference (needs to be set to enabled). To change preferences in
Chrome, visit
chrome://flags. Full support 70Notes Notes Windows 10.Edge Full support <=79Notes Full support <=79Notes Notes macOS only. Full support <=79Notes Disabled Notes Linux and versions of Windows earlier than 10.Disa...
... and versions of Windows earlier than 10.Disabled From version 44: this feature is behind the #enable-experimental-web-platform-features preference (needs to be set to enabled). ...
console.log() - Web APIs
aScript objects. Note: This feature is available in Web Workers. Syntax console.log(obj1 [, obj2, ..., objN]); console.log(msg [, subst1, ..., substN]); Parameters obj1 ... objN A list of JavaScript objects to output. The string representations of each of these objects are appended together in the order listed and output. Please be warned that if you log objects in the latest versions of
Chrome and Firefox what you get logged on the console is a reference to the object, which is not necessarily the 'value' of the object at the moment in time you call console.log(), but it is the value of the object at the moment you open the console. msg A JavaScript string containing zero or more substitution strings. subst1 ... substN JavaScript objects with which to replace substitution strings w...
...ings. subst1 ... substN JavaScript objects with which to replace substitution strings within msg. This gives you additional control over the format of the output. See Outputting text to the console in the documentation of console for details. Difference between log() and dir() You might ask yourself what's the difference between console.dir() and console.log(). ...
... Logging objects Don't use console.log(obj), use console.log(JSON.parse(JSON.stringify(obj))). This way you are sure you are seeing the value of obj at the moment you log it. Otherwise, many browsers provide a live view that constantly updates as values change. This may not be what you want. ...
Element: mousewheel event - Web APIs
ribute value along the vertical axis. The sign of the value is the same as the wheelDelta attribute value. Internet Explorer The value is the same as the delta value of Windows' WM_MOUSEWHEEL or WM_MOUSEHWHEEL. It means that if the mouse wheel doesn't support high resolution scroll, the value is 120 per notch. The value isn't changed even if the scroll amount of system settings is page scroll.
Chrome On Windows, the value is the same as the delta value of WM_MOUSEWHEEL or WM_MOUSEHWHEEL. And also, the value isn't changed even if the scroll amount of system settings is page scroll, i.e., the value is the same as IE on Windows. On Linux, the value is 120 or -120 per native wheel event. This makes the same behavior as IE and
Chrome for Windows. On Mac, the value is complicated. The value is c...
...he value is different from Safari. This difference makes a serious issue for web application developers. That is, web developers cannot know if mousewheel event is caused by which device. See WebInputEventFactory::mouseWheelEvent of the Chromium's source code for the detail. Safari The value is always computed from accelerated scroll amount. This is really different from other browsers except
Chrome with continuous scroll supported device. Opera (Presto) The value is always the detail attribute value ? 40. On Windows, since the detail attribute value is computed from actual scroll amount, the value is different from other browsers except the scroll amount per notch is 3 lines in system settings or a page. On Linux, the value is 80 or -80 per native wheel event. This is different from oth...
... Specifications Not part of any specification. ...
EventTarget.addEventListener() - Web APIs
tion specified by listener will never call preventDefault(). If a passive listener does call preventDefault(), the user agent will do nothing other than generate a console warning. See Improving scrolling performance with passive listeners to learn more. mozSystemGroup A Boolean indicating that the listener should be added to the system group. Available only in code running in XBL or in the
chrome of the Firefox browser. useCapture Optional A Boolean indicating whether events of this type will be dispatched to the registered listener before being dispatched to any EventTarget beneath it in the DOM tree. Events that are bubbling upward through the tree will not trigger a listener designated to use capture. Event bubbling and capturing are two ways of propagating events that occur in a...
...er all listeners on an element in the order they were registered, regardless of the useCapture parameter. Note: useCapture has not always been optional. Ideally, you should include it for the widest possible browser compatibility. wantsUntrusted A Firefox (Gecko)-specific parameter. If true, the listener receives synthetic events dispatched by web content (the default is false for browser
chrome and true for regular web pages). This parameter is useful for code found in add-ons, as well as the browser itself. Return value undefined Usage notes The event listener callback The event listener can be specified as either a callback function or an object that implements EventListener, whose handleEvent() method serves as the callback function. The callback function itself has the same p...
...g to the specification, the default value for the passive option is always false. However, this introduces the potential for event listeners handling certain touch events (among others) to block the browser's main thread while it is attempting to handle scrolling, resulting in possibly enormous reduction in performance during scroll handling. To prevent this problem, some browsers (specifically,
Chrome and Firefox) have changed the default value of the passive option to true for the touchstart and touchmove events on the document-level nodes Window, Document, and Document.body. This prevents the event listener from being called, so it can't block page rendering while the user is scrolling. Note: See the compatibility table below if you need to know which browsers (and/or which versions of tho...
Using the Gamepad API - Web APIs
axes."; gameLoop(); }); Now we use the gamepaddisconnected event to check if the gamepad is disconnected again. If so, we stop the requestAnimationFrame() loop (see below) and revert the gamepad information back to what it was originally. window.addEventListener("gamepaddisconnected", function(e) { gamepadInfo.innerHTML = "Waiting for gamepad."; cancelRequestAnimationFrame(start); });
Chrome does things differently here. Instead of constantly storing the gamepad's latest state in a variable it only stores a snapshot, so to do the same thing in
Chrome you have to keep polling it and then only use the Gamepad object in code when it is available. We have done this below using Window.setInterval(); once the object is available the gamepad info is outputted, the game loop is started, and ...
...We attempt to detect and handle both the prefixed version and the standard version of the function for backwards compatibility. var interval; if (!('ongamepadconnected' in window)) { // No gamepad events available, poll instead. ...
...erval); } } } Now on to the main game loop. In each execution of the loop we check if one of four buttons is being pressed; if so, we update the values of the a and b movement variables appropriately, then update the left and top properties, changing their values to the current values of a and b respectively. This has the effect of moving the ball around the screen. In current versions of
Chrome (version 34 as of this writing) the button values are stored as an array of double values, instead of GamepadButton objects. This is fixed in development versions. After all this is done, we use our requestAnimationFrame() to request the next animation frame, running gameLoop() again. function buttonPressed(b) { if (typeof(b) == "object") { return b.pressed; } return b == 1.0; } func...
Browser storage limits and eviction criteria - Web APIs
ace to allocate to web data storage and what to delete when that limit is reached is not simple, and differs between browsers. This article describes how browsers determine what local content to purge and when in order to free up needed local storage space. Note: The information below should be fairly accurate for most modern browsers, but browser specifics are called out where known. Opera and
Chrome should behave the same in all cases. Opera Mini (still presto-based, server-side rendering) doesn't store any data on the client. What technologies use browser data storage? In Firefox, the following technologies make use of browser data storage to store data when required. We term them "quota clients" in this context: IndexedDB asm.js caching Cache API Cookies Note: In Firefox, Web S...
...cribed in this document. Note: In private browsing mode, most data storage is not supported. Local storage data and cookies are still stored, but they are ephemeral -- the data is deleted when you close the last private browsing window. The "last access time" of origins is updated when any of these are activated/deactivated -- origin eviction will delete data for all these quota clients. In
Chrome/Opera, the Quota Management API handles quota management for AppCache, IndexedDB, WebSQL, and File System API. Different types of data storage Even in the same browser, using the same storage method, there are different classes of data storage to understand. This section discusses the different ones you might find in different browsers. Storage comes in two types: Persistent: This is data t...
...ation can continue. Note: The group limit can't be more than the global limit, despite the minimum group limit mentioned above. If you had a really low memory situation where the global limit was, say, 8 MB, then the group limit would also be 8 MB. Note: If the group limit is exceeded, or if origin eviction couldn't free enough space, the browser will throw a QuotaExceededError. Note: In
Chrome the soft and hard storage quota limits has changed since M66. More information can be found here. LRU policy When the available disk space is filled up, the quota manager will start clearing out data based on an LRU policy -- the least recently used origin will be deleted first, then the next one, until the browser is no longer over the limit. We track the "last access time" for each origin u...
Page Visibility API - Web APIs
owsers stop sending requestAnimationFrame() callbacks to background tabs or hidden <iframe>s in order to improve performance and battery life. Timers such as setTimeout() are throttled in background/inactive tabs to help improve performance. See Reasons for delays longer than specified for more details. Budget-based background timeout throttling is now available in modern browsers (Firefox 58+,
Chrome 57+), placing an additional limit on background timer CPU usage. This operates in a similar way across modern browsers, with the details being as follows: In Firefox, windows in background tabs each have their own time budget in milliseconds -- a max and a min value of +50 ms and -150 ms, respectively.
Chrome is very similar except that the budget is specified in seconds. Windows are sub...
...Firefox, windows in background tabs each have their own time budget in milliseconds -- a max and a min value of +50 ms and -150 ms, respectively.
Chrome is very similar except that the budget is specified in seconds. Windows are subjected to throttling after 30 seconds, with the same throttling delay rules as specified for window timers (again, see Reasons for delays longer than specified). In
Chrome, this value is 10 seconds. Timer tasks are only permitted when the budget is non-negative. Once a timer's code has finished running, the duration of time it took to execute is subtracted from its window's timeout budget. The budget regenerates at a rate of 10 ms per second, in both Firefox and
Chrome. Some processes are exempt from this throttling behavior. In these cases, you can...
... // This shows the paused videoElement.addEventListener("pause", function(){ document.title = 'Paused'; }, false); // When the video plays, set the title. videoEleme...
PushEvent.data - Web APIs
ons Specification Status Comment Push APIThe definition of 'data' in that specification. Working Draft Initial definition. Browser Compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...sh APIThe definition of 'data' in that specification. Working Draft Initial definition. Browser Compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. DesktopMobile
ChromeEdgeFirefoxInternet ExplorerOperaSafariAndroid webview
Chrome for AndroidFirefox for AndroidOpera for AndroidSafari on iOSSamsung Internetdata Experimental
Chrome Full support 57Edge Full support 16Disabled Full support 16Disabled Disabled From version 16: this feature is behind the Enable service workers preference. ...
... 44Notes Notes Extended Support Releases (ESR) before Firefox 78 ESR do not support service workers and the Push API.IE No support NoOpera Full support 44Safari No support NoWebView Android No support No
Chrome Android Full support 57Firefox Android Full support 44 Full support 44 Full support 48Notes Notes Push enabled by default.Opera Android Full support 43Safari iOS ...
Functions and classes available to Web Workers - Web APIs
nother global context, DedicatedWorkerGlobalScope, different from the current window. By default, methods and properties of Window are not available to them, but DedicatedWorkerGlobalScope, like Window, implements WindowTimers and WindowBase64. ...
...n WorkerGlobalScope yes, on WorkerGlobalScope no close() yes, on WorkerGlobalScope yes, on WorkerGlobalScope yes, but is a no-op. Unknown no postMessage() yes, on DedicatedWorkerGlobalScope no no Unknown no APIs available in workers Function Functionality Support in Gecko (Firefox) Support in IE Support in Blink (
Chrome and Opera) Support in WebKit (Safari) Broadcast Channel API Allows simple communication between browsing contexts (that is windows, tabs, frames, or iframes) with the same origin (usually pages from the same site). 38 (38) No support No support No support Cache Cache API provides the ability to programmatically control cache storage associated with current o...
...ce setting. In about:config, set gfx.offscreencanvas.enabled to true. No support No support No support WebSocket Creates and returns a new WebSocket object; this mimics the behavior of the standard WebSocket() constructor. 37 (37) 11.0 (Yes) (Yes) Worker Creates a new Worker. Yes, workers can spawn more workers. 3.5 (1.9.1) 10.0 Enabled since
Chrome 69 No support WorkerGlobalScope The global scope of workers. This objects defines worker-specific functions. (Yes) 10.0 (Yes) (Yes) WorkerLocation The subset of the Location interface available to workers. 3.6 (1.9.2) 10.0 (Yes) (Yes) WorkerNavigator The subset of the Navigator interface available to workers. Basic implementation (...
Window.navigator - Web APIs
s for unlisted browsers. ...
... { sBrowser = "Samsung Internet"; // "Mozilla/5.0 (Linux; Android 9; SAMSUNG SM-G955F Build/PPR1.180610.011) AppleWebKit/537.36 (KHTML, like Gecko) SamsungBrowser/9.4
Chrome/67.0.3396.87 Mobile Safari/537.36 } else if (sUsrAg.indexOf("Opera") > -1 || sUsrAg.indexOf("OPR") > -1) { sBrowser = "Opera"; // "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_0) AppleWebKit/537.36 (KHTML, like Gecko)
Chrome/70.0.3538.102 Safari/537.36 OPR/57.0.3098.106" } else if (sUsrAg.indexOf("Trident") > -1) { sBrowser = "Microsoft Internet Explorer"; // "Mozilla/5.0 (Windows NT 10.0; WOW64; Trident/7.0; .NET4.0C; .NET4.0E; Zoom 3.6.0; wbx 1.0.0; rv:11.0) like Gecko" } else if (sUsrAg.indexOf("Edge") > -1) { sBrowser = "Microsoft Edge"; // "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KH...
...fari/537.36 OPR/57.0.3098.106" } else if (sUsrAg.indexOf("Trident") > -1) { sBrowser = "Microsoft Internet Explorer"; // "Mozilla/5.0 (Windows NT 10.0; WOW64; Trident/7.0; .NET4.0C; .NET4.0E; Zoom 3.6.0; wbx 1.0.0; rv:11.0) like Gecko" } else if (sUsrAg.indexOf("Edge") > -1) { sBrowser = "Microsoft Edge"; // "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko)
Chrome/58.0.3029.110 Safari/537.36 Edge/16.16299" } else if (sUsrAg.indexOf("
Chrome") > -1) { sBrowser = "Google
Chrome or Chromium"; // "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Ubuntu Chromium/66.0.3359.181
Chrome/66.0.3359.181 Safari/537.36" } else if (sUsrAg.indexOf("Safari") > -1) { sBrowser = "Apple Safari"; // "Mozilla/5.0 (iPhone; CPU iPhone OS 11_4 like Mac...
Window - Web APIs
r overriding the prototype of built-in elements) are listed in a separate section below. Window.closed Read only This property indicates whether the current window is closed or not. Window.console Read only Returns a reference to the console object which provides access to the browser's debugging console. Window.controllers Read only Returns the XUL controller objects for the current
chrome window. Window.customElements Read only Returns a reference to the CustomElementRegistry object, which can be used to register new custom elements and get information about previously registered custom elements. Window.crypto Read only Returns the browser crypto object. Window.devicePixelRatio Read only Returns the ratio between physical pixels and device independent pixels in the curren...
...false). WindowOrWorkerGlobalScope.origin Read only Returns the global object's origin, serialized as a string. (This does not yet appear to be implemented in any browser.) Deprecated properties Window.content and Window._content Read only Returns a reference to the content element in the current window. Since Firefox 57 (initially Nightly-only), both versions are only available from
chrome (privileged) code, and not available to the web anymore. Window.defaultStatus Gets/sets the status bar text for the given window. Window.dialogArguments Read only Gets the arguments passed to the window (if it's a dialog box) at the time window.showModalDialog() was called. This is an nsIArray. Window.directories Synonym of window.personalbar Window.globalStorage Multiple stora...
...icular set of coordinates in the document. Window.setImmediate() Executes a function after the browser has finished other heavy tasks Window.setResizable() Toggles a user's ability to resize a window. Window.sizeToContent() Sizes the window according to its content. Window.stop() This method stops window loading. Window.updateCommands() Updates the state of commands of the current
chrome window (UI). Methods implemented from elsewhere EventTarget.addEventListener() Register an event handler to a specific event type on the window. EventTarget.dispatchEvent() Used to trigger an event. WindowOrWorkerGlobalScope.atob() Decodes a string of data which has been encoded using base-64 encoding. WindowOrWorkerGlobalScope.btoa() Creates a base-64 encoded ASCII string from a stri...
WindowOrWorkerGlobalScope.setTimeout() - Web APIs
. Timeouts throttled to >= 4ms In modern browsers, setTimeout()/setInterval() calls are throttled to a minimum of once every 4 ms when successive calls are triggered due to callback nesting (where the nesting level is at least a certain depth), or after certain number of successive intervals. Take this example: function cb() { f(); setTimeout(cb, 0); } setTimeout(cb, 0); setInterval(f, 0); In
Chrome and Firefox, the 5th successive callback call is clamped; Safari clamps on the 6th call; in Edge its the 3rd one. Gecko started to treat setInterval() like this in version 56 (it already did this with setTimeout(); see below). Historically some browsers implemented this throttling behaviour a bit differently (e.g. Firefox) -- on setInterval() calls made from anywhere, or when a nested setTimeout...
...imeouts was 10 ms. Timeouts in inactive tabs throttled to >= 1000ms To reduce the load (and associated battery usage) from background tabs, timeouts are throttled to firing no more often than once per second (1,000 ms) in inactive tabs. Firefox implements this behavior since version 5 (see bug 633421, the 1000ms constant can be tweaked through the dom.min_background_timeout_value preference).
Chrome implements this behavior since version 11 (crbug.com/66078). Firefox for Android uses a timeout value of 15 minutes for background tabs since bug 736602 in Firefox 14, and background tabs can also be unloaded entirely. Firefox 50 no longer throttles background tabs if a Web Audio API AudioContext is actively playing sound. Firefox 51 further amends this such that background tabs are no longer ...
...esulting execution order may not be as expected. Deferral of timeouts during pageload Starting in Firefox 66, Firefox will defer firing setTimeout and setInterval timers while the current tab is loading. Firing is deferred until the MainThread is deemed idle (similar to window.requestIdleCallback()), or until the load event is fired. Maximum delay value Browsers including Internet Explorer,
Chrome, Safari, and Firefox store the delay as a 32-bit signed integer internally. This causes an integer overflow when using delays larger than 2,147,483,647 ms (about 24.8 days), resulting in the timeout being executed immediately. Specifications Specification Status Comment HTML Living StandardThe definition of 'WindowOrWorkerGlobalScope.setTimeout()' in that specificati...
Accessibility: What users can do to browse more safely - Accessibility
work station can be set up to acommodate both a low-vision individual (needs high-contrast) and to accomodate an individual with photosensitive susceptibilities, by simply, adjusting personalization and accessiblity settings. Use modern browers. Learn personalization and accessibility settings Firefox 73 and above (Dekstop) Firefox added support for CSS prefers-reduced-motion in October 2018.
Chrome 74 and above (Desktop)
Chrome 74 added support for reduced-motion-query, it has even added support to detect whether the user has requested a reduced motion experience. The user would access this through an accessibility interface, as seen below. CSS Transition events are now supported. Examples include: transitionrun transitionstart transitionend transitioncancel Edge 75 and above (D...
...as seen below. CSS Transition events are now supported. Examples include: transitionrun transitionstart transitionend transitioncancel Edge 75 and above (Desktop, in Windows 10) According to Eric Bailey, in his April 30, 2019 article Revisiting prefers-reduced-motion, the reduced motion media query, "While Microsoft Edge does not have support for prefers-reduced-motion, it will become
Chrome under the hood soon." Safari 10.1 and above (Desktop) Do not enable Auto-Play (does not work for gifs) iOS Safari 10.3 and above (Mobile and Tablet) Select the "Reduce motion option" in OS Accessibility settings for Apple (image source: developers.google.com from Thomas Steiner's article "Move Ya! Or maybe, don't, if the user prefers-reduced-motion!"). This will not work on animated gifs; th...
...ge Zoom Turn off animated GIFs in the browser Browsers offer much power to their users; it's just a matter of knowing where to go. Using Firefox as an example, it explains that by changing the value the image.animation_mode from "normal" to "none", all animated images will be blocked. To reverse it, you will have to change the value back to "normal" Use browser extensions Gif Blocker For
Chrome, GIF Blocker is an extension available at the web store. Gif Scrubber Gif Scrubber is a
chrome extension that allows you to control gifs like a video player. There is a Github repository for it at https://github.com/0ui/gif-scrubber Beeline Reader Beeline Reader has a browser extension that allows you to set up for grayscale and Dyslexi font, among other things Take advantage Operating Sys...
CSS Grid Layout and Progressive Enhancement - CSS: Cascading Style Sheets
In Spring of 2017, we saw for the first time a major specification like Grid being shipped into browsers almost simultaneously, and we now have CSS Grid Layout support in the public versions of Firefox,
Chrome, Opera, Safari and Edge. 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. In this guide we will walk through a variety of strategies for support. The supporting browsers Other than in Internet Explorer, CSS Grid Layout is unprefixed in Safari,
Chrome, Opera, Firefox and Edge. Support for all the properties and values detailed in these guides is interoperable across browsers. This means that if you write some Grid Layout code in Fire...
...This is no longer an experimental specification, and you are safe to use it in production. ...
...n enable it with grid: true option. autoprefixer({ grid: 'autoplace' }) Grid prefixes are disabled by default because some properties can't be prefixed. Is it safe to use CSS grids for my layout? As with any front-end technology choice, the decision to use CSS Grid Layout will come down to the browsers your site visitors are typically using. If they tend to use up-to-date versions of Firefox,
Chrome, Opera, and Safari, then it would make sense to start using CSS grids once those browsers update. If your site serves a market sector that is tied to older browsers, however, it may not make sense yet. However, my suggestion is not to make assumptions based on how new specifications have been rolled out in browsers in the past. CSS Grid Layout is very different, in terms of the amount of time it ...
Using media queries - CSS: Cascading Style Sheets
reen? height Height of the viewport hover Does the primary input mechanism allow the user to hover over elements? Added in Media Queries Level 4. inverted-colors Is the user agent or underlying OS inverting colors? Added in Media Queries Level 5. light-level Light level of the environment Added in Media Queries Level 5. mono
chrome Bits per pixel in the output device's mono
chrome frame buffer, or zero if the device isn't mono
chrome orientation Orientation of the viewport overflow-block How does the output device handle content that overflows the viewport along the block axis? Added in Media Queries Level 4. overflow-inline Can content that overflows the viewport along the in...
...'s meaning The not keyword inverts the meaning of an entire media query. It will only negate the specific media query it is applied to. (Thus, it will not apply to every media query in a comma-separated list of media queries.) The not keyword can't be used to negate an individual feature query, only an entire media query. The not is evaluated last in the following query: @media not all and (mono
chrome) { ... } ... so that the above query is evaluated like this: @media not (all and (mono
chrome)) { ... } ... rather than like this: @media (not all) and (mono
chrome) { ... } As another example, the following media query: @media not screen and (color), print and (color) { ... } ... is evaluated like this: @media (not (screen and (color))), print and (color) { ... } Improving compatibilit...
...ot Using not() around a media feature negates that feature in the query. For example, not(hover) would match if the device had no hover capability: @media (not(hover)) { ... } Testing for multiple features with or You can use or to test for a match among more than one feature, resolving to true if any of the features are true. For example, the following query tests for devices that have a mono
chrome display or hover capability: @media (not (color)) or (hover) { ... } ...
object-fit - CSS: Cascading Style Sheets
orking Draft CSS Images Module Level 3The definition of 'object-fit' in that specification. Candidate Recommendation Initial definition Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...ition of 'object-fit' in that specification. Candidate Recommendation Initial definition Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. DesktopMobile
ChromeEdgeFirefoxInternet ExplorerOperaSafariAndroid webview
Chrome for AndroidFirefox for AndroidOpera for AndroidSafari on iOSSamsung Internetobject-fit
Chrome Full support 31Edge Full support 16Notes Full support 16Notes Notes Edge supports object-fit on img elements only. See Edge issue 13603873 for details.Firefox ...
... NoOpera Full support 19 Full support 19 Full support 11.6Prefixed Prefixed Implemented with the vendor prefix: -o-Safari Full support 10WebView Android Full support 4.4.3
Chrome Android Full support 31Firefox Android Full support 36Opera Android Full support 19 Full support 19 Full support 12Prefixed Prefixed Implemented with the vendor prefix: -o-Sa...
<input type="search"> - HTML: Hypertext Markup Language
rule, you should avoid using them unless it can't be helped. Attribute Description autocorrect Whether or not to allow autocorrect while editing this input field. Safari only. incremental Whether or not to send repeated search events to allow updating live search results while the user is still editing the value of the field. WebKit and Blink only (Safari,
Chrome, Opera, etc.). mozactionhint A string indicating the type of action that will be taken when the user presses the Enter or Return key while editing the field; this is used to determine an appropriate label for that key on a virtual keyboard. Firefox for Android only. results The maximum number of items that should be displayed in the drop-down list of previous search querie...
...ates whether or not to activate automatic correction while the user is editing this field. Permitted values are: on Enable automatic correction of typos, as well as processing of text substitutions if any are configured. off Disable automatic correction and text substitutions. incremental The Boolean attribute incremental is a WebKit and Blink extension (so supported by Safari, Opera,
Chrome, etc.) which, if present, tells the user agent to process the input as a live search. As the user edits the value of the field, the user agent sends search events to the HTMLInputElement object representing the search box. This allows your code to update the search results in real time as the user edits the search. If incremental is not specified, the search event is only sent when the user expl...
...he server will be q=searchterm. You must remember to set a name for your input, otherwise nothing will be submitted. Differences between search and text types The main basic differences come in the way browsers handle them. The first thing to note is that some browsers show a cross icon that can be clicked on to remove the search term instantly if desired. The following screenshot comes from
Chrome: In addition, modern browsers also tend to automatically store search terms previously entered across domains, which then come up as autocomplete options when subsequent searches are performed in search inputs on that domain. This helps users who tend to do searches on the same or similar search queries over time. This screenshot is from Firefox: At this point, let's look at some useful techn...
<input type="week"> - HTML: Hypertext Markup Language
umber during that year (i.e., week 1 to 52 or 53). The source for this interactive example is stored in a GitHub repository. If you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request. 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">. In
Chrome/Opera the week control provides slots to fill in week and year values, a pop-up calendar interface to select them more visually, and an "X" button to clear the control's value. The Edge week control is somewhat more elaborat...
...?</label> <input id="week" type="week" name="week" min="2017-W01" max="2017-W52"> <span class="validity"></span> </form> Here's the CSS used in the above example. Here we make use of the :valid and :invalid CSS properties to style the input based on whether or not the current value is valid. We had to put the icons on a <span> next to the input, not on the input itself, because in
Chrome the generated content is placed inside the form control, and can't be styled or shown effectively. div { margin-bottom: 10px; position: relative; } input[type="number"] { width: 100px; } input + span { padding-right: 30px; } input:invalid+span:after { position: absolute; content: '?'; padding-left: 5px; } input:valid+span:after { position: absolute; content: '?'; padding-...
...s mentioned above, the major problem with using week inputs right now is browser support: Safari and Firefox don't support it on desktop, and old versions of IE don't support it. Mobile platforms such as Android and iOS make really good use of such input types, providing specialist UI controls that make it really easy to select values in a touchscreen environment. For example, the week 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. The second problem is the more serious. As mentioned earlier, with a week input the actual value is always normalized to the format yyyy-Www. When the browser falls back t...
RangeError: precision is out of range - JavaScript
The JavaScript exception "precision is out of range" occurs when a number that's outside of the range of 0 and 20 (or 21) was passed into toFixed or toPrecision. ...
...r that's outside of the range of 0 and 20 (or 21) was passed into toFixed or toPrecision. Message RangeError: The number of fractional digits is out of range (Edge) RangeError: The precision is out of range (Edge) RangeError: precision {0} out of range (Firefox) RangeError: toExponential() argument must be between 0 and 20 (
Chrome) RangeError: toFixed() digits argument must be between 0 and 20 (
Chrome) RangeError: toPrecision() argument must be between 1 and 21 (
Chrome) Error type RangeError What went wrong? There was an out of range precision argument in one of these methods: Number.prototype.toExponential() Number.prototype.toFixed() Number.prototype.toPrecision() The allowed range for these methods is usually between 0 and 20 (or 21). However, the ECMAScript specification allows...
...) Error type RangeError What went wrong? There was an out of range precision argument in one of these methods: Number.prototype.toExponential() Number.prototype.toFixed() Number.prototype.toPrecision() The allowed range for these methods is usually between 0 and 20 (or 21). However, the ECMAScript specification allows to extend this range. ...
Porting the Library Detector - Archive of obsolete content
overlay adds a box element to the browser's status bar: The script does everything else. The bulk of the script is an array of test objects, one for each library. Each test object contains a function called test(): if the function finds the library, it defines various additional properties for the test object, such as a version property containing the library version. Each test also contains a
chrome:// URL pointing to the icon associated with its library. The script listens to gBrowser's DOMContentLoaded event. When this is triggered, the testLibraries() function builds an array of libraries by iterating through the tests and adding an entry for each library which passes. Once the list is built, the switchLibraries() function constructs a XUL statusbarpanel element for each library it foun...
...brary. The script listens to gBrowser's DOMContentLoaded event. When this is triggered, the testLibraries() function builds an array of libraries by iterating through the tests and adding an entry for each library which passes. Once the list is built, the switchLibraries() function constructs a XUL statusbarpanel element for each library it found, populates it with the icon at the corresponding
chrome:// URL, and adds it to the box. Finally, it listens to gBrowser's TabSelect event, to update the contents of the box for that window. Content Script Separation The test objects in the original script need access to the DOM window object, so in the SDK port, they need to run in a content script. In fact, they need access to the un-proxied DOM window, so they can see the objects added by librari...
preferences/service - Archive of obsolete content
Returns string : Localized preference value, returns a default value if no preference is set. Some preferences refer to a properties file. So that prefs.get returns the properties file URL whereas prefs.getLocalized returns the value defined in the properties file. ...
...l to "
chrome://global/locale/intl.properties" prefs.getLocalized(name) // is equal to "en-US" setLocalized(name, value) Sets the localized application preference name to value. Parameters name : string Preference name. ...
remote/parent - Archive of obsolete content
In the SDK, content scripts run in the child process, and, of course, can access web content. ...
...In the SDK, content scripts run in the child process, and, of course, can access web content. ...
ui/sidebar - Archive of obsolete content
The URL of the content to load in the sidebar. This must be a local URL (typically, loaded from the "data" folder using self.data.url()). From Firefox 34, you can use "./myFile.html" as an alias for self.data.url("myFile.html"). Optional options: Name Type id string The id of the sidebar. This used to identify this sidebar in its
chrome window. It must be unique. This option was mandatory before Firefox 28. onAttach function Listener for the sidebar's attach event. onDetach function Listener for the sidebar's detach event. onShow function Listener for the sidebar's show event. onHide function Listener for the sidebar's ...
...to listen for. listener : function The listener function that handles the event. removeListener(type, listener) Unregisters/removes an event listener from the sidebar. Parameters type : string The type of event for which listener was registered. listener : function The listener function that was registered. Properties id The id of the sidebar. This used to identify this sidebar in its
chrome window. It must be unique. title The title of the sidebar. This will be used for the label for your sidebar in the "Sidebar" submenu in Firefox, and will be shown at the top of your sidebar when it is open. url The URL of the content to load in the sidebar. This must be a local URL (typically, loaded from the "data" folder using self.data.url()). Events attach This event is emitted when a ...
HTML to DOM - Archive of obsolete content
The <div> is returned, and it is never actually appended to the current page. The returned <body> object is of type Element Here is a sample that counts the number of paragraphs in a string: var DOMPars = HTMLParser('<p>foo</p><p>bar</p>'); alert(DOMPars.getElementsByTagName('p').length); ...
...See Using a hidden iframe element to parse HTML to a window's DOM below. Parsing Complete HTML to DOM Loading an HTML document seems much simpler if it's loaded using the XMLHttpRequest object. For that matter, we're going to load our HTML document first: var request = XMLHttpRequest(); request.open("GET", "http://example.org/file.html", false); request.send(null); our next step is to crea...
Post data to window - Archive of obsolete content
ata = Cc["@mozilla.org/network/mime-input-stream;1"]. ...
...ation/x-www-form-urlencoded"); postData.addContentLength = true; postData.setData(stringStream); // postData is ready to be used as aPostData argument ... ...
Windows - Archive of obsolete content
The simplest way to do that is to use nsIWindowMediator. ...
.... var wenum = Components.classes["@mozilla.org/embedcomp/window-watcher;1"] .getService(Components.interfaces.nsIWindowWatcher) .getWindowEnumerator(); var index = 1; var windowName = "yourWindowName"; while (wenum.hasMoreElements()) { var win = wenum.getNext(); if (win.name == windowName) { win.focus(); return; } index++ } window.open("
chrome://to/your/window.xul", windowName, "features"); Uniquely identifying DOM windows Requires Gecko 2.0(Firefox 4 / Thunderbird 3.3 / SeaMonkey 2.1) In Gecko, each DOM window has a unique 64-bit ID number. You can get a DOM window's ID using the nsIDOMWindowUtils attribute outerWindowID. Each time a new window is created, it gets assigned an ID one greater than the last created window. This c...
Extension Packaging - Archive of obsolete content
Every extension must provide an install.rdf file, which contains metadata about the extension, such as its unique ID, version, author, and compatibility information. ...
...lable bundles, including extensions, themes, and XULRunner applications Extension Packaging: specific information about how to package extensions Theme Packaging: specific information about how to package themes Multiple-item Extension Packaging: specific information about multiple-item extension XPIs XUL Application Packaging: specific information about how to package XULRunner applications
Chrome Registration Printing in XUL Apps ...
Installing Extensions and Themes From Web Pages - Archive of obsolete content
d by nsICryptoHash. The hash is specified as hash function:hash value, for example, sha1:28857e60d043447c5f4550853f2d40770b326a13. toString() The toString() property should return the XPI URL, for compatibility with Firefox browsers older than version 1.0, and other applications such as Seamonkey. Themes Pretty much everything I've described applies to themes too, except you'll use the install
Chrome function. Because so many sites installed extensions by direct-linking the XPI file and relying on content handling to invoke the confirmation UI, many sites are (incorrectly) doing so for theme JAR files too and wondering why they aren't auto-detected and installed. Well, XPI is a Mozilla-specific extension and so we can have special handling for it, but JAR is not - not all .jar files are Firef...
...nstallTrigger exposes a function called updateEnabled that some of you may be calling before you call InstallTrigger.install. This is not necessary as install calls updateEnabled itself internally. Furthermore, calling updateEnabled may lead to problems if your distribution site is not in the user's whitelist, because Firefox only displays the "Installation Blocked" message when install or install
Chrome are called, or when a XPI file is loaded. So, if you have code that looks like this: if (InstallTrigger.updateEnabled()) InstallTrigger.install({"Foo": "foo.xpi"}); ... and your site is not in the whitelist, when the user invokes that code, updateEnabled will return false because your site isn't whitelisted, and since it was updateEnabled that discovered this, not a call to install, there wi...
Offering a context menu for form controls - Archive of obsolete content
icular window, enabling context menus to work on form controls. This article presents information based on Ehsan Akhgari's Form Control Context Menu extension, which was created specifically to demonstrate how to do this. There is ongoing discussion about this topic; please see bug 433168 for the latest information. ...
...about this topic; please see bug 433168 for the latest information. Overlay the content The first thing to do is to establish an overlay over the
chrome for the window in which you want to allow context menus on form controls. <overlay id="formcontrolcontextmenu-overlay" xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"> <script type="application/javascript" src="
chrome://formcontrolcontextmenu/content/overlay.js"/> </overlay> Change the right-click behavior The overlaid code is responsible for adjusting the behavior of right-clicking on form controls. window.addEventListener("load", function() { let setTargetOriginal = nsContextMenu.prototype.setTarget; Components.utils.reportError(setTargetOriginal); nsContextMenu.prototype.setTarget = function...
Adding sidebars - Archive of obsolete content
red to add a sidebar is very simple, as explained in Creating a Firefox Sidebar. It's even simpler than that. All you need is to overlay the View Sidebar menu. <menupopup id="viewSidebarMenu"> <menuitem id="xulschoolhello-sidebar" label="&xulschoolhello.sidebar.title;" accesskey="&xulschoolhello.sidebar.accesskey;" type="checkbox" autoCheck="false" group="sidebar" sidebarurl="
chrome://xulschoolhello/content/sidebar.xul" sidebartitle="&xulschoolhello.sidebar.title;" oncommand="toggleSidebar('xulschoolhello-sidebar');" /> </menupopup> The example in the MDC page includes a shortcut key combination to toggle the new sidebar. Keyboard shortcuts are an essential feature of Firefox, and you can add your own into your extensions, which is also great. The problem is that ...
.... A stack is like a deck, except that all of its children are always on display, one of top of the other. It allows you to decompose complex UI into individual layers, broadening the layout possibilities. One common use for a stack is to have an image background that stretches horizontally and vertically depending on the size of the foreground object: <stack> <hbox flex="1"> <image src="
chrome://xulschoolhello/skin/stack-bg.png" flex="1" /> </hbox> <hbox> <!-- Some content here. --> </hbox> </stack> This workaround is necessary because you can't have an background image stretch using CSS. A less common use for the stack element is to use the left and top attributes on its children in order to have absolute positioning for the content on the layers. This kind of positionin...
Appendix E: DOM Building and Insertion (HTML & XUL) - Archive of obsolete content
{}; document.documentElement.appendChild( jsonToDOM(["xul:hbox", {}, ["div", {}, ["a", { href: href, key: "link", onclick: function (event) { alert(event.target.href); } }, text], ["span", { class: "stuff" }, "stuff"]]], document, nodes)); alert(nodes.link); function addEntryToPopup(menuPopup, doc,
chromeWindow) { var newItem = doc.createElement("menuitem"); newItem.setAttribute("value", "testValue"); newItem.setAttribute("label", "Another popup menu item"); menuPopup.appendChild(newItem); }; var jsonTemplateBtn = ["xul:toolbarbutton", { id: "myTestButton", class: "toolbarbutton-1", type: "menu", label: "Test button label...
...y a remote server. Fortunately, there is a safe and simple way to do this. For WebExtensions the most simple way is sanitize the output about javaScript inline declaration and other wrong content. For XUL addon based the nsIParserUtils.parseFragment() method will convert a string to a document fragment while removing any scripts or other unsafe content in the process. let { Cc, Ci } = require("
chrome"); /** * Safely parse an HTML fragment, removing any executable * JavaScript, and return a document fragment. * * @param {Document} doc The document in which to create the * returned DOM tree. * @param {string} html The HTML fragment to parse. * @param {boolean} allowStyle If true, allow <style> nodes and * style attributes in the parsed fragment. Gecko 14+ only. * @param {nsIURI...
Setting Up a Development Environment - Archive of obsolete content
ring development and testing. More about this further ahead. Let's try and build the XPI from the command line first. Open the command line program in your system and navigate to the src directory in your project. Run the following command: make That's it. If everything went well, you should see an output similar to this: Creating XPI file. adding: install.rdf (deflated 50%) adding:
chrome.manifest (deflated 50%) adding: content/browserOverlay.js (deflated 42%) adding: content/browserOverlay.xul (deflated 69%) adding: skin/browserOverlay.css (stored 0%) adding: locale/browserOverlay.dtd (deflated 52%) adding: locale/browserOverlay.properties (stored 0%) Creating XPI file. Done! Build finished successfully. If you inspect the bin directory, you should see the xulschoo...
...TTP requests and their responses. It allows you to cancel them and even replace payload data before it is sent. There are several similar extensions, such as Live HTTP Headers, but Tamper Data is the one that we use the most. We'll cover more on HTTP debugging later on. Firebug The Firebug extension includes pretty much all tools mentioned so far, but it's mostly focused on web development. The
Chromebug extension helps in making Firebug more useful for extension development, but it may still not be powerful enough to replace all of the previously mentioned add-ons. On the other hand, Firebug has a very friendly, integrated user interface, and sees much more development that its counterparts. It's definitely worth a try. Leak Monitor Memory leaks have always been a big criticism drawn again...
The Box Model - Archive of obsolete content
ings in the buttons. If the label of the "Parrot" button was something much longer, the size ratio would not be kept. You can have even more control over the size of flexible elements using the minwidth, maxwidth, minheight and maxheight attributes, or their CSS counterparts: min-width, max-width, min-height and max-height. The latter are recommended to keep style code in the skin section of the
chrome. As their names should make clear, you can control the flexibility boundaries of elements, thus preventing them from growing or shrinking too much. All CSS properties involving lengths should be handled with caution. We recommended that you use proportional units (em, %) instead of absolute units (px) whenever possible. Using the former allows the UI to scale proportionately depending on font ...
...xmlns:html="http://www.w3.org/1999/xhtml"> Then you can have an html:p (paragraph) element where you insert the result of parsing the property string. You can easily parse XML using the DOMParser object. Since XUL documents are strict XML, you can only use strict XHTML in XUL, and not the more loosely-formatted forms of HTML. Exercise Use the DOM Inspector extension to look into the Firefox
chrome. Select toolbar buttons, menu items, textboxes, etc. and look into the Box Model, CSS Style Rules and Computed Style views. Look into the computed width and height values, and how the paddings and margins affect the dimensions of XUL nodes. Modify the Hello World extension so that it changes the appearance of Firefox drastically using only CSS. Play with changing the dimensions and appearance of...
Updating addons broken by private browsing changes - Archive of obsolete content
ode refers to any of the following interfaces: FF 15: nsIDOMStorageManager FF 16: nsITransferable FF 18: imgICache mozIAsyncFavicons nsIFaviconService nsIWebBrowserPersist FF 19: nsIContentPrefService nsIDownloadManager nsIDownload nsIHttpAuthManager nsIStrictTransportSecurityService FF 20: nsIPrivateBrowsingService nsIRecentBadCertService Furthermore, if your code uses any of these common
chrome APIs: FF 19: saveURL saveInternal openLinkIn FF 20: OpenBrowserWindow gPrivateBrowsingUI Finally, if your code watches for any of these observer notifications: private-browsing private-browsing-cancel-vote private-browsing-change-granted private-browsing-transition-complete Then your addon will require updating to correctly support the new per-window private browser feature in Firefox ...
...e private bad certificates or public ones are desired. Observer notifications None of the ones listed above will be sent as of Firefox 20. 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).
Chrome APIs OpenBrowserWindow: Takes an optional parameter to indicate desired properties of the window. Passing {private: true} will cause a private window to open, otherwise the window will always be non-private. Use {private: PrivateBrowsingUtils.isWindowPrivate(window)} to open a window that matches the current window's privacy status. openLinkIn: Can receive an extra private boolean property in...
Add-ons - Archive of obsolete content
st practices when making extensions, including how to be kind to your users. It assumes that you are already familiar with Building an Extension. Extension Packaging Extensions are packaged in a form of Installable Bundle which can be downloaded and installed by a user, or provided pre-packaged with an application or by an external program. Extensions use a directory structure which can provide
chrome, components, and other files to extend the functionality of an XUL program. Extensions support in SeaMonkey 2 Starting with SeaMonkey 2 Alpha 1 SeaMonkey supports toolkit/-style extensions. These type of extensions have many advantages for both users and developers compared to the old xpinstall/-style extensions. Firefox addons developer guide The original document is in Japanese and distribu...
...source code on MDC, not on xuldev), and to Japanese things (like some specific locales, which have been translated to French since non-latin characters are not well supported). Hotfix Extension This document has been moved to the Add-ons wiki. How to convert an overlay extension to restartless First off, what kind of add-on are we talking about here? Well, XUL overlays and windows, JSM files,
chrome & resource mappings with localization, default preferences, but no XPCOM components of your own. Some of that will have to be replaced and the rest will need to be loaded differently. Inline options Firefox 7 supports a new syntax for defining extensions' preferences for both bootstrapped and traditional extensions. The user interface for the preferences defined with this new syntax appears in ...
Creating a dynamic status bar extension - Archive of obsolete content
from the Creating a status bar extension sample, you can follow this tutorial to update that existing code with new features. Download the sample Update the install manifest Replace all occurrences of the first sample's ID, "status-bar-sample-1", with the new sample's ID, "stockwatcher", and update the front end metadata to describe our new extension. See Install Manifests for details. Update the
chrome manifest The
chrome manifest needs only a minor update from the previous sample; simply replace the ID of the first sample, "status-bar-sample-1", with the name of the new sample, "stockwatcher". If you need to brush up, visit the
Chrome Manifest section. Write the XUL file We need a slightly more complicated XUL file this time, in order to add a reference to the JavaScript code that will do the ...
...sit the
Chrome Manifest section. ...
List of Former Mozilla-Based Applications - Archive of obsolete content
to WebKit in version 1.8.6 Boxee Media center software Switched to WebKit in version 1.0 Epiphany Browser Switched from Gecko to Webkit Flock Social browsing Flock switched from being Firefox-based to Chromium-based when it released a new beta on June 16, 2010 Jolicloud web operating system As of March 2010, RW/W reports Jolicloud is on
Chrome/
Chrome OS Joost TV over Internet Switched from XULRunner-based client to a web application Liferea News aggregator Switched to WebKit in version 1.6 ManyOne Browser Browser Originally Mozilla-based but now I believe the have a web-based tool (need reference for that) Miro (formerly Democracy Player) Video Switched from XULRunner to WebKi...
... aggregator Switched to WebKit in version 1.6 ManyOne Browser Browser Originally Mozilla-based but now I believe the have a web-based tool (need reference for that) Miro (formerly Democracy Player) Video Switched from XULRunner to WebKit in version 3.0.2 Moblin Browser Browser When Moblin became Meego it switched from a custom Gecko-based browser to
Chrome Nautilus File manager Hasn't used Mozilla code since version 2.0 Raptr client Gaming client Was a XULRunner app initially but now uses Adobe AIR Rift Technologies Software installation over Internet No longer using Mozilla technology -- need confirmation and details Second Life Virtual world desktop client Switched from embedded Mozilla ...
Using XML Data Islands in Mozilla - Archive of obsolete content
Here is a complete demo (also available as an attachment): <!DOCTYPE html> <html> <head> <title>XML Data Block Demo</title> <script id="purchase-order" type="application/xml"> <purchaseOrder xmlns="http://example.mozilla.org/PurchaseOrderML"> <lineItem> <name>Line Item 1</name> <price>1.25</price> </lineItem> <lineItem...
...Here is another possible way, using the <object> tag. For this demo, you must create an external document called purchase_order.xml: <!DOCTYPE html> <html> <head> <title>XML Data Block Demo</title> <script> function runDemo() { var doc = document.getElementById("purchase-order").contentDocument; var lineItems = doc.getElementsBy...
Enabling the behavior - updating the status periodically - Archive of obsolete content
reference to our JavaScript code into navigator.xul, just as we put a reference to our CSS code into that file back in Specifying the appearance. Put the JavaScript code into a file called tinderstatus.js in the same directory as navigator.xul and reference it in navigator.xul where other JavaScript scripts are referenced: ... ...
...S code into that file back in Specifying the appearance. Put the JavaScript code into a file called tinderstatus.js in the same directory as navigator.xul and reference it in navigator.xul where other JavaScript scripts are referenced: ... <!-- Navigator --> <script type="application/javascript" src="
chrome://navigator/content/browser.js"/> <script type="application/javascript" src="
chrome://navigator/content/navigator.js"/> <script type="application/javascript" src="
chrome://navigator/content/navigatorDD.js"/> <script type="application/javascript" src="
chrome://navigator/content/sessionHistoryUI.js"/> <script type="application/javascript" src="
chrome://navigator/content/tinderstatus.js"/> <!-- hook for stringbundle overlays --> ... With this code in place, r...
Finding the file to modify - Archive of obsolete content
b Development" submenu, then select the "DOM Inspector" item. The DOM Inspector will load in a new window. In the DOM Inspector window, go to the File menu, select the Inspect a Window submenu, then select the Mozilla browser window item (named after the page currently loaded in the browser). The DOM Inspector will display the URL of the XUL file that defines the Mozilla browser window, which is
chrome://navigator/content/navigator.xul. A
chrome URL is a URL used internally by Mozilla to refer to files in the
chrome subdirectory of the Mozilla installation directory.
Chrome URLs have paths that do not necessarily refer to a precise directory hierarchy. In this case the
chrome URL refers to the file located at mozilla-installation-directory/
chrome/content/navigator/navigator.xul. [explain furth...
...
chrome URL is a URL used internally by Mozilla to refer to files in the
chrome subdirectory of the Mozilla installation directory.
Chrome URLs have paths that do not necessarily refer to a precise directory hierarchy. ...
Creating a Skin for Firefox/Getting Started - Archive of obsolete content
a zip archive. However, if your application doesn't detect classic.jar as a standard zip archive, rename the file classic.zip and continue extraction. Note: Starting in Gecko 2.0, the new omni.jar file contains the skin, among other resources. See Theme changes in Firefox 4 for details on how to extract skin files from Firefox 4 or later. Classic.jar locations Linux: /usr/lib/MozillaFirefox/
chrome/classic.jar or /usr/lib/firefox-*.*.*/
chrome/classic.jar Windows: \Program Files\Mozilla Firefox\
chrome\classic.jar For Mac OS X: Go to your applications folder Control click application icon(Firefox icon), choose Show Package Contents. Go to contents/MacOS/
Chrome/classic.jar Copy classic.jar to another easily accessible folder -- Classic is recommended -- extract the contents of that fo...
...ake sure not to just zip up the My_Theme parent directory since that will cause the drag and drop install in the next section to fail without error messages. Once you have put the files in the zip folder, rename it to My_Theme.jar Triggering the install from the web To install the theme's JAR file directly from the web, you need to run some JavaScript. <a href='javascript:InstallTrigger.install
Chrome(InstallTrigger.SKIN, "myskin.jar", "My Skin Theme")'>install My Skin</a> If you have JAR files on your hard drive and would like to install them, then download/use this form. You can also just open the themes window in Mozilla and drag and drop your .jar file onto it. Now to change your folder(s) back into a .jar Well it's easy! What you do is put your folder(s) into a .zip file and then whe...
Drag and Drop JavaScript Wrapper - Archive of obsolete content
r drag and drop. The JavaScript Drag and Drop Wrapper The JavaScript wrapper to drag and drop simplifies the process by handling all of the XPCOM interfaces for you. It works by providing an object which implements the event handlers. All you have to do is write some simpler functions which work with the data being dragged. This drag and drop interface is stored in the global package, in the file
chrome://global/content/nsDragAndDrop.js. You can include this file in your XUL file with the script tag in the same way you would include your own scripts. The library also depends on another script library, which you should also include, usually at the top of your XUL file. You can look at the contents of these files to see how drag and drop is done at a lower level. Note that you can only use these l...
...u can include this file in your XUL file with the script tag in the same way you would include your own scripts. The library also depends on another script library, which you should also include, usually at the top of your XUL file. You can look at the contents of these files to see how drag and drop is done at a lower level. Note that you can only use these libraries from within XUL loaded via a
chrome URL. <script src="
chrome://global/content/nsDragAndDrop.js" /> <script src="
chrome://global/content/nsTransferable.js" /> This drag and drop library creates an object stored in the variable nsDragAndDrop. The object contains a series of functions, one for each event handler (except for dragenter where it has nothing special to do). Each of the functions takes two parameters, the first is the eve...
Embedding Mozilla in a Java Application using JavaXPCOM - Archive of obsolete content
Get the window watcher service nsIWindowWatcher windowWatcher = (nsIWindowWatcher)serviceManager.getServiceByContractID("@mozilla.org/embedcomp/window-watcher;1", nsIWindowWatcher.NS_IWINDOWWATCHER_IID); // Set the window creator (from step 6) windowWatcher.setWindowCreator(windowCreator); // Create the root XUL window: nsIDOMWindow win = windowWatcher.openWindow(null, "
chrome://your-app/content/window.xul", "mywindow", "
chrome,resizable,centerscreen", null); // Set this as the active window windowWatcher.setActiveWindow(win); // Hand over the application to xpcom/xul, this will block: appStartup.run(); Here is an example of a LocationProvider that works : public class LocationProvider implements IAppFileLocProvider { private fin...
...anager.NS_IPROXYOBJECTMANAGER_IID); // and use the proxy object manager to create a proxy for the nsIWindowWatcher instance we created above. ...
Style System Overview - Archive of obsolete content
Detail: !important declarations cause an extra rule object CSSImportantRule to be created since they are in a separate part of the cascade Other nsIStyleRule implementations nsHTMLMappedAttributes represents stylistic HTML attributes turned into a style rule (one instance per unique set of attributes) BodyRule handles marginwidth/mar...
...hen puts them in RuleHash, which remembers order and then hashes by first of id, class, tag, namespace, or unhashed. To match rules, we do lookups in the RuleHash's tables, remerge the lists of rules using stored indices, and then call SelectorMatchesTree to find which selectors really match. Matching of class and id selectors is much faster than, say, attribute selectors. (Important advice for
chrome CSS authors.) Pseudo-elements are hashed in element hash, so for matching pseudo-elements we only need one hashtable lookup. Style contexts Each style context (nsStyleContext), which is the interface through which layout accesses the style data for a given element, points to one rule node. We create one style context per frame, since frames point to style contexts rather than the other way...
Menu - Archive of obsolete content
Note: This page documents the Jetpack Prototype, which has since been replaced by the Add-on SDK. Please see the wiki page and online documentation for more information on how to use the Add-on SDK. Jetpack's menu API allows features to access and modify the browser's built-in menus. Features can also create new menus and attach them almost anywhere,
chrome or content, as popup menus or context menus. Two namespaces are associated with this API: jetpack.menu, which provides access to the browser's menus, and jetpack.Menu, the constructor for making new menus. The API is fairly comprehensive, so you may want to start by reading through some examples. Because it is still under development, the API currently lives in the future and must be imported before it is used: jetpack.future.imp...
...r One or more CSS selectors. A string. Examples: "a[href]", "a[href] > img", "a[href], img". Return value A new ContextMenuSet object. jetpack.menu.context The feature's context menu. All of the feature's context menus are exposed through jetpack.menu.context, including slidebar, panel, toolbar, and status bar item context menus. A ContextMenuSet object. jetpack.menu.context.browser The
chrome context menu. This is the context menu that appears when right-clicking on an element in Firefox's interface, such as a bookmark on the bookmarks toolbar. A ContextMenuSet object. Note: Sometimes jetpack.menu.context.browser.on() does not work as expected. For example, jetpack.menu.context.browser.on("*").add("foo") does not add "foo" to the tab strip's and location bar's context menus, but it d...
Remote XUL - Archive of obsolete content
Note: Support for remote XUL has long been a potential security concern; support for it was disabled in Gecko 2.0. This also means you can't load XUL using file:// URLs unless you set the preference dom.allow_XUL_XBL_for_file to true. However, there is a whitelist that lets you specify sites that can still use remote XUL. ...
... ...
Safely loading URIs - Archive of obsolete content
If a web page gets access to a window with such expanded privileges, it may be able to abuse it to gain access to those privileges itself. ...
...I that one plans to load, and the third argument is a set of flags that can be used to impose additional restrictions on the URIs that may be loaded. It's important to make sure that the first argument to these methods identifies the source of the URI. So if you're implementing a context menu and you add a "View Image" option, the source of the image URI would be the page the image is in, not the
chrome document the context menu code is in. Differences between the methods The three methods differ from each other in how the source of the URI is identified and in what is known about the URI to be loaded. In general, the following guidelines apply for Gecko 1.8: If you plan pass a URI string to nsIWebNavigation.loadURI (which can happen indirectly, e.g. by passing the string to something that...
Elements - Archive of obsolete content
mozilla.org/xbl%22%3E%0A%20%20%3Cbinding%20id%3D%22xbltest%22%3E%3Ccontent%3EPASS%3C/content%3E%3C/binding%3E%0A%3C/bindings%3E%0A); } Since data: URLs don't support fragment identifiers, the first binding found in the embedded XML is used instead. Keep in mind that the binding is still required to have an ID even though you're not referencing it. In addition, data: URLs are only supported from
chrome code (in other words, from the application or an extension). Note: The normal same-origin policy is used for web sites; they can only link to XBL files on the same domain, or within the
chrome. For clarity's sake, here's what the embedded XML in the previous example looks like: <?xml version="1.0"?> <bindings id="xbltestBindings" xmlns="http://www.mozilla.org/xbl"> <binding id="xbltest"><con...
...meaning as charcode. clickcount - The clickcount attribute imposes a filter on the handler. It is used with mouse handlers to specify how many times a button has been clicked. The event handler will only be matched if the value of the clickcount field in the DOM mouse event object matches the value of the attribute. command - The id of a command to invoke when the event occurs. If used in a non-
chrome document, the entire handler will be ignored. preventdefault - If set to true, the default action of the event is not performed. See also preventDefault method of the Event object. resources <!ENTITY % resources-content "(image?,stylesheet?)"> <!ELEMENT resources %resources-content;> <!ATTLIST property id ID #IMPLIED > Used for inclusion of image elements, ...
XPInstall API reference - Archive of obsolete content
addDirectory addFile alert cancelInstall confirm deleteRegisteredFile execute gestalt getComponentFolder getFolder getLastError getWinProfile getWinRegistry initInstall loadResources logComment patch performInstall refreshPlugins register
Chrome resetError setPackageFolder InstallTrigger No properties Methods compareVersion enabled getVersion install install
Chrome startSoftwareUpdate InstallVersion Properties Methods compareTo init toString File No properties Methods ...
... isKeyWritable keyExists setRootKey setValue setValueNumber setValueString valueExists WinRegValue constructor Other Information Return Codes See complete list Examples Trigger Scripts and Install Scripts Code Samples File.macAlias File.windowsShortcut Install.addDirectory Install.addFile InstallTrigger.install
Chrome InstallTrigger.startSoftwareUpdate Windows Install ...
treecol.type - Archive of obsolete content
ox treecells. This style MUST come before treechildren::-moz-tree-checkbox(checked) otherwise it won't take effect. */ list-style-image: none; } treechildren::-moz-tree-checkbox(checked) { /* checked checkbox treecells. cbox-check.gif isn't available in Firefox 1, 2, and 3 in Mac OS X so you should specify a URL to an image in your extension or elsewhere. ...
...ld specify a URL to an image in your extension or elsewhere. */ list-style-image: url("
chrome://global/skin/checkbox/cbox-check.gif"); } treechildren::-moz-tree-checkbox(disabled) { /* disabled checkbox treecells. cbox-check.gif isn't available in Firefox 1, 2, and 3 in Mac OS X, so you should specify a URL to an image in your extension or elsewhere. ...
Introduction - Archive of obsolete content
m the network, you really don't notice this. If the datasource is already loaded, the builder can construct content all in one step, although even this isn't completely true as we'll see later. For XML datasources, use a querytype of xml. The datasources attribute should be the URL of an XML file, which can be either the location of a web site or a file on the local file system, using its file or
chrome URL. This file will be loaded and the resulting XML document will be used as the datasource when the template builder generates results and creates content. For example: <listbox datasources="http://www.xulplanet.com/ds/sample.xml" querytype="xml"> <template> <listitem label="?name"/> </template> </listbox> This template uses an XML datasource to generate a listbox. Although we'll look a...
...rces is often termed 'aggregation'. This can be quite a useful feature and works regardless of the datasource. For instance, you might use the built-in bookmarks datasource which holds the user's browser bookmarks and use your own datasource to add custom data about those bookmarks. <vbox datasources="rdf:bookmarks http://www.xulplanet.com/ds/sample.rdf"> In addition, when using the RDF type for
chrome XUL (such as in extensions), the datasource rdf:local-store is always included in the composite. The local store is a datasource which is usually used to hold state information such as window sizes, which columns in a tree are showing, and which tree items are open. You can query for any data in the local store in a template though this is rarely done. Sometimes, you will want to specify the data...
Adding Buttons - Archive of obsolete content
<button label="Disabled" disabled="true"/> The examples above will generate the buttons in the image. The first button is a normal button. The second button is disabled so it appears greyed out. We'll start by creating a simple Find button for the find files utility. The example code below shows how to do this. <button id="find-button" label="Find"/> Note: Firefox does not allow you to open
chrome windows from web pages, so the View links in the tutorial will open in normal browser windows. Due to this, the buttons will appear to stretch across the window. You can add align="start" to the window tag to prevent the stretching. The findfile.xul example Let's add this code to the file findfile.xul that we created in the previous section. The code needs to be inserted in-between the window ...
...ows. Due to this, the buttons will appear to stretch across the window. You can add align="start" to the window tag to prevent the stretching. The findfile.xul example Let's add this code to the file findfile.xul that we created in the previous section. The code needs to be inserted in-between the window tags. The code to add is shown in red below: <?xml version="1.0"?> <?xml-stylesheet href="
chrome://global/skin/" type="text/css"?> <window id="findfile-window" title="Find Files" orient="horizontal" xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"> <button id="find-button" label="Find"/> <button id="cancel-button" label="Cancel"/> </window> You'll notice that the Cancel button was added also. The window has been given a horizontal orient...
Adding Event Handlers - Archive of obsolete content
create the script file later when we know what we want to put in it. We'll define some functions in the file and we can call them in event handlers. You can include multiple scripts in a XUL file by using multiple script tags, each pointing to a different script. You may use relative or absolute URLs. ...
...You can also change the preference javascript.options.strict for debugging. By setting this value to true, non-standard, poorly written, or syntax prone to cause logic errors are logged to the JavaScript console. ...
Anonymous Content - Archive of obsolete content
n element. The children added in the XUL are added in place of the children element. This is handy when creating custom menu widgets. For example, a simplified version of an editable menulist element, might be created as follows: XUL: <menu class="dropbox"> <menupopup> <menuitem label="1000"/> <menuitem label="2000"/> </menupopup> </menu> CSS: menu.dropbox { -moz-binding: url('
chrome://example/skin/example.xml#dropbox'); } XBL: <binding id="dropbox"> <content> <children/> <xul:textbox flex="1"/> <xul:button src="
chrome://global/skin/images/dropbox.jpg"/> </content> </binding> This example creates an input field with a button beside it. The menupopup will be added to the content in the location specified by the children element. Note that to DOM functions, t...
...ent. Note that to DOM functions, the content will appear as it was in the XUL file, so the menupopup will be a child of the menu. The XBL content is hidden away so the XUL developer doesn't need to even know it is there. The resulting content would be: <menu class="dropbox"> <menupopup> <menuitem label="1000"/> <menuitem label="2000"/> </menupopup> <textbox flex="1"/> <button src="
chrome://global/skin/images/dropbox.jpg"/> </menu> includes Attribute In some cases, you may wish to only include specific types of content and not others. Or, you may wish to place different types of content in different places. The includes attribute can be used to allow only certain elements to appear in the content. Its value should be set to a single tag name, or to a list of tags separated by ver...
Creating a Wizard - Archive of obsolete content
laced on the wizard are used to control the wizard navigation. When creating a wizard, use the wizard tag instead of the window tag. The content of the wizard element includes the content of each page of the wizard. The pages of the wizard are created using the wizardpage element. You can place whatever content you want inside each wizardpage. Note that wizards currently only work properly from
chrome URLs. The wizard consists of several sections. The exact layout will vary according to the OS for the platform. Wizards will generally be displayed using customs that are familiar to the user of a particular OS. A typical layout will include a title across the top, a set of navigation buttons across the bottom and the page contents in between. The title across the top is created using the title...
... to the user of a particular OS. A typical layout will include a title across the top, a set of navigation buttons across the bottom and the page contents in between. The title across the top is created using the title attribute, much like one would use for regular windows. The navigation buttons are created automatically. ...
Creating an Installer - Archive of obsolete content
I Archive Note: If you want to create a new XULRunner application, extension, or theme, see Bundles. The installer XPI file is required to contain one file called install.js which is a JavaScript file which is executed during the installation. The remaining files are the files to be installed. These files will typically be placed inside a directory in the archive but they do not have to be. For
chrome files, they might be structured like the
chrome directory. Often, the only files placed in an XPI archive will be the install script (install.js) and a JAR file. This JAR file contains all of the files used by your application. The components provided with Mozilla are stored in this manner. Because the XPI file is just a special ZIP file, you can create it and add files to it using a zip utilit...
... Next, we'll look further at the install script. << PreviousNext >> ...
Features of a Window - Archive of obsolete content
ed into its browsing context.">Window.open() function to open the second window. This function will return a reference to the newly opened window. You can use this reference to call functions of the other window. The open function takes three arguments. The first is the URL of the file you wish to open. The second is an internal name of the window. The third is a list of display flags. ...
...function to open the second window. This function will return a reference to the newly opened window. You can use this reference to call functions of the other window. The open function takes three arguments. The first is the URL of the file you wish to open. The second is an internal name of the window. The third is a list of display flags. The flag '
chrome' is important to open the window as a
chrome file. If you do not add the '
chrome' flag, the file will open up as the content in a browser window. For example: var myWin = window.open("
chrome://findfile/content/findfile.xul", "findfile", "
chrome"); Specifying the Width and Height You should have noticed that whenever elements were added to a window, the window's width expanded to fit the new elements. The window is really just a box whic...
Templates - Archive of obsolete content
mark. Mozilla provides a bookmarks datasource so it can be used to get the data. This example will only get the top-level bookmarks (or bookmark folders) as we're going to create buttons. For child bookmarks, we would need to use an element that displays a hierarchy such as a tree or menu. This example and any others that reference internal RDF datasources will only work if you load them from a
chrome URL. For security reasons, Mozilla doesn't allow access to them from other sources. To view this example, you will need to create a
chrome package and load the file from there (you can do this easily, see Manifest Files). You can then enter the
chrome URL into the browser URL field. Example 1 : Source <vbox datasources="rdf:bookmarks" ref="NC:BookmarksRoot" flex="1"> <template> <button ...
... attribute. This is used to declare what RDF datasource will be providing the data to create the elements. In this case, rdf:bookmarks is used. You can probably guess that this means to use the bookmarks datasource. This datasource is provided by Mozilla. To use your own datasource, specify the URL of an RDF file for the datasources attribute, as indicated in the example below: <box datasources="
chrome://zoo/content/animals.rdf" ref="http://www.some-fictitious-zoo.com/all-animals"> You can even specify multiple datasources at a time by separating them with a space in the attribute value. This can be used to display data from multiple sources. The ref attribute indicates where in the datasource you would like to retrieve data from. In the case of the bookmarks, the value NC:BookmarksRoot...
XBL Attribute Inheritance - Archive of obsolete content
the label will need to inherit its text from the value attribute and the textbox will also need to inherit its default value from the value attribute as well. To solve this, we will need to use a different attribute and map it to the same one. The following demonstrates this: XUL: <box class="labeledtextbox" title="Enter some text:" value="OK"/> CSS: box.labeledtextbox { -moz-binding: url('
chrome://example/skin/example.xml#labeledtextbox'); } XBL: <binding id="labeledtextbox"> <content> <xul:label xbl:inherits="value=title"/> <xul:textbox xbl:inherits="value"/> </content> </binding> The textbox inherits the value attribute directly. To set the value attribute on the label, we need to use a different attribute name and map it to the value. The inherits attribute on the label...
...it to the value. The inherits attribute on the label grabs the title attribute from the labeledtextbox and maps it to the value attribute of the label element. The syntax <inner attribute>=<outer attribute> is used to map one attribute to another. Here is another example: XUL: <box class="okcancel" oktitle="OK" canceltitle="Cancel" image="happy.png"/> CSS: box.okcancel { -moz-binding: url('
chrome://example/skin/example.xml#okcancel'); } XBL: <binding id="okcancel"> <content> <xul:button xbl:inherits="label=oktitle,image"/> <xul:button xbl:inherits="label=canceltitle"/> </content> </binding> The value of the oktitle attribute is mapped to the label attribute of the first button. The canceltitle attribute is mapped to the label attribute of the second button. The first button...
Urlbar-icons - Archive of obsolete content
<< XUL Reference home [ Examples | Attributes | Properties | Methods | Related ] The location of UI elements like the bookmarks, feed and go buttons. Create new image or button child elements to add your own items. ...
...s of browser.xul: <hbox id="urlbar-icons"> <button be=""
chromedir="ltr" class="urlbar-icon" click="" for="" id="safebrowsing-urlbar-icon" img="" level="safe" might="" onclick="goDoCommand('safebrowsing-show-warning');" page="" style="-moz-user-focus:" tooltiptext="This" type="menu"> <img class="urlbar-icon" id="star-button" onclick="PlacesStarButton.onClick(event);" /> <img address=""
chromedir="ltr" class="urlbar-icon" id="go-button" in="" location="" onclick="handleURLBarCommand(event);" p="" the="" to="" tooltiptext="Go" /> </button> </hbox> ...
Using multiple DTDs - Archive of obsolete content
DTD (Document Type Definition) to localize a specific XUL file. But there are situations where you want to use multiple DTDs, for example to localize common widgets used in all your XUL files, additionally to the ones specific to the file. Single DTD To make strings in your XUL file localizable, you normally add a DTD declaration at the beginning of the file like this: <!DOCTYPE window SYSTEM "
chrome://myextension/locale/mainwindow.dtd"> where "window" is the local name of the document (root) element. Assuming you have an entity called someButton.label defined in mainwindow.dtd, you can access the entity like this: <button id="somebutton" label="&someButton.label"> Multiple DTDs If you want to use multiple DTDs with your XUL file, you can simply list all of the DTDs inside your DTD dec...
...e local name of the document (root) element. Assuming you have an entity called someButton.label defined in mainwindow.dtd, you can access the entity like this: <button id="somebutton" label="&someButton.label"> Multiple DTDs If you want to use multiple DTDs with your XUL file, you can simply list all of the DTDs inside your DTD declaration: <!DOCTYPE window [ <!ENTITY % commonDTD SYSTEM "
chrome://myextensions/locale/common.dtd"> %commonDTD; <!ENTITY % mainwindowDTD SYSTEM "
chrome://myextension/locale/mainwindow.dtd"> %mainwindowDTD; ]> You can now access the entities declared in the DTDs as shown above. Assume you have an entity okButton.label defined in file common.dtd. Then accessing entities from both DTDs would look like this: <button id="somebutton" label="&someButton.labe...
Window icons - Archive of obsolete content
Note: This feature was removed at Firefox 67. See also bug 1531836 for more details. Starting with Firefox 1.5, Thunderbird 1.5, and XULRunner 1.8, you can specify an icon for a XUL window by putting files named mywindow.ico (for Windows) and mywindow.xpm or mywindow16.xpm (Linux), where mywindow is the id of the <window> you want to attach the icon to, in the
chrome/icons/default subfolder of your bundle. These icons will override the global icon files, which are located in app_dir/browser/
chrome/icons/default. Note: The global icons override does not currently work due to bug bug 543490. Global icon files currently take precedence and bundles are only searched for icons which are not provided by the application. Starting with Firefox 3.0, XULRunner 3.0, Thunderbird 3.0 and SeaM...
...ich are not provided by the application. Starting with Firefox 3.0, XULRunner 3.0, Thunderbird 3.0 and SeaMonkey 2.0 you can now specify PNG format icons instead of XPM format on Linux. You can specify up to 4 different sizes of PNG icons using the suffixes .png, 16.png, 32.png and 48.png. Older versions To support older applications, such as Firefox 1.0, you need to copy the icons to app_dir/
chrome/icons/default manually on the first start (example code). ...
XUL Parser in Python/source - Archive of obsolete content
keeper/there.is.only.xul window", etc. ...
...nip): t = re.sub('http://.*?\s', '', snip) return t class XULParser(xmllib.XMLParser): def unknown_starttag(self, t, a): name = strip(t) if name not in el_list: el_list[name] = {} for attr,val in a.items(): el_list[name][strip(attr)] = strip(val) def syntax_error(self, message): pass p = XULParser() cmd = 'dir /s /b *.xul'
CHROME_DIR = 'C:\Program Files\Netscape\Netscape 6\
chrome' os.chdir(
CHROME_DIR) files = os.popen(cmd).readlines() for file in files: file = file.strip() print '** ' + file + ' **' data = open(file).read() p.feed(data) w.write('<html><h3>Periodic Table of XUL Elements</h3>') w.write('<table><style>.head {font-weight: bold; background-color: lightgrey;}</style>') elements = el_list.keys() elements.sort() for item in elements: w.write('<tr><td class...
titlebar - Archive of obsolete content
<< XUL Reference home [ Examples | Attributes | Properties | Methods | Related ] Boxes created with the titlebar element behave just like a normal window titlebar: when the element is clicked and dragged, the window moves with it. This element can't be used to change the platform-native titlebar of normal windows; instead, it's used to create custom titlebars for
chromeless windows. If the titlebar is in a panel element, dragging it will move the panel. Elements inside the titlebar usually don't receive any mouse events, so e.g. buttons inside it can't be clicked and textboxes can't be focused with the mouse. If you don't want this behavior, you can override it by setting allowevents="true" on the titlebar element. The titlebar will send a command event after the move is co...
...arent; -moz-appearance: none;"> <titlebar flex="1" oncommand="close()" style="background: rgba(30, 30, 30, 0.9); -moz-border-radius: 10px; -moz-box-shadow: 0 1px 8px rgba(0, 0, 0, 0.8); margin: 8px 12px 16px;"/> </window> It can be opened from the error console like this: open("file:///Users/markus/Sites/hudwindow.xul", "", "
chrome=1, titlebar=0") Attributes Inherited from XUL element align, allowevents, allownegativeassertions, class, coalesceduplicatearcs, collapsed, container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, p...
treecol - Archive of obsolete content
> </treerow> </treeitem> </treechildren> </tree> To make the checkbox visible on some platforms, the following styles need to be added to the stylesheet (see treecol.type). On Firefox 2.x and 3.x, all operating systems other than Mac OS X already use these styles by default. If targeting Firefox for Mac OS X, be sure to use these styles but include your own checkbox image. However,
chrome://global/skin/checkbox/cbox-check.gif is available in SeaMonkey on Mac OS X.. treechildren::-moz-tree-checkbox { /* unchecked checkbox treecells. This style MUST come before treechildren::-moz-tree-checkbox(checked) otherwise it won't take effect. */ list-style-image: none; } treechildren::-moz-tree-checkbox(checked){ /* css for checked cells. cbox-check.gif isn't available in Firefox 1,...
...d checkbox treecells. This style MUST come before treechildren::-moz-tree-checkbox(checked) otherwise it won't take effect. */ list-style-image: none; } treechildren::-moz-tree-checkbox(checked){ /* css for checked cells. cbox-check.gif isn't available in Firefox 1, 2, and 3 on Mac OS X, so you should specify a URL to an image in your extension or elsewhere. */ list-style-image: url("
chrome://global/skin/checkbox/cbox-check.gif"); } For example: Create a CSS file. Copy and paste the code above and link the CSS file to your XUL file. Reload the page to see the checkbox. If you want, you can also style the tree using CSS. Attributes crop Type: one of the values below If the label of the element is too big to fit in its given space, the text will be c...
Dialogs in XULRunner - Archive of obsolete content
so users get a consistent experience across applications. Custom dialogs Building dialogs in XUL is very similar to creating windows. Each dialog is described in its own XUL file. XUL provides a dialog element to act as the container for the dialog. Dialog XUL files can have DTD, CSS, and JavaScript, just like windows. ...
...label="Oranges because they are fruity"/> <radio id="2" selected="true" label="Strawberries because of color"/> <radio id="3" label="Bananna because it pre packaged"/> </radiogroup> </groupbox> </dialog> XUL window elements have a special method to open dialogs, called window.openDialog(). Here is the code needed to open a dialog: function openDialog() { window.openDialog("
chrome://basicapp/content/dialog.xul", "newdlg", "modal"); } The resulting dialog looks like this on Windows 2000, and will look similar on other operating systems: The first thing that caught my eye about dialog is the button-related attributes on the element. In an effort to make things easier for developers and more consistent for users, XUL has a mechanism to automatically create and position t...
External resources for plugin creation - Archive of obsolete content
ts), advanced security features, and more. Supported development environments are Visual Studio on windows, XCode on mac, and GCC on linux. All platforms rely on CMake for easy cross-platform builds. Project: Nixysa Project Home Page Description (from the home page): Nixysa is a framework written in Python to automatically generate glue code for NPAPI plugins (plugins for browsers such as Google
Chrome or Firefox), letting you easily expose C++ classes to Javascript from a simple IDL representation. Nixysa was originally conceived for the needs of O3D, but is flexible enough to support a wide range of use cases. Project: JUCE Project Home Page Description (from the home page): JUCE (Jules' Utility Class Extensions) is an all-encompassing C++ class library for developing cross-platform applicati...
...nd sound. Supported development environments are XCode, Visual Studio, GCC (and probably any other modern C++ compiler) Browser plugins can be built as NPAPI (Mac/Windows), or ActiveX (Windows). ...
Updating an extension to support multiple Mozilla applications - Archive of obsolete content
> These two blocks indicate that the extension supports Thunderbird versions 1.5 through 2.0.0.x, Sunbird versions 0.2 through 0.4.x. After inserting this code, you can successfully install the extension into any (or all) of Firefox, Thunderbird, and Sunbird, but you won't see any effect in Thunderbird and Sunbird. That's because there's nothing telling those two applications what to do with the
chrome provided by the extension. That's where the
chrome manifest comes into play. Update the
chrome manifest Remember way back in the first article in this series when we created our
chrome manifest, which we haven't touched since? It's time to touch it. As you may (or may not) recall, that file tells the application what XUL code your extension's interface needs to overlay onto. For Firefox, we overl...
... we created our
chrome manifest, which we haven't touched since? It's time to touch it. As you may (or may not) recall, that file tells the application what XUL code your extension's interface needs to overlay onto. For Firefox, we overlaid onto browser.xul, which describes a Firefox browser window. We need to add lines to the manifest for Thunderbird and Sunbird, like this: # Thunderbird overlay
chrome://messenger/content/messenger.xul
chrome://stockwatcher2/content/stockwatcher2.xul # Sunbird overlay
chrome://calendar/content/calendar.xul
chrome://stockwatcher2/content/stockwatcher2.xul These lines cause the main Thunderbird message list window and the main window in Sunbird to be the target of the overlays we apply in the stockwatcher2.xul file. With these simple tweaks, this extension wil...
Using workers in extensions - Archive of obsolete content
var self = this; this.worker.onmessage = function(event) { self.onworkermessage.call(self, event); }; this.worker.postMessage(this.tickerSymbol); }, The worker is set up and configured here in lines 13-22: L...
... to the main thread. Its job is to update the ticker information that's currently displayed in the status bar, as well as to update the tooltip that appears while the mouse cursor is hovering over the ticker. This code is essentially identical to what's done in the previous version, except that it's done in response to an event instead of within the refreshInformation() method. A note about
ChromeWorkers Requires Gecko 2.0(Firefox 4 / Thunderbird 3.3 / SeaMonkey 2.1) Gecko 2.0 added the new
ChromeWorker object, which provides a special
chrome-only worker that can be used by applications and extensions. This worker object has access to js-ctypes, which standard workers do not have. ...
background-size - Archive of obsolete content
are based on WebKit, like Netscape 6-8, SeaMonkey, Camino, Flock, Fennec, Blackbird etc. are based on Gecko. Both layout engines are mentioned in the table. People should refer to the WebKit and Gecko version to get the info they need. Agreed; we should definitely encourage people to look stuff up by engine rather than browser. ...
...rowser. These tables should be revised over time to list Gecko, WebKit, Internet Explorer, and Opera, with perhaps a tooltip on each that provides details on which browsers are encompassed by each. I'm going to post on dev-mdc momentarily with a proposal on this. (Sheppy 07 December 2009) We should encourage web developers to ask for layout engines, not for browsers. [That said, the popularity of
Chrome let me think of a table row like Safari,
Chrome (WebKit) | 4.0, 2.0 (528). But I'm not able and willing spending time for this. Remember you have to test yourself, don't trust online references, don't trust WebKit | Apple | Google homepage, they are wrong. DON'T TRUST THE INTERNET AT ALLl! ] Listing Konqueror below the table is a compromise for consistency. Feel free to put it inside, nothi...
XForms Custom Controls Examples - Archive of obsolete content
Introduction Here is a collection of misc. custom control examples. Please feel free to add your own examples. A full example showing a complete form can be found on XForms:Custom_Controls. ...
...g anonid="content"/> </html:div> </content> <implementation implements="nsIXFormsUIWidget"> <method name="refresh"> <body> var img = document.getAnonymousElementByAttribute(this, "anonid", "content"); img.setAttribute("src", this.stringValue); return true; </body> </method> </implementation> </binding> Output Showing XHTML <binding id="output-xhtml" extends="
chrome://xforms/content/xforms-xhtml.xml#xformswidget-output"> <content> <children includes="label"/> <xhtml:div class="xf-value" anonid="content"></xhtml:div> <children/> </content> <implementation implements="nsIXFormsUIWidget"> <field name="_domparser">null</field> <property name="domparser" readonly="true"> <getter> if (!this._domparser) this._domparser = new DOM...
RDF in Mozilla FAQ - Archive of obsolete content
f a template specifies a whitespace-separated list of datasource URIs to load. But what is a "datasource URI"? It is either: An abbreviated ContractID for a locally installed component. By specifying rdf:name, you instruct the template builder to load the XPCOM component with the ContractID @mozilla.org/rdf/datasource;1?name=name. The URL of an RDF/XML file. For example, file:///tmp/foo.rdf
chrome://mycomponent/content/component-data.rdf http://www.mysite.com/generate-rdf.cgi ftp://ftp.somewhere.org/toc.rdf The load will be processed asynchronously, and as RDF/XML arrives, the template builder will generate content. In either case, the datasource will be loaded using the nsIRDFService's GetDataSource() method, so it will be managed similarly to all other datasources loaded this way...
...c.rdf The load will be processed asynchronously, and as RDF/XML arrives, the template builder will generate content. In either case, the datasource will be loaded using the nsIRDFService's GetDataSource() method, so it will be managed similarly to all other datasources loaded this way. What is the security model for RDF/XML in XUL? XUL that is loaded from a "trusted" URL (currently, any
chrome: URL) can specify any datasource URI in the datasources attribute of the XUL template. XUL that is loaded from an "untrusted" URL can only specify an RDF/XML document from the same codebase (in the Java sense of the word) that the XUL document originated from. No "special" (i.e., rdf:) datasources may be loaded from untrusted XUL. How do I add a datasource to a XUL template? Although it's poss...
Gecko FAQ - Gecko Redirect 1
nformation see the Wikipedia article on Gecko. What is a layout engine? Basically, a layout engine takes content (such as HTML, XML, image files, applets, and so on) and formatting information (such as Cascading Style Sheets, presentational HTML tags, etc.) and displays the formatted content on the screen. It paints the browser's content area, which is the blank area inside the browser window's
chrome. Formally, a layout engine defines the placement policy for a document and places content on a page. Gecko's core is a very fast layout engine. Gecko also offers the ability to parse various document types (HTML, XML, SVG, etc), advanced rendering capabilities including compositing and transformations, and support for embedded JavaScript and plugins. Gecko is so fast and so powerful that it's b...
...a document and places content on a page. Gecko's core is a very fast layout engine. Gecko also offers the ability to parse various document types (HTML, XML, SVG, etc), advanced rendering capabilities including compositing and transformations, and support for embedded JavaScript and plugins. Gecko is so fast and so powerful that it's being used to create the user interface of some applications ("
chrome") as well. In other words, Gecko will not only be displaying the document's content, but it will also be painting the scrollbars, toolbars, and menus on the screen as well. For more information see XUL. How is a layout engine like Gecko different from a Web browser? Gecko provides the foundation needed to display content on the screen, including a layout engine and a complementary set of browse...
MDN Web Docs Glossary: Definitions of Web-related terms
ffer C Cache Cacheable CalDAV Call stack Callback function Canonical order Canvas Card sorting CardDAV caret CDN Certificate authority Certified Challenge-response authentication Character Character encoding Character set
Chrome CIA Cipher Cipher suite Ciphertext Class Client hints Closure CMS Code splitting Codec Compile Compile time Computer Programming Conditional Constant Constructor Continuous Media Control flow Cookie Copyleft CO...
...ponse header name Fork Fragmentainer frame rate (FPS) FTP FTU Function Fuzz testing G Gaia Garbage collection Gecko General header GIF GIJ Git Global object Global scope Global variable Glyph Gonk Google
Chrome GPL GPU Graceful degradation Grid Grid Areas Grid Axis Grid Cell Grid Column Grid container Grid Lines Grid Row Grid Tracks Guard Gutters Gzip compression H Hash Head High-level programming language HMAC ...
Flexbox - Learn web development
see in subsequent sections, flexbox makes a lot of layout tasks much easier. Let's dig in! Introducing a simple example In this article we are going to get you to work through a series of exercises to help you understand how flexbox works. To get started, you should make a local copy of the first starter file -- flexbox0.html from our github repo -- load it in a modern browser (like Firefox or
Chrome), and have a look at the code in your code editor. You can see it live here also. You'll see that we have a <header> element with a top level heading inside it, and a <section> element containing three <article>s. We are going to use these to create a fairly standard three column layout. Specifying what elements to lay out as flexible boxes To start with, we need to select which elements are...
... your browser window width. The buttons will take up as much space as they can and sit as many on the same line as they can, but when they can no longer fit comfortably on the same line, they'll drop down to create new lines. button { flex: 1 auto; margin: 5px; font-size: 18px; line-height: 1.5; } Cross browser compatibility Flexbox support is available in most new browsers -- Firefox,
Chrome, Opera, Microsoft Edge and IE 11, newer versions of Android/iOS, etc. However you should be aware that there are still older browsers in use that don't support Flexbox (or do, but support a really old, out-of-date version of it.) While you are just learning and experimenting, this doesn't matter too much; however if you are considering using flexbox in a real website you need to do testing and m...
What is the difference between webpage, website, web server, and search engine? - Learn web development
refer to related but different functionalities. In fact, you'll sometimes see these terms misused in news reports and elsewhere, so getting them mixed up is understandable! We'll cover these terms and technologies in more detail as we explore further, but these quick definitions will be a great start for you: web page A document which can be displayed in a web browser such as Firefox, Google
Chrome, Opera, Microsoft Internet Explorer or Edge, or Apple's Safari. These are also often called just "pages." website A collection of web pages which are grouped together and usually connected together in various ways. Often called a "web site" or simply a "site." web server A computer that hosts a website on the Internet. search engine A web service that helps you find other web pages, such as...
... connected together in various ways. Often called a "web site" or simply a "site." web server A computer that hosts a website on the Internet. search engine A web service that helps you find other web pages, such as Google, Bing, Yahoo, or DuckDuckGo. Search engines are normally accessed through a web browser (e.g. you can perform search engine searches directly in the address bar of Firefox,
Chrome, etc.) or through a web page (e.g. bing.com or duckduckgo.com). Let's look at a simple analogy -- a public library. This is what you would generally do when visiting a library: Find a search index and look for the title of the book you want. Make a note of the catalog number of the book. Go to the particular section containing the book, find the right catalog number, and get the book. Le...
The HTML5 input types - Learn web development
is how the browser styles its appearance. Often, search fields are rendered with rounded corners; they also sometimes display an "(X)", which clears the field of any value when clicked). Additionally, on devices with dynamic keyboards, the keyboard's enter key may read "search", or display a magnifying glass icon. The below screenshots show a non-empty search field in Firefox 71, Safari 13, and
Chrome 79 on macOS, and Edge 18 and
Chrome 79 on Windows 10. Note that the clear icon only appears if the field has a value, and, apart from Safari, it is only displayed when the field is focused. Another feature worth noting is that the values of a search field can be automatically saved and re-used to offer auto-completion across multiple pages of the same website; this tends to happen automaticall...
...ith further constraining possible via the step attribute (whose value varies according to input type). <label for="myDate">When are you available this summer?</label> <input type="date" name="myDate" min="2013-06-01" max="2013-08-31" step="7" id="myDate"> Browser support for date/time inputs You should be warned that the date and time widgets don't have the best browser support. At the moment,
Chrome, Edge, and Opera support them well, but there is no support in Internet Explorer, Safari has some mobile support (but no desktop support), and Firefox supports time and date only. 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. Most modern frameworks...
HTML forms in legacy browsers - Learn web development
ere are other resources that can be amazingly helpful: Browser vendor documentation Mozilla: You're in the right place, just browse MDN Microsoft: Internet Explorer Standards Support Documentation WebKit: Because there are several different editions of this engine, things are a little trickier. The WebKit blog and Planet WebKit aggregate the best articles by WebKit core developers.
Chrome platform status site is also important. As well as the Apple web site. Make things simple Because HTML forms involves complex interaction, there is one rule of thumb: keep it simple, also known as the "KISS principal". There are so many cases where we want forms that are "nicer" or "with advanced functionality", but building efficient HTML Forms is not a question of design or technolog...
...A" in some cases --> <button type="submit" name="IWantTo" value="A"> <em>Do A</em> </button> Choosing one solution or the other is up to you based on your project's constraints. Let go of CSS One of the big issues with HTML Forms is styling form widgets with CSS. Form controls appearance is browser and operating system specific. For example, the input of color type looks different in Safari,
Chrome and Firefox browser, but the color picker widget is the same in all browsers on a device as it opens up the operating system's native color picker. It's generally a good idea to not alter the default appearance of form control because altering one CSS property value may alter some input types but not others. For example, if you declare input { font-size: 2rem; }, it will impact number, date, and...
CSS property compatibility table for form controls - Learn web development
Text and font color N.A. N.A. font N.A. N.A. letter-spacing N.A. N.A. text-align N.A. N.A. text-decoration N.A. N.A. text-indent N.A. N.A. text-overflow ...
...order-radius No[1] No[1] box-shadow No[1] No[1] Range See the range input type. There is no standard way to change the style of the range grip and Opera has no way to tweak the default rendering of the range widget. Property N T Note CSS box model width Yes Yes height Partial[1] Partial[1]
Chrome and Opera add some extra space around the widget, whereas Opera on Windows 7 stretches the range grip. border No Yes margin Yes Yes padding Partial[1] Yes The padding is applied, but has no visual effect. Text and font color N.A. N.A. font N.A. N.A. lett...
Styling web forms - Learn web development
rea { font-family: inherit; font-size: 100%; } The inherit property value causes the property value to match the computed value of the property of its parent element; inheriting the value of the parent. The screenshots below show the difference. On the left is the default rendering of an <input type="text">, <input type="date">, <select>, <textarea>, <input type="submit">, and a <button> in
Chrome on macOS, with the platform's default font style in use. On the right are the same elements, with our above style rule applied. The defaults differed in a number of ways. Inheriting should change their fonts to that of the parent's font family -- in this case the default serif font of the parent container. They all do, with a strange exception -- <input type="submit"> does not inherit from the...
...latform's default font style in use. On the right are the same elements, with our above style rule applied. The defaults differed in a number of ways. Inheriting should change their fonts to that of the parent's font family -- in this case the default serif font of the parent container. They all do, with a strange exception -- <input type="submit"> does not inherit from the parent paragraph in
Chrome. Rather, it uses the font-family: system-ui. This is another reason to use <button> elements over their equivalent input types! There's a lot of debate as to whether forms look better using the system default styles, or customized styles designed to match your content. This decision is yours to make, as the designer of your site, or web application. Box sizing All text fields have complete sup...
Installing basic software - Learn web development
rite code in. This could be a text editor (e.g. Visual Studio Code, Notepad++, Sublime Text, Atom, GNU Emacs, or VIM), or a hybrid editor (e.g. Dreamweaver or WebStorm). Office document editors are not suitable for this use, as they rely on hidden elements that interfere with the rendering engines used by web browsers. Web browsers, to test code in. Currently, the most-used browsers are Firefox,
Chrome, Opera, Safari, Internet Explorer and Microsoft Edge. You should also test how your site performs on mobile devices and on any old browsers your target audience may still be using (such as IE 8-10.) Lynx, a text-based terminal web browser, is great for seeing how your site is experienced by visually-impaired users. A graphics editor, like GIMP, Figma, Paint.NET, Photoshop, or XD, to make images ...
...obably do better than Notepad or TextEdit. We recommend starting with Visual Studio Code, which is a free editor, that offers live previews and code hints. Installing modern web browsers For now, we'll install a couple of desktop web browsers to test our code in. Choose your operating system below and click the relevant links to download installers for your favorite browsers: Linux: Firefox,
Chrome, Opera, Brave. Windows: Firefox,
Chrome, Opera, Internet Explorer, Microsoft Edge, Brave (Windows 10 comes with Edge by default; if you have Windows 7 or above, you can install Internet Explorer 11; otherwise, you should install an alternative browser). macOS: Firefox,
Chrome, Opera, Safari, Brave (MacOS and iOS come with Safari by default). Before going on, you should install at least two of...
What is JavaScript? - Learn web development
r on a page, or some new content displayed (as we saw above in our simple demo) for example, that's the DOM in action. The Geolocation API retrieves geographical information. This is how Google Maps is able to find your location and plot it on a map. The Canvas and WebGL APIs allow you to create animated 2D and 3D graphics. People are doing some amazing things using these web technologies --see
Chrome Experiments and webglsamples. Audio and Video APIs like HTMLMediaElement and WebRTC allow you to do really interesting things with multimedia, such as play audio and video right in a web page, or grab video from your web camera and display it on someone else's computer (try our simple Snapshot demo to get the idea). Note: Many of the above demos won't work in an older browser -- when experime...
...MediaElement and WebRTC allow you to do really interesting things with multimedia, such as play audio and video right in a web page, or grab video from your web camera and display it on someone else's computer (try our simple Snapshot demo to get the idea). Note: Many of the above demos won't work in an older browser -- when experimenting, it's a good idea to use a modern browser like Firefox,
Chrome, Edge or Opera to run your code in. You will need to consider cross browser testing in more detail when you get closer to delivering production code (i.e. real code that real customers will use). Third party APIs are not built into the browser by default, and you generally have to grab their code and information from somewhere on the Web. For example: The Twitter API allows you to do things ...
Client-Server Overview - Learn web development
the actual content itself, which is in the body): GET https://developer.mozilla.org/search?q=client+server+overview&topic=apps&topic=html&topic=css&topic=js&topic=api&topic=webdev HTTP/1.1 Host: developer.mozilla.org Connection: keep-alive Pragma: no-cache Cache-Control: no-cache Upgrade-Insecure-Requests: 1 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko)
Chrome/52.0.2743.116 Safari/537.36 Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8 Referer: https://developer.mozilla.org/ Accept-Encoding: gzip, deflate, sdch, br Accept-Charset: ISO-8859-1,UTF-8;q=0.7,*;q=0.7 Accept-Language: en-US,en;q=0.8,es;q=0.6 Cookie: sessionid=6ynxs23n521lu21b1t136rhbv7ezngie; csrftoken=zIPUJsAZv6pcgCBJSCj1zU6pQZbfMUAT; dwf_section_edit=False;...
...y, though the first line identifies this request as a POST. ...
Command line options
p ~/Desktop/myapplication.xulapp /Library/Frameworks/XUL.framework/xulrunner-bin --install-app ~/Desktop/myapplication.xpi --register-global Registers XULRunner on the system for all users. Must be run as admin / root. --register-user Registers XULRunner for a single user. --unregister-global Unregisters XULRunner for all users. --unregister-user Unregisters XULRunner for a single user.
Chrome -
chrome chrome_URL Load the specified
chrome. firefox -
chrome chrome://inspector/content -register
chrome_URL Register the specified
chrome, but do not start application. Add-ons Gecko 1.9.2 note -install-global-extension and -install-global-theme have been removed from Gecko 1.9.2 and upwards. -install-global-extension /path/to/extension Installs the extension into the applicatio...
...LAY Set the X display to use. --g-fatal-warnings Make all warnings fatal. --sync Make X calls synchronous. ...
Creating a Language Pack
with the en-US files from the original source. Every time you want to create a langpack, you need to be in the directory obj-firefox-build/browser/locales. It is likely that you will continue to generate language packs as your progress just to test your work. While in that directory, issue the following command: $ make merge-x-testing LOCALE_MERGEDIR=$(PWD)/mergedir x-testing: browser
chrome browser aboutCertError.dtd // add and localize this file ... // lots of notifications about missing entities ... x-testing: changed: 6 missingInFiles: 6124 missing: 5 0% of entries changed This step is not necessary anymore to create the language pack, because it is included in the next command. It is only useful if you want to preview the cont...
...ll now merge the localized files from x-testing locale with the en-US files from the original source. Issue the following command: $ make merge-x-testing LOCALE_MERGEDIR=$(PWD)/mergedir rm -f -rf mergedir MACOSX_DEPLOYMENT_TARGET= compare-locales -m mergedir /Users/your_id/Mozilla/vc/mozilla-aurora/browser/locales/l10n.ini /Users/your_id/Mozilla/vc/l10n-central x-testing x-testing: browser
chrome browser aboutCertError.dtd // add and localize this file ... // lots of notifications about missing entities ... x-testing: changed: 6 missingInFiles: 6124 missing: 5 0% of entries changed If you now preview the contents of the mergedir, you'll see that it contains the files which in your localization were missing some entities. All other files...
Makefile - variables
f real platform a target platform is being built on(building mobile binaries on GNU/Linux). Distribution/Release variables Variable Description DIST Top level distribution directory for install/packaging/repacking. DIST_FILES A list of files copied into the distribution archive(~application.ini). DIST_
CHROME_FILES Exists in rules.mk but not referenced by mozilla-central. Deprecated? FINAL_TARGET Directory to install distributed content. default=$(DIST)/bin XPI_NAME If set FINAL_TARGET=$(DIST)/xpi-stage/$(XPI_NAME) DIST_SUBDIR If set FINAL_TARGET will be $(DIST)/bin/$(DIST_SUBDIR) [ metro build ] ...
...t FINAL_TARGET=$(DIST)/xpi-stage/$(XPI_NAME) DIST_SUBDIR If set FINAL_TARGET will be $(DIST)/bin/$(DIST_SUBDIR) [ metro build ] l10n.mk and localization Variable Description EN_US_BINARY_URL Server URL from which wget will FTP binaries. L10NBASEDIR MOZ_
CHROME_MULTILOCALE A list of locale names to process MOZ_
CHROME_FILE_FORMAT both, file, jar, omni, symlink PACKAGER_NO_LIBS Hack to allow one makefile to include another without pulling in libs:: target definitions. STAGEDIST Local staging directory for localization and packaging. Todo: xpcom/xpinstall variables: https://d...
How Mozilla's build system works
xultree_s.$(LIB_SUFFIX) \ $(DIST)/lib/$(LIB_PREFIX)gkxulgrid_s.$(LIB_SUFFIX) \ $(NULL) include $(topsrcdir)/config/rules.mk SHARED_LIBRARY_LIBS is set to a list of static libraries, which should be linked into this shared library. Note the use of LIB_PREFIX and LIB_SUFFIX to make this work on all platforms. Building jar files jar files are used for packaging
chrome files (XUL, JavaScript, and CSS). For more information on jar packaging, see this document. Here, we will only cover how to set up a makefile to package jars. Below is an example: DEPTH = ../../../.. topsrcdir = @top_srcdir@ srcdir = @srcdir@ VPATH = @srcdir@ include $(DEPTH)/config/autoconf.mk include $(topsrcdir)/config/rules.mk As you can see, ther...
...= @top_srcdir@ srcdir = @srcdir@ VPATH = @srcdir@ include $(DEPTH)/config/autoconf.mk include $(topsrcdir)/config/rules.mk As you can see, there are no extra variables to define. If a jar.mn file exists in the same directory as this Makefile.in, it will automatically be processed. Although the common practice is to have a resources directory that contains the jar.mn and
chrome files, you may also put a jar.mn file in a directory that creates a library, in which case it will be processed. Related Links See the glossary of makefile variables for information about specific variables and how to use them. Original Document Information Author: Brian Ryner Copyright Information: Portions of this content are (C) 1998-2006 by individual mozilla.org contributors; content...
ESLint
will apply to the whole directory. My script is a frame-script, or includes items that loaded into content scripts: Add a line to tell eslint to use the frame-script environment: /* eslint-env mozilla/frame-script */ My script is a worker: Add a line to tell eslint to use the worker environment: /* eslint-env worker */ or, to use a
chrome worker environment: /* eslint-env mozilla/
chrome-worker */ My file uses
Chrome/XBL specific globals Either, specify the global at the top of the file: /* globals My
ChromeGlobal */ or, add to the global section toolkit/.eslintrc.js if it is widely used. Foo.jsm exports a symbol, but that is not recognised by ESlint Check it is listed...
...tly in tools/lint/eslint/modules.json Using Services.scriptloader.loadSubScript? You'll need to include the following just above it: /* import-globals-from relative/path/to/file.js */ do_check_eq, add_task not defined in a test directory. Ensure there is a .eslintrc.js file that extends one of: "plugin:mozilla/browser-test" "plugin:mozilla/
chrome-test" "plugin:mozilla/mochitest-test" "plugin:mozilla/xpcshell-test" See other test directories for how to do this. I need to test that something isn't defined. Do something like: // eslint-disable-next-line no-undef it.does.not.exist(); Need More Help? Join the #eslint channel on irc.mozilla.org and ask away. ...
Displaying Places information using views
the following built-in views: Tree Menu Toolbar Instantiating The three built-in views are simply standard XUL elements with a special type attribute whose value is "places". Every XUL document containing a built-in view must import the stylesheet browser/components/places/content/places.css and overlay the file browser/components/places/content/placesOverlay.xul: <?xml-stylesheet href="
chrome://browser/content/places/places.css" ?> <?xul-overlay href="
chrome://browser/content/places/placesOverlay.xul" ?> It's this stylesheet that binds elements with the special type attribute to one of the views. The overlay contains JavaScript required by the views. It also contains the built-in Places context menu and commands, which you may want to take advantage of in your own uses of the views. ...
.... If you would like your tree view to be styled in the same manner that Firefox styles its uses of the view, you should include the following stylesheet. Note that this stylesheet is different from the one given above, which must be included if you use a built-in Places view. The following stylesheet is optional and only applies styles and icons to the built-in tree view: <?xml-stylesheet href="
chrome://browser/skin/places/places.css" ?> For examples of instantiating a tree view from JavaScript rather than XUL, see Programmatic generation of the built-in tree view. Column binding The built-in tree view makes it easy to hook up specific columns of your tree to specific properties of the result. It does so by recognizing certain magic values of the id attribute on your treecol elements. A pr...
Frame script environment
nager, giving it the following environment: content The DOM window of the content loaded in the browser. may be null (see below) docShell The nsIDocShell associated with the browser. addEventListener() Listen to events from content. removeEventListener() Stop listening to events from content. addMessageListener() Listen to messages from
chrome. removeMessageListener() Stop listening to messages from
chrome. sendAsyncMessage() Send an asynchronous message to
chrome. sendSyncMessage() Send a synchronous message to
chrome. dump() Print a message to the console. atob() Base64 decode. btoa() Base64 encode. Components The usual Components object. In pa...
...ariables you define conflicting with global variables defined by another frame script. You can still access the global directly via this. Frame scripts run with system principals. If you want other principals, you can use a Sandbox. Frame scripts run with system privileges and have access to the Components object, enabling them to use XPCOM objects and JSMs. However, some APIs that work in the
chrome process will not work in a frame script. See Limitations of frame scripts for more details. Events Besides the regular DOM events being captured/bubbling up from content the current content object the following additional events get fired in a frame script environment: unload Fires when the frame script environment is shut down, i.e. when a tab gets closed. If you use a c...
Frame script environment
anager, giving it the following environment: content The DOM window of the content loaded in the browser may be null (see below) docShell The nsIDocShell associated with the browser. addEventListener() Listen to events from content. removeEventListener() Stop listening to events from content. addMessageListener() Listen to messages from
chrome. removeMessageListener() Stop listening to messages from
chrome. sendAsyncMessage() Send an asynchronous message to
chrome. sendSyncMessage() Send a synchronous message to
chrome. dump() Print a message to the console. atob() Base64 decode. btoa() Base64 encode. Components The usual Components object. In pa...
...s defined by another frame script. You can still access the global directly using this. Frame scripts run with system principals. If you want other principals or when interacting with untrusted page scripts, you should use a Sandbox. Frame scripts run with system privileges and have access to the Components object, enabling them to use XPCOM objects and JSMs. However, some APIs that work in the
chrome process do not work in a frame script. See Limitations of frame scripts for more details. Events Besides the regular DOM events being captured/bubbling up from content the current content object the following additional events get fired in a frame script environment: unload Bubbles No Fires when the frame script environment is shut down, i.e. when a tab ge...
CSS -moz-bool-pref() @supports function
HTML <div id="pref-test"> This will have a green background if the <code>test</code> preference is enabled. ...
... HTML <div id="pref-test"> This will have a green background if the <code>test</code> preference is enabled. ...
IPDL Tutorial
between parent and a child end points, called actors. An IPDL protocol declares how actors communicate: it declares the possible messages that may be sent between actors, as well as a state machine describing when messages are allowed to be sent. The parent actor is typically the more permanent side of the conversation: Parent/Child Actors Parent Child IPC Tabs
Chrome process Content process IPC Plugins Content process Plugin Process Each protocol is declared in a separate file. The IPDL compiler generates several C++ headers from each IPDL protocol. This generated code manages the details of the underlying communication layer (sockets and pipes), constructing and sending messages, ensuring that all actors adhere to their specification...
...ely need to block on a reply, use sync semantics very carefully. It is possible to get into trouble with careless uses of synchronous messages; while IPDL can check and/or guarantee that your code does not deadlock, it is easy to cause nasty performance problems by blocking. Please don't use RPC semantics. RPC semantics exists mainly to support remoting plugins (NPAPI), where we have no choice.
Chrome to content calls (for IPC tabs) must only use async semantics. In order to preserve responsiveness, the
chrome process may never block on a content process which may be busy or hung. Message Delivery Order Delivery is "in-order", that is, messages are delivered to the receiver in the order that they are sent, regardless of the messages' semantics. If an actor A sends messages M1 then M2 to act...
JavaScript OS
OS.Constants OS-related constants, including errors, file opening modes, system configuration, etc. OS.File Access to the native file system. ...
... OS.Constants OS-related constants, including errors, file opening modes, system configuration, etc. OS.File Access to the native file system. ...
TimerFirings logging
ative label. Interface and observer timers only have an address, which is less useful, but they are uncommon enough that this usually doesn't matter much. The above example shows only timers from C++ within Gecko. There are also timers for setTimer or setInterval calls in JavaScript code, as the following sample shows. ...
... The informative labels are only present on function timers that have had their creation site annotated. For unannotated function timers, there are three possible behaviours. First, on Mac the code uses dladdr to get the name immediately, and the output will look like the following. ...
Preference reference
event.clipboardevents.enabled lets websites get notifications if the user copies, pastes, or cuts something from a web page, and it lets them know which part of the page had been selected. The emitting of the oncopy, oncut and onpaste events are controlled by this preference. javascript.options.showInConsoleThe preference javascript.options.showInConsole controls whether errors or warnings in
chrome code are shown in the Error Console.javascript.options.strictTechnical review completed.mail.tabs.drawInTitlebarStarting in Thunderbird 17.0, the tabs are drawn in the title bar. The old behavior can be restored by setting the preference mail.tabs.drawInTitlebar to false.nglayout.debug.disable xul fastloadThe preference nglayout.debug.disable_xul_fastload controls whether or not XUL fastload is u...
...iew completed.mail.tabs.drawInTitlebarStarting in Thunderbird 17.0, the tabs are drawn in the title bar. The old behavior can be restored by setting the preference mail.tabs.drawInTitlebar to false.nglayout.debug.disable xul fastloadThe preference nglayout.debug.disable_xul_fastload controls whether or not XUL fastload is used.nglayout.debug.disable_xul_cacheTo improve performance, Mozilla caches
chrome XUL documents the first time they load for faster loading later. The effect is that the source XML file is not read and re-parsed each time the
chrome in question is displayed. The XUL cache is serialized and saved between Mozilla sessions in the XUL FastLoad file, which saves a "compiled" version of the XUL and JavaScript in a document to disk for faster startup the next time the application run...
Preferences system
.is.only.xul"> <prefpane id="pane1" label="&pane1.title;"> <preferences> <preference id="pref1" name="pref.name" type="bool"/> </preferences> .. UI elements that refer to the preferences above, e.g.: <checkbox id="check1" preference="pref1" label="&check1.label;" accesskey="&check1.accesskey;"/> </prefpane> <prefpane id="pane2" label="&pane2.title;" src="
chrome://uri/to/pane.xul"/> </prefwindow> Pane content can be specified inline or an external
chrome URI supplied for pane content to be loaded in via a dynamic overlay. You should be careful to read the HIGs for the platforms you are targeting and use the XUL preprocessor if necessary to set different window titles as appropriate. You should also be careful to specify the width of the window (in em) a...
... platform, as well as the height (in em) for platforms where the window size does not change as the selected panel is changed (e.g. Windows). Usage in XULRunner applications When calling openDialog() to open a preferences dialog, "toolbar" should be included in the features string. ...
compare-locales
gs cross-channel repository, the toml configuration files are in the _configs subdirectory, browser.toml, mobile_android.toml, mail.toml and calendar.toml, and suite.toml. Options To get a brief list of available options, use the --help flag: $ compare-locales --help The output The output of compare-locales shows the missing and obsolete strings in a pseudo-diff format. ...
...md2.label migration/migration.dtd -importFromFile.accesskey -importFromFile.label +importFromHTMLFile.accesskey +importFromHTMLFile.label You can assume changed strings when you see entities removed and added with a similar name. The file names will be shown in a hierarchical form, so in the example above, your files are browser.dtd in ab-CD/browser/
chrome/browser and migration.dtd in another directory level deeper. The output closes with a summary, giving the total counts of missing and obsolete strings and words, and some statistics on how many strings are changed or not, excluding access- and commandkeys. That gives localizers an idea on how thorough the localization is. This number won't reach 100% in general, mid 80s should be the target, tho...
Toolkit API
The Mozilla Toolkit is a set of programming interfaces (APIs) built on top of Gecko which provide advanced services to XUL applications. ...
...including extensions, themes, and XULRunner applications Extension Packaging: specific information about how to package extensions Theme Packaging: specific information about how to package themes Multiple-item Extension Packaging: specific information about multiple-item extension XPIs XUL Application Packaging: specific information about how to package XULRunner applications
Chrome Registration Printing in XUL Apps See also The following developer pages contain examples and discussions of particular topics: XUL XUL overlays Developing extensions XULRunner Developing themes DOM RDF Storage ...
Components.utils.Sandbox
s option was removed in Gecko version 26. Use wantGlobalProperties instead. wantXrays A Boolean value indicating whether the sandbox wants Xray vision with respect to same-origin objects outside the sandbox. Default: true. "Xray vision" is exactly the same Xray behavior that script always gets, by default, when working with DOM objects across origin boundaries. This is primarily visible for
chrome code accessing content. However, it also occurs during cross-origin access between two content pages, since each page sees a "vanilla" view of the other. The protection is bidirectional: the caller sees the bonafide DOM objects without being confused by sneakily-redefined properties, and the target receives appropriate privacy from having its expandos inspected by untrusted callers. In situations...
...ives appropriate privacy from having its expandos inspected by untrusted callers. In situations where only unidirectional protection is needed, callers have the option to waive the X-ray behavior using wrappedJSObject or XPCNativeWrapper.unwrap(). In general, when accessing same-origin content, script gets a Transparent wrapper rather than an Xray wrapper. However, sandboxes are often used when
chrome wants to run script as another origin, possibly to interact with the page. In this case, same-origin Xrays are desirable, and wantXrays should be set to true. See Safely accessing content DOM from
chrome for more details. Methods available on the Sandbox object dump() - Similar to window.dump(). debug() For more information on the built-in Sandbox functions, please consult the source cod...
amIInstallTrigger
/extensions/amIInstallTrigger.idlScriptable Called when an install completes or fails. 1.0 66 Introduced Gecko 2.0 Inherits from: nsISupports Last changed in Gecko 2.0 (Firefox 4 / Thunderbird 3.3 / SeaMonkey 2.1) Method overview boolean enabled(); boolean install(in nsIVariant aArgs, [optional] in amIInstallCallback aCallback); boolean install
Chrome(in PRUint32 aType, in AString aUrl, in AString aSkin); Deprecated since Gecko 2.0 boolean startSoftwareUpdate(in AString aUrl, [optional] in PRInt32 aFlags); Deprecated since Gecko 2.0 boolean updateEnabled(); Deprecated since Gecko 2.0 Constants Retained for backwards compatibility. Constant Value Description SKIN 1 LOCALE 2 ...
...the name of an add-on to be installed. The value of the property should either be a string URL, or an object with the following properties: URL for the add-on's URL IconURL for an icon for the add-on Hash for a hash of the add-on. aCallback Optional A callback to call as each installation succeeds or fails. Return value true if the installations were successfully started. install
Chrome Starts installing a new add-on. This method is deprecated, please use install() in the future. boolean install
Chrome( in PRUint32 aType, in AString aUrl, in AString aSkin ); Parameters aType Unused, retained for backwards compatibility. aUrl The URL of the add-on. aSkin Unused, retained for backwards compatibility. Return value true if the installation was successfully starte...
mozIAsyncFavicons
the database or taking the place of otherwise fetched icon data when calling setAndFetchFaviconForPage later. Favicon data for favicon URIs that are not associated with a page URI via setAndFetchFaviconForPage will be stored in memory, but may be expired at any time, so you should make an effort to associate favicon URIs with page URIs as soon as possible. It's better to not use this function for
chrome: icon URIs since you can reference the
chrome image yourself. getFaviconLinkForIcon/Page will ignore any associated data if the favicon URI is "
chrome:" and just return the same
chrome URI. This function does NOT send out notifications that the data has changed. Pages using this favicons that are visible in history or bookmarks views will keep the old icon until they have been refreshed by other ...
...conDataFromDataURL() Same as replaceFaviconData() but the data is provided by a string containing a data URL. Favicon data for favicon URIs that are not associated with a page URI via setAndFetchFaviconForPage will be stored in memory, but may be expired at any time, so you should make an effort to associate favicon URIs with page URIs as soon as possible. It's better to not use this function for
chrome: icon URIs since you can reference the
chrome image yourself. getFaviconLinkForIcon/Page will ignore any associated data if the favicon URI is "
chrome:" and just return the same
chrome URI. This function does NOT send out notifications that the data has changed. Pages using this favicons that are visible in history or bookmarks views will keep the old icon until they have been refreshed by other ...
mozIJSSubScriptLoader
onally, properties of the targetObj target object can be referred to as variables in the loaded script. If the script returns a value, it will be returned by this method. Note: This method must only be called from JavaScript! jsval loadSubScript( in string url, in Object targetObj Optional, in string charset Optional, ); Example let context = {}; Services.scriptloader.loadSubScript("
chrome://my-package/content/foo-script.js", context, "UTF-8" /* The script's encoding */); Parameters url The URL pointing to the script to load. It must be a local
chrome:, resource: or file: URL (see bug 307686 and bug 418356). Note: In versions of Gecko prior to Gecko 1.9, you could use data: URLs as well, but this introduced security concerns, and is no l...
...e file is interpreted as ASCII. loadSubScriptWithOptions() Same as loadSubScript(), except that parameters after url are expressed as an object, and a new ignoreCache option is available. Note: This method must only be called from JavaScript! jsval loadSubScriptWithOptions( in string url, in Object options ); Parameters url The URL pointing to the script to load. It must be a local
chrome:, resource: or file: URL. options An object that may include any of these parameters: Property Type Description target object The object to use as the scope object for the script being executed. It defaults to the global object of the caller. Note: Undeclared variables in the loaded script will be created as global variables in the caller (ie.: in the ...
nsIAlertsService
OT_AVAILABLE Unable to display the notification; this may happen, for example, on Mac OS X if Growl is not installed. Example Simple usage The following code was used to display the above notification. var alertsService = Components.classes["@mozilla.org/alerts-service;1"]. ...
...Click here to focus the tab', true, null, notifListener, 'StackOverflow Notifier'); closeAlert() Closes alerts created by the service. void closeAlert( in AString name, Optional in nsIPrincipal principal Optional ); Parameters name The name of the notification to close. If no name is provided ...
nsIDOMParser
When you create a DOMParser from a privileged script, you can pass parameters to the constructor, more on that below. ...
...he defaults by providing arguments to the DOMParser constructor or calling parser.init(). Usually you don't need to do that. If you come across a situation when these matter, feel free to ask questions in mozilla.dev.tech.dom and update this documentation to mention these cases. When a DOMParser is instantiated by calling new DOMParser(), it inherits the calling code's principal (except that for
chrome callers the principal is set to the null principal) and the documentURI and baseURI of the window the constructor came from. If the caller has UniversalXPConnect privileges, it can pass parameters to new DOMParser(). If fewer than three parameters are passed, the remaining parameters will default to null. The first parameter is the principal to use; this overrides the default principal normally ...
nsIDOMWindow
ce. Read only. Note: Prior to Gecko 8.0 this attribute was part of nsIDOMStorageWindow. name DOMString Get or set the name of this window. This attribute is "replaceable" in JavaScript. parent nsIDOMWindow The window's parent window. If there is no parent window, or if the parent is of a different type, this is the current window. The window hierarchy does not cross
chrome-content boundaries. Read only. scrollX long The current horizontal (x) scroll position, in pixels. This attribute is "replaceable" in JavaScript. Read only. scrollY long The current vertical (y) scroll position, in pixels. This attribute is "replaceable" in JavaScript. Read only. scrollbars nsIDOMBarProp The object that controls whether or not scrollba...
... not supporting zoom. This attribute should always return 1.0 for implementations not supporting text zoom. 1.0 represents normal (unzoomed) size. Native code only! top nsIDOMWindow The root window for the hierarchy of windows that contain this nsIDOMWindow. This is the window itself if there is no parent, or if the parent is of a different type. The window hierarchy does not cross
chrome-content boundaries. This attribute is "replaceable" in JavaScript. Read only. windowRoot nsIDOMEventTarget The window root for this window. This is useful for connecting event listeners to this window as well as every other window nested in that window root. Read only. Native code only! Note: Prior to Gecko 7.0 this attribute was part of nsIDOMWindow2. Methods getComputedSt...
nsIDOMWindowUtils
lues of aAdditionalFlags of sendQueryContentEvent(). This flag must not be set with QUERY_CONTENT_FLAG_USE_NATIVE_LINE_BREAK. When this is set, the aOffset and aLength are offset and length in/of the content generated with XP line breaks (I.e., "\n" on all platforms). Additionally, the offset, length and string of result are also computed with XP line breaks. This is more useful for Javascript in
chrome. QUERY_CONTENT_FLAG_SELECTION_SPELLCHECK 0x0002 One of values of aAdditionalFlags of sendQueryContentEvent(). QUERY_CONTENT_FLAG_SELECTION_IME_RAWINPUT 0x0008 One of values of aAdditionalFlags of sendQueryContentEvent(). QUERY_CONTENT_FLAG_SELECTION_IME_SELECTEDRAWTEXT 0x0010 One of values of aAdditionalFlags of sendQueryContentEvent(). QUERY...
....g., "\r\n" on Windows) SELECTION_SET_FLAG_USE_XP_LINE_BREAK 0x0001 One of values of aAdditionalFlags of sendSelectionSetEvent(). This flag must not be set with SELECTION_SET_FLAG_USE_NATIVE_LINE_BREAK. When this is set, the aOffset and aLength are offset and length in/of the content generated with XP line breaks (I.e., "\n" on all platforms). This is more useful for Javascript in
chrome SELECTION_SET_FLAG_REVERSE 0x0002 One of values of aAdditionalFlags of sendSelectionSetEvent(). If this is set, the selection is set from aOffset + aLength to aOffset. SELECT_CHARACTER 0 SELECT_CLUSTER 1 SELECT_WORD 2 SELECT_LINE 3 SELECT_BEGINLINE 4 SELECT_ENDLINE 5 SELECT_PAR...
nsIDocShell
ng that was used when loading the data into the document. Setting this attribute overrides the encoding; however, to update the DOM or display of the content, you need have the data reparsed. Overriding the character set also sets the fallback encoding for the container frame. Note: Prior to Gecko 12.0, this attribute was part of a separate nsIDocCharset interface.
chromeEventHandler nsIDOMEventTarget Events generated in the frame bubble up to its
chromeEventHandler. In the case of a content frame or subframe this is the containing
chrome frame. In the case of a
chrome frame this is the same as the frame element. This attribute allows
chrome to tie in to handle DOM events that may be of interest to
chrome. contentViewer nsIContentViewer Conten...
...) Cancel the XPCOM timers for each meta-refresh URI in this docshell, and this docshell's children, recursively. The meta-refresh timers can be restarted using resumeRefreshURIs(). If the timers are already suspended, this has no effect. void suspendRefreshURIs(); Parameters None. tabToTreeOwner() Tells the docshell to offer focus to its tree owner. This is currently only necessary for embedding
chrome. void tabToTreeOwner( in boolean forward, out boolean tookFocus ); Parameters forward Whether to tab forwards or backwards. tookFocus Whether or not an element was successfully focused. ...
nsIFrameLoader
pe Description delayRemoteDialogs boolean depthTooGreat boolean Find out whether the loader's frame is at too great a depth in the frame tree. This can be used to decide what operations may or may not be allowed on the loader's docshell. Read only. docShell nsIDocShell Get the docshell from the frame loader. Read only. messageManager nsI
ChromeFrameMessageManager The message manager handling messages for this frame. Read only. Methods activateFrameEvent() Activates event forwarding from client (remote frame) to parent. void activateFrameEvent( in AString aType, in boolean capture ); Parameters aType The event type for which to enable forwarding. capture Whether or not to capture these events. activateRemoteFr...
...ther or not to ignore the root scroll frame. ...
nsIFrameScriptLoader
in AString aURL, in boolean aAllowDelayedLoad, [optional] in boolean aRunInGlobalScope) void removeDelayedFrameScript(in AString aURL); jsval getDelayedFrameScripts(); loadFrameScript() Load a script in the remote frame. Frame scripts are loaded as soon as loadFrameScript() is called. ...
...licable frame: every open frame in the given window for the window message manager, or every frame in every window for the global message manager if aAllowDelayedLoad is true, then the script will also be loaded into any applicable new frames opened after the loadFrameScript() call. Otherwise it will only be loaded into frames that exist at the time of the call. If this function is called on a
ChromeMessageSender: it will load the frame script only into this
ChromeMessageSender's frame aAllowDelayedLoad should always be true. It's possible that the frame for this
ChromeMessageSender is not yet available at the time of the loadFrameScript() call, and if you pass false in this situation, your process script won't be loaded. For example: let windowMM = window.messageManager; windowMM.load...
nsIJetpack
1.0 66 Introduced Gecko 2.0 Inherits from: nsISupports Last changed in Gecko 2.0 (Firefox 4 / Thunderbird 3.3 / SeaMonkey 2.1) Method overview void sendMessage(in AString aMessageName /* [optional] in jsval v1, [optional] in jsval v2, ... ...
...he script to evaluate in the Jetpack process. createHandle() This creates an opaque handle that can transparently be exchanged between processes. nsIVariant createHandle(); Parameters None. Return value The new handle. destroy() This terminates the Jetpack process. void destroy(); Parameters None. Special Messages If an exception goes uncaught in the Jetpack process, it will be reported to the
chrome process via a message with the name core:exception. The message comes with one argument, which represents the exception object that was thrown. Warning: bug 589308 prevents this message from being sent in some situations. History See bug 556846 for details. See also nsIJetpackService Jetpack Processes ...
nsIMsgAccountManagerExtension
t implementing this Interface. The interface is basically a manifest and defines the properties of the new Panel. A Panel consists of a XUL file with a Page Element as root element and the Property File containing the localized name. Note: The Account Manager relies on a very strong naming scheme to load and unload a panel. An Account Manager Extension with a "name" attribute of "devmo" and the "
chromePackageName" attribute set to "extension@example.org" means, that the Account Manager expects to find a XUL file in "
chrome://extension@example.org/content/am-devmo.xul" and a property file in "
chrome://extension@example.org/locale/am-devmo.properties" containing a property named "prefPanel-devmo". You have to register any new Account Manager Extensions via the the category manager at start up. Si...
...n Gecko ??? Inherits from: nsISupports Method overview boolean showPanel(in nsIMsgIncomingServer server); Attributes Attribute Type Description name ACString name of the account manager extension. It has to be unique and defines the file name of the property file and the XUL Page as well as the name of the localized string contained in the property file. This attribute is readonly!
chromePackageName ACString
chrome package, where the files for the new panel are located. This is usually GUID of the ID of the addons which adds the new Panel. This attribute is readonly! Methods showPanel() Before displaying a panel in the Account Manager this method is triggered. boolean showPanel( in nsIMsgIncomingServer server ); Parameters server The account for which the panel should be...
nsIMsgWindow
MsgHeaderSink This allows the backend code to send message header information to the UI. transactionManager nsITransactionManager This is used to track undo/redo transactions. openFolder nsIMsgFolder This is used to track the folder currently open in the UI. rootDocShell nsIDocShell This is used to track the
chrome window's nsIDocShell object. You don't normally need to set this, instead set the domWindow property instead. messageWindowDocShell nsIDocShell Readonly: This retrieves the nsIDocShell object for the message pane. You should not store this in a global variable. notificationCallbacks nsIInterfaceRequestor These are currently used to set notif...
... boolean Remember the message's charset was overridden, so it can be inherited (e.g for quoting). stopped boolean Check if a running url been stopped. If you are checking this flag, you need to clear it before you start your operation since there's no convenient place to clear it. domWindow nsIDOMWindow The message window's global
chrome window object. Set this to initialize the rootDocShell. Methods displayHTMLInMessagePane() Loads the specified HTML in the message pane. This is equivalent to calling LoadURI on the nsIWebNavigation object with a data: URL specifying the HTML. void displayHTMLInMessagePane(in AString title, in AString body, in boolean clearMsgHd...
nsISessionStore
you want to use in nsISessionStore, you need a nsIDOMWindow object containing browser.xul. This will be the outermost or root nsIDOMWindow in a nsIXULWindow (the window seen by users as a moveable frame on the display). This kind of DOMWindow object can be obtained from other nsIDOMWindow objects (like the sidebar window object) by applying the 'mainWindow' statement from Working_with_windows_in_
chrome_code. This outermost or root window can also be obtained from the list returned by nsIWindowMediator; see example #3 in Working_with_windows_in_
chrome_code. It can also be obtained from an nsIXULWindow using if (xul_win.docShell instanceof nsIInterfaceRequestor) { var win = xul_win.docShell.getInterface(nsIDOMWindow); ... Note on tabs The nsISessionStore APIs referencing nsIDOMNode aT...
...uestor) { var win = xul_win.docShell.getInterface(nsIDOMWindow); ... Note on tabs The nsISessionStore APIs referencing nsIDOMNode aTab require you to get hold of the tab node storing the data. If you you are working in a browser.xul overlay and want the currently selected tab, it's as simple as gBrowser.selectedTab. If you just hold a reference to some content document in the overlay's
chrome window, here is how you find its corresponding tab: function tabFromDoc(doc) { var no = gBrowser.getBrowserIndexForDocument(doc); return gBrowser.tabContainer.childNodes[no]; } // example use: Cc['@mozilla.org/browser/sessionstore;1'] .getService(Ci.nsISessionStore) .setTabValue(tabFromDoc(myContentDoc), 'myKey', 'myValue'); See also The Session store API article. nsISessionStartu...
nsIStringBundleService
ndle(in string aURLSpec); nsIStringBundle createExtensibleBundle(in string aRegistryKey); void flushBundles(); wstring formatStatusMessage(in nsresult aStatus, in wstring aStatusArg); Methods createBundle() nsIStringBundle createBundle( in string aURLSpec ); Parameters aURLSpec The URL of the properties file to load. This is typically a locale URL, e.g.
chrome://global/locale/global.properties Return value A string bundle corresponding to the properties file. This string bundle has functions available on it. On the return value object on you can call functions like GetStringFromName and formatStringFromName see nsIStringBundle. createExtensibleBundle() nsIStringBundle createExtensibleBundle( in string aRegistryKey ); Parameters aRegis...
...e( in string aRegistryKey ); Parameters aRegistryKey The name of the category under which the properties file(s) have been registered. Return value An extensible bundle corresponding to the properties file(s). flushBundles() Flushes the string bundle cache - useful when the locale changes or when we need to get some extra memory back. (Automatically called for the memory-pressure and
chrome-flush-caches global observer topics.) void flushBundles(); Parameters None. formatStatusMessage() Formats a message string from a status code and status arguments. Typically used to format a message received by a nsIProgressEventSink's onStatus method. wstring formatStatusMessage( in nsresult aStatus, in wstring aStatusArg ); Parameters aStatus The status code. This is mapped int...
nsIWindowCreator
embedding/base/nsIWindowCreator.idlScriptable A callback interface used by Gecko to create new browser windows. The application, either Mozilla or an embedding app, must provide an implementation of the Window Watcher component and notify the WindowWatcher during application initialization. Inherits from: nsISupports Last changed in Gecko 0.9.6 Method overview nsIWebBrowser
Chrome create
ChromeWindow(in nsIWebBrowser
Chrome parent, in PRUint32
chromeFlags); Methods create
ChromeWindow() Create a new window. Gecko will/may call this method, if made available to it, to create new windows. nsIWebBrowser
Chrome create
ChromeWindow( in nsIWebBrowser
Chrome parent, in PRUint32
chromeFlags ); Parameters parent The nsIWebBrowser
Chrome of the parent window, if any. null if no parent ...
...his method, if made available to it, to create new windows. nsIWebBrowser
Chrome create
ChromeWindow( in nsIWebBrowser
Chrome parent, in PRUint32
chromeFlags ); Parameters parent The nsIWebBrowser
Chrome of the parent window, if any. null if no parent exists. The newly created window should be made a child/dependent window of the parent, if any (and if the concept applies to the underlying OS).
chromeFlags
Chrome features from nsIWebBrowser
Chrome. Return value An nsIWebBrowser
Chrome for the new window. See also nsIWindowWatcher for more details. ...
nsIWorkerFactory
dom/interfaces/threads/nsIDOMWorkers.idlScriptable Creates and returns a new Worker 1.0 66 Introduced Gecko 2.0 Obsolete Gecko 8.0 Inherits from: nsISupports Last changed in Gecko 2.0 (Firefox 4 / Thunderbird 3.3 / SeaMonkey 2.1) This interface was removed in Gecko 8.0. You don't need to use it anymore to create workers from
chrome. Instead, you can just do new Worker or new
ChromeWorker. Implemented by: threads/workerfactory;1. To create an instance, use: var workerFactory = Components.classes['@mozilla.org/threads/workerfactory;1'] .createInstance(Components.interfaces.nsIWorkerFactory); Method overview nsIWorker new
ChromeWorker(in DOMString aScriptURL); Methods new
ChromeWorker() Returns a new
ChromeWor...
...threads/workerfactory;1. To create an instance, use: var workerFactory = Components.classes['@mozilla.org/threads/workerfactory;1'] .createInstance(Components.interfaces.nsIWorkerFactory); Method overview nsIWorker new
ChromeWorker(in DOMString aScriptURL); Methods new
ChromeWorker() Returns a new
ChromeWorker that will run a specified script. nsIWorker new
ChromeWorker( in DOMString aScriptURL ); Parameters aScriptURL The URL of the script to load into the new worker. Return value An nsIWorker object representing the new
ChromeWorker. See also Using web workers Worker SharedWorker ...
Troubleshooting XPCOM components registration
ng to the Error Console and evaluating Components.classes["contract-id"].name where contract-id is your contract ID. If the response is your contract ID instead of an error, the component was successfully registered and this is the wrong page. Load Failure of Binary Components On the Mozilla trunk (Firefox 3, XULRunner 1.9), components that fail to load will print an error to the Error Console.
Chrome errors must be enabled. If the error appears, you can use NSPR logging to see additional information about the failure by running Firefox from a command prompt: rem Close all Firefox windows! set NSPR_LOG_MODULES=nsNativeModuleLoader:5 set NSPR_LOG_FILE=C:\Path\to\logfile "C:\Program Files\Mozilla Firefox\firefox.exe" Examining this log for warning and errors may provide valuable clues why the...
...d prompt: rem Close all Firefox windows! set NSPR_LOG_MODULES=nsNativeModuleLoader:5 set NSPR_LOG_FILE=C:\Path\to\logfile "C:\Program Files\Mozilla Firefox\firefox.exe" Examining this log for warning and errors may provide valuable clues why the component failed to load. If using Firefox 4 / XULRunner 2.0, make sure that your extension is unpacked and you declared the binary component in your
chrome.manifest. See XPCOM changes in Gecko 2.0 Parsing Errors in JavaScript Components The most common reason for components written in JavaScript to fail is that there are parsing errors. These parsing errors should show up in the Error Console if
chrome errors are enabled. To learn more about enabling
chrome errors, see "How can I see errors in my code" in the Extension FAQs. Registration Failure ...
nsIMsgCloudFileProvider
a unique string identifier which can be used by interface elements for styling. As such, the type should be an alphanumpheric string with no spaces. displayName ACString Readonly: Used for displaying the service name in the user interface. serviceURL ACString Readonly: A link to the homepage of the service, if applicable. iconClass ACString Readonly: A
chrome URL for an icon to be used for representing the service. accountKey ACString Readonly: The unique identifier for the account associated with an instance of an nsIMsgCloudFileProvider. settingsURL ACString Readonly: A
chrome URL for an XHTML page displayed in the account setup dialog window, used for displaying and setting provider-specific settings. This URL should n...
...This URL should not point to external web content. ...
Filelink Providers
t be registered as a component. If the provider is being merged into the comm-central code repository (and thus added to the official Thunderbird build), you must also add the components to the cloudfile/cloudFileComponents.manifest, cloudfile/jar.mn, and installer/package-manifest.in. If the nsIMsgCloudFileProvider is being created as part of an add-on, the add-on must register the component in
chrome.manifest. Also, you must add the component's contract ID to the "cloud-file" category. See cloudfile/cloudFileComponents.manifest for an example, as well as this document on
chrome.manifest files. The Account Setup Dialog The account setup dialog allows the user to select what account type they would like to create from a menulist. Some providers require Thunderbird to do very little in orde...
...he user to fill in additional details in order to connect to the service. Hightail, for example, requires a username and password. Other services may require the user to fill in a server string or port number. A provider implementation can choose what information it gets from the user from the setup dialog by pointing the settingsURL attribute of their nsIMsgCloudFileProvider implementation to a
chrome URL for an XHTML page that contains a form with the extra information. That URL is then loaded into an IFrame directly beneath the provider menulist. Note: The setup dialog window should resize itself automatically in order to fit the content of the IFRAME without scrollbars. Custom settings fields To handle custom settings, the settings XHTML page should contain a form with the id "provider-f...
Main Windows
As such, I've always thought it would be nice to have a list of what xul, js, or other files are that are here, what they do, and where they overlay at different points within the client. ...
...toolkit's customizeToolbar.xul. Items have the same ID's, and contain the same structure. A few odd pieces are missing though. For instance, the "Add New Toolbar" buttons from toolkit aren't in the Thunderbird version. customizeToolbarSheet.xul is a similar implementation written for OSX to give a more native appearance. At compile time these files are added to the toolkit directory so that their
chrome addresses are in global, the same as Firefox's. Why this is this way, I'm not sure at the moment. I assume that customizeToolbars was originally not in the toolkit, but in Firefox's
chrome, or that there were some special changes wanted for Thunderbird's implementation at some point. Regardless, it seems to still be that way now. ...
Building a Thunderbird extension 5: XUL
. We add widgets by inserting new XUL DOM elements into the application window and modify them using scripts and attaching event handlers. While XUL provides the elements of the user interface, actions are written in JavaScript. For our first extension, we will add some text to the Thunderbird status bar. The status bar is implemented in a XUL file called messenger.xul, which can be found in the
chrome/messenger/content/messenger folder which is packaged inside the omni.ja archive. To view this XUL file use the DOM Inspector extension (no longer supported) or look inside the omni.ja archive, which is located in the Thunderbird program folder. omni.ja can be easily browsed by copying the file to a different location and renaming it to omni.zip. If you have trouble with one zip manager (like 7zi...
...files. This also enables version independence between Thunderbird and Thunderbird extensions. Example XUL Overlay Document Create a new file called myhelloworld.xul within the content folder you created earlier with the following content: <?xml version="1.0"?> <overlay id="sample" xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"> <script type="application/javascript" src="
chrome://myfirstext/content/overlay.js"/><!-- A reference to your JavaScript file --> <statusbar id="status-bar"> <statusbarpanel id="my-panel" label="Date"/> </statusbar> </overlay> The <statusbar> widget named status-bar specifies the merge point within the application window that we want to attach to. When parsing our overlay file, the XUL engine will take all child elements of the <statusbar> ...
Creating a Custom Column
small extension that will be adding a column that will display the "Reply-To:" field of an email (if it exists, it if often not set). If you are unfamiliar with the setup and creation of an extension please read Building a Thunderbird Extension. Adding A Column By far the easiest part is the physical addition of the column. For this we overlay messenger.xul, by placing the following line in our
chrome.manifest file: overlay
chrome://messenger/content/messenger.xul
chrome://replyto_col/content/replyto_col_overlay.xul Now that our overlay is set up we need to connect a column to the current columns that exist. Looking in messenger.xul reveals that the columns reside inside a tree with the id "threadTree" whose columns (treecols) reside in "threadCols". To attach our column we add another treec...
...Unfortunately the new column doesn't have any data in it and it doesn't react to sort clicks on it... yet. The Column Handler Now that our column physically exists it's time to give it a bit of personality. The nsIMsgCustomColumnHandler Interface To handle a column we need to implem...
Access StringBundle from Overlay
Stringbundles are handy for localizing your project by removing all of your strings into a separate, easy to access text file. Unfortunately adding the bundles into Thunderbird isn't as easy as adding them to your XUL overlay. ...
... JavaScript as follows: var str = document.getElementById("your-extension-strings"); //get the stringbundle object itself str.getString("propertyName"); //get a string (and do something with it) Alternative way let stringBundleService = Cc["@mozilla.org/intl/stringbundle;1"].getService(Ci.nsIStringBundleService); let bundle = stringBundleService.createBundle("
chrome://your_extension/locale/overlay.properties"); let str = bundle.GetStringFromName("propertyName"); see nsIStringBundleService ...
Theme Packaging
eme for Thunderbird requires knowledge of Cascading Stylesheets (CSS), probably XBL, and some graphic design and aesthetic skill (...or maybe not). This document describes only how Themes are packaged in order to be shown in Firefox's Themes window. Theme File Layout Thunderbird themes are packaged in an XPI file with the following structure: theme.xpi: install.rdf preview.png icon.png
chrome/ browser/files communicator/files global/files mozapps/files ... You must have a top-level
chrome.manifest file which registers the
chrome for the theme (as before) and also an install.rdf manifest that specifies metadata that is displayed in the Appearance section of the Add-ons Manager. preview.png is a preview image which will show when double-clicked on...
...lable bundles, including extensions, themes, and XULRunner applications Extension Packaging: specific information about how to package extensions Theme Packaging: specific information about how to package themes Multiple-item Extension Packaging: specific information about multiple-item extension XPIs XUL Application Packaging: specific information about how to package XULRunner applications
Chrome Registration ...
Using popup notifications
hat's not very pretty; where's the icon? Adding an icon to your notification Adding an icon to a notification is simple. You just need to provide the appropriate CSS. The PopupNotifications.jsm code module adds a popupid attribute to the notification object's icon element. ...
... ...
js-ctypes
ctypes. For a discussion on extended C++ support see bug 505907. Other work made possible by js-ctypes is JNI, this is elaborated on in the JNI.jsm section and not the js-ctypes section due to the JSM abstracting away all of the js-ctypes. Unlike binary XPCOM components, it allows developers to ship a single binary for use with multiple versions of Firefox. Note: js-ctypes is only available from
chrome code; that is, ctypes is not available to websites, only application and extension code. Documentation If you are brand new to js-ctypes, and have no idea about it, the pages you should read first is - ctypes.open followed by Standard OS Libraries. Using JS-Ctypes ctypes.open Custom Native File Standard OS Libraries ...
... ABI CData CType ctypes FunctionType Int64 Library UInt64 View All... Examples Add to iPhoto A Firefox extension that uses js-ctypes to call Carbon and Core Foundation framework routines on Mac OS X to implement an ...
Flash Activation: Browser Comparison - Plugins
best user experience. In each browser, the decision to enable Flash is made by users on a per-site basis. When a site attempts to use Flash, the browser will prompt the user in some way and give the user an opportunity to enable Flash for that site. Flash-blocking extensions are no longer necessary because this functionality is now built into the browser. ...
...cludes links to roadmaps and posts from other vendors. UI Comparison Mozilla Firefox In-page UI is displayed when the site attempts to use Flash. An icon also appears on the left side of the location bar. The user can click on the Flash object or the location bar icon to activate Flash: Users have the choice to allow Flash just for the current session, or to remember their choice: Google
Chrome In-page UI is displayed when the site attempts to use Flash without fallback content: A user can click the plugin element to show a prompt for allowing Flash: If the site provides fallback content for an object element,
Chrome will display that content and will not prompt the user to enable Flash. If a Flash element is not visible to the user, the user will not get a visible prompt. A use...
Plugin Roadmap for Firefox - Plugins
versions of Firefox. Adobe will stop shipping security updates for Flash at the end of 2020. ...
...Adobe Flash Usage in Firefox July 2017 - Firefox Roadmap for Flash End-of-Life Adobe Flash November 2015 - Flash, HTML5 and Open Web Standards July 2017 - Flash & the Future of Interactive Content Google
Chrome Flash Roadmap Sep 2013 - Saying Goodbye to Our Old Friend NPAPI May 2014 - Update on NPAPI Deprecation November 2014 - The Final Countdown for NPAPI August 2016 - Flash and
Chrome December 2016 - Roll-out plan for HTML5 by Default July 2017 - Saying Goodbye to Flash in
Chrome Microsoft Edge and Internet Explorer April 2016 - Putting Users in Control of Flash December 2016 - Extending User Control of Flash with Click-to-Run July 2017 - Flash on Windows Timeline August 2019 - Update on removing Flash from Microsoft Edge and Internet Explorer Apple Safari J...
Preferences System
.is.only.xul"> <prefpane id="pane1" label="&pane1.title;"> <preferences> <preference id="pref1" name="pref.name" type="bool"/> </preferences> .. UI elements that refer to the preferences above, e.g.: <checkbox id="check1" preference="pref1" label="&check1.label;" accesskey="&check1.accesskey;"/> </prefpane> <prefpane id="pane2" label="&pane2.title;" src="
chrome://uri/to/pane.xul"/> </prefwindow> Pane content can be specified inline or an external
chrome URI supplied for pane content to be loaded in via a dynamic overlay. You should be careful to read the HIGs for the platforms you are targeting and use the XUL preprocessor if necessary to set different window titles as appropriate. You should also be careful to specify the width of the window (in em) a...
... platform, as well as the height (in em) for platforms where the window size does not change as the selected panel is changed (e.g. Windows). Usage in XULRunner applications When calling openDialog() to open a preferences dialog, "toolbar" should be included in the features string. ...
Tutorial: Show Allocations Per Call Path - Firefox Developer Tools
Tutorial: Show Allocations Per Call Path This page shows how to use the Debugger API to show how many objects a web page allocates, sorted by the function call path that allocated them. Visit the URL about:config, and set the devtools.
chrome.enabled preference to true: Setting the 'devtools.
chrome.enabled' preference Open a developer Scratchpad (Menu button > Developer > Scratchpad), and select "Browser" from the "Environment" menu. (This menu will not be present unless you have changed the preference as explained above.) Selecting the 'browser' context in the Scratchpad Enter the following code in the Scratchpad: // This simply defines the 'Debugger' constructor in this // Scratchpad; it doesn't actually start debugging anything. Components.utils.impor...
...on plot(log) { // Given the log, compute a map from allocation sites to // allocation counts. Note that stack entries are '===' if // they represent the same site with the same callers. var counts = new Map; for (let site of log) { // This is a kludge, necessary for now. The saved stacks // are new, and Firefox doesn't yet understand that they // are safe for
chrome code to use, so we must tell it // so explicitly. site = Components.utils.waiveXrays(site.frame); if (!counts.has(site)) counts.set(site, 0); counts.set(site, counts.get(site) + 1); } // Walk from each site that allocated something up to the // root, computing allocation totals that include // children. Remember that 'null' is a valid site, //...
Debugger-API - Firefox Developer Tools
read debugging API. Both the debuggee and the code using Debugger to observe it must run in the same thread. Cross-thread, cross-process, and cross-device tools must use Debugger to observe the debuggee from within the same thread, and then handle any needed communication themselves. (Firefox's builtin tools have a protocol defined for this purpose.) In Gecko, the Debugger API is available to
chrome code only. By design, it ought not to introduce security holes, so in principle it could be made available to content as well; but it is hard to justify the security risks of the additional attack surface. The Debugger API cannot currently observe self-hosted JavaScript. This is not inherent in the API's design, but simply that the self-hosting infrastructure isn't prepared for the kind of invas...
...en it is hit that evaluates an expression in the page's context. Showing how many objects different call paths allocate. Gecko-specific features While the Debugger core API deals only with concepts common to any JavaScript implementation, it also includes some Gecko-specific features: [Global tracking][global] supports debugging all the code running in a Gecko instance at once--the '
chrome debugging' model. [Object wrapper][wrapper] functions help manipulate object references that cross privilege boundaries. Source Metadata Generated from file: js/src/doc/Debugger/Debugger-API.md Watermark: sha256:6ee2381145a0d2e53d2f798f3f682e82dd7ab0caa0ac4dd5e56601c2e49913a7 Changeset: ffa775dd5bd4 ...
Index - Firefox Developer Tools
in the CSS pane. 69 Select and highlight elements The selected element is the element in the page that the Inspector is currently focused on. The selected element is shown in the HTML pane and its CSS is displayed in the CSS pane. 70 Use the Inspector API Inspector, Reference, Reference(2), Tools Firefox add-ons may access the following objects from the
chrome://browser/content/devtools/inspector/inspector.xul context: 71 Use the Inspector from the Web Console Guide, Inspector, Tools The element that's currently selected in the Page Inspector can be referenced in the Web Console using the variable $0. 72 View background images In the Rules view, you can see a preview of images specified using background-image.
...e volume. See this guide to using these keys as standard function keys. To use a remapped key as a standard function key, hold the Function key down as well (so to open the Profiler, use Shift + Function + F5). 117 How to These articles describe how to use the debugger. 118 Access debugging in add-ons The following items are accessible in the context of
chrome://browser/content/debugger.xul (or, in version 23 beta,
chrome://browser/content/devtools/debugger.xul): 119 Breaking on exceptions When an exception occurs, the line where it occurs is highlighted in the source pane, with a squiggly red line under the problematic code. A tooltip describes the exception. Starting in Firefox 80, a disclosure triangle within the tooltip reveal...
CanvasRenderingContext2D.drawWindow() - Web APIs
nderingContext2D.drawWindow() method of the Canvas 2D API renders a region of a window into the canvas. The contents of the window's viewport are rendered, ignoring viewport clipping and scrolling. This API cannot be used by Web content. It is synchronous, and as such can't be compatible with Fission. If you're using it from an extension, you should switch to tabs.captureTab. If you're writing
chrome code, you probably want WindowGlobalParent.drawSnapshot from the parent process. Syntax void ctx.drawWindow(window, x, y, w, h, bgColor [, flags]); Parameters window The Window to render. x The x-axis coordinate of the window. y The y-axis coordinate of the window. w The width of the window. h The height of the window. bgColor A DOMString that specifies the color the canvas is f...
...rowsers do, and many websites expect that transparent parts of their interface will be drawn on white background. With this method, it is possible to fill a hidden IFRAME with arbitrary content (e.g., CSS-styled HTML text, or SVG) and draw it into a canvas. It will be scaled, rotated and so on according to the current transformation. Ted Mielczarek's tab preview extension uses this technique in
chrome to provide thumbnails of web pages, and the source is available for reference. Specifications Not part of any current specification or draft. This is a non-standard and internal only API. ...
CanvasRenderingContext2D - Web APIs
gion() Removes the hit region with the specified id from the canvas. CanvasRenderingContext2D.clearHitRegions() Removes all hit regions from the canvas. Filters CanvasRenderingContext2D.filter Applies a CSS or SVG filter to the canvas, e.g., to change its brightness or bluriness. Non-standard APIs Blink and WebKit Most of these APIs are deprecated and were removed shortly after
Chrome 36. CanvasRenderingContext2D.clearShadow() Removes all shadow settings like CanvasRenderingContext2D.shadowColor and CanvasRenderingContext2D.shadowBlur. CanvasRenderingContext2D.drawImageFromRect() This is redundant with an equivalent overload of drawImage. CanvasRenderingContext2D.setAlpha() Use CanvasRenderingContext2D.globalAlpha instead. CanvasRenderingContext2D.setC...
...d was introduced in Gecko 1.9 and is unimplemented starting with Gecko 7.0. Use CanvasRenderingContext2D.measureText() instead. CanvasRenderingContext2D.mozPathText() This method was introduced in Gecko 1.9 and is removed starting with Gecko 7.0. CanvasRenderingContext2D.mozTextAlongPath() This method was introduced in Gecko 1.9 and is removed starting with Gecko 7.0. Internal APIs (
chrome-context only) CanvasRenderingContext2D.drawWindow() Renders a region of a window into the canvas. The contents of the window's viewport are rendered, ignoring viewport clipping and scrolling. CanvasRenderingContext2D.demote() This causes a context that is currently using a hardware-accelerated backend to fallback to a software one. All state should be preserved. Internet Explorer ...
Document.cookie - Web APIs
cern, it's important that any web app implementation invalidate cookie data after a certain timeout instead of relying on the browser to do it. Many browsers let users specify that cookies should never expire, which is not necessarily safe. See Date.toUTCString() for help formatting this value. ;secure Cookie to only be transmitted over secure protocol as https. Before
Chrome 52, this flag could appear with cookies from http domains. ;samesite SameSite prevents the browser from sending this cookie along with cross-site requests. Possible values are lax, strict or none. The lax value value will send the cookie for all same-site requests and top-level navigation GET requests. This is sufficient for user tracking, but it will prevent many CSRF attacks. This ...
...st- Signals to the browser that in addition to the restriction to only use the cookie from a secure origin, the scope of the cookie is limited to a path attribute passed down by the server. If the server omits the path attribute the "directory" of the request URI is used. It also signals that the domain attribute must not be present, which prevents the cookie from being sent to other domains. For
Chrome the path attribute must always be the origin. The dash is considered part of the prefix. These flags are only settable with the secure attribute. Note: As you can see from the code above, document.cookie is an accessor property with native setter and getter functions, and consequently is not a data property with a value: what you write is not the same as what you read, everything is ...
Document.designMode - Web APIs
In IE6-10, the value is capitalized. Syntax var mode = document.designMode; document.designMode = value; Value A string indicating whether designMode is (or should be) set to on or off. Valid values are on and off. ...
...In IE6-10, the value is capitalized. Syntax var mode = document.designMode; document.designMode = value; Value A string indicating whether designMode is (or should be) set to on or off. Valid values are on and off. ...
Document - Web APIs
rrerRead only Returns the URI of the page that linked to this page. Document.title Sets or gets the title of the current document. Document.URLRead only Returns the document location as a string. Properties included from DocumentOrShadowRoot The Document interface includes the following properties defined on the DocumentOrShadowRoot mixin. Note that this is currently only implemented by
Chrome; other browsers still implement them directly on the Document interface. DocumentOrShadowRoot.activeElementRead only Returns the Element within the shadow tree that has focus. Document.fullscreenElementRead only The element that's currently in full screen mode for this document. DocumentOrShadowRoot.pointerLockElement Read only Returns the element set as the target for mouse events wh...
.... Document.queryCommandValue() Returns the current value of the current range for a formating command. Document.write() Writes text in a document. Document.writeln() Writes a line of text in a document. Methods included from DocumentOrShadowRoot The Document interface includes the following methods defined on the DocumentOrShadowRoot mixin. Note that this is currently only implemented by
Chrome; other browsers still implement them on the Document interface. DocumentOrShadowRoot.getSelection() Returns a Selection object representing the range of text selected by the user, or the current position of the caret. DocumentOrShadowRoot.elementFromPoint() Returns the topmost element at the specified coordinates. DocumentOrShadowRoot.elementsFromPoint() Returns an array of all elements a...
Using files from web applications - Web APIs
Using the File API, which was added to the DOM in HTML5, it's now possible for web content to ask the user to select local files and then read the contents of those files. This selection can be done by either using an HTML <input type="file"> element or by drag and drop. If you want to use the DOM File API from extensions or other browser
chrome code, you can; however, note there are some additional features to be aware of. See Using the DOM File API in
chrome code for details. Accessing selected file(s) Consider this HTML: <input type="file" id="input" multiple> The File API makes it possible to access a FileList containing File objects representing the files selected by the user. The multiple attribute on the input element allows the user to select multiple files. Accessing the first s...
...nstead. Consider this HTML: <input type="file" id="fileElem" multiple accept="image/*" class="visually-hidden"> <label for="fileElem">Select some files</label> and this CSS: .visually-hidden { position: absolute !important; height: 1px; width: 1px; overflow: hidden; clip: rect(1px, 1px, 1px, 1px); } /* Separate rule for compatibility, :focus-within is required on modern Firefox and
Chrome */ input.visually-hidden:focus + label { outline: thin dotted; } input.visually-hidden:focus-within + label { outline: thin dotted; } There is no need to add JavaScript code to call fileElem.click(). Also in this case you can style the label element as you wish. You need to provide a visual cue for the focus status of the hidden input field on its label, be it an outline as shown above, or ...
File and Directory Entries API - Web APIs
d the contents of a directory. FileSystemFlags Defines a set of values which are used when specifying option flags when calling certain methods in the File and Directory Entries API. FileError Represents an error which is generated by asynchronous file system calls. There are also two global functions (which are not part of the specification at this time and are implemented only by Google
Chrome). They're available on the Window object and implemented in LocalFileSystem: requestFileSystem() and resolveLocalFileSystemURL(). Synchronous API The synchronous API is should only be used in Workers; these calls block until they're finished executing, and simply return the results instead of using callbacks. Using them on the main thread will block the browser, which is naughty. The interfaces...
...SystemDirectoryReaderSync Created by calling FileSystemDirectoryEntrySync.createReader(), this interface provides the functionality which lets you read the contents of a directory. FileException Represents an error which is generated by synchronous file system calls. There are also two global functions (which are not part of the specification at this time and are implemented only by Google
Chrome). They're available on the Worker object and implemented in LocalFileSystemSync: requestFileSystemSync() and resolveLocalFileSystemSyncURL(). Other Interfaces LocalFileSystem Gives you access to a sandboxed file system. LocalFileSystemSync LockedFile Provides tools to deal with a given file with all the necessary locks. Metadata Specifications Specification Status Co...
Using the Frame Timing API - Web APIs
ole.log("Warning: frame '" + THRESHOLD + "' exceeded!"); } } }); observe_frame.observe({entryTypes: ['frame']}); The tools will save you! First, perhaps using the tools will save you is a bit too strong but performance tools can certainly help identify code that is not conformant to some expected time threshold. This section briefly describes the web performance tools for the Firefox and
Chrome/Canary browsers. Firefox performance tool Firefox's performance tool allows the developer to record a piece of the user's interaction and the data obtained during the recording is used to create a profile of the browser's activity. The profile includes a waterfall of the activity such as event handling, layout, painting, scripting, etc. Firefox's performance tool also includes a frame rate gra...
...data to help analyze the site's JavaScript usage. The call tree shows where the application is spending most of its time, whereas the flame chart shows the state of the JavaScript stack for the code at every millisecond during the performance profile. This provides a way to know exactly which function was executing at any point during the recording, how long it ran, and where it was called from.
Chrome performance tool The
Chrome (and Canary) browsers also have a performance tool with similar functions as Firefox. See Performance profiling with the Timeline for more information about this tool. ...
GamepadButton - Web APIs
The GamepadButton interface defines an individual button of a gamepad or other controller, allowing access to the current state of different types of buttons available on the control device. A GamepadButton object is returned by querying any value of the array returned by the buttons property of the Gamepad interface. Note: This is the case in Firefox Gecko 28 and later;
Chrome and earlier Firefox versions still return an array of double values when this property is accessed. Properties GamepadButton.value Read only A double value used to represent the current state of analog buttons, such as the triggers on many modern gamepads. The values are normalized to the range 0.0 --1.0, with 0.0 representing a button that is not pressed, and 1.0 representing a button that is fully pressed. G...
..., with 0.0 representing a button that is not pressed, and 1.0 representing a button that is fully pressed. GamepadButton.pressed Read only A Boolean value indicating whether the button is currently pressed (true) or unpressed (false). Example The following code is taken from my Gamepad API button demo (you can view the demo live, and find the source code on Github.) Note the code fork -- in
Chrome Navigator.getGamepads needs a webkit prefix and the button values are stored as an array of double values, whereas in Firefox Navigator.getGamepads doesn't need a prefix, and the button values are stored as an array of GamepadButton objects; it is the GamepadButton.value or GamepadButton.pressed properties of these we need to access, depending on what type of buttons they are. In this simple exam...
HTMLCanvasElement.toBlob() - Web APIs
var canvas = document.getElementById('canvas'); var d = canvas.width; ctx = canvas.getContext('2d'); ctx.beginPath(); ctx.moveTo(d / 2, 0); ctx.lineTo(d, d); ctx.lineTo(0, d); ctx.closePath(); ctx.fillStyle = 'yellow'; ctx.fill(); fu...
...dy.appendChild(a); a.style.display = 'block'; a.download = iconName + '.ico'; a.href = window.URL.createObjectURL(b); } } canvas.toBlob(blobCallback('passThisString'), 'image/vnd.microsoft.icon', '-moz-parse-options:format=bmp;bpp=32'); Save toBlob to disk with OS.File (
chrome/add-on context only) This technique saves it to the desktop and is only useful in Firefox
chrome context or add-on code as OS APIs are not present on web sites. var canvas = document.getElementById('canvas'); var d = canvas.width; ctx = canvas.getContext('2d'); ctx.beginPath(); ctx.moveTo(d / 2, 0); ctx.lineTo(d, d); ctx.lineTo(0, d); ctx.closePath(); ctx.fillStyle = 'yellow'; ctx.fill(); function blobCallback(iconName) { return function(b) { var r = new FileReader(); r.onloaden...
Navigator.onLine - Web APIs
alue, with true meaning online and false meaning offline. The property sends updates whenever the browser's ability to connect to the network changes. The update occurs when the user follows links or when a script requests a remote page. For example, the property should return false when users click links soon after they lose internet connection. Browsers implement this property differently. In
Chrome and Safari, if the browser is not able to connect to a local area network (LAN) or a router, it is offline; all other conditions return true. So while you can assume that the browser is offline when it returns a false value, you cannot assume that a true value necessarily means that the browser can access the internet. You could be getting false positives, such as in cases where the computer is r...
... online status of the browser, you should develop additional means for checking. To learn more, see the HTML5 Rocks article, Working Off the Grid. In Firefox and Internet Explorer, switching the browser to offline mode sends a false value. Until Firefox 41, all other conditions return a true value; testing actual behavior on Nightly 68 on Windows shows that it only looks for LAN connection like
Chrome and Safari giving false positives. You can see changes in the network state by listening for the events on window.ononline and window.onoffline. Syntax online = window.navigator.onLine; Value online is a boolean true or false. Example View a live example. To check if you are online, query window.navigator.onLine, as in the following example: if (navigator.onLine) { console.log('onlin...
Using the Permissions API - Web APIs
issions API provides the tools to allow developers to implement a better user experience as far as permissions are concerned. For example, it can query whether permission to use a particular API is granted or denied, and specifically request permission to use an API. At the moment, implementation of the API is at an early stage, so support in browsers is pretty spotty: It can only be found in
Chrome 44 and later and Firefox 43 and later. The only supported method right now is Permissions.query(), which queries permission status. The only two APIs currently recognized by the Permissions API in
Chrome are Geolocation and Notification, with Firefox also recognizing Push and WebMIDI. More features will be added as time progresses. A simple example For this article, we have put together a s...
...re just reporting the change in state. Conclusion and future work At the moment this doesn't offer much more than what we had already. If we choose to never share our location from the permission prompt (deny permission), then we can't get back to the permission prompt without using the browser menu options: Firefox: Tools > Page Info > Permissions > Access Your Location. Select Always Ask.
Chrome: Hamburger Menu > Settings > Show advanced settings. In the Privacy section, click Content Settings. In the resulting dialog, find the Location section and select Ask when a site tries to... . Finally, click Manage Exceptions and remove the permissions you granted to the sites you are interested in. However, future additions to browser functionality should provide the request() method, which wi...
ServiceWorkerRegistration.showNotification() - Web APIs
to suppress vibrations and audible alerts when reusing a tag value. If options's renotify is true and options's tag is the empty string a TypeError will be thrown. The default is false. requireInteraction: Indicates that on devices with sufficiently large screens, a notification should remain active until the user clicks or dismisses it. If this value is absent or false, the desktop version of
Chrome will auto-minimize notifications after approximately twenty seconds. The default value is false. silent: When set indicates that no sounds or vibrations should be made. If options's silent is true and options's vibrate is present a TypeError exception will be thrown. The default value is false. tag: An ID for a given notification that allows you to find, replace, or remove the notification us...
...e A Promise that resolves to undefined. Examples navigator.serviceWorker.register('sw.js'); function showNotification() { Notification.requestPermission(function(result) { if (result === 'granted') { navigator.serviceWorker.ready.then(function(registration) { registration.showNotification('Vibration Sample', { body: 'Buzz! Buzz!', icon: '../images/touch/
chrome-touch-icon-192x192.png', vibrate: [200, 100, 200, 100, 200, 100, 200], tag: 'vibration-sample' }); }); } }); } To invoke the above function at an appropriate time, you could use the ServiceWorkerGlobalScope.onnotificationclick event handler. You can also retrieve details of the Notifications that have been fired from the current service worker using Servi...
Using Service Workers - Web APIs
ns native apps are often chosen over web apps. Setting up to play with service workers Many service workers features are now enabled by default in newer versions of supporting browsers. If however you find that demo code is not working in your installed versions, you might need to enable a pref: Firefox Nightly: Go to about:config and set dom.serviceWorkers.enabled to true; restart browser.
Chrome Canary: Go to
chrome://flags and turn on experimental-web-platform-features; restart browser (note that some features are now enabled by default in
Chrome.) Opera: Go to opera://flags and enable Support for ServiceWorker; restart browser. Microsoft Edge: Go to about:flags and tick Enable service workers; restart browser. You'll also need to serve your code via HTTPS -- Service workers are res...
...eted by the time you get your first fetch event on the new service worker. self.addEventListener('activate', (event) => { var cacheKeeplist = ['v2']; event.waitUntil( caches.keys().then((keyList) => { return Promise.all(keyList.map((key) => { if (cacheKeeplist.indexOf(key) === -1) { return caches.delete(key); } })); }) ); }); Developer tools
Chrome has
chrome://inspect/#service-workers, which shows current service worker activity and storage on a device, and
chrome://serviceworker-internals, which shows more detail and allows you to start/stop/debug the worker process. In the future they will have throttling/offline modes to simulate bad or non-existent connections, which will be a really good thing. Firefox has also started to implement s...
ShadowRoot - Web APIs
inside the ShadowRoot. ShadowRoot.mode Read only The mode of the ShadowRoot -- either open or closed. This defines whether or not the shadow root's internal features are accessible from JavaScript. Properties included from DocumentOrShadowRoot The ShadowRoot interface includes the following properties defined on the DocumentOrShadowRoot mixin. Note that this is currently only implemented by
Chrome; other browsers still implement them on the Document interface. DocumentOrShadowRoot.activeElement Read only Returns the Element within the shadow tree that has focus. DocumentOrShadowRoot.styleSheets Read only Returns a StyleSheetList of CSSStyleSheet objects for stylesheets explicitly linked into, or embedded in a document. Methods The ShadowRoot interface includes the following meth...
...Element Read only Returns the Element within the shadow tree that has focus. DocumentOrShadowRoot.styleSheets Read only Returns a StyleSheetList of CSSStyleSheet objects for stylesheets explicitly linked into, or embedded in a document. Methods The ShadowRoot interface includes the following methods defined on the DocumentOrShadowRoot mixin. Note that this is currently only implemented by
Chrome; other browsers still implement them on the Document interface. DocumentOrShadowRoot.getSelection() Returns a Selection object representing the range of text selected by the user, or the current position of the caret. DocumentOrShadowRoot.elementFromPoint() Returns the topmost element at the specified coordinates. DocumentOrShadowRoot.elementsFromPoint() Returns an array of all elements a...
VTTCue - Web APIs
Specifications Specification Status Comment WebVTT: The Web Video Text Tracks Format Candidate Recommendation ...
... Specifications Specification Status Comment WebVTT: The Web Video Text Tracks Format Candidate Recommendation ...
Starting up and shutting down a WebXR session - Web APIs
ogies related to it and to the implementation of the polyfill change over time. Be sure to read the readme carefully; the polyfill comes in several versions depending on what degree of compatibility with newer JavaScript features your target browsers include. WebXR API Emulator extension The Mozilla WebXR team has created a WebXR API Emulator browser extension, compatible with both Firefox and
Chrome, which emulates the WebXR API, simulating a variety of compatible devices such as the HTC Vive, the Oculus Go and Oculus Quest, Samsung Gear, and Google Cardboard. With the extension in place, you can open up a developer tools panel that lets you control the position and orientation of the headset and any hand controllers, as well as button presses on the controllers. Emulator usage While somew...
...and make sure you're aware of the limitations before you begin. Important: You should always test your code on actual AR and/or VR hardware before releasing or shipping a product! Emulated, simulated, or polyfilled environments are not an adequate substitute for actual testing on physical devices. Getting the extension Download the WebXR API Emulator for your supported browser below: Google
Chrome Mozilla Firefox The source code for the extension is also available on GitHub. Emulator issues and notes While this isn't the place for a full article about the extension, there are some specific things worth mentioning. Version 0.4.0 of the extension was announced on March 26, 2020. It introduced support for augmented reality (AR) through the WebXR AR Module, which has is approaching a sta...
Using the Web Animations API - Web APIs
d unlike pure, declarative CSS, JavaScript also lets us dynamically set values from properties to durations. For building custom animation libraries and creating interactive animations, the Web Animations API might be the perfect tool for the job. Let's see what it can do! Browser Support The basic Web Animations API features discussed in this article are available by default in Firefox 48+ and
Chrome 36+. Safari supports Web Animations in its Technology Preview version and there is also a handy polyfill that tests for feature support and adds it where necessary. Writing CSS Animations with the Web Animations API One of the more familiar ways to approach learning the Web Animations API is to start with something most web developers have played with before: CSS Animations. CSS Animations have...
...inish = endGame; // ...or Alice reaches the end of her animation aliceChange.onfinish = endGame; Better still, the Web Animations API also provides a finish promise that will resolve when the animation finishes, or reject if it is canceled. Conclusion These are the basic features of the Web Animations API, most of which are already supported across the latest release versions of Firefox and
Chrome. By now you should be ready to "jump down the rabbit hole" of animating in the browser and ready to write your own animation experiments! If you're using the API and want to share, try using the #WAAPI hashtag. We will be watching and will write more tutorials to cover further features as support spreads! ...
Background audio processing using AudioWorklet - Web APIs
rocessor's owning AudioWorkletNode running even when it would otherwise decide to shut down the node. Returning false from the process() method tells the API that it should follow its normal logic and shut down your processor node if it deems it appropriate to do so. If the API determines that your node is no longer needed, process() will not be called again. ...
...o. If the API determines that your node is no longer needed, process() will not be called again. Note: At this time, unfortunately,
Chrome does not implement this algorithm in a manner that matches the current standard. Instead, it keeps the node alive if you return true and shuts it down if you return false. Thus for compatibility reasons you must always return true from process(), at least on
Chrome. However, once this
Chrome issue is fixed, you will want to change this behavior if possible as it may have a slight negative impact on performance. Creating an audio processor worklet node To create an audio node that pumps blocks of audio data through an AudioWorkletProcessor, you need to follow these simple steps: Load and install the audio processor module Create an AudioWorkletNode, s...
Using Web Workers - Web APIs
thodArguments); } else { defaultReply(oEvent.data); } }; It is possible to switch the content of each mainpage -> worker and worker -> mainpage message. And the property names "queryMethod", "queryMethodListeners", "queryMethodArguments" can be anything as long as they are consistent in QueryableWorker and the worker. Passing data by transferring ownership (transferable objects) Google
Chrome 17+ and Firefox 18+ contain an additional way to pass certain types of objects (transferable objects, that is objects implementing the Transferable interface) to or from a worker with high performance. Transferable objects are transferred from one context to another with a zero-copy operation, which results in a vast performance improvement when sending large data sets. Think of it as pass-by-ref...
... that sit between web applications, and the browser and network (when available). They are intended to (amongst other things) enable the creation of effective offline experiences, intercepting network requests and taking appropriate action based on whether the network is available and updated assets reside on the server. They will also allow access to push notifications and background sync APIs.
Chrome Workers are a Firefox-only type of worker that you can use if you are developing add-ons and want to use workers in extensions and have access to js-ctypes in your worker. See
ChromeWorker for more details. Audio Worklet provide the ability for direct scripted audio processing to be done in a worklet (a lightweight version of worker) context. Functions and interfaces available in workers You ...
Window.content - Web APIs
Non-standard This feature is non-standard and is not on a standards track. Do not use it on production sites facing the Web: it will not work for every user. There may also be large incompatibilities between implementations and the behavior may change in the future. Note: Since Firefox 57 (initially Nightly-only), both the content and _content variants are only available to
chrome (privileged) code, and not available to the web anymore. Returns a Window object for the primary content window. This is useful in XUL windows that have a <browser> (or tabbrowser or <iframe>) with type="content-primary" attribute on it -- the most famous example is Firefox main window, browser.xul. In such cases, content returns a reference to the Window object for the document currently displ...
...s), content is normally equivalent to top (except in the case of a webpage loaded in a sidebar, content still refers to the Window of the currently selected tab). Note: Some examples use _content instead of content. The former has been deprecated for a long time, and you should use content in any new code. Syntax var windowObject = window.content; Example Executing the following code in a
chrome XUL window with a <browser type="content-primary"/> element in it draws a red border around the first div on the page currently displayed in the browser: content.document.getElementsByTagName("div")[0].style.border = "solid red 1px"; Specification None. See also Working with windows in
chrome code When accessing content documents from privileged code, be aware of XPCNativeWrappers. ...
Window.fullScreen - Web APIs
This is to prevent scripts designed to set this property in Internet Explorer from breaking. Return value isInFullScreen A boolean. Possible Values: true: The window is in full screen mode. ...
...This is to prevent scripts designed to set this property in Internet Explorer from breaking. Return value isInFullScreen A boolean. Possible Values: true: The window is in full screen mode. ...
Privileged features - Web APIs
centerscreen Centers the window in relation to its parent's size and position. minimizable This setting can only apply to dialog windows; minimizable requires dialog=yes. If minimizable is on, the new dialog window will have a minimize system command icon in the titlebar and it will be minimizable. Any non-dialog window is always minimizable and minimizable=no will be ignored. dependent If on, the new window is said to be dependent of its parent window. ...
...window is minimized. On Windows platforms, a dependent window does not show on the task bar. A dependent window also stays in front of the parent window. Dependent windows are not implemented on MacOS X, this option will be ignored. The dependent feature is currently under revision to be removed (bug 214867) In MSIE 6, the nearest equivalent to this feature is the showModelessDialog() method.
chrome If on, the page is loaded as window's only content, without any of the browser's interface elements. There will be no context menu defined by default and none of the standard keyboard shortcuts will work. The page is supposed to provide a user interface of its own, usually this feature is used to open XUL documents (standard dialogs like the JavaScript Console are opened this way). dialog Th...
WorkerGlobalScope.navigator - Web APIs
or); inside a worker (which would basically be the equivalent of self.console.log(self.navigator);, as these are being called on the worker scope, which can be referenced with WorkerGlobalScope.self), you will get a WorkerNavigator object written to the console -- something like the following: Object {onLine: true, userAgent: "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_1) Ap...ML, like Gecko)
Chrome/40.0.2214.93 Safari/537.36", product: "Gecko", platform: "MacIntel", appVersion: "5.0 (Macintosh; Intel Mac OS X 10_10_1) AppleWebKi...ML, like Gecko)
Chrome/40.0.2214.93 Safari/537.36"...} appCodeName: "Mozilla" appName: "Netscape" appVersion: "5.0 (Macintosh; Intel Mac OS X 10_10_1) AppleWebKit/537.36 (KHTML, like Gecko)
Chrome/40.0.2214.93 Safari/537.36" hardwareConcurrency: 4 ...
...14.93 Safari/537.36"...} appCodeName: "Mozilla" appName: "Netscape" appVersion: "5.0 (Macintosh; Intel Mac OS X 10_10_1) AppleWebKit/537.36 (KHTML, like Gecko)
Chrome/40.0.2214.93 Safari/537.36" hardwareConcurrency: 4 onLine: true platform: "MacIntel" product: "Gecko" userAgent: "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_1) AppleWebKit/537.36 (KHTML, like Gecko)
Chrome/40.0.2214.93 Safari/537.36" __proto__: Object You could use this navigator object to return more information about the runtime envinronment, as you might do with a normal Navigator object. Specifications Specification Status Comment HTML Living StandardThe definition of 'navigator' in that specification. Living Standard ...
Web applications and ARIA FAQ - Accessibility
y want to consider implementing ARIA using progressive enhancement techniques--such as adding ARIA using JavaScript, not directly to your markup--in order to more gracefully support older browsers and assistive technologies. Browsers ARIA is supported in the following browsers: Browser Minimum Version Notes Firefox 3.0+ Works with NVDA, JAWS 10+, and Orca
Chrome Latest Screen reader support still experimental as of
Chrome 15 Safari 4+ Safari 5 support is much improved. Live region support requires Safari 5 with VoiceOver on iOS5 or OS X Lion Opera 9.5+ Requires VoiceOver on OS X. TBD: how well does this currently work? Internet Explorer 8+ Works with JAWS 10+ and NVDA. No live region support in NVDA.
...ipt-driven widgets on the web are comparable to their equivalents on the desktop. How do I test my use of ARIA? Are there any tools available for free? Several inspecting and debugging tools exist to help you test ARIA in action: Object Inspector on Windows Accessibility Inspector on OS X AccProbe on Linux Firebug's DOM Inspector The Accessibility Inspector for Firebug The Audits tab in
Chrome DevTools There are several free or open source screen readers that can be used to do hands-on testing with ARIA. They include: Orca for Linux NVDA for Windows VoiceOver is built into OS X When you're testing with a screen reader, keep two key points in mind: Casual testing with a screen reader user can never replace feedback, testing, and help from real users. There's more to accessi...
@import - CSS: Cascading Style Sheets
l supports( supports-query ); @import url supports( supports-query ) list-of-media-queries; where: url Is a <string> or a <url> representing the location of the resource to import. The URL may be absolute or relative. Note that the URL for a Mozilla package need not actually specify a file; it can just specify the package name and part, and the appropriate file is chosen automatically (e.g.
chrome://communicator/skin/). See here for more information. list-of-media-queries Is a comma-separated list of media queries conditioning the application of the CSS rules defined in the linked URL. If the browser does not support any these queries, it does not load the linked resource. supports-query Is either a <supports-condition> or a <declaration>. Description Imported rules must precede all...
... C...
border-collapse - CSS: Cascading Style Sheets
e of browser engines HTML <table class="separate"> <caption><code>border-collapse: separate</code></caption> <tbody> <tr><th>Browser</th> <th>Layout Engine</th></tr> <tr><td class="fx">Firefox</td> <td class="gk">Gecko</td></tr> <tr><td class="ed">Edge</td> <td class="tr">EdgeHTML</td></tr> <tr><td class="sa">Safari</td> <td class="wk">Webkit</td></tr> <tr><td class="ch">
Chrome</td> <td class="bk">Blink</td></tr> <tr><td class="op">Opera</td> <td class="bk">Blink</td></tr> </tbody> </table> <table class="collapse"> <caption><code>border-collapse: collapse</code></caption> <tbody> <tr><th>Browser</th> <th>Layout Engine</th></tr> <tr><td class="fx">Firefox</td> <td class="gk">Gecko</td></tr> <tr><td class="ed">Edge</td> <td class="tr">EdgeHTML</td></...
...d></tr> </tbody> </table> <table class="collapse"> <caption><code>border-collapse: collapse</code></caption> <tbody> <tr><th>Browser</th> <th>Layout Engine</th></tr> <tr><td class="fx">Firefox</td> <td class="gk">Gecko</td></tr> <tr><td class="ed">Edge</td> <td class="tr">EdgeHTML</td></tr> <tr><td class="sa">Safari</td> <td class="wk">Webkit</td></tr> <tr><td class="ch">
Chrome</td> <td class="bk">Blink</td></tr> <tr><td class="op">Opera</td> <td class="bk">Blink</td></tr> </tbody> </table> CSS .collapse { border-collapse: collapse; } .separate { border-collapse: separate; } table { display: inline-table; margin: 1em; border: dashed 5px; } table th, table td { border: solid 3px; } .fx { border-color: orange blue; } .gk { border-color: black red; ...
Event reference
OM L3 A wheel button of a pointing device is rotated in any direction. Non-standard events Event Name Event Type Specification Fired when... afterscriptexecute Event Mozilla Specific A script has been executed. beforescriptexecute Event Mozilla Specific A script is about to be executed. beforeinstallprompt Event
Chrome specific A user is prompted to save a website to a home screen on mobile. DOMMouseScroll Mozilla specific The wheel button of a pointing device is rotated (detail attribute is a number of lines). (use wheel instead) dragdrop DragEvent Mozilla specific An element is dropped (use drop instead). dragexit DragEvent Mozilla specific A dra...
...s (see progress). ussdreceived Firefox OS specific A new USSD message is received msContentZoom Microsoft specific MSManipulationStateChanged Microsoft specific MSPointerHover Microsoft specific Mozilla-specific events Note: These events are never exposed to web content and can only be used in a XUL
chrome content context. XUL events Event Name Event Type Specification Fired when... broadcast XUL An observer noticed a change to the attributes of a watched broadcaster. CheckboxStateChange XUL The state of a checkbox has been changed either by a user action or by a script (useful for accessibility). close XUL The close...
Adding captions and subtitles to HTML5 video - Developer guides
Browser Compatibility Browser support for WebVTT and the <track> element is fairly good, although some browsers differ slightly in their implementation. Internet Explorer Internet Explorer 10+ subtitles are enabled by default, and the default controls contain a button and a menu that offers the same functionality as the menu we just built. The defa...
...d. Note: IE will completely ignore WebVTT files unless you define the MIME type. This can easily be done by adding an .htaccess file to an appropriate directory that contains AddType text/vtt .vtt. Safari Safari 6.1+ has similar support to Internet Explorer 10+, displaying a menu with the different available options, with the addition of an "Auto" option, which allows the browser to choose.
Chrome and Opera These browsers have similar implementations again: subtitles are enabled by default and the default control set contains a 'cc' button that turns subtitles on and off.
Chrome and Opera ignore the default attribute on the <track> element and will instead try to match the browser's language to the subtitle's language. Firefox Firefox's implementation was completely broken due to a bug,...
Writing Web Audio API code that works in every browser - Developer guides
You probably have already read the announcement on the Web Audio API coming to Firefox, and are totally excited and ready to make your until-now-WebKit-only sites work with Firefox, which uses the unprefixed version of the spec. Unfortunately,
Chrome, Safari and Opera still use the webkitAudioContext prefixed name. Furthermore, as a result of the spec being still in flux, some browsers use deprecated properties and method names that are not present in standards-compliant browsers: Safari uses the old method names, Firefox uses the new ones, and
Chrome and Opera use both. In addition, not all features of Web Audio are already implemented in Firefox yet. What do we do!? We don't want to maintain two or more separate code bases, and feature detection code is cumbersome! Plus we want to writ...
...ise" the interfaces for you and make it look as if your code is running in a standards compliant browser, by aliasing prefixed names to the unprefixed versions. And it won't do anything if the unprefixed versions are already present. Once you include it in your page, you can write in "modern Web Audio API" style, and do things such as: var audioContext = new AudioContext(); everywhere, including
Chrome/ium, Opera, Safari, and ---of course!--- Firefox. Also, if new methods such as start are not detected in some nodes, the library will also alias them to their old names. Thus, start is mapped to noteOn, stop to noteOff, and so on. 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 w...
<input type="date"> - HTML: Hypertext Markup Language
y. If you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request. The input UI generally varies from browser to browser; see Browser compatibility for further details. In unsupported browsers, the control degrades gracefully to <input type="text">. Among browsers with custom interfaces for selecting dates are
Chrome and Opera, whose data control looks like so: The Edge date control looks like: And the Firefox date control looks like this: Value A DOMString representing a date in YYYY-MM-DD format, or empty Events change and input Supported common attributes autocomplete, list, readonly, and step IDL attributes list, value, valueAsDate, valueAsNumber. ...
... an error. 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. We make use of the :valid and :invalid pseudo-elements to add an icon next to the input, based on whether or not the current value is valid. We had to put the icon on a <span> next to the input, not on the input itself, because in
Chrome at least the input's generated content is placed inside the form control, and can't be styled or shown effectively. label { display: flex; align-items: center; } span::after { padding-left: 5px; } input:invalid + span::after { content: '?'; } input:valid+span::after { content: '?'; } Important: Client-side form validation is no substitute for validating on the server. It's easy fo...
<input type="range"> - HTML: Hypertext Markup Language
50" label="50%"></option> <option value="60"></option> <option value="70"></option> <option value="80"></option> <option value="90"></option> <option value="100" label="100%"></option> </datalist> Screenshot Live Note: Currently, no browser fully supports these features. Firefox doesn't support hash marks and labels at all, for example, while
Chrome supports hash marks but doesn't support labels. Version 66 (66.0.3359.181) of
Chrome supports labels but the <datalist> tag has to be styled with CSS as its display property is set to none by default, hiding the labels. Change the orientation By default, if a browser renders a range input as a slider, it will render it so that the knob slides left and right. When supported, we will be able to...
...ng the labels. Change the orientation By default, if a browser renders a range input as a slider, it will render it so that the knob slides left and right. When supported, we will be able to make the range vertical, to slide up and down with CSS by declaring a height value greater than the width value. This is not actually implemented yet by any of the major browsers. (See Firefox bug 981916,
Chrome bug 341071). It also, perhaps, may still be under discussion. In the meantime, we can make the range vertical by rotating it using using CSS transforms, or, by targeting each browser engine with their own method, which includes setting the appearance to slider-vertical, by using a non-standard orient attribute in Firefox, or by changing the text direction for Internet Explorer and Edge. Conside...
<input>: The Input (Form Input) element - HTML: Hypertext Markup Language
eneral rule, you should avoid using them unless it can't be helped. Attribute Description autocorrect A string indicating whether or not autocorrect is on or off. Safari only. incremental Whether or not to send repeated search events to allow updating live search results while the user is still editing the value of the field. WebKit and Blink only (Safari,
Chrome, Opera, etc.). mozactionhint A string indicating the type of action that will be taken when the user presses the Enter or Return key while editing the field; this is used to determine an appropriate label for that key on a virtual keyboard. Firefox for Android only. orient Sets the orientation of the range slider. Firefox only. results The maximum number of ite...
...cates whether or not to activate automatic correction while the user is editing this field. Permitted values are: on Enable automatic correction of typos, as well as processing of text substitutions if any are configured. off Disable automatic correction and text substitutions. incremental The Boolean attribute incremental is a WebKit and Blink extension (so supported by Safari, Opera,
Chrome, etc.) which, if present, tells the user agent to process the input as a live search. As the user edits the value of the field, the user agent sends search events to the HTMLInputElement object representing the search box. This allows your code to update the search results in real time as the user edits the search. If incremental is not specified, the search event is only sent when the user expl...
<meter>: The HTML Meter element - HTML: Hypertext Markup Language
tribute is not set, the <button> is associated with its ancestor <form> element, if any. This attribute is only used if the <meter> element is being used as a form-associated element, such as one displaying a range corresponding to an <input type="number">. ...
... <p>Heat the oven to <meter min="200" max="500" value="350">350 degrees</meter>.</p> Result On Google
Chrome, the resulting meter looks like this: High and Low range example Note that in this example the min attribute is omitted. This is allowed, as it will default to 0. HTML <p>He got a <meter low="69" high="80" max="100" value="84">B</meter> on the exam.</p> Result On Google
Chrome, the resulting meter looks like this: Specifications Specification Status Comment HTML Living StandardThe definition of '<meter>' in that specification. Living Standard HTML5The definition of '<meter>' in that specification. Recommendation Initial definition ...
<video>: The Video Embed element - HTML: Hypertext Markup Language
reating media elements whose source will be set at a later time, under user control. See our autoplay guide for additional information about how to properly use autoplay. To disable video autoplay, autoplay="false" will not work; the video will autoplay if the attribute is there in the <video> tag at all. To remove autoplay, the attribute needs to be removed altogether. In some browsers (e.g.
Chrome 70.0) autoplay doesn't work if no muted attribute is present. autoPictureInPicture A Boolean attribute which if true indicates that the element should automatically toggle picture-in-picture mode when the user switches back and forth between this document and another document or application. buffered An attribute you can read to determine the time ranges of the buffered media. This attrib...
...int of the media timeline's reference frame. disablePictureInPicture Prevents the browser from suggesting a Picture-in-Picture context menu or to request Picture-in-Picture automatically in some cases. disableRemotePlayback A Boolean attribute used to disable the capability of remote playback in devices that are attached using wired (HDMI, DVI, etc.) and wireless technologies (Miracast,
Chromecast, DLNA, AirPlay, etc). In Safari, you can use x-webkit-airplay="deny" as a fallback. duration Read only A double-precision floating-point value which indicates the duration (total length) of the media in seconds, on the media's timeline. If no media is present on the element, or the media is not valid, the returned value is NaN. If the media has no known end (such as for live streams of ...
Content negotiation - HTTP
t is different when fetching a document entered in the address bar or an element linked via an <img>, <video> or <audio> element. Browsers are free to use the value of the header that they think is the most adequate; an exhaustive list of default values for common browsers is available. The Accept-CH header This is part of an experimental technology called Client Hints. Initial support is in
Chrome 46 or later. The Device-Memory value is in
Chrome 61 or later. The experimental Accept-CH lists configuration data that can be used by the server to select an appropriate response. Valid values are: Value Meaning Device-Memory Indicates the approximate amount of device RAM. This value is an approximation given by rounding to the nearest power of 2 and dividing that ...
...itionally, it was set to a different value for each locale for the browser, like ISO-8859-1,utf-8;q=0.7,*;q=0.7 for a Western European locale. With UTF-8 now being well-supported, being the preferred way of encoding characters, and to guarantee better privacy through less configuration-based entropy, browsers omit the Accept-Charset header: Internet Explorer 8, Safari 5, Opera 11, Firefox 10 and
Chrome 27 have abandoned this header. The Accept-CH-Lifetime header This is part of an experimental technology called Client Hints and is only available in
Chrome 61 or later. The Accept-CH-Lifetime header is used with the Device-Memory value of the Accept-CH header and indicates the amount of time the device should opt-in to sharing the amount of device memory with the server. The value is given i...
HTTP Index - HTTP
e-Policy: wake-lock Directive, Feature-Policy, HTTP, Reference, Wake Lock API The HTTP Feature-Policy header wake-lock directive controls whether the current document is allowed to use Wake Lock API to indicate that device should not enter power-saving mode. 151 Feature-Policy: xr This Feature Policy directive was at one point defined as xr (but implemented only in
Chrome as vr), use xr-spatial-tracking instead. 152 Feature-Policy: xr-spatial-tracking The HTTP Feature-Policy header xr-spatial-tracking directive controls whether the current document is allowed to use the WebXR Device API. This policy controls whether navigator.xr.requestSession() can return XRSession that requires spatial tracking and whether user agent can indicate support fo...
...n be used to indicate whether or not a browser should be allowed to render a page in a <frame>, <iframe>, <embed> or <object>. Sites can use this to avoid clickjacking attacks, by ensuring that their content is not embedded into other sites. 204 X-XSS-Protection HTTP, Reference, Security, XSS, header The HTTP X-XSS-Protection response header is a feature of Internet Explorer,
Chrome and Safari that stops pages from loading when they detect reflected cross-site scripting (XSS) attacks. Although these protections are largely unnecessary in modern browsers when sites implement a strong Content-Security-Policy that disables the use of inline JavaScript ('unsafe-inline'), they can still provide protections for users of older web browsers that don't yet support CSP. 205 ...
Proxy Auto-Configuration (PAC) file - HTTP
s whether web browser requests (HTTP, HTTPS, and FTP) go directly to the destination or are forwarded to a web proxy server. The JavaScript function contained in the PAC file defines the function: function FindProxyForURL(url, host) { // ... } Syntax function FindProxyForURL(url, host) Parameters url The URL being accessed. The path and query components of https:// URLs are stripped. ...
...ile defines the function: function FindProxyForURL(url, host) { // ... } Syntax function FindProxyForURL(url, host) Parameters url The URL being accessed. The path and query components of https:// URLs are stripped. In
Chrome (versions 52 to 73), you can disable this by setting PacHttpsUrlStrippingEnabled to false in policy or by launching with the --unsafe-pac-url command-line flag (in
Chrome 74, only the flag works, and from 75 onward, there is no way to disable path-stripping; as of
Chrome 81, path-stripping does not apply to HTTP URLs, but there is interest in changing this behavior to match HTTPS); in Firefox, the preference is network.proxy.autoconfig_url.include_path. host The hostname extracted from the URL. This is only for convenience; it is the same string as between :// a...
RangeError: invalid date - JavaScript
Examples Invalid cases Unrecognizable strings or dates containing illegal element values in ISO formatted strings usually return NaN. ...
... Examples Invalid cases Unrecognizable strings or dates containing illegal element values in ISO formatted strings usually return NaN. ...
TypeError: cannot use 'in' operator to search for 'x' in 'y' - JavaScript
ght-hand side of 'in' should be an object" occurs when the in operator was used to search in strings, or in numbers, or other primitive types. It can only be used to check if a property is in an object. Message TypeError: Invalid operand to 'in' (Edge) TypeError: right-hand side of 'in' should be an object, got 'x' (Firefox) TypeError: cannot use 'in' operator to search for 'x' in 'y' (Firefox,
Chrome) Error type TypeError What went wrong? The in operator can only be used to check if a property is in an object. You can't search in strings, or in numbers, or other primitive types. Examples Searching in strings Unlike in other programming languages (e.g. Python), you can't search in strings using the in operator. "Hello" in "Hello World"; // TypeError: cannot use 'in' operator to search...
...: cannot use 'in' operator to search for 'Hello' in 'Hello World' Instead you will need to use String.prototype.indexOf(), for example. "Hello World".indexOf("Hello") !== -1; // true The operand can't be null or undefined Make sure the object you are inspecting isn't actually null or undefined. var foo = null; "bar" in foo; // TypeError: cannot use 'in' operator to search for 'bar' in 'foo' (
Chrome) // TypeError: right-hand side of 'in' should be an object, got null (Firefox) The in operator always expects an object. var foo = { baz: "bar" }; "bar" in foo; // false "PI" in Math; // true "pi" in Math; // false Searching in arrays Be careful when using the in operator to search in Array objects. The in operator checks the index number, not the value at that index. var trees = ['redwoo...
Function.name - JavaScript
onstructor function (ECMAScript2015, 14.5.14.21.b + 12.2.6.9). Therefore we can't obtain the class name for virtually any class with a static method property name(): class Foo { constructor() {} static name() {} } With a static name() method Foo.name no longer holds the actual class name but a reference to the name() function object. Above class definition in ES2015 syntax will behave in
Chrome or Firefox similar to the following snippet in ES5 syntax: function Foo() {} Object.defineProperty(Foo, 'name', { writable: true }); Foo.name = function() {}; Trying to obtain the class of fooInstance via fooInstance.constructor.name won't give us the class name at all but a reference to the static class method. Example: let fooInstance = new Foo(); console.log(fooInstance.constructor.name); ...
...Object.defineProperty(Foo, 'name', { writable: true }); Foo.name = function() {}; Trying to obtain the class of fooInstance via fooInstance.constructor.name won't give us the class name at all but a reference to the static class method. Example: let fooInstance = new Foo(); console.log(fooInstance.constructor.name); // logs function name() You may also see from the ES5 syntax example that in
Chrome or Firefox our static definition of Foo.name becomes writable. The built-in definition in the absence of a custom static definition is read-only: Foo.name = 'Hello'; console.log(Foo.name); // logs "Hello" if class Foo has a static name() property but "Foo" if not. Therefore you may not rely on the built-in Function.name property to always hold a class's name. Symbols as function names If a S...
function declaration - JavaScript
ested within an if statement, however the results are inconsistent across implementations and therefore this pattern should not be used in production code. For conditional function creation, use function expressions instead. var hoisted = "foo" in this; console.log(`'foo' name ${hoisted ? "is" : "is not"} hoisted. typeof foo is ${typeof foo}`); if (false) { function foo(){ return 1; } } // In
Chrome: // 'foo' name is hoisted. typeof foo is undefined // // In Firefox: // 'foo' name is hoisted. typeof foo is undefined // // In Edge: // 'foo' name is not hoisted. typeof foo is undefined // // In Safari: // 'foo' name is hoisted. typeof foo is function The results are exactly the same for a condition that evaluates to true var hoisted = "foo" in this; console.log(`'foo' name ${hoisted ? "is" ...
...foo is undefined // // In Edge: // 'foo' name is not hoisted. typeof foo is undefined // // In Safari: // 'foo' name is hoisted. typeof foo is function The results are exactly the same for a condition that evaluates to true var hoisted = "foo" in this; console.log(`'foo' name ${hoisted ? "is" : "is not"} hoisted. typeof foo is ${typeof foo}`); if (true) { function foo(){ return 1; } } // In
Chrome: // 'foo' name is hoisted. typeof foo is undefined // // In Firefox: // 'foo' name is hoisted. typeof foo is undefined // // In Edge: // 'foo' name is not hoisted. typeof foo is undefined // // In Safari: // 'foo' name is hoisted. typeof foo is function Function declaration hoisting Function declarations in JavaScript are hoisted to the top of the enclosing function or global scope. You can us...
Mapping the width and height attributes of media container elements to their aspect-ratio - Web media technologies
g on a proposal in the CSS Box Sizing Level 4 draft to define an aspect-ratio property and propose the idea of using the width and height attributes to compute layout. Fantasai & Jen Simmons collaborated with Emilio, who worked on an experimental implementation to prove it would work. Mozilla then brought the idea up in the WICG community group and discussed it further until representatives from
Chrome were onboard with the idea. Due to this work, browsers are working on adding a new mechanism for sizing images before the actual image is loaded. Firefox has added an internal aspect-ratio property (in version 69 onwards) that applies to replaced elements, and other related elements that accept width and height attributes. This appears in the browser's internal UA stylesheet, similar to the foll...
...It will ship with Firefox 71. ...
Performance fundamentals - Web Performance
roll 10 elements, changing the content of the first and last accordingly to your position in the results list, instead of moving 100 elements that aren't visible. The same trick applies in games to sprites: if they aren't currently on the screen, there is no need to poll them. Instead re-use elements that scroll off screen as new ones coming in. General application performance analysis Firefox,
Chrome, and other browsers include built-in tools that can help you diagnose slow page rendering. In particular, Firefox's Network Monitor will display a precise timeline of when each network request on your page happens, how large it is, and how long it takes. If your page contains JavaScript code that is taking a long time to run, the JavaScript profiler will pinpoint the slowest lines of code: ...
...ing large images and CSS gradients can also take longer. Simply downloading large files can take longer, even over a fast network, because mobile hardware is sometimes too slow to take advantage of all the available bandwidth. For useful general tips on mobile Web performance, have a look at Maximiliano Firtman's Mobile Web High Performance talk. Testcases and submitting bugs If the Firefox and
Chrome developer tools don't help you find a problem, or if they seem to indicate that the Web browser has caused the problem, try to provide a reduced test case that maximally isolates the problem. That often helps in diagnosing problems. See if you can reproduce the problem by saving and loading a static copy of an HTML page (including any images/stylesheets/scripts it embeds). If so, edit the static...
How to make PWAs installable - Progressive web apps (PWAs)
ise be present, creating an even more seamless and native-like feel. Requirements To make the web site installable, it needs the following things in place: A web manifest, with the correct fields filled in The web site to be served from a secure (HTTPS) domain An icon to represent the app on the device A service worker registered, to allow the app to work offline (this is required only by
Chrome for Android currently) Currently, only the Chromium-based browsers such as
Chrome, Edge, and Samsung Internet require the service worker. If developing your app using Firefox, be aware that you will need a service worker to be compatible with Chromium-based browsers. The manifest file The key element is a web manifest file, which lists all the information about the website in a JSON format.
...rs are used to create this screen. Summary In this article, we learned about how we can make PWAs installable with a properly-configured web manifest, and how the user can then install the PWA with the "add to home screen" feature of their browser. For more information on a2hs, be sure to read our Add to Home screen guide. Browser support is currently limited to Firefox for Android 58+, Mobile
Chrome and Android Webview 31+, and Opera for Android 32+, but this should improve in the near future. Now let's move to the last piece of the PWA puzzle: using push notifications to share announcements with the user, and to help the user re-engage with your app. Previous Overview: Progressive Next ...
Certificate Transparency - Web security
xtension, the included SCTs are decided by the issuing CA. There should be no need for web servers to be modified if this mechanism is used. With the latter methods, servers will need to be updated to send the required data. The advantage is that the server operator can customise the CT log sources providing the SCTs sent via the TLS extension/stapled OCSP response. Browser Requirements Google
Chrome requires CT log inclusion for all certificates issues with a notBefore date of after 30 April 2018. Users will be prevented from visiting sites using non-compliant TLS certificates.
Chrome had previously required CT inclusion for Extended Validation (EV) and Symantec-issued certificates. Apple requires a varying number of SCTs in order for Safari and other servers to trust server certificates. ...
...usion for Extended Validation (EV) and Symantec-issued certificates. Apple requires a varying number of SCTs in order for Safari and other servers to trust server certificates. Firefox does not currently check or require the use of CT logs for sites that users visit. The Expect-CT header can be used to request that a browser always enforces the requirement for certificate transparency (e.g. in
Chrome, even if the certificate was issued with a notBefore date prior to April). Specifications Specification Status Comment Certificate Transparency IETF RFC ...
How to fix a website with blocked mixed content - Web security
Starting with Firefox 23, Firefox blocks active mixed content by default. This follows a practice adopted by Internet Explorer (since version 9) and
Chrome. This page explains what you should be aware of as a web developer. Your website may break If your website delivers HTTPS pages, all active mixed content delivered via HTTP on this pages will be blocked by default. Consequently, your website may appear broken to users (if iframes or plugins don't load, etc.). Passive mixed content is displayed by default, but users can set a preference to block this type of content, as well. ...
...k If your website delivers HTTPS pages, all active mixed content delivered via HTTP on this pages will be blocked by default. Consequently, your website may appear broken to users (if iframes or plugins don't load, etc.). Passive mixed content is displayed by default, but users can set a preference to block this type of content, as well. Note that since mixed content blocking already happens in
Chrome and Internet Explorer, it is very likely that if your website works in both of these browsers, it will work equally well in Firefox with mixed content blocking. In any case, the best way to know if something is broken in Firefox is to download the latest Firefox Edition, open different pages on your website with the web console open (enable the "Security" messages) and see if anything related to...
Mixed content - Web security
te) <link> (href attribute) (this includes CSS stylesheets) <iframe> (src attribute) XMLHttpRequest requests fetch() requests All cases in CSS where a <url> value is used (@font-face, cursor, background-image, and so forth). <object> (data attribute) Navigator.sendBeacon (url attribute) Other resource types like web fonts and workers may be considered active mixed content, as they are in
Chrome. Warnings in Web Console The Firefox Web Console displays a mixed content warning message in the Net pane when a page on your website has this issue. The mixed content resource that was loaded via HTTP will show up in red, along with the text "mixed content", which links to this page. As well as finding these warnings in the Web Console, you could use Content Security Policy (CSP) to report ...
...Safari does not allow any mixed content. ...
Same-origin policy - Web security
are some examples of resources which may be embedded cross-origin: JavaScript with <script src="..."></script>. Error details for syntax errors are only available for same-origin scripts. CSS applied with <link rel="stylesheet" href="...">. Due to the relaxed syntax rules of CSS, cross-origin CSS requires a correct Content-Type header. Restrictions vary by browser: Internet Explorer, Firefox,
Chrome, Safari (scroll down to CVE-2010-0051) and Opera. Images displayed by <img>. Media played by <video> and <audio>. External resources embedded with <object> and <embed>. Fonts applied with @font-face. Some browsers allow cross-origin fonts, others require same-origin. Anything embedded by <iframe>. Sites can use the X-Frame-Options header to prevent cross-origin framing. How to allow cross-...
...stored in the browser such as Web Storage and IndexedDB are separated by origin. Each origin gets its own separate storage, and JavaScript in one origin cannot read from or write to the storage belonging to another origin. Cookies use a separate definition of origins. A page can set a cookie for its own domain or any parent domain, as long as the parent domain is not a public suffix. Firefox and
Chrome use the Public Suffix List to determine if a domain is a public suffix. Internet Explorer uses its own internal method to determine if a domain is a public suffix. The browser will make a cookie available to the given domain including any sub-domains, no matter which protocol (HTTP/HTTPS) or port is used. When you set a cookie, you can limit its availability using the Domain, Path, Secure, and Ht...
Using templates and slots - Web Components
Adding flexibility with slots So far so good, but the element isn't very flexible. We can only display one bit of text inside it, meaning that at the moment it is even less useful than a regular paragraph! We can make it possible to display different text in each element instance in a nice declarative way using the <slot> element. This has m...
... Adding flexibility with slots So far so good, but the element isn't very flexible. We can only display one bit of text inside it, meaning that at the moment it is even less useful than a regular paragraph! We can make it possible to display different text in each element instance in a nice declarative way using the <slot> element. This has more limited support than <template>, available since
Chrome 53, Opera 40, Safari 10, Firefox 59, and Edge 79. Slots are identified by their name attribute, and allow you to define placeholders in your template that can be filled with any markup fragment you want when the element is used in the markup. So, if we want to add a slot into our trivial example, we could update our template's paragraph element like this: <p><slot name="my-text">My default tex...
Introduction to using XPath in JavaScript - XPath
+= thisHeading.textContent + '\n'; thisHeading = headings.iterateNext(); } Once we iterate to a node, we have access to all the standard DOM interfaces on that node. After iterating through all the h2 elements returned from our expression, any further calls to iterateNext() will return null. Evaluating against an XML document within an Extension The following uses an XML document located at
chrome://yourextension/content/peopleDB.xml as an example. <?xml version="1.0"?> <people xmlns:xul = "http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" > <person> <name first="george" last="bush" /> <address street="1600 pennsylvania avenue" city="washington" country="usa"/> <phoneNumber>202-456-1111</phoneNumber> </person> <person> <name first="tony" last="blair" /> <address st...
...honeNumber> </person> </people> To make the contents of the XML document available within the extension, we create an XMLHttpRequest object to load the document synchronously, the variable xmlDoc will contain the document as an XMLDocument object against which we can use the evaluate method JavaScript used in the extensions xul/js documents. ...
content/worker - Archive of obsolete content
n the internal implementation of SDK modules which use content scripts to interact with web content. It exports the Worker trait, which enables content scripts and the add-on code to exchange messages using the port or postMessage APIs. The Worker is similar to the web worker interface defined by the W3C. But unlike "web workers," these workers run in the same process as web content and browser
chrome, so code within workers can block the UI. Globals Constructors Worker(options) Creates a content worker. Parameters options : object Required options: Name Type window object The content window to create JavaScript sandbox for communication with. Optional options: Name Type contentScriptFile string,array...
core/namespace - Archive of obsolete content
nction View(element) { let view = Object.create(View.prototype); dom(view).element = element; // .... } View.prototype.destroy = function destroy() { let { element } = dom(this); element.parentNode.removeChild(element); // ... }; // ... exports.View = View; // ... Also, multiple namespaces can be used with one object: // ./widget.js let { Cu } = require('
chrome'); let { ns } = require('sdk/core/namespace'); let { View } = require('./view'); // Note this is completely independent from View's internal Namespace object. let sandboxes = ns(); function Widget(options) { let { element, contentScript } = options; let widget = Object.create(Widget.prototype); View.call(widget, options.element); sandboxes(widget).sandbox = Cu.Sandbox(...
io/file - Archive of obsolete content
ikely won't work when users run it on Unix-like systems. Likewise, if your add-on uses literal Unix-style path specifications, it won't work for users on Windows. To ensure your add-on works for everyone, generate paths using the join function. Unfortunately this API does not currently provide a way to obtain an absolute base path which you could then use with join. For now, you need to require("
chrome") and use the XPCOM directory service as described in this article about File I/O. Note that if you do decide to hardcode Windows-style paths, be sure to escape backslashes in strings. For example, to specify the file at C:\Users\Myk, you need to use the string "C:\\Users\\Myk", not "C:\Users\Myk". Read more about escaping characters in strings. Globals Functions basename(path) The path pa...
system/events - Archive of obsolete content
API for working with the application observer service. Usage The system/events module provides core (low level) API for working with the application observer service, also known as nsIObserverService. You can find a list of events dispatched by the Firefox codebase here. var events = require("sdk/system/events"); var { Ci } = require("
chrome"); function listener(event) { var channel = event.subject.QueryInterface(Ci.nsIHttpChannel); channel.setRequestHeader("User-Agent", "MyBrowser/1.0", false); } events.on("http-on-modify-request", listener); Globals Functions emit(type, event) Send an event to observer service Parameters type : string The event type. event : object An optional object with data and subject attributes. data refers to a string that you would like to pass thr...
system/runtime - Archive of obsolete content
true if Firefox was started in safe mode, otherwise false. OS A string identifying the current operating system. For example, . "WINNT", "Darwin", or "Linux". See OS_TARGET for a more complete list of possible values. processType The type of the caller's process, which will be one of these constants: Constant Value Description PROCESS_TYPE_DEFAULT 0 The default (
chrome) process. PROCESS_TYPE_PLUGIN 1 A plugin subprocess. PROCESS_TYPE_CONTENT 2 A content subprocess. PROCESS_TYPE_IPDLUNITTEST 3 An IPDL unit testing subprocess. widgetToolkit A string identifying the target widget toolkit in use. XPCOMABI A string identifying the ABI of the current processor and compiler vtable. This string takes the form <proc...
Low-Level APIs - Archive of obsolete content
e aware that the cost of privileged access is the need to take more elaborate security precautions. In many cases these modules have simpler, more restricted analogs among the "High-Level APIs" (for example, windows or request). These modules are still in active development, and we expect to make incompatible changes to them in future releases. /loader Create CommonJS module loaders.
chrome The
chrome module gives an Add-on SDK add-on access to the Components object, which in turn gives it access to a large set of privileged low-level Firefox APIs. console/plain-text Constructor for a console instance. console/traceback Functionality similar to Python's traceback module. content/content Re-exports three objects from three other modules: Loader, Worker, and Symbiont. content/...
Tutorials - Archive of obsolete content
page. Development techniques Logging Log messages to the console for diagnostic purposes. Creating reusable modules Structure your add-on in separate modules to make it easier to develop, debug, and maintain. Create reusable packages containing your modules, so other add-on developers can use them too. Unit testing Writing and running unit tests using the SDK's test framework.
Chrome authority Get access to the Components object, enabling your add-on to load and use any XPCOM object. Creating event targets Enable the objects you define to emit their own events. Listen for load and unload Get notifications when your add-on is loaded or unloaded by Firefox, and pass arguments into your add-on from the command line. Using third-party modules (jpm) Install and use ...
Bookmarks - Archive of obsolete content
ed when my add-on is loaded onLoad: function() { bmsvc.addObserver(myExt_bookmarkListener, false); }, // This function is called when my add-on is unloaded onUnLoad: function() { bmsvc.removeObserver(myExt_bookmarkListener); }, doSomething: function() { alert("Did something."); } }; See also nsINavBookmarksService nsINavBookmarkObserver Places Using XPCOM without
chrome - Bookmark Observer ...
Canvas code snippets - Archive of obsolete content
'.tmp' }); }); } Loading a remote page onto a canvas element The following class first creates a hidden iframe element and attaches a listener to the frame's load event. Once the remote page has loaded, the remotePageLoaded method fires. This method gets a reference to the iframe's window and draws this window to a canvas object. Note that this only works if you are running the page from
chrome. If you try running the code as a plain webpage, you will get a 'Security error" code: "1000' error. RemoteCanvas = function() { this.url = 'http://developer.mozilla.org'; }; RemoteCanvas.CANVAS_WIDTH = 300; RemoteCanvas.CANVAS_HEIGHT = 300; RemoteCanvas.prototype.load = function() { var windowWidth = window.innerWidth - 25; var iframe; iframe = document.createElement('iframe')...
Embedding SVG - Archive of obsolete content
xlink"> <body> <p>hello</p> <svg:svg version="1.1" baseProfile="full" width="150" height="150"> <svg:rect x="10" y="10" width="100" height="100" fill="red"/> <svg:circle cx="50" cy="50" r="30" fill="blue"/> </svg:svg> <p>world</p> </body> </html> Embedding into XUL Make sure you use the right namespace when embedding <?xml version="1.0"?> <?xml-stylesheet href="
chrome://global/skin/" type="text/css"?> <window xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" xmlns:svg="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"> <!-- XUL and SVG go here --> </window> Example: <?xml version="1.0"?> <?xml-stylesheet href="
chrome://global/skin/" type="text/css"?> <window xmlns="http://www.mozilla.org/keymaster...
Forms related code snippets - Archive of obsolete content
p-empty-cell { cursor: not-allowed; } </style> </head> <body> <form name="myform"> <p> From: <input type="text" readonly class="date-picker" name="date-from" /> To: <input type="text" readonly class="date-picker" name="date-to" /> </p> </form> </body> </html> Note: The current implementation of const (constant statement) is not part of ECMAScript 5. It is supported in Firefox &
Chrome (V8) and partially supported in Opera 9+ and Safari. It is not supported in Internet Explorer 6-9, or in the preview of Internet Explorer 10. const is going to be defined by ECMAScript 6, but with different semantics. Similar to variables declared with the let statement, constants declared with const will be block-scoped. We used it only for didactic purpose. If you want a full browser compatibil...
HTML in XUL for rich tooltips - Archive of obsolete content
iv element div.appendChild(injectHTML); } } window.addEventListener('load', htmltip.onLoad, false); In the XUL overlay, xmlns:html is used to enable HTML tags to be used inside the XUL. Our enhanced XUL tooltip is an element that is written ahead of time, and it contains an HTML div element whose type attribute lowers its privileges to being that content element, although it is an element of
chrome. This is recommended for security reasons, especially if remote HTML is to be inserted. A number of menuitems have a tooltip attribute pointing to the same tooltip. That tooltip is empty now, but we will use the mouseover event to dynamically populate the tooltip (which is about to be shown) with a different message for each menuitem. This is done by calling the onMouseTooltip function, which wi...
JS XPCOM - Archive of obsolete content
implements a quick about protocol handler in JS using XPCOMUtils.jsm. Components.utils.import("resource://gre/modules/Services.jsm"); Components.utils.import("resource://gre/modules/XPCOMUtils.jsm"); const Cc = Components.classes; const Ci = Components.interfaces; function AboutHandler() {} AboutHandler.prototype = { newChannel: function(uri) { var channel = Services.io.newChannel("
chrome://mystuff/content/mystuff.xul", null, null); channel.originalURI = uri; return channel; }, getURIFlags: function(uri) { // Do NOT return Ci.nsIAboutModule.URI_SAFE_FOR_UNTRUSTED_CONTENT unless // you make sure to set a non-system principal in newChannel. return 0; }, classDescription: "About MyStuff Page", classID: Components.ID("xxxxxx...
JavaScript Debugger Service - Archive of obsolete content
rtLine: 0, endLine: 0 }; return filter; }, We then add the filters we want. jsd.clearFilters(); // clear the list of filters // we exclude the scripts with the following filenames from being tracked jsd.appendFilter(createFilter("*/firefox/components/*")); jsd.appendFilter(createFilter("*/firefox/modules/*")); jsd.appendFilter(createFilter("XStringBundle")); jsd.appendFilter(createFilter("
chrome://*")); jsd.appendFilter(createFilter("x-jsd:ppbuffer*")); jsd.appendFilter(createFilter("XPCSafeJSObjectWrapper.cpp")); jsd.appendFilter(createFilter("file://*")); Note that appendFilter adds the filter to the end of the list. You can use insertFilter (jsdIFilter filter, jsdIFilter after) to insert the filter after a particular filter; you can pass null for jsdIFilter after to insert at the he...
Running applications - Archive of obsolete content
There are two ways to run programs. Using nsIProcess The recommended way is to use the nsIProcess interface because it is crossplatform. Using nsILocalFile.launch() This method is not implemented on all platforms, especially not on Unix/Linux! See nsILocalFile.launch() for details and make sure that all your target platforms support this method! This method has the same effect as if you double-clicked the file, so for executable files--it will just run the file without any parameters. For more information on nsIFile/nsILocalFile, see File I/O. ...
Tabbox - Archive of obsolete content
tab is removed, widget fails to advance to next tab*/ if(-1 == tabbox.selectedIndex && tabs.childNodes.length>0){ tabbox.selectedIndex=0; } } Creating a close tab button To have a tab close button, you must configure the style. Examples: .tabs-closebutton { list-style-image: url(http://mozilla.org/favicon.ico); } .tabs-closebutton { list-style-image: url("
chrome://global/skin/icons/Close.gif"); } ...
Common Pitfalls - Archive of obsolete content
core Mozilla code. These are the sort of things that super-review should be catching for code that goes into the tree; avoiding these to start with saves super-reviewers a lot of effort. The first couple of items deal with loading content from a URI. It's important to create the URI correctly, and then check that it's secure to load. This will shield you from loading <tt>javascript:</tt> or <tt>
chrome:</tt> URIs when you shouldn't. How to create a URI object In almost all cases, when creating a URI object you want to use the newURI method on the nsIIOService interface, like so: JavaScript: try { var ioServ = Components.classes["@mozilla.org/network/io-service;1"] .getService(Components.interfaces.nsIIOService); var uriObj = ioServ.newURI(uriString, uriCharset, ...
Custom about: URLs - Archive of obsolete content
s.jsm"); // globals const ABOUTPAGE_DESCRIPTION = 'This is my custom about page'; const ABOUTPAGE_ID = 'aa132730-2278-11e5-867f-0800200c9a66'; // make sure you generate a unique id from https://www.famkruithof.net/uuid/uuidgen const ABOUTPAGE_WORD = 'myaboutpage' const ABOUTPAGE_URI = 'data:text/html,hi this is the page that is shown when navigate to about:myaboutpage'; // const ABOUTPAGE_URI = '
chrome://myaboutaddon/content/index.html'; class AboutPage { static get classID() { return Components.ID(`{${ABOUTPAGE_ID}}`); } static get classDescription() { return ABOUTPAGE_DESCRIPTION; } static get contractID() { return `@mozilla.org/network/protocol/about;1?what=${ABOUTPAGE_WORD}`; } static get QueryInterface() { return XPCOMUtils.generateQI([Ci.nsIAboutModule]); } constructor() { ...
Default Preferences - Archive of obsolete content
e trees. One with user supplied prefs, another with default prefs. User supplied prefs are set using the GUI and also by modifying a profile's prefs.js file (which uses the user_pref() function). Default preferences are set similarly but inside an extension and use the pref() function. Setting default preferences While most of an extension's directories can be named arbitrarily and mapped using a
chrome manifest, default preferences must be in very particular spot: | Extension Root +--|content +--|skin +--|defaults +--|preferences To add preferences simply drop a .js file into that directory and Mozilla will read it and set the appropriate preferences. The actual file, despite having .js extension, is not a JavaScript file. You may not set variables inside of it, nor may do any kind of prog...
Downloading JSON and JavaScript in extensions - Archive of obsolete content
ript or JSON (they are different) from a remote website. Once the content has been downloaded, the extension authors proceed to use eval() to decode the string content into JavaScript objects. This practice is dangerous and will not, in fact, pass an AMO review. So the extension will not be allowed to move out of the AMO sandbox. The practice is dangerous because the decoded JavaScript has full
chrome privileges and could perform some nasty actions. How could the JavaScript an extension downloads perform nasty actions? Fairly easy if the webserver where the JavaScript is hosted were to be hijacked or compromised. It happens to the best of us. AMO takes the threat very seriously. The good news is there are several ways to workaround the problem. Downloading JSON If the extension is downloadi...
Extension Etiquette - Archive of obsolete content
Object prototypes, such as String.prototype, which are often extended to add methods to native objects. Global variables, such as top-level declarations on scripts loaded into shared windows or web pages. Expando properties of shared objects, such as document objects, or DOM nodes. IDs and class names in HTML and XUL documents, when extensions add elements to web pages or browser windows.
chrome: or resource: packages, which are often defined in
chrome.manifest files. about: page URLs. XPCOM contract IDs, which are often registered in
chrome.manifest files. While these are among the most common examples of namespaces in which conflicts can occur, there are many others. In general, care must be taken whenever defining a name anywhere that other code might do likewise. Strategies to av...
Multiple item extension packaging - Archive of obsolete content
lable bundles, including extensions, themes, and XULRunner applications Extension Packaging: specific information about how to package extensions Theme Packaging: specific information about how to package themes Multiple-item Extension Packaging: specific information about multiple-item extension XPIs XUL Application Packaging: specific information about how to package XULRunner applications
Chrome Registration ...
Chapter 6: Firefox extensions and XUL applications - Archive of obsolete content
) Matsuzawa and was originally published in Japanese for the Firefox Developers Conference Summer 2007. Matsuzawa-san is a co-author of Firefox 3 Hacks (O'Reilly Japan, 2008.) This chapter discusses tools to assist in developing extensions. Tools for extension developers FIXME: Are we sure we'll talking about Venkman since it's not well maintained FIXME: We maybe should talk about Firebug and
Chromebug FIXME: and what about Console 2 and Docked-JS Console? Venkman, the JavaScript debugger Venkman is a full-fledged JavaScript debugger that runs inside Firefox. It works like typical debuggers, and is useful not only for developing extensions, but also for general web development. Also, because it works with the JavaScript in extensions and Firefox itself, the debugger can be a good way to ...
Appendix A: Add-on Performance - Archive of obsolete content
or run code before it's needed. Add-ons can have extra features that are only available depending on user preferences. Other add-ons have most of their features depend on a user being logged in to a service. Don't load at startup something you won't need at the time. JavaScript Code Modules. Use them. JSM provide the cleanest way to separate JS into modules that can be loaded on request, unlike
chrome scripts which are generally loaded with the overlay at startup. Keep as much of your code in JSM, make it as modular as you can, and only load modules as you require them. If your add-on is too simple for JSM, don't worry about it. There's still one more thing you can do. Do as little as possible in your load handler. Ask yourself: is there anything I can't run 100 ms or even 500 ms later? If th...
Appendix B: Install and Uninstall Scripts - Archive of obsolete content
initial DB the add-on will use for storage. A few others require cleanup code to be run after the add-on is uninstalled. This appendix covers these cases with simple code that should work for most add-ons. Install Scripts Just like with a regular initialization function, we want a load event handler: // rest of overlay code goes here. window.addEventListener( "load", function() { XulSchool
Chrome.BrowserOverlay.init(); }, false); Then all we need is some persistent flag that ensures that the first run code is only run once. The best approach in this case is to use a preference, as explained in the Handling Preferences section. So, if we were to use FUEL, we can do the following in the init function: init : function() { let firstRunPref = "extensions.xulschoolhello.firstRunDone"; ...
Appendix C: Avoiding using eval in Add-ons - Archive of obsolete content
re no viable alternatives, a Mozilla Add-ons Gallery reviewer will generally reject the submission! Parsing JSON Mozilla provides native JSON support since Firefox 3. There is simply no need to parse JSON using eval. Additionally, parsing JSON retrieved from a remote location becomes a security vulnerability when parsed with the eval function. Basically, you are executing remote code with full
chrome access; that is, introducing a remote code execution vulnerability. Even if you trust the remote server; for example, because it is one you rent and administer yourself, there is a huge security risk, because of, but not limited to: You might discontinue your project or sell it, so that it is possible another person with malicious intentions takes over your domain. The server and/or domain na...
Connecting to Remote Content - Archive of obsolete content
ent.target.status); }; request.open("GET", url, true); request.send(null); In this example we demonstrate how to make a XMLHttpRequest call in asynchronous mode. You can see that an instance of the XMLHttpRequest class is created and it holds all functionality for making a request. We create this instance using XPCOM instead of the usual way (new XMLHttpRequest()) because this way works both in
chrome and non-
chrome code. Following initialization, onload and onerror handlers are registered to a callback function to handle the response returned from the remote server. In both cases aEvent.target is an nsIXMLHttpRequest. In the onload callback function, the responseText parameter contains the server response as text. If the response is an XML document, the responseXML property will hold an XML...
Getting Started with Firefox Extensions - Archive of obsolete content
hoose the Save Link As... option. Decompress the XPI file in a convenient location. Issue the following command to unzip the file on Linux or Mac OS X: unzip xulschoolhello1.xpi -d xulschoolhello1 On Windows, you can change the file extension from xpi to zip, or open the file directly, then unzip it, using a ZIP tool. You should see the following directory structure: xulschoolhello1
chrome.manifest install.rdf content browserOverlay.xul browserOverlay.js skin browserOverlay.css locale en-US browserOverlay.dtd browserOverlay.properties That's lots of files for something so simple! In the next section, we'll inspect these files and see what they do. << PreviousNext >...
Performance best practices in extensions - Archive of obsolete content
CPU overhead. When these events cannot be avoided, computation during the listeners should be kept to a minimum and real work throttled. The listeners should be added to the most specific element possible, and removed when not immediately necessary. Avoid animated images Animated images are much more expensive than generally expected, especially when used in XUL tree elements.. Consider using
Chrome Workers You can use a
ChromeWorker to execute long running tasks or do data processing. ...
Signing an extension - Archive of obsolete content
Class 3 Code Signing 2010 CA - VeriSign, Inc." -t "C,C,C" -d . It's all done. Sign The basic usage of the signing tool is as follows: nss-signtool \ -d (path to the directory that contains your certificate database files) \ -k (your certificate nickname) \ -p (your certificate password) \ -X -Z (output path/name of signed file) \ (path to your extension working directory that contains
chrome directory,
chrome.manifest file, install.rdf file, etc.) Writing your password directly in the script is dangerous. For production, use such a code: echo "Enter password for Object Signing:" read MYPASSWORD nss-signtool \ -d /Volumes/Codesign/keystore \ -k "My Company's VeriSign, Inc. ID" \ -p $MYPASSWORD \ -X -Z ~/Desktop/MyExtension/dest/MyExtension-1.0.xpi \ ~/Desktop/MyExtension/sourc...
Search Extension Tutorial (Draft) - Archive of obsolete content
s: Cc, interfaces: Ci, utils: Cu, results: Cr } = Components; // Import the Services module. Cu.import("resource://gre/modules/Services.jsm"); // These must be the same details as in your search.xml file. const ENGINE_DETAILS = { name: "Example Engine", url: "https://www.example.com/search?q=_searchTerms_&source=search-box" }; // Get the engine URL based on our URL. const ENGINE_URL = "
chrome://example-engine/content/search.xml"; // Keep track of whether this is the first run. var firstRun = false; // Decide whether to select the search engine. var selectSearch = false; function removeObserver() { try { Services.obs.removeObserver(searchObserver, ENGINE_ADDED); } // If we've already removed this observer, ignore the error. catch (e) {} } // Observer called a...
JXON - Archive of obsolete content
pe || null); loadObjTree(oNewDoc, oNewDoc, oObjTree); return oNewDoc; }; const sValProp = "keyValue", sAttrProp = "keyAttributes", sAttrsPref = "@", /* you can customize these values */ aCache = [], rIsNull = /^\s*$/, rIsBool = /^(?:true|false)$/i; })(); Note: The current implementation of const (constant statement) is not part of ECMAScript 5. It is supported in Firefox &
Chrome (V8) and partially supported in Opera 9+ and Safari. It is not supported in Internet Explorer 6-9, or in the preview of Internet Explorer 10. const is going to be defined by ECMAScript 6, but with different semantics. Similar to variables declared with the let statement, constants declared with const will be block-scoped. We used it only for didactic purpose. If you want a full browser compatibil...
Environment variables affecting crash reporting - Archive of obsolete content
the user's profile directory, in a subdirectory named "minidumps". MOZ_CRASHREPORTER_DISABLE Disable Breakpad crash reporting completely. You can use this if you would rather use the JIT debugger on Windows with the symbol server, for example. MOZ_CRASHREPORTER_SHUTDOWN Save the minidump and then force the application to close. This is useful for content crashes that don't normally close the
chrome (main application) processes. This variable would cause the application to close as well. MOZ_CRASHREPORTER The opposite of MOZ_CRASHREPORTER_DISABLE, force crash reporting on even if disabled in application.ini. You must use this to enable crash reporting on Linux debug builds. Additionally, on Mac OS X, you can set an application default setting to allow Apple's Crash Reporter tool to run a...
Source code directories overview - Archive of obsolete content
used by the Mozilla build team for building and managing the Mozilla code base. These programs coordinate the running of makefiles and the creation of the dist directory. calendar contains the code for the various Mozilla calendar apps and extensions. caps contains C interfaces and code for determining the capabilities of content based on the security settings and certificates (e.g. Verisign).
chrome contains the toolkit
chrome registry. config contains scripts and programs used by Mozilla developers to manipulate the code base and to perform special actions inside makefiles. These programs are used for code level things instead of build level things (which are a stored in the build directory). content was split off from layout and contains objects as they are exposed to the DOM. db contai...
Using content preferences - Archive of obsolete content
This makes it possible to write an extension that lets the user customize the appearance of specific web sites (setting the font size larger on sites that use obnoxiously small fonts, for instance). The content preferences service, implemented by nsIContentPrefService, offers functions for setting and retrieving preferences for specific sites or in the global preference space; global preferences are used whenever a site-specific preference isn't available. ...
Conclusion - Archive of obsolete content
o localize. How could it be added to the extension if necessary? Tinderbox actually keeps track of more than one codebase. In particular, it tracks both the main Mozilla codebase (the trunk) and a stable branch. How could you modify tinderstatus to show the status of both the trunk and the branch? This extension can be installed into Netscape 7 without problems. Firefox has slightly different
chrome registry requirements, so you may need to modify the contents.rdf files. For example, you need to change
chrome://navigator/content/navigator.xul to
chrome://browser/content/browser.xul. << Previous ...
Finding the code to modify - Archive of obsolete content
lect each statusbarpanel node in turn. Notice the flashing red border around each different section of the status bar. Open the navigator.xul file in a text editor. Find the statusbar element within it. This is where we are going to add our tinderbox status UI. InspectorWidget The InspectorWidget extension adds a toolbar button and context menus for invoking the DOM Inspector (DOMi) for either
chrome or content elements.Thus this makes it possible to save all the above DOM inspector user interface diggings. As a side note it would be good if the InspectorWidget additions were integrated directly in DOMi, that would help everyone. << PreviousNext >> ...
toolbarBindings.xml - Archive of obsolete content
Copy the following text and paste it into a text file, then save that file as "toolbarBindings.xml": <bindings id="toolbarBindings"> <binding id="toolbar-primary" extends="
chrome://global/content/bindings/toolbar.xml#toolbar-primary"> <content> <xul:hbox class="toolbar-holder toolbar-primary-holder" flex="1" xbl:inherits="orient=tborient,buttonstyle"> <xul:hbox class="toolbar-button-box" flex="1"> <children/> </xul:hbox> <xul:image class="toolbar-primary-icon" xbl:inherits="buttonstyle"/> </xul:hbox> </content> </binding> </bindings> ...
Creating a Skin for Mozilla - Archive of obsolete content
o style everything else in the interface. What is a skin? A skin does not totally change the interface, it just defines how it looks. You cannot change what happens when the user right clicks on an image, but you can change the look of the right click menu (Make it blue with pink polka dots, for example). If you want to change the functionality of Mozilla, you'll have to look into modifying the
chrome. That is beyond the scope of this document. Contents Getting Started Setup Changing Borders and Colours Changing Images Creating the Install Script In-Depth System Colours Mozilla CSS Commands How do I know what to Modify? Organizing Images Adding an image to the right of a toolbar Jar File Installer Utility (provided by Neil Marshall) Frequently...
Error Console - Archive of obsolete content
The Error Console is deprecated in Firefox, and is now only made available if you set the devtools.errorconsole.enabled preference to true. Use the Web Console instead, for web content, or the Browser Console for
chrome 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. It reports JavaScript-related errors and warnings, CSS errors and arbitrary messages from
chrome code. In Firefox, the Error Console can be opened from the tools menu or by Ctrl-Shift-J. For information about what JavaScript exceptions get logged into the Error Console, and how to make all exceptions get logged, read the article Exception logging in JavaScript. See Setting up extension development en...
Code snippets - Archive of obsolete content
Tabs from Other Computers This snippet shows how to load all tabs from other computers. Components.utils.import("resource://services-sync/main.js"); // Obtain a reference to the main Firefox window. ...
JavaScript OS.Shared - Archive of obsolete content
Module OS.Shared contains tools to interact with the operating system (and, more generally, in C) in JavaScript. All these tools are designed to be used with js-ctypes. For the moment, module OS.Shared is accessible only from
chrome workers. Global object OS.Shared.Type Properties void_t voidptr_t char jschar int unsigned_int int32_t uint32_t int64_t uint64_t long bool off_t size_t ssize_t fd (Unix only) negativeone_or_fd (Unix only) negativeone_or_nothing (Unix only) string (Unix only) null_or_string (Unix only) HANDLE (Windows only) maybe_HANDLE (Windows only) DWORD (Windows only) negative_or_DWORD (Windows only) zero_or_DWORD (Windows only) zero_or_nothing (Windows only) declareFFI() intn_t() uintn_t()Instances of OS.Shared.Type convert_from_c() releaseWith() Attrib...
slideBar - Archive of obsolete content
nt persistdefault slide behavior when being selectedbool autoReloadautomatically reload content on selectbool onClickcallback when the icon is clickedfunction onSelectcallback when the feature is selectedfunction onReadycallback when featured is loadedfunction An example: jetpack.slideBar.append({ url: "http://mozilla.com", width: 150, onClick: function(slide){ slide.icon.src = "
chrome://branding/content/icon48.png"; }}); ...
Mozilla Application Framework in Detail - Archive of obsolete content
new Mozilla software Facilities for detecting and maintaining application versions High-level objects for manipulating local directories and files Complete reference documentation, including useful example installations The following snippet from an XPInstall installation gives you some idea about how easy it is to write cross-platform installations that use the Mozilla browser: // Register
chrome register
Chrome(PACKAGE | DELAYED_
CHROME, getFolder("
Chrome","xmlterm.jar"), "content/xmlterm/"); register
Chrome(SKIN | DELAYED_
CHROME, getFolder("
Chrome","xmlterm.jar"), "skin/modern/xmlterm/"); register
Chrome(LOCALE | DELAYED_
CHROME, getFolder("
Chrome","xmlterm.jar"), "locale/xmlterm/"); if (getLastError() == SUCCESS) performInstall(); else { alert("Error detected: "+getLastError()); ...
Bundles - Archive of obsolete content
WebApp bundle In addition to passing simple command line parameters, Prism can use a zipped bundle package to install a webapp. The bundle can hold additional resources currently limited to: Application INI settings Application icon Script for the application
chrome, not the web content Installing a bundle When Prism opens a webapp bundle it will unpack it into the WebApps/{webapp-id} folder. This folder is located in the Application Data folder of the user's home directory on Windows, in the ~/.webapps directory on Linux and under ~/Library on OS X. Since this folder maybe be located in a directory that requires elevated privileges, the web application should not write data to it. The application profile directory can be used instead for this purpose. Note: The webapp must have an ID ...
PyDOM - Archive of obsolete content
For example, <window script-type="application/x-python" .../> HTML <meta http-equiv="Content-Script-Type" content="application/x-python" /> should work (but possibly doesn't - see bug 100924). But addEventListener within a <script type="application/x-python"> block does. Almost Python code can not be secured - so it will only run from trusted sources. This means you can only have Python code in
chrome. Content loaded from anywhere other than a
chrome:// URL can not host Python. It should be obvious why you don't want to run http://evil.com/something_evil.py in your browser! Inside
chrome, you can use Python via either HTML or XUL. Related Topics PyXPCOM: Create and use XPCOM components with Python Python-SpiderMonkey PyDOM Samples: Sample applications that use PyDOM PythonExt: A Firefox/XU...
Same origin policy for XBL - Archive of obsolete content
rformed Once the originating principal is determined, checks are done to make sure the load should be allowed. The checks performed are: If the principal originating the load is the system principal, the load is allowed. A call to ChecLoadURIWithPrincipal() is done to make sure the principal is able to link to the given URI in the first place. A content policy check is performed. If the URI is a
chrome: URI, the load is allowed. Note that step 2 already denied the load attempt for cases in which the
chrome: URI isn't accessible to untrusted content. A CheckMayLoad() check is performed on the originating principal for the given URI. If the CheckMayLoad() check passes, the load is allowed. ...
Supporting per-window private browsing - Archive of obsolete content
m and use PrivateBrowsingUtils.getPrivacyContextFromWindow(win), passing a Window object that is related to the content in question. As an example, if an add-on adds a context menu item that accesses an API that requires an nsILoadContext, the most relevant window is the one that owns the element being targeted by the context menu (element.ownerDocument.defaultView). If some action triggered by a
chrome element (such as a button) requires an API that takes a privacy context, the most relevant window is the one that contains the
chrome element. In some cases, there is no logical window object to use (such as when data or an action originate from some other source than web content). In these cases, it is permissable to pass null as the argument instead of a real privacy context. However, this can ...
Supporting private browsing mode - Archive of obsolete content
classes["@mozilla.org/privatebrowsing;1"] .getService(Components.interfaces.nsIPrivateBrowsingService); var inPrivateBrowsingMode = pbs.privateBrowsingEnabled; if (!inPrivateBrowsingMode) { /* save private information */ } In the above example, we only save the user's private information if not in private browsing mode. Note: Private browsing mode may only be detected by
chrome code, such as extensions; web content cannot detect whether or not private browsing is in effect. Detecting whether private browsing mode is permanent Requires Gecko 2.0(Firefox 4 / Thunderbird 3.3 / SeaMonkey 2.1) Firefox 4 added support for having private browsing mode permanently enabled. The theme looks different in this scenario. To determine whether or not the browser is permanent...
URIScheme - Archive of obsolete content
a supported URI schemes List of URI Schemes http:// by default, port 80 https:// by default, port 443 (SSL) ftp:// by default, port 21 file:// : file:///etc/hosts on Unix/Linux, file:///c:/some/file.txt on Windows. moz-icon://.ext?size=32 : you can replace ext by your some file extension like js, css, xul, xml, etc. and the size number by 1 to 127 mailto:emailaddress@domain.com about:
chrome:// ... Preferences See gecko.handlerService.schemes.* Scripting Interface See nsIProtocolHandler to create a new protocol/scheme. about: about: about:config about:crashes about:mozilla about:plugins about:robots ... ...
XML in Mozilla - Archive of obsolete content
parsing XML without validation (we use the Expat parser), displaying XML with CSS, manipulating XML documents with scripts via DOM, associating stylesheets with XML documents, and namespaces in XML. The core support is very good with few bugs. DTDs and Other External Entities Mozilla does not load external entities from the web. Mozilla can load external entities whose system identifier uses the
chrome protocol. This feature is used mainly to localize Mozilla to different languages (the UI strings are stored in external DTD files). Another exception is an entity whose system identifier is a relative path, and the XML declaration states that the document is not standalone (default), in which case Mozilla will try to look for the entity under <bin>/res/dtd directory. Mozilla may also make an exce...
Examples - Archive of obsolete content
Examples Trigger Scripts and Install Scripts describes typical kinds of script that use the XPInstall API. The following samples demonstrate some of the principal installation functions in the XPInstall API: File.macAlias File.windowsShortcut [Install.]addDirectory [Install.]addFile InstallTrigger.install
Chrome InstallTrigger.startSoftwareUpdate Windows Install Example ...
getFolder - Archive of obsolete content
or NULL in case of error or if subDirectory refers to a file that already exists. Description The getFolder method obtains an object representing one of Netscape's standard directories, for use with the addFile and getWinProfile methods. ...
loadResources - Archive of obsolete content
urces( String xpiPath ); Parameters The sole input parameter for loadResources is a string representing the path to the properties file in the XPI in which the key/value pairs are defined. Returns A JavaScript object whose property names are the keys from that file and whose values are the strings. Description The format of the properties file expected by loadResources is the same as that of the
chrome locale .properties files. This method is used to internationalize installation scripts by allowing the installer to retrieve localized string values from a separate file. Be aware that the parameter specifies the file within the XPI and not on the file system, as the following example demonstrates. Example Given a XPI with this internal structure: install.js bin/res_eg_2.properties bin/somefile.e...
Methods - Archive of obsolete content
n object whose properties are localized strings loaded from the specified property file. logComment Add a comment line to the install log. patch Applies a set of differences between two versions. performInstall Finalizes the installation of the software. refreshPlugins Refreshes the list of plug-ins registered for the browser. register
Chrome Registers
chrome with the
chrome registry. resetError Resets a saved error code to zero. setPackageFolder Sets the default package folder that is saved with the root node. ...
Return Codes - Archive of obsolete content
source file and got directory SOURCE_IS_FILE -234 Expected source directory and got file INSUFFICIENT_DISK_SPACE -235 Not enough disk space for install FILENAME_TOO_LONG -236 UNABLE_TO_LOCATE_LIB_FUNCTION -237 UNABLE_TO_LOAD_LIBRARY -238
CHROME_REGISTRY_ERROR -239 MALFORMED_INSTALL -240 KEY_ACCESS_DENIED -241 Access to the registry key has been denied KEY_DOES_NOT_EXIST -242 Registry key does not exist VALUE_DOES_NOT_EXIST -243 Registry value does not exist INVALID_SIGNATURE -260 The...
fullscreenbutton - Archive of obsolete content
<< XUL Reference home fullscreenbutton Type: boolean Set this attribute to true to display a button in the window
chrome to allow the user to switch the window into full screen mode. Supported on Mac OS X 10.7 Lion and later and on Windows. The window receives a "fullscreen" event once the change has been made. ...
onchange - Archive of obsolete content
Radio/Check Box When the state is changed Select List When the selected item is changed What is accessible The script context at this point can only access the following things: Global Values/Functions i.e. ...
reserved - Archive of obsolete content
This means that, to execute these commands, key events won't be passed to content, and event listeners registered for them in content will not be executed. Currently, the content still receives these key events, even though it can't override them. In future releases, it won't receive them. See bug 1173061 for details. ...
script.type - Archive of obsolete content
<< XUL Reference home type Type: language content type The language of the script. Usually, you would set this to application/javascript. Note: If the JavaScript file is in
chrome://, setting this attribute to application/javascript will always use the latest available JavaScript version. If you omit this attribute, the default (and older) JavaScript version is used (like you get when including a JavaScript file from web content without specifying a version number). ...
textbox.type - Archive of obsolete content
attribute. The command event will fire if the user presses the Enter key. The timed type is deprecated in Gecko 1.9.1 and the search textbox may be used instead. XBL-specific note Beware that if you create an XBL binding for a textbox, you need to use the appropriate extends attribute and changing type attribute on the tree won't have effect. E.g. if you have <binding id="input" extends="
chrome://global/content/bindings/autocomplete.xml#autocomplete" >, then the textbox will have autocomplete type, regardless of tree's 'type' attribute. Use <binding extends="
chrome://global/content/bindings/textbox.xml#textbox" > for ordinary textbox. See also type ...
Attribute (XUL) - Archive of obsolete content
lose disabled disablehistory disableKeyNavigation disablesecurity dlgtype dragging editable editortype element empty emptytext Deprecated since Gecko 2 enableColumnDrag enablehistory equalsize eventnode events expr firstdayofweek firstpage first-tab fixed flags flex focused forceComplete grippyhidden grippytooltiptext group handleCtrlTab height helpURI hidden hide
chrome hidecolumnpicker hideheader hideseconds hidespinbuttons highlightnonmatches homepage href icon id ignoreBlurWhileSearching ignorecase ignoreincolumnpicker ignorekeys image inactivetitlebarcolor increment index inputtooltiptext insertafter insertbefore instantApply inverted iscontainer isempty key keycode keytext label lastpage lastSelected last-tab left linkedpa...
Dynamically modifying XUL-based user interface - Archive of obsolete content
hat different web pages (and even different instances of the same web page) correspond to different documents. Each XUL window has its own distinct document, and there may even be a few different documents in a single window, when there is an <iframe>, <browser>, or a <tabbrowser> element. You must be sure to always manipulate the correct document. (Read more about this in Working with windows in
chrome code.) When your script is included using a <script> tag, the document property references the DOM document that includes the script. Examples: Using DOM methods This section demonstrates the use of appendChild(), createElement(), insertBefore(), and removeChild() DOM methods. Removing all children of an element This example removes all children of an element with id=someElement from the current ...
International characters in XUL JavaScript - Archive of obsolete content
: var text = "Ein schones Beispiel eines mehrsprachigen Textes: ???"; This mixes German and Japanese characters. Earlier versions always interpreted JS files loaded from XUL as ISO-8859-1 (Latin-1), in both local and remote cases. Unicode escapes, as discussed below, have always worked. How the character encoding is determined in Gecko 1.8 and later When the JavaScript file is loaded from a
chrome:// URL, a Byte Order Mark (FIXME: )(BOM) is used to determine the character encoding of the script. Otherwise, the character encoding will be the same as the one used by the XUL file (which can be specified using an encoding attribute in the <?xml?> tag). By default this will use UTF-8, which can represent virtually all characters in the world. If the script file is loaded via HTTP, the HTTP hea...
loadURI - Archive of obsolete content
Please check which one you're documenting! (This one has no post data parameter, see loadURIWithFlags for a version that does) loadURI( uri, referrer, charset ) Return type: no return value Load a URL into the document, with the given referrer and character set. ...
Panels - Archive of obsolete content
mporary popup displays for selecting or entering data. The panel element The panel element is used to create panels. The panel will display whatever elements are placed as children of the panel element. For example, the following panel displays a textbox for entering a name. Note that the panel is not placed in a separate file and is instead placed inside another window. <?xml-stylesheet href="
chrome://global/skin" type="text/css"?> <window xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"> <button label="Details" type="panel"> <panel id="search-panel"> <label control="name" value="Name:"/> <textbox id="name"/> </panel> </button> </window> Many panels will be associated with a button, as in this example. When the button is pressed, the panel is opened. Clic...
Special per-platform menu considerations - Archive of obsolete content
r applications that have one (such as SeaMonkey; Firefox does not have this item). The last five items aren't normally used but are listed for completeness. Here is an example: <menubar> <menu label="Tools"> <menupopup> <menuitem label="Spell Check"/> <menuitem id="menu_preferences" label="Preferences" oncommand="window.openDialog('options.xul', '_new', '
chrome');"/> </menupopup> </menu> </menubar> This menu item will be placed on the application menu on the Macintosh but left in the Tools menu on other platforms. When moved to the application menu, the label and shortcut keys are overridden by platform conventions. However, regardless of the platform, the command event will be fired on the menu item when it is activated by the user. Notes fo...
Printing from a XUL App - Archive of obsolete content
including extensions, themes, and XULRunner applications Extension Packaging: specific information about how to package extensions Theme Packaging: specific information about how to package themes Multiple-item Extension Packaging: specific information about multiple-item extension XPIs XUL Application Packaging: specific information about how to package XULRunner applications
Chrome Registration Printing in XUL Apps ...
Sorting and filtering a custom tree view - Archive of obsolete content
tering a custom tree view, that is, a tree whose values are loaded via JavaScript. This will not work for other types of trees, for example RDF-backed or ones created with DOM methods. For the sake of simplicity, strings are not localized and the data loaded is hard coded. Because of bug 340478, this code will only work from privileged script. ...
Style classes - Archive of obsolete content
<< XUL Reference home alert-icon
chromeclass-toolbar error-icon groove header indent listcell-iconic listitem-iconic menuitem-iconic menuitem-non-iconic message-icon monospace plain question-icon small-margin statusbarpanel-iconic statusbarpanel-iconic-text statusbarpanel-menu-iconic text-link thin tree-splitter treecol-image ...
Template Builder Interface - Archive of obsolete content
, it is common to start with an empty datasource using the special URI 'rdf:null'. <tree datasources="rdf:null" ref="http://www.xulplanet.com/rdf/myphotos"> This will create a composite datasource with no datasources in it. This syntax is necessary as otherwise you wouldn't be able to specify a value for the datasources attribute, and a template builder would not be attached to the element. In a
chrome context, the datasource 'rdf:local-store' is always included even if you don't specify it. This is something to watch out for if you are going to be manipulating the composite datasource. One more note: the datasources attribute may use either absolute or relative URLs. Relative URLs are relative to the XUL document the corresponding element is in. The RDF service's GetDataSource method however, ...
Template and Tree Listeners - Archive of obsolete content
en an index in the tree and the associated member resource for the item at the index. Naturally, we can't store the index as the item may have moved its position. Or, the resource may no longer be part of the results, which is why we need to check the return value of the getIndexOfResource method. (As this example uses the RDF resources directly, it requires elevated privileges so you will need a
chrome URL to test it.) You might also guess that the builder's root property, which is used above, refers to the tree. In a content builder, it will return the element with the datasources attribute, which in the template builder is referred to as the root element. Finally, you can remove a listener using the builder's removeListener method. Listening for Tree Changes The second type of listener is use...
Toolbars - Archive of obsolete content
MozillaZine forum about:addons newsletter Mozilla's Web-Tech blog mozdev project owners Planet Mozilla Other community links... Tools DOM Inspector edit the live DOM (Firefox and Thunderbird) Mozilla Labs Add-on Builder Extension Developer's Extension a suite of development tools
Chrome List view files in
chrome:// (Firefox, Thunderbird) Extension Wizard a web-based extension skeleton generator (Firefox and Thunderbird) ... more tools ... Related Topics XUL, Themes, Developing Mozilla ...
Tree Widget Changes - Archive of obsolete content
leaving out the attribute. Note that it's the value attribute you use, not the label attribute. <treecell/> <treecell value="true"/> You need to specify the checkbox image with CSS for the checkbox to display. (Do NOT set id of the column to be 'checked' it will cause problems with the CSS) treechildren::-moz-tree-checkbox(checked) { /* css for checked cells */ list-style-image: url("
chrome://global/skin/checkbox/cbox-check.gif"); } In addition, checkmark columns support editing: <tree editable="true"> <treecols> <treecol type="checkbox" editable="true"> ... </treecol> </treecols> </tree> If the column is editable, the user can click the cell to change the state of the checkbox. When the user clicks the cell, the view's setCellValue method will be called with ...
Adding HTML Elements - Archive of obsolete content
ML element. xmlns:html="http://www.w3.org/1999/xhtml" This is a declaration of HTML much like the one we used to declare XUL. This must be entered exactly as shown or it won't work correctly. Note that Mozilla does not actually download this URL, but it does recognize it as being HTML. ...
Adding Labels and Images - Archive of obsolete content
ld be better in order to support different themes to use a style sheet to set the image URL. A later section will describe how to use style sheets, but an example will be shown here for completeness. You can use the list-style-image CSS property to set the URL for the image. Here are some examples: XUL: <image id="image1"/> <image id="search"/> Style Sheet: #image1 { list-style-image: url("
chrome://findfile/skin/banner.jpg"); } #search { list-style-image: url("http://example.com/images/search.png"); } These images come from within the
chrome directory, in the skin for the findfile package. Because images vary by theme, you would usually place images in the skin directory. In the next section, we will learn how to add some input controls to a window. << PreviousNext >> ...
Box Model Details - Archive of obsolete content
ch is used to center the buttons horizontally. The align attribute aligns the buttons vertically. The result is that the buttons will be centered in the box in both directions. This example will work with a vertical box as well, although the second button will be underneath the first one, instead of beside it. ...
Custom Tree Views - Archive of obsolete content
n assign a value to this property at any time to set or change the view. function setView(){ document.getElementById('my-tree').view = treeView; } The following presents the example together. An inline script has been used here to simplify the example. Normally, you would put the script in an external script file. ...
Element Positioning - Archive of obsolete content
ite direction. As with the pack attribute, the align attribute applies to the box containing the elements to be aligned, not to the elements themselves. For example, the first box below will have its children stretch, because that is the default. The second box has an align attribute, so its children will be placed centered. ...
More Wizards - Archive of obsolete content
llowing example, the user must enter a secret code into a textbox on the first page of the wizard. The function checkCode() is called whenever the first page is shown as indicated by the onpageshow attribute. It is also called whenever a key is pressed in the textbox, to determine whether the Next button should be enabled again. ...
Open and Save Dialogs - Archive of obsolete content
n type of dialog is one where the user can select a file to open or save. File pickers A file picker is a dialog that allows the user to select a file. It is most commonly used for the Open and Save menu commands, but you can use it any place in which the user needs to select a file. The XPCOM interface nsIFilePicker is used to implement a file picker. Note that the file picker only works from
chrome URLs. You can use the file picker in one of three modes: Open - the user is asked to select a file for opening. Get Folder - the user is asked to select a folder (directory). Save - the user is asked to select the name to save a file to. The appearance of the dialog will be different for each type and will vary on each platform. Once the user selects a file or folder, it can be read from ...
Property Files - Archive of obsolete content
nformation. This element reads in the contents of a property file and builds a list of properties for you. You can then look up a particular property by name. <stringbundleset id="stringbundleset"> <stringbundle id="strings" src="strings.properties"/> </stringbundleset> Including this element will read the properties from the file 'strings.properties' in the same directory as the XUL file. Use a
chrome URL to read a file from the locale: <stringbundleset id="stringbundleset"> <stringbundle id="strings" src="
chrome://myplugin/locale/strings.properties"/> </stringbundleset> Like other non-displayed elements, you should declare all your stringbundles inside a stringbundleset element so that they are all kept together. Getting a String from the Bundle This stringbundle element has a number of prop...
Tree View Details - Archive of obsolete content
tell the tree to repaint the twisty in the new state. The easiest way to do this is to invalidate the row. Complete Example There are several other view functions we can implement but they don't need to do anything in this example, so we can create functions that do nothing for those. ...
XBL Inheritance - Archive of obsolete content
to the features from the binding it inherits from (and any that binding inherits from and so on up the tree). To extend an existing binding, add an extends attribute on to the binding tag. For example, the following binding creates a textbox which adds the text 'http://www' to the beginning of its value when the F4 key is pressed. Example 1 : Source <binding id="textboxwithhttp" extends="
chrome://global/content/bindings/textbox.xml#textbox"> <handlers> <handler event="keypress" keycode="VK_F4"> this.value="http://www"+value; </handler> </handlers> </binding> The XBL here extends from the XUL textbox element. The URL given in the extends attribute above is the URL of the textbox binding. This means that we inherit all of the content and behavior provided by the textbox...
Using Visual Studio as your XUL IDE - Archive of obsolete content
ry entries ExtJS and ExtXml. Make sure that Visual Studio is not running, when you do this. 5. Problems that need to be solved There are still some problems for which I did not find a solution yet. 5.1 Localization using DTD You will get validation errors in Visual Studio, if you are localizing your XUL files. That has to do with the way Mozilla implemented localization: < !DOCTYPE window SYSTEM "
chrome://loomo/locale/main.dtd"> Visual Studio doesn't recognize the
chrome URI prefix, what will give you an error at the previous line ("The URI prefix is not recognized"). As VS doesn't know how the
chrome protocol works it can't detect where the dtd file is really located and thus will give you errors wherever you use the entities that are declared in this file. 5.2 Text preprocessor The Mozilla Bu...
XUL Template Primer - Bindings - Archive of obsolete content
rule's <conditions>. This is different from the variables specified in the rule's conditions, where a value must be found for each variable for the rule to match. If a <binding> can't be matched, the rule will still fire. Example To illustrate how <bindings> work, we'll examine this XUL document, which builds a simple content model an RDF/XML file. ...
XUL Coding Style Guidelines - Archive of obsolete content
While some of the guidelines are recommended practices, the others are mandatory. XML, XUL, HTML, and XHTML guidelines The following are considered good coding style for XML/XUL documents. Disobeying them might not cause any parsing error for now, however, it might cause future maintenance headache: convert HTML files to XUL files. use the XML declaration. use Namespace. case sensitivity. use
chrome URLs. JavaScript code shall be moved out of XUL. DTD declaration. predefined Entities. Other guidelines mentioned in XHTML 1.1 Recommendation. See details here. Making XUL localizable -- mandatory In the past, UI (display) related resource descriptions are stored in *.rc (for Windows client) or *.ad (for UNIX client) so that they can be localized for a specific language or culture. In the new w...
XUL Event Propagation - Archive of obsolete content
event target itself. The combination of basic these two basic event flow mechanisms, event bubbling and event capturing, mean that events raised in the interface can be caught anywhere above the element that raised the event. This flexibility in the XUL event model is the focus of this article. ...
colorpicker - Archive of obsolete content
Radio/Check Box When the state is changed Select List When the selected item is changed What is accessible The script context at this point can only access the following things: Global Values/Functions i.e. ...
dialog - Archive of obsolete content
n, buttondir, buttondisabledaccept, buttonlabelaccept, buttonlabelcancel, buttonlabeldisclosure, buttonlabelextra1, buttonlabelextra2, buttonlabelhelp, buttonorient, buttonpack, buttons, defaultButton, title Properties buttons, defaultButton Methods acceptDialog, cancelDialog, centerWindowOnScreen, getButton, moveToAlertPosition Examples <?xml version="1.0"?> <?xml-stylesheet href="
chrome://global/skin/global.css" type="text/css"?> <dialog id="donothing" title="Dialog example" xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" buttons="accept,cancel" buttonlabelcancel="Cancel" buttonlabelaccept="Save"> <dialogheader title="Options" description="My preferences"/> <groupbox> <caption label="Colour"/> <radiogroup> <radio label="Red"/> ...
dialogheader - Archive of obsolete content
<< XUL Reference home [ Examples | Attributes | Properties | Methods | Related ] A heading row for a dialog box. This element should be placed inside a dialog element. The header may have a title and a description. ...
editor - Archive of obsolete content
from a file dialog. In this case, set the editortype attribute on the editor. Call the makeEditable method to make the document loaded in the editor editable. Enable the design mode of the document loaded in the editor. To edit a new document, set the src attribute to about:blank. To access most of the functionality of the editor, your application must be part of an extension or part of the
chrome. XUL applications loaded via a URL from a web server will not be able to access most of the features of the editor. See the Rich text editing and Midas pages for more information about Gecko's built-in rich text editor. Attributes editortype, src, type Properties accessibleType, commandManager, contentDocument, contentWindow, docShell, editingSession, editortype, webBrowserFind, webNavi...
notificationbox - Archive of obsolete content
The notification box is a vertical box which may have children. The notifications appear at the top of the box. The notifications may be placed at the bottom by setting the dir attribute to reverse. Finding the current notification box Within a Firefox extension, you can retrieve the current notification box for a specific tab by calling the global function getNotificationBox(): notifyBox =
chromeWin.getNotificationBox(notifyWindow) notifyBox = getNotificationBox(notifyWindow) // applies to current context's window object Here,
chromeWin is the XUL window (usually just window), and notifyWindow is the web content window for the tab you want to find the notification box for. Also it is possible to call function with the same name (they are different) of global object gBrowser: notifyBox...
preference - Archive of obsolete content
Radio/Check Box When the state is changed Select List When the selected item is changed What is accessible The script context at this point can only access the following things: Global Values/Functions i.e. ...
resizer - Archive of obsolete content
ow by dragging it. The resizer will send a command event after the resize is complete. Note: Starting in Gecko 2.0, you can also specify a target element using the element attribute, to use the resizer to resize the specified element instead of the window. ...
script - Archive of obsolete content
n the XUL tutorial. Attributes src, type Examples <script src="test.js"/> <script src="http://example.com/js/test.js"/> <script> function foo(){ // code } </script> Attributes src Type: URI The URI of the script. type Type: language content type The language of the script. Usually, you would set this to application/javascript. Note: If the JavaScript file is in
chrome://, setting this attribute to application/javascript will always use the latest available JavaScript version. If you omit this attribute, the default (and older) JavaScript version is used (like you get when including a JavaScript file from web content without specifying a version number). Inherited from XUL element align, allowevents, allownegativeassertions, class, coalesceduplicatearcs, c...
stack - Archive of obsolete content
eg, if setting width, both "left" and "right" must be set. In some case, setting the width or height this way may even be necessary because using the width/height attributes (eg, "width", "minwidth" and "maxwidth") inside a stack can sometimes produce unpredictable and undesireable results. More information is available in the XUL tutorial. Examples <stack> <hbox flex="1"> <image src="
chrome://xulschoolhello/skin/stack-bg.png" flex="1"left="10"right="10" top="10" bottom="10"/> </hbox> <hbox> <!-- Some content here. --> </hbox> </stack> In this example, the resulting width of the top-most hbox will be 400px (600px - 200px - 0) : <stack width="600"> <hbox flex="1"> <!-- content --> </hbox> <hbox left="0" right="200" > <!-- Some content here. --> </hbox>...
stringbundle - Archive of obsolete content
of property key-value pairs each on a separate line. The key and value is separated with an equals sign. For example, the following defines two properties: message.displayError=An error occured trying to display this message message.nameAlreadyUsed=The name %S is already being used by another account. More information is available in the XUL tutorial. The "src" attribute accepts only absolute
chrome:// URLs (see bugs 133698, 26291) Attributes src Properties appLocale , src, stringBundle, strings Methods getFormattedString, getString Examples (example needed) Attributes src Type: URI The URI of the property file that contains the localized strings. Inherited from XUL element align, allowevents, allownegativeassertions, class, coalesceduplicatearcs, collapsed...
tabbrowser - Archive of obsolete content
d, and if replace is true, the currently displayed tabs are replaced with the specified URIs instead of adding new tabs. The properties of params are following: boolean inBackground boolean replace boolean allowThirdPartyFixup tab targetTab number newIndex object postDatas number userContextId NOTE: This is the XUL method on <browser> / <tabbrowser>, not the global function in
chrome://browser/content/browser.js. Please check which one you're documenting! (This one has no post data parameter, see loadURIWithFlags for a version that does) loadURI( uri, referrer, charset ) Return type: no return value Load a URL into the document, with the given referrer and character set. The first argument should be a string, not a nsIURI object. To get a string f...
toolbox - Archive of obsolete content
e toolbox's externalToolbars property. More information is available in the XUL tutorial. If you'd like to detect when toolbars in a toolbox are changed, see Toolbar customization events. ...
Custom app bundles for Mac OS X - Archive of obsolete content
ile) MacOS/ (The MacOS folder will contain your XULRunner executable) xulrunner (This is the xulrunner stub) Resources/ (This is where you place your XUL Application code and support files) application.ini (XULRunner-related application settings) example.icns (This is the icon which will be used by your application bundle)
chrome/ content/ example.xul (This directory contains your application's
chrome) example.manifest defaults/ preferences/ app-prefs.js (This provides some default values for preferences) Application bun...
XULRunner Hall of Fame - Archive of obsolete content
highly functional and customizable web browser, based on XULRunner 22. Websecurify Web Application Security Testing Environment. Source Yoono Desktop Win/Mac application to get all your friend updates, update your status and share stuff easily across Facebook, MySpace, Twitter, and more - all at once! Simplify your online social life. Zotero Reference manager with Firefox,
Chrome, and Safari integration. Both Firefox extension and XULRunner-based standalone application available. Source Applications based on XULRunner 1.9 or earlier Buzzbird XUL-based desktop twitter client. GitHub BlueGriffon The next-generation Web Editor based on the rendering engine of Firefox. Build instructions Convertigo Enterprise Mashup Server A Web integrator and Web cl...
mozilla.dev.platform FAQ - Archive of obsolete content
mework or you can use the packages of the Firefox release repackager which uses the embedded framework successfully. Please make sure you're using 1.8.0.4 or later (not 1.8.0.1, which had a bug that prevented this from working properly). Q: When using xul elements <browser/> and <tabbrowser/> the javascript popup windows don't work out of the box, what needs to be implement? A: Have the browser.
chromeURL preference - this should be a XUL document containing a <browser type="content-primary"> element in which the popup window's content should get loaded. Visual Studio Express 2005 Q: When I try to run xulrunner-stub.exe I get the error "this application failed to start because MSVCR80.dll was not found." A: See Bug 350616 ...
2006-10-20 - Archive of obsolete content
dLoad in the interface nslContentPolicy. When the method is executed Firefox crashes. As of yet there are no responses. IE7 RSS Reader Better - Say Reviewers A discussion revolving around the quality of RSS readers in IE7, Firefox and other assorted browsers. Also a debate about which browser is "beating" which to a lesser extent further in the discussion. How to create firefox extension (
chrome) to add images next to URLs ? Question regarding how to make a firefox extension that would insert an image next to all links in the loaded web pages similar to the McAfee SiteAdvisor extension. Adding support for new URI scheme Question regarding creating a new URI scheme for Firefox on Windows. Helpful information was found here on mozillaZine. Meetings None this week. Authors S...
2006-11-24 - Archive of obsolete content
ork under XulRunner when compiled with MSVS 2005. Luke is migrating all of his code to compile with vc8 and is having some problems. He is receiving the following error: Error: uncaught exception: [Exception... "Component returned failure code: 0x80570016 (NS_ERROR_XPC_GS_RETURNED_FAILURE) [nsIJSCID.getService]" nsresult: "0x80570016 (NS_ERROR_XPC_GS_RETURNED_FAILURE)" location: "JS frame ::
chrome://modzilla/content/js/pkg_zillacom.js :: <TOP_LEVEL> :: line 1202" data: no] He is running XulRunner v1.8.0.4. Luke wants to know if compiling XulRunner with a static CRT is better or worse than compiling with the MSCVR80.DLL dependency. firefox 1.5 build on Windows with GTK2 November 23rd: Vin is trying to build Firefox 1.5.0.3 on Windows XP. The build is working properly with the defau...
2006-11-10 - Archive of obsolete content
njamin Smedberg crossposted a notice about Unit Testing For the Mozilla Toolkit, letting developers know about the importance of testing for the improvement of Mozilla 2, and asks for complete coverage. Several community members comment, backing up Benjamin's post. William VanderPol asks, regarding Remote XUL Applications, if is it possible (or does it exist?) to have an extension that will allow
chrome access to certain specified URL's? James Leigh points out that resources are available at O'Reily, in the Creating Applications with Mozilla section. Benjamin Smedberg has been "working on some xptcall refactoring which will allow us to expose XPTCall via a frozen API (and C linkage)". He is looking for xptcall port maintainers to submit patches to bug 349002. Matthew Gertner wants to know if any...
Accessing XML children - Archive of obsolete content
Use DOMParser/DOMSerializer or a non-native JXON algorithm instead. Normal JavaScript Objects use the . operator or [] notation to set properties. var a = {}; a.foo = 1; a["bar"] = 2; In E4X, the . and [] operators provide access to the child nodes of an E4X element. ...
E4X Tutorial - Archive of obsolete content
Use DOMParser/DOMSerializer or a non-native JXON algorithm instead. This tutorial walks you through the basic syntax of E4X (ECMAScript for XML). With E4X, programmers can manipulate an XML document with a syntax more familiar to JavaScript programming. ...
Using JavaScript Generators in Firefox - Archive of obsolete content
Generators can be used to simplify asynchronous code in Firefox by opting in to using JavaScript version 1.7 or later. You can opt in in HTML as follows: <script type="text/javascript;version=1.7" src="myScript.js"></script> Then your myScript.js file might look like this: // Need to stash the generator in a global variable. var generator; // Simple event listener function to pass the received event to the generator. function grabEvent(event) { generator.send(event); } // When we're all done we can close the generator, but that must happen outside // of the generator so we use a timeout. ...
Date.prototype.toLocaleFormat() - Archive of obsolete content
handled automatically since you have control over the order in which they occur. You should take care that the format string is localized properly according to the user's system settings. Be aware that the locale used is not necessarily the same as the locale of the browser. Extension and XULRunner developers should know that just loading the format string from a .dtd or .properties file using a
chrome://somedomain/locale/somefile.ext URI should be avoided, as the .dtd/.properties file and the toLocaleFormat() method does not not necessarily use the same locale, which could result in odd looking or even ambiguous or unreadable dates. Also note that the behavior of the used locale depends on the platform, and the user might customize the locale used, so using the system locale the choose the fo...
Window.importDialog() - Archive of obsolete content
ary Because opening windows on mobile isn't necessarily appropriate, the Firefox Mobile team designed the importDialog() method to replace window.openDialog(). Instead of opening a new window, it merges the specified XUL dialog into the main window. Syntax newDialog = importDialog(aParent, aSrc, aArguments) newDialog The opened window aParent The dialog's parent; can be null. aSrc The
chrome URL of the XUL dialog. aArguments A JavaScript object containing data to pass to the dialog. Example var dialog = importDialog(null, "
chrome://myextension/content/dialog.xul", myObject); Notes The XUL passed to importDialog() is very similar to XUL passed to window.openDialog(), with some limitations and caveats: Only <dialog> top level elements are permitted. Scripts are loaded via a...
XUL Booster - Archive of obsolete content
ooster is a third party Eclipse / WebTools build that offers some support for XUL Editing and awesome support for extension packaging. Extension Quick Start XUL Booster makes creating and packaging an extension very easy. It supports exporting XPI files or registering a file system based project. Create an extension You'll need an extension ID; see Generating GUIDs. Add an Overlay You'll need the
chrome address of the content you wish to overlay, ex.
chrome://browser/content/browser.xul. Learn more at Creating_a_Mozilla_Extension:Finding_the_file_to_modify To create an XUL:overlay, create a XUL fragment with a top level node that has an ID matching an existing element, ex. menupopup id="menu_ToolsPopup". Learn more at Creating_a_Mozilla_Extension:Adding_the_structure. Download Visit XULBooster a...
Anatomy of a video game - Game development
frame. It is up to the browser how to relate these requests to their main loop. The W3C spec for requestAnimationFrame does not really define exactly when the browsers must perform the requestAnimationFrame callbacks. This can be a benefit because it leaves browser vendors free to experiment with the solutions that they feel are best and tweak it over time. Modern versions of Firefox and Google
Chrome (and probably others) attempt to connect requestAnimationFrame callbacks to their main thread at the very beginning of a frame's timeslice. The browser's main thread thus tries to look like the following: Start a new frame (while the previous frame is handled by the display). Go through the list of requestAnimationFrame callbacks and invoke them. Perform garbage collection and other per-fram...
Game distribution - Game development
audience who would be interested in your games. Your creativity is critical here. Web stores The best platforms for HTML5 games are the Web-based stores. It's easy to prepare a game for them as such an action involves little to no modification of the game itself -- usually adding a manifest file containing necessary information in a zipped package containing all the resources is enough. The
Chrome Web Store is also an attractive option -- again, having a manifest file ready, zipping your game and filling in the online submission form is about all that's required. Tizen is also putting a high value on supporting apps written in JavaScript. Their store is another available option. Native mobile stores When it comes to the mobile market, there's the Apple App Store for iOS, Google Play fo...
Building up a basic demo with A-Frame - Game development
vaScript. The end result is 3D web experiences, which are VR-enabled by default. Environment setup Let's start by setting up an environment to create something with A-Frame. We'll then build up a demo and run it. You should start off by: Making sure you are using a modern browser with good WebGL support (and WebXR support if you have available VR or AR hardware) such as the latest Firefox or
Chrome -- download Firefox Nightly or
Chrome (v54 or higher). (Optional) set up a VR device such as Oculus Rift or Google Cardboard. Create a new directory to store your project in. Save a copy of the latest A-Frame JavaScript library file inside your directory (check the GitHub repository for latest stable a dev builds). Open the A-Frame documentation in a separate tab -- it is useful to refer to. ...
Building up a basic demo with Babylon.js - Game development
lding up a basic demo series with Three.js, PlayCanvas or A-Frame (or you are familiar with other 3D libraries) you'll notice that Babylon.js works on similar concepts: camera, light and objects. Environment setup To start developing with Babylon.js, you don't need much. You should start off by: Making sure you are using a modern browser with good WebGL support, such as the latest Firefox or
Chrome. Creating a directory to store your experiments in. Saving a copy of the latest Babylon.js engine inside your directory. Opening the Babylon.js documentation in a separate tab -- it is useful to refer to. HTML structure Here's the HTML structure we will use: <!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>MDN Games: Babylon.js demo</title> <style> html,body...
Building up a basic demo with the PlayCanvas engine - Game development
worked through our Building up a basic demo with Three.js article (or you are familiar with other 3D libraries) you'll notice that PlayCanvas works on similar concepts: camera, light and objects. Environment setup To start developing with PlayCanvas, you don't need much. You should start off by: Making sure you are using a modern browser with good WebGL support, such as the latest Firefox or
Chrome. Creating a directory to store your experiments in. Saving a copy of the latest PlayCanvas engine inside your directory. Opening the PlayCanvas documentation in a separate tab -- it is useful to refer to. HTML structure Here's the HTML structure we will use. <!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>MDN Games: PlayCanvas demo</title> <style> body { mar...
Building up a basic demo with Three.js - Game development
aries, and it is easy to get started with. We are not trying to say it is better than any other WebGL library available, and you should feel free to try another library, such as CopperLicht, GLGE, or PlayCanvas. Environment setup To start developing with Three.js, you don't need much. You should: Make sure you are using a modern browser with good WebGL support, such as the latest Firefox or
Chrome. Create a directory to store your experiments in. Save a copy of the latest minimized Three.js library inside your directory. Open the Three.js documentation in a separate tab -- it is useful to refer to. HTML structure Here's the HTML structure we will use: <!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>MDN Games: Three.js demo</title> <style> body { margin: 0; padding: ...
GLSL Shaders - Game development
focus on the shader code. Three.js and other 3D libraries abstract a lot of things for you -- if you wanted to create such an example in raw WebGL, you'd have to write a lot of extra code to actually make it work. Environment setup To start with the WebGL shaders you don't need much. You should: Make sure you are using a modern browser with good WebGL support, such as the latest Firefox or
Chrome. Create a directory to store your experiments in. Save a copy of the latest minimized Three.js library inside your directory. HTML structure Here's the HTML structure we will use. <!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>MDN Games: Shaders demo</title> <style> body { margin: 0; padding: 0; font-size: 0; } canvas { width: 100%; height: 100%; } </style> <script src...
WebVR — Virtual Reality for the Web - Game development
use in your games and other applications. Note: There are of course other APIs useful for creating games, for example The Gamepad API for control inputs, and the Device Orientation API for handling display orientation on mobile. Browser support and spec status Currently browser support for the WebVR API is still experimental -- it works in nightly builds of Firefox and experimental builds of
Chrome (Mozilla and Google teamed up to work on the implementation together), but sooner rather than later we'll see it in regular builds. The WebVR spec is in Editor's Draft status which means it is still subject to change. The development is led by Vladimir Vukicevic from Mozilla and Brandon Jones from Google. For more info be sure to visit the MozVR.com and WebVR.info websites. Using the WebVR API ...
Audio for Web games - Game development
using the vanilla <audio> element -- leads to patchy results on mobile devices. element -- results in patchy results on mobile devices. Testing and support Here's a table that shows what mobile platforms support the features talked about above. Mobile support for web audio features Mobile browser Version Concurrent play Autoplay Volume adjusting Preload
Chrome (Android) 69+ Y Y Y Y Firefox (Android) 62+ Y Y Y Y Edge Mobile Y Y Y Y Opera Mobile 46+ Y Y Y Y Safari (iOS) 7+ Y/N* N N Y Android Browser 67+ Y Y Y Y There's a full compatibility chart for mobile and desktop HTMLMediaElement support here. * Note: Safa...
Implementing controls using the Gamepad API - Game development
y providing an interface exposing button presses and axis changes that can be used inside JavaScript code to handle the input. These are good times for browser gaming. API status and browser support The Gamepad API is still at the Working Draft stage in the W3C process, which means its implementation might still change, but saying that the browser support is already quite good. Firefox 29+ and
Chrome 35+ support it out of the box. 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. Which gamepads are best? The most popular gamepads right now are those from the Xbox 360, Xbox One, PS3 and PS4 -- they have been heavily...
Game over - Game development
reloading the page. First, replace where you initially called setInterval() setInterval(draw, 10); with: var interval = setInterval(draw, 10); Then replace the second if statement with the following: if(y + dy < ballRadius) { dy = -dy; } else if(y + dy > canvas.height-ballRadius) { alert("GAME OVER"); document.location.reload(); clearInterval(interval); // Needed for
Chrome to end game } Letting the paddle hit the ball The last thing to do in this lesson is to create some kind of collision detection between the ball and the paddle, so it can bounce off it and get back into the play area. The easiest thing to do is to check whether the center of the ball is between the left and right edges of the paddle. Update the last bit of code you modified again, to the follo...
Track the score and win - Game development
The document.location.reload() function reloads the page and starts the game again once the alert button is clicked. Compare your code The latest code looks (and works) like th...
Visual-js game engine - Game development
ent line selected intro editor . Save on drop menu or better with ctrl+s before testing in browsers. Adding new script explanation : After adding new script and save script if you have extra changes , open starter/run.js and you will found line : SYS.SCRIPT.LOAD("scripts/new_script.js") ctrl+S Use from menu Run->Choose browser for testing . - important safari not working at the moment
chrome , firefox , opera Tutorial - Pencil (Animation path) : How to use Pencil tool to create PATH object . Path object can be saved intro localhost , you can collect object and put it direct source code . File location : starter/templates/paths.js Templetes are made from visual-js core also . See source code : paths.js See the Pen Visual js - Pencil by VisualJS game engine (@zlatnaspi...
Visual typescript game engine - Game development
WebSocket. A connector is our account session used for login, register etc. Implemented video chat based on webRTC protocol. - Running rtc3 server is also easy : Command 'npm run broadcaster' is not necessary for beginners. Features come with broadcaster: Multiplatform video chat works with other hybrid frameworks or custom implementation throw the native mobile application web control (
Chrome implementation usually tested). npm run broadcaster Documentation : Beta version for documentation. API Documentation If you wanna generate doc you will need manual remove the comment from plugin section in webpack.config.js. Restart 'npm run dev' Best way to fully healthy build. HTML/CSS is not prior to this project. If you wanna insert some new HTML page just define it intro webpack.con...
Blink - MDN Web Docs Glossary: Definitions of Web-related terms
Blink is an open-source browser layout engine developed by Google as part of Chromium (and therefore part of
Chrome as well). Specifically, Blink began as a fork of the WebCore library in WebKit, which handles layout, rendering, and DOM, but now stands on its own as a separate rendering engine. ...
Browser - MDN Web Docs Glossary: Definitions of Web-related terms
A Web browser or browser is a program that retrieves and displays pages from the Web, and lets users access further pages through hyperlinks. A browser is the most familiar type of user agent. Learn more Download a browser Mozilla Firefox Google
Chrome Microsoft Edge Opera Browser ...
JavaScript - MDN Web Docs Glossary: Definitions of Web-related terms
JavaScript an industry standard. Since then, the standardized JavaScript is called ECMAScript and specified under ECMA-262, whose latest (tenth, ES2019) edition is available as of June 2019. Recently, JavaScript's popularity has expanded even further through the successful Node.js platform--the most popular cross-platform JavaScript runtime environment outside the browser. Node.js - built using
Chrome's V8 JavaScript Engine - allows developers to use JavaScript as a scripting language to automate things on a computer and build fully functional HTTP and Web Sockets servers. Learn more General knowledge JavaScript on Wikipedia Learning JavaScript The JavaScript Guide on MDN The "javascripting" workshop on NodeSchool The JavaScript course on codecademy.com John Resig's Learning Advan...
Microsoft Internet Explorer - MDN Web Docs Glossary: Definitions of Web-related terms
Internet Explorer (or IE) is a free graphical browser maintained by Microsoft for legacy enterprise uses. Microsoft Edge is currently the default Windows browser. Microsoft first bundled IE with Windows in 1995 as part of the package called "Microsoft Plus!". By around 2002, Internet Explorer had become the most used browser in the world, but has since lost ground to
Chrome, Firefox, Edge, and Safari. IE has gone through many releases and currently stands at version 11.0.12, with desktop, mobile, and Xbox Console versions available. Formerly available on Mac and UNIX, Microsoft discontinued those versions in 2003 and 2001 respectively. Learn more General knowledge Internet Explorer on Wikipedia History of Internet Explorer on Wikipedia Internet Explorer versions on Wikipedia L...
RAIL - MDN Web Docs Glossary: Definitions of Web-related terms
The performance mantra of RAIL is "Focus on the user; the end goal isn't to make your site perform fast on any specific device, it's to make users happy." There are 4 stages of interaction: page load, idle, response to input, and scrolling and animation. In acronym order, the main tenets are: Response Respond to users immediately, acknowledging any user input in 100ms or less. Animation When animating, render each frame in under 16ms, aiming for consistency and avoiding jank. ...
WebExtensions - MDN Web Docs Glossary: Definitions of Web-related terms
WebExtensions is a cross-browser system for developing browser extensions in Firefox. This system provides APIs, which to a large extent are supported across different browsers like Mozilla Firefox, Google
Chrome, Opera Browser, and Microsoft Edge . Learn more Technical reference Browser extensions on MDN ...
Accessible multimedia - Learn web development
r> <video controls> <source src="rabbit320.mp4" type="video/mp4"> <source src="rabbit320.webm" type="video/webm"> <p>Your browser doesn't support HTML5 video. Here is a <a href="rabbit320.mp4">link to the video</a> instead.</p> </video> The controls attribute provides play/pause buttons, seek bar, etc. -- the basic controls you'd expect from a media player. It looks like so in Firefox and
Chrome: However, there are problems with these controls: They are not keyboard accessible in most browsers, i.e. you can't tab between the controls inside the native player. Opera and
Chrome provide this to some degree, but it still isn't ideal. Different browsers give the native controls differing styling and functionality, and they aren't stylable, meaning that they can't be easily made to fo...
What is accessibility? - Learn web development
are either physical magnifiers or software zoom capabilities. Most browsers and operating systems these days have zoom capabilities. Some users will rely on screen readers, which is software that reads digital text aloud. Some screen reader examples include: Some are paid commercial products, like JAWS (Windows) and Dolphin Screen Reader (Windows). Some are free products, like NVDA (Windows),
ChromeVox (
Chrome, Windows and Mac OS X), and Orca (Linux). Some are built into the operating system, like VoiceOver (macOS, iPadOS, iOS), Narrator (Microsoft Windows),
ChromeVox (on
Chrome OS), and TalkBack (Android). It is a good idea to familiarise yourself with screen readers; you should also set up a screen reader and have a play around with it, to get an idea of how it works. See our cross-brow...
Advanced styling effects - Learn web development
t-text-fill-color: transparent; feature, this allows you to clip background images to the shape of the element's text, making for some nice effects. This is not an official standard, but has been implemented across multiple browsers, as it is popular, and used fairly widely by developers. ...
Handling different text directions - Learn web development
rt as shown in the example below. Change the writing mode on this example to vertical-rl to see what happens to the image. Change inline-start to inline-end to change the float. Here we are also using logical margin values to ensure the margin is in the correct place no matter what the writing mode is. Currently, only Firefox supports flow relative values for float. If you are using Google
Chrome or Microsoft Edge, you may find that the image did not float. Should you use physical or logical properties? The logical properties and values are newer than their physical equivalents, and therefore have only recently been implemented in browsers. You can check any property page on MDN to see how far back the browser support goes. If you are not using multiple writing modes then for now you m...
How much does it cost to do something on the Web? - Learn web development
Windows, Cyberduck for Mac or Windows, and more. Because FTP is inherently insecure, you should make sure to use SFTP -- the secure, encrypted version of FTP that most hosting sites you'll deal with these days will offer by default -- or another secure solution like Rsync over SSH. Browsers You either already have a browser or can get one for free. If necessary, download Firefox here or Google
Chrome here. Web access Computer / modem You need a computer. Costs can vary tremendously, depending on your budget, and where you live. To publish a barebones website, you only need a basic computer capable of launching an editor, and a Web browser, so the entry level can be quite low. Of course, you'll need a more serious computer if you want to produce complicated designs, touch up photos, or pro...
How do you set up a local testing server? - Learn web development
r examples hosted on GitHub (or an example on some other remote server), the web address will start with http:// or https://, to show that the file has been received via HTTP. The problem with testing local files Some examples won't run if you open them as local files. This can be due to a variety of reasons, the most likely being: They feature asynchronous requests. Some browsers (including
Chrome) will not run async requests (see Fetching data from the server) if you just run the example from a local file. This is because of security restrictions (for more on web security, read Website security). They feature a server-side language. Server-side languages (such as PHP or Python) require a special server to interpret the code and deliver the results. Running a simple local HTTP server T...
How to build custom form controls - Learn web development
he most common cases, especially in the mobile world where the network is not very reliable. The script is buggy: You should always consider this possibility. The script is in conflict with a third party script: This can happen with tracking scripts or any bookmarklets the user uses. The script is in conflict with, or is affected by, a browser extension (such as Firefox's NoScript extension or
Chrome's NotScripts extension). The user is using a legacy browser, and one of the features you require is not supported: This will happen frequently when you make use of cutting-edge APIs. The user is interacting with the content before the JavaScript has been fully downloaded, parsed, and executed. Because of these risks, it's really important to seriously consider what will happen if your JavaScr...
Other form controls - Learn web development
r capturing HTML/"rich" content instead of plain text). Visually, the text entered wraps and the form control is by default resizable. Modern browsers provide a drag handle that you can drag to increase/decrease the size of the text area. The following screenshots show default, focused, and disabled <textarea> elements in Firefox 71 and Safari 13 on macOS, and Edge 18, Yandex 14, Firefox 71 and
Chrome 79 on Windows 10. Note: You can find a slightly more interesting example of text area usage in the example we put together in the first article of the series (see the source code also). Controlling multi-line rendering <textarea> accepts three attributes to control its rendering across several lines: cols Specifies the visible width (columns) of the text control, measured in average ch...
Sending form data - Learn web development
indicates the size of the body, and the Content-Type header indicates the type of resource sent to the server. We'll discuss these headers later on. Note: You can find this example on GitHub -- see post-method.html (see it live also). Viewing HTTP requests HTTP requests are never displayed to the user (if you want to see them, you need to use tools such as the Firefox Network Monitor or the
Chrome Developer Tools). As an example, your form data will be shown as follows in the
Chrome Network tab. After submitting the form: Open the developer tools. Select "Network" Select "All" Select "foo.com" in the "Name" tab Select "Headers" You can then get the form data, as shown in the image below. The only thing displayed to the user is the URL called. As we mentioned above, with a GET r...
Example - Learn web development
l of text field border */ border: 1px solid #999; } input:focus, textarea:focus { /* To give a little highligh on active elements */ border-color: #000; } textarea { /* To properly align multiline text field with their label */ vertical-align: top; /* To give enough room to type some text */ height: 5em; /* To allow users to resize any textarea vertically It works only on
Chrome, Firefox and Safari */ resize: vertical; } .button { /* To position the buttons to the same position of the text fields */ padding-left: 90px; /* same size as the label elements */ } button { /* This extra magin represent the same space as the space between the labels and their text fields */ margin-left: .5em; } Result ...
How the Web works - Learn web development
nd servers Computers connected to the web are called clients and servers. A simplified diagram of how they interact might look like this: Clients are the typical web user's internet-connected devices (for example, your computer connected to your Wi-Fi, or your phone connected to your mobile network) and web-accessing software available on those devices (usually a web browser like Firefox or
Chrome). Servers are computers that store webpages, sites, or apps. When a client device wants to access a webpage, a copy of the webpage is downloaded from the server onto the client machine to be displayed in the user's web browser. The other parts of the toolbox The client and server we've described above don't tell the whole story. There are many other parts involved, and we'll describe them bel...
The web and web standards - Learn web development
ly. For a more detailed explanation of how some of them work together, read our article How the web works. Browsers You are probably reading these words inside a web browser in this very moment (unless you've printed it out, or are using assistive technology, such as a screenreader to read it out to you). Web browsers are the software programs people use to consume the web, and include Firefox,
Chrome, Opera, Safari, and Edge. HTTP Hypertext Transfer Protocol, or HTTP, is a messaging protocol that allows web browsers to communicate with web servers (where web sites are stored). A typical conversation goes something like "Hello web server. Can you give me the files I need to render bbc.co.uk"? "Sure thing web browser -- here you go" [Downloads files and renders web page] The actual syntax...
Tips for authoring fast-loading HTML pages - Learn web development
sign, make sure that reasonable user-agent requirements are specified for projects. Do not require your content to appear pixel-perfect in all browsers, especially not in down-version browsers. Ideally, your basic minimum requirements should be based on the consideration of modern browsers that support the relevant standards. This can include recent versions of Firefox, Internet Explorer, Google
Chrome, Opera, and Safari. Note, however, that many of the tips listed in this article are common-sense techniques which apply to any user agent, and can be applied to any web page, regardless of browser-support requirements. Use async and defer, if possible Make the JavaScript scripts such that they are compatible with both the async and the defer attributes, and use async whenever possible, especia...
What’s in the head? Metadata in HTML - Learn web development
. This means that your web page will be able to handle displaying any language; it's therefore a good idea to set this on every web page you create! For example, your page could handle English and Japanese just fine: If you set your character encoding to ISO-8859-1, for example (the character set for the Latin alphabet), your page rendering may appear all messed up: Note: Some browsers (e.g.
Chrome) automatically fix incorrect encodings, so depending on what browser you use, you may not see this problem anyway. You should still set an encoding of utf-8 on your page anyway, to avoid any potential problems in other browsers. Active learning: Experiment with character encoding To try this out, revisit the simple HTML template you obtained in the previous section on <title> (the title-exampl...
From object to iframe — other embedding technologies - Learn web development
s single-tag <param> elements, contained within <object> independent HTML content as fallback for an unavailable resource not supported (<noembed> is obsolete) contained within <object>, after <param> elements Note: <object> requires a data attribute, a type attribute, or both. If you use both, you may also use the typemustmatch attribute (only implemented in Firefox and
Chrome, as of this writing). typemustmatch keeps the embedded file from running unless the type attribute provides the correct media type. typemustmatch can therefore confer significant security benefits when you're embedding content from a different origin (it can keep attackers from running arbitrary scripts through the plugin). Here's an example that uses the <embed> element to embed a Flash movie ...
Video and audio content - Learn web development
WebM container typically packages Vorbis or Opus audio with VP8/VP9 video. This is supported in all modern browsers, though older versions may not work. An MP4 container often packages AAC or MP3 audio with H.264 video. This is also supported in all modern browsers, as well as Internet Explorer. The Ogg container tends to use Vorbis audio and Theora video. This is best supported in Firefox and
Chrome, but has basically been superseded by the better quality WebM format. There are some special cases. For example, for some types of audio, a codec's data is often stored without a container, or with a simplified container. One such instance is the FLAC codec, which is stored most commonly in FLAC files, which are just raw FLAC tracks. Another such situation is the always-popular MP3 file. An "M...
Build your own function - Learn web development
e alert function is limited: you can alter the message, but you can't easily vary anything else, such as the color, icon, or anything else. We'll build one that will prove to be more fun. Note: This example should work in all modern browsers fine, but the styling might look a bit funny in slightly older browsers. We'd recommend you doing this exercise in a modern browser like Firefox, Opera, or
Chrome. The basic function To begin with, let's put together a basic function. Note: For function naming conventions, you should follow the same rules as variable naming conventions. This is fine, as you can tell them apart -- function names appear with parentheses after them, and variables don't. Start by accessing the function-start.html file and making a local copy. You'll see that the HTML ...
Client-side storage - Learn web development
mple example. Testing the example offline To test our service worker example, you'll need to load it a couple of times to make sure it is installed. Once this is done, you can: Try unplugging your network/turning your Wifi off. Select File > Work Offline if you are using Firefox. Go to the devtools, then choose Application > Service Workers, then check the Offline checkbox if you are using
Chrome. If you refresh your example page again, you should still see it load just fine. Everything is stored offline -- the page assets in a cache, and the videos in an IndexedDB database. Summary That's it for now. We hope you've found our rundown of client-side storage technologies useful. ...
Introduction to web APIs - Learn web development
toplaying audio is usually really annoying and we really shouldn't be subjecting our users to it. Note: Depending on how strict the browser is, such security mechanisms might even stop the example from working locally, i.e. if you load the local example file in your browser instead of running it from a web server. At the time of writing, our Web Audio API example wouldn't work locally on Google
Chrome -- we had to upload it to GitHub before it would work. Summary At this point, you should have a good idea of what APIs are, how they work, and what you can do with them in your JavaScript code. You are probably excited to start actually doing some fun things with specific APIs, so let's go! Next up, we'll look at manipulating documents with the Document Object Model (DOM). Overview: Clien...
Aprender y obtener ayuda - Learn web development
ools like MDN Web Docs to look up things they have forgotten all the time. As you'll discover, learning web development is more about problem-solving and learning patterns than it is about learning lots of syntaxes. Videos There are also a number of sites that have video learning content on them. YouTube is an obvious one, with channels such as Mozilla Layout Land, MozillaDeveloper, and Google
ChromeDevelopers providing many useful videos. Many people prefer textual articles for more in-depth learning and reference material, and videos for quick explanations of concepts and new features, but it is really up to you what you prefer to learn from. There is no right and wrong answer here. Interactive code playgrounds You might be the kind of person that prefers minimal instructions and would pr...
Perceived performance - Learn web development
the perception of speed. How fast or slow something feels like it's taking depends a lot on whether the user is actively or passively waiting for this thing to happen. Waits can have an active and passive phase. When the user is active - moving the mouse, thinking, being entertainted, they are in an active phase. The passive phase occurs when the user is passively waiting, like staring at a mono
chrome screen. If both the passive and active waits time were objectively equal, users would estimate that the passive waiting period was longer than the active. If a load, render, or response time can not be objectively minimized any further, turning the wait into an active wait instead of a passive wait can make it feel faster. There are tips and tricks to follow. Some of these quick tips have full a...
Web performance resources - Learn web development
Tools Learn to use the Firefox Dev Tools to profile your site. Pagespeed Insights can analyze your page and give some general hints to improve performance. Lighthouse can give you a detailed breakdown of many aspects of your site including performance, SEO and accessibility. Test your page's speed using Webpagetest.org, where you can use different real device types and locations. Try the
Chrome User Experience Report which quantifies real user metrics. Define a performance budget. APIs Gather user metrics using https://github.com/akamai/boomerang Or directly gather with window.performance.timing Things not to do (bad practices) Download everything Use uncompressed media files ...
Server-side web frameworks - Learn web development
ull stack frameworks (comprising both server and client-side frameworks) are based on Express, including Feathers, ItemsAPI, KeystoneJS, Kraken, LoopBack, MEAN, and Sails. A lot of high profile companies use Express, including: Uber, Accenture, IBM, etc. (a list is provided here). Deno (JavaScript) Deno is a simple, modern, and secure JavaScript/TypeScript runtime and framework built on top of
Chrome V8 and Rust. Deno is powered by Tokio -- a Rust-based asynchronous runtime which lets it serve web pages faster. It also has internal support for WebAssembly, which enables the compilation of binary code for use on the client-side. Deno aims to fill in some of the loop-holes in Node.js by providing a mechanism that naturally maintains better security. Deno's features include: Security by def...
Getting started with React - Learn web development
of the git for Windows toolset) or Windows Subsystem for Linux (WSL) are both suitable. See Command line crash course for more information on these, and on terminal commands in general. Also bear in mind that React and ReactDOM produce apps that only work on a fairly modern set of browsers -- IE9+ by way of some polyfills. It is recommended that you use a modern browser like Firefox, Safari, or
Chrome when working through these tutorials. Also, see the following for more information: "What is npm" on nodejs.org "Introducing npx" on the npm blog The create-react-app documentation Initializing your app create-react-app takes one argument: the name you'd like to give your app. create-react-app uses this name to make a new directory, then creates the necessary files inside it. Make sure y...
React resources - Learn web development
e things that are rendered from arrays. On the right, we see the props and hooks that our App component utilizes. Notice, too, that the Form, FilterButton, and Todo components are indented to the right - this indicates that App is their parent. In more complex apps, this view is great for understanding parent/child relationships at a glance. React DevTools is available in a number of forms: A
Chrome browser extension. A Firefox browser extension. A Chromium Edge browser extension (available soon). A stand-alone application you can install with NPM or Yarn. Try installing one of these, then using it to inspect the app you've just built! You can read more about React DevTools on the React blog. The Context API The application that we built in this tutorial utilized component props to p...
Working with Svelte stores - Learn web development
, status and alert. In our case, just adding a role="alert" to the <div> container will do the trick, like this: <div role="alert" on:click={() => visible = false}> In general, testing your applications using screen readers is a good idea, not only to discover accessibility issues but also to get used to how visually impaired people use the Web. You have several options, like NVDA for Windows,
ChromeVox for
Chrome, Orca on Linux, and VoiceOver for Mac OS X and iOS, among other options. To learn more about detecting and fixing accessibility issues check out our Handling common accessibility problems article. Using the store contract to persist our todos Our little app lets us manage our todos quite easily, but is rather useless if we always get the same list of hardcoded todos when we reloa...
Introduction to automated testing - Learn web development
omated Sauce Lab tests in the next article. BrowserStack Getting started with BrowserStack Let's get started with a BrowserStack Trial. Create a BrowserStack trial account. Sign in. This should happen automatically after you verify your e-mail address. When you first sign in, you should be on the Live testing page; if not, click the Live link in the top nav menu. If you are on Firefox or
Chrome, you'll be prompted to Install a browser extension in a dialog titled "Enable Local Testing" -- click the Install button to proceed. On other browsers you'll still be able to use some of the features (generally via Flash), but you might not get the full experience. The basics: Manual tests The BrowserStack Live dashboard allows you to choose what device and browser you want to test on -- Platf...
omni.ja (formerly omni.jar)
t options when packing the extracted files. The correct command to pack omni.ja is: zip -0DXqr omni.ja * The working directory must be at the root directory of the files from the omni.ja file. zip -0DXqr omni.ja path/to/omni/* will not work. Note: Prior to Firefox 10 and Thunderbird 10, omni.ja was called omni.jar. omni.ja contents The omni.ja file contains assorted application resources:
chrome.manifest The
chrome manifest file. /
chrome/ User interface files for the application /
chrome/localized.manifest Manifest of localized content; referenced by the main
chrome manifest file. /
chrome/nonlocalized.manifest Manifest of non-localized content; referenced by the main
chrome manifest file. /components/ XPCOM components the application relies upon. /defaults/ Default preference f...
Accessibility/LiveRegionDevGuide
. Filtering for Performance The most significant difference between AT-SPI and IAccessible2 is that AT-SPI is an inter-process communication service while IAccessible2 runs in process. As a result, care must be taken in an AT-SPI based application to minimize performance degradation by only acting on events that are truly live regions. These "non-live" events may be events originating from the
chrome, user interaction in the
chrome or document, document loading events, or real live region events from hidden tabs. With the goal of eliminating the "non-live" events, some sort of event filtering logic must be employed. The following is a list of potential filtering techniques: The "event-from-input" object attribute can be used to filter events that were triggered by user action. The ":system...
Gecko info for Windows accessibility vendors
ild() or accNavigate(). See MSDN for more information. Avoiding Memory Leaks It is the assistive technology's responsibility to watch for system events that indicate when windows are being destroyed, and to release all IAccessibles related to that window. To help web developers in that regard, there is the wonderful Memory Leak monitor, a Firefox 1.5+ extension from David Baron, which warns
chrome and extension developers about one particular type of memory leak. It warns when
chrome windows close but leave native code pointing at their JavaScript objects. This typically happens for things like observers, timer callbacks, and (in Firefox 1.5 and earlier) event listeners, and is one of the most common causes of leaks in
chrome and extension code. Additional DOM Support There are a numbe...
Add-ons
nsions In the past, there were several toolsets for developing Firefox extensions, but as of November 2017, extensions must be built using WebExtensions APIs. Other toolsets, such as overlay add-ons, bootstrapped add-ons, and the Add-on SDK, are no longer supported. Extensions written using WebExtensions APIs for Firefox are designed to be cross-browser compatible. In most cases, it will run in
Chrome, Edge, and Opera with few if any changes. They are also fully compatible with multiprocess Firefox. You can see the APIs currently supported in Firefox and other browsers. Extension Workshop The Firefox Extension Workshop can help you develop extensions for Firefox and give your users simple, yet powerful ways to customize their browsing experience. You'll find: Overview of the Firefox exten...
Adding a new event
ts: Set mEventIsInternal in the constructor of the most descendant class because each constructor creates dummy internal event instance at calling constructors of its super class. Therefore, super classes always set it false. Don't override methods of its super classes as far as possible since overriding the method may cause harder to maintain. When you need to check if the caller content or
chrome, you can use implicitJSContext attribute in dom/bindings/Bindings.conf. Then, the method can have a pointer of JSContext in its argument. Create DOM event factory method If your DOM event implementation is generatable, you can skip this section. In nsIDOMEvent.idl, you need to define NS_NewDOMFooEvent(). It's last argument should be the most subclass. Then, the implementation of the DOM eve...
A bird's-eye view of the Mozilla framework
command buttons, dialog boxes and scroll bars. The Mozilla XPToolkit module provides a similar set of facilities for building cross-platform UI controls implemented as XML User Interface Language (XUL) packages. A XUL package consists of a XUL description of the UI widget Cascading Style Sheets customizing appearance JavaScript services implementing the UI behavior A package (also known as
chrome) is really just a bundling of a set of UI widgets and associated services implementing a particular application feature.
Chrome and Extensions are examples of packages. Content (DOM) The Mozilla Document Object Model (DOM) specifies a logical tree structure for storing UI and document content, and provides an API (Application Programming Interface) for accessing and manipulating the content. An...
Continuous Integration
tophone (Android) Autophone is a test harness which runs a set of performance tests on a variety of real Android phones. It reports to a custom dashboard known as phonedash. Tests currently run are primarily startup tests. Games Benchmarking (Firefox) Under development, the games benchmarking harness (aka mozbench) will allow a number of games-related benchmarks to be run against Firefox and
Chrome. Eventually, the system will likely be expanded with support for Android. Post-Job Analysis and Alerts There is some analysis of test data that occurs out-of-band after jobs complete. Perfherder Alerts We track changes to Talos and other performance frameworks inside Perfherder, and try to automatically alert when there is a sustained change exceeding a certain magnitude (specified per test)...
Creating reftest-based unit tests
ou intend to check-in must not rely on behaviour that requires elevated privileges. The build process runs reftests in a profile that does not automatically grant elevated privileges: requesting them will cause the standard security alert to display, which will likely cause the machine running the test to hang or timeout. Any tests that require such privileges to work correctly should be testing
chrome only pieces of UI. You can accomplish this by either: Rewrite them as Mochitests. The helper functions snapshotWindow and compareSnapshots are available in testing/mochitest/tests/SimpleTest/WindowSnapshot.js. Register them in the
chrome package in layout/tools/reftest/jar.mn, and reference the
chrome URIs in the manifest file (see an example). Testing invalidation Testing that a document ...
Debugging
s of the Mozilla codebase Debugging OpenGL If you're working on code that involves OpenGL calls, and need to debug it, you can turn on a special OpenGL debugging mode. Debugging frame reflow and Debugging table reflow Notes on debugging issues in Gecko's layout engine. Miscellaneous Debugging Safari Some tips for debugging Safari Debugging
Chrome Some tips for debugging
Chrome Debugging Internet Explorer Some tips for debugging Internet Explorer Providing useful information to the Mozilla developers How to get a stacktrace for a bug report Useful information you can provide about a crash. Reporting a Performance Problem ...using the Gecko Profiler extension. Debugging a hang o...
Adding APIs to the navigator object
CONTRACT_ID, false, true); This adds a new object, myApi, to the window.navigator object. The newly added object is a reference to the component specified by the contract ID MY_CONTRACT_ID. You can learn more about Contract IDs are unique text identifiers for XPCOM components. Using a manifest to add an object to navigator You can also add an object to the window.navigator object by using the
chrome manifest of an add-on: component {ffffffff-ffff-ffff-ffff-ffffffffffff} MyComponent.js contract @mozilla.org/mycomponent;1 {ffffffff-ffff-ffff-ffff-ffffffffffff} category JavaScript-navigator-property myComponent @mozilla.org/mycomponent;1 Generate a GUID and replace the "ffff" sections in both the component and contract lines with your GUID. This adds a new API, myComponent, to the navigator...
Interface Compatibility
s is the recommended way for extensions to call into OS or third-party native code. You should strongly consider migrating existing code to use js-ctypes instead of binary components. If necessary, it is possible for an extension to support multiple versions by shipping multiple shared libraries (DLLs) in the same extension package, and selecting the correct version using versioning flags in its
chrome.manifest file. JSAPI, NSPR, NSS, and other libraries which are currently shipped as separate shared libraries may be integrated into libxul, and extension authors should avoid linking against them. ...
Message manager
These guides explain how to use message managers in multiprocess Firefox. Note that none of this requires multiprocess Firefox: everything described here will work with single-process Firefox, so the same code will work on both variants. ...
Multiprocess Firefox
Some elements of Multiprocess Firefox have been retained for compatibility. This page is an informal index of leftovers, mostly revolving around the Message Manager and the related Cross Process Object Wrappers. Message manager A complete guide to the objects used to communicate between
chrome code and web content. Cross Process Object Wrappers Cross Process Object Wrappers are a migration aid, giving
chrome code synchronous access to web content. Limitations of
chrome scripts Practices that will no longer work in
chrome code, and how to update them. Limitations ...
Firefox and the "about" protocol
(for example for Safe Browsing) about:webrtc Information about WebRTC usage about:welcome Page first displayed when Firefox is installed about:welcomeback Information page displayed after Firefox is reset These URLs are defined in docshell/base/nsAboutRedirector.cpp within the kRedirMap array. The array maps most of the URLs, like config to URLs in the
chrome: pseudo protocol, such as
chrome://global/content/config.xul. The about location information is duplicated in docshell/build/nsDocShellModule.cpp. Note: You must access about: protocol pages by typing them into the address bar. Attempts to navigate through window.location will throw -- Error: Access to 'about:addons' from script denied. ...
Using the Browser API
may also be large incompatibilities between implementations and the behavior may change in the future. The HTML Browser API is an extension of the HTML <iframe> element that allows web apps to implement browsers or browser-like applications. It was originally used in Firefox OS to implement browser applications before that project was cancelled; since Firefox 47 it is available to desktop
chrome code and used in places like the Firefox devtools. It consists of two major parts: Custom <iframe> attributes: by adding a mozbrowser attribute to the <iframe> element we can make it appear like a top-level browser window to the embedded content. This means that window.top, window.parent, window.frameElement, etc. should not reflect the frame hierarchy. API extensions: the API includes sever...
Browser API
Browser API concepts and usage The Browser API consists of two major parts: Custom <iframe> attributes: By adding a mozbrowser attribute to the <iframe> element we can make it appear like a top-level browser window to the embedded content. This means that window.top, window.parent, window.frameElement, etc. should not reflect the frame hierarchy. ...
-moz-window-dragging
The property was added in Firefox 35 to solve intermittent problems related to Firefox windows not being moveable when busy (bug 944836). Initial value drag Applies to all elements that create native windows, e.g. ...
:-moz-lwtheme-brighttext
Non-standard This feature is non-standard and is not on a standards track. Do not use it on production sites facing the Web: it will not work for every user. There may also be large incompatibilities between implementations and the behavior may change in the future. The :-moz-lwtheme-brighttext pseudo-class matches in
chrome documents when :-moz-lwtheme is true and a lightweight theme with a bright text color is selected. ...
:-moz-lwtheme-darktext
Non-standard This feature is non-standard and is not on a standards track. Do not use it on production sites facing the Web: it will not work for every user. There may also be large incompatibilities between implementations and the behavior may change in the future. The :-moz-lwtheme-darktext pseudo-class matches in
chrome documents when :-moz-lwtheme is true and a lightweight theme with a dark text color is selected. ...
:-moz-lwtheme
Non-standard This feature is non-standard and is not on a standards track. Do not use it on production sites facing the Web: it will not work for every user. There may also be large incompatibilities between implementations and the behavior may change in the future. The :-moz-lwtheme pseudo-class matches in
chrome documents when the root element's lightweightthemes attribute is true and a theme is selected. ...
overflow-clip-box-block
rflow-clip-box-block: padding-box; overflow-clip-box-block: content-box; /* Global values */ overflow-clip-box-block: inherited; overflow-clip-box-block: initial; overflow-clip-box-block: unset; Note: On Gecko, by default, padding-box is used everywhere, but <input type="text"> and similar use the value content-box. Note that this property is activated by default only in the UA stylesheet and
chrome contexts. Value not found in DB! Syntax Values padding-box This keyword makes the clipping be related to the padding box. content-box This keyword makes the clipping be related to the content box. Formal syntax Syntax not found in DB! Examples padding-box HTML <div class="things"> <input value="ABCDEFGHIJKLMNOPQRSTUVWXYZAAO" class="scroll padding-box"> <div class="scroll padd...
overflow-clip-box-inline
-clip-box-inline: padding-box; overflow-clip-box-inline: content-box; /* Global values */ overflow-clip-box-inline: inherited; overflow-clip-box-inline: initial; overflow-clip-box-inline: unset; Note: On Gecko, by default, padding-box is used everywhere, but <input type="text"> and similar use the value content-box. Note that this property is activated by default only in the UA stylesheet and
chrome contexts. Value not found in DB! Syntax Values padding-box This keyword makes the clipping be related to the padding box. content-box This keyword makes the clipping be related to the content box. Formal syntax Syntax not found in DB! Examples padding-box HTML <div class="things"> <input value="ABCDEFGHIJKLMNOPQRSTUVWXYZAAO" class="scroll padding-box"> <div class="scroll padd...
overflow-clip-box
verflow-clip-box: inherit; overflow-clip-box: initial; overflow-clip-box: unset; Note: On Gecko, by default, padding-box is used everywhere, but <input type="text"> and similar use the value content-box. Prior to Firefox 29, this behavior was hardcoded; since then it uses this property that can be used elsewhere too. Note that this property is activated by default only in the UA stylesheet and
chrome contexts. Initial valuepadding-boxApplies toall elementsInheritednoMediavisualComputed valueas specifiedAnimation typediscreteCanonical orderthe unique non-ambiguous order defined by the formal grammar Syntax Values padding-box This keyword makes the clipping be related to the padding box. content-box This keyword makes the clipping be related to the content box. Formal syntax paddin...
Embedding Mozilla
Documentation Gecko Embedding Basics An introduction to embedding the Gecko rendering engine. ...
Gecko Keypress Event
nt. A handler on the innermost element should handle a key event even when the event does not match exactly and there is an outer element with a handler that does match exactly (bug 433192). When handling web content accesskeys, the handlers should consider both characters that are available on the key (without and with Shift). The character that is normally entered without Shift is preferred. (
Chrome accesskey, including menu accesskey, handling is currently similar, but this should not be relied on. There should be no
chrome access keys with punctuation characters or other characters that would normally require depressing the Shift key.) During accel key handling, if the event includes the Shift modifier, but an alternative charCode is not a bicameral letter (i.e., it does not have upper an...
Gecko
it on the user's screen or print it. In XUL-based applications Gecko also renders the application's user interface. Gecko is used in many applications, including a few browsers such as Firefox and SeaMonkey (for a complete list, please refer to Wikipedia's article on Gecko). Products using the same version of Gecko have identical support for Web standards. Documentation
Chrome This page contains information specific to browser
chrome (not Google
Chrome) code running in Gecko. Gecko FAQ Frequently asked questions about Gecko. Gecko DOM reference Reference to the DOM. Gecko event reference Reference to events used within Gecko and Mozilla applications; for web-standard DOM events, see the DOM event reference. Introducti...
HTTP Cache
describes the New HTTP cache version 2. The code resides in /network/cache2. API Here is a detailed description of the HTTP cache v2 API, examples included. This document only contains what cannot be found or may not be clear directly from the IDL files comments. The cache API is completely thread-safe and non-blocking. There is no IPC support. It's only accessible on the default
chrome process. When there is no profile the new HTTP cache works, but everything is stored only in memory not obeying any particular limits. It is strongly encoraged to NOT USE the OLD cache API any more - nsICacheService et al. It will soon be completely obsoleted and removed (bug 913828). nsICacheStorageService The HTTP cache entry-point. Accessible as a service only, fully thread-safe, ...
Creating a New Protocol
C++ implementation inherits from the abstract IPDL-generated classes PNewProtocolParent and PNewProtocolChild. It must implement abstract methods for receiving the appropriate messages on each side. The method signatures can be read from the generated PNewProtocolParent.h and PNewProtocolChild.h headers. Writing the Tests Protocols which are managed by PBrowser must be tested using the mochitest-
chrome test framework with a <browser remote="true">. It is acceptable to use synchronous calls on JPW wrappers for testing purposes. It may be possible to test protocols unrelated to a particular window using the xpcshell testing framework, which has additional primitives in Electrolysis for launching and running JS commands in a content process. ...
Extending a Protocol
The tutorial is designed for beginners and will walk you through all the steps you need to get things working. 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. ...
Add-on Manager
You can pass the url to a page in the add-on manager tab to load that page. Read more about it at this topic here on Mozilla Add-ons Forum :: How to open an add-on's preference panel? and also here MDN :: Inline options - Opening Inline Options in Add-on Manager. These pages show you how to load pages such as services page etc. ...
DownloadLastDir.jsm
The DownloadLastDir.jsm JavaScript code module lets you retrieve the path of the last directory into which a download occurred. To use this, you first need to import the code module into your JavaScript scope: Components.utils.import("resource://gre/modules/DownloadLastDir.jsm"); If you are using Addon SDK, you can import the code module as: let { Cu } = require("
chrome"); let DownloadLastDir = Cu.import("resource://gre/modules/DownloadLastDir.jsm").DownloadLastDir; Once you've imported the module, you can then use the DownloadLastDir object it exports. Using the DownloadLastDir object To determine or set the path into which the last download occurred: // file is an nsIFile var file = DownloadLastDir.file; DownloadLastDir.file = file; You can also set and retrieve this information o...
FxAccountsOAuthClient.jsm
menting the methods described in this article. Methods launchWebFlow() Opens a new tab at the Firefox Accounts OAuth authorization URL. Registers a WebChannel listener and sets up a callback if needed. Parameters None tearDown() Call this function to manually release all channels and callbacks that are in use by this client. ...
FxAccountsProfileClient.jsm
newly created FxAccountsProfileClient object implementing the methods described in this article. Methods fetchProfile() Fetches Firefox Accounts profile information. Parameters None Return value Promise Resolves: Object - Successful response from the '/profile' endpoint. Rejects: FxAccountsProfileClientError - Profile client error. Examples Using the FxAccountsProfileClient
Chrome code let client = new FxAccountsProfileClient({ serverURL: "https://profile.accounts.firefox.com/v1", token: "FXA_OAUTH_BEARER_TOKEN", }); client.fetchProfile().then(profile => console.log(profile)); Error Handling The FxAccountsProfileClient.jsm normalizes request and client errors into FxAccountsProfileClientError object. FxAccountsProfileClientError Attributes name String ...
JavaScript OS.Constants
OS.Constants contains Operating System-specific constants. This module is largely a companion to js-ctypes. Using OS.Constants From the main thread To initialize OS.Constants for use in the main thread, add the following snippet to your code: Components.classes["@mozilla.org/net/osfileconstantsservice;1"]. getService(Components.interfaces.nsIOSFileConstantsService). init(); From a
chrome worker No initialization is required. Module OS.Constants is always available for
chrome workers. OS.Constants.Sys Constants related to system configuration. Name The name of the operating system (e.g. "Darwin"). DEBUG Set to true on debug build configurations, non-existent otherwise. OS.Constants.Path Paths of well-known files and directories. libx...
PerfMeasurement.jsm
Before you can use this module, you need to import it into your scope: Components.utils.import("resource://gre/modules/PerfMeasurement.jsm") See Measuring performance using the PerfMeasurement.jsm code module for details on how to use this API. ...
PopupNotifications.jsm
notifications. To use this, you first need to import the code module into your JavaScript scope: Components.utils.import("resource://gre/modules/PopupNotifications.jsm"); Once you've imported the module, you can then use the PopupNotifications object it exports; this object provides methods for creating and displaying popup notification panels. Note: This code module is imported by Firefox
chrome windows, so you don't have to do it yourself in most extensions. Method overview void locationChange(); Notification getNotification(id, browser); void remove(notification); Notification show(browser, id, message, anchorID, mainAction, secondaryActions, options); Properties Attribute Type Description isPanelOpen Boolean R...
Examples
ozconfig in " + currentDir); }); }).then(null, Components.utils.reportError); Parallel promise (THIS EXAMPLE NEEDS MORE WORK) So when chaining promises, consequent promises run after the previous promise completes. Now what if we want to run multiple promises and then return when all are done? This is accomplished by using Promise.all, this feature requires Promise.jsm. ...
Services.jsm
The Services.jsm JavaScript code module offers a wide assortment of lazy getters that simplify the process of obtaining references to commonly used services. To use it, you first need to import the code module into your JavaScript scope: const {Services} =
ChromeUtils.import("resource://gre/modules/Services.jsm"); Then you can obtain references to services by simply accessing them from the Services object exported by the code module. For example, to obtain a reference to the preferences service: var prefsService = Services.prefs; Provided service getters Service accessor Service interface Service name androidBridge nsIAndroidBridge 1 appinfo nsIXULAppInfo nsIXULRuntime Application information service appShell nsIAppShellServic...
Sqlite.jsm
of callback driven operations). If the function throws, the transaction is automatically rolled back. This makes code easy to write and read. JavaScript-y API. Sqlite.jsm feels like a pure JavaScript module. The complexities of XPCOM are mostly hidden from view. JavaScript programmers should feel right at home using Sqlite.jsm. Note: The Sqlite.jsm JavaScript code module can only be used from
chrome -- that is, from within the application itself or an add-on. Before you can use this module, you need to import it into your scope: Components.utils.import("resource://gre/modules/Sqlite.jsm") Obtaining a Connection Sqlite.jsm exports the Sqlite symbol. This symbol is an object with a single function: openConnection. This function takes an object defining connection options: path (require...
XPCOMUtils.jsm
nents passed to generateModule(). This function doesn't need to return a value. ...
JavaScript code modules
ow-level hardware and OS performance measurement tools. PluralForm.jsm Supplies an easy way to get the correct plural forms for the current locale, as well as ways to localize to a specific plural rule. PopupNotifications.jsm Gives an easy way to present non-modal notifications to users. Promise.jsm Implements the Promises/A+ proposal as known in April 2013. PromiseWorker.jsm A version of
ChromeWorker which uses Promises to return the worker's result instead of using an event to do so. Services.jsm Provides getters for conveniently obtaining access to commonly-used services. source-editor.jsm The Source Editor is used by developer tools such as, the Style Editor; this interface implements the editor and lets you interact with it. Sqlite.jsm A Promise-based API to mozIStorage/SQLite...
Localizing extension descriptions
m:id> from install.rdf) and LOCALIZED_DESCRIPTION is the description of your extension that you want to appear in the given language): extensions.EXTENSION_ID.description=LOCALIZED_DESCRIPTION If you do not currently have one, create a default preferences file. ...
Patching a Localization
cations are printed to stdout (standard output). Visually inspect your modifications. A good patch only contains those changes that you intended to make. If it contains more, you'll likely regress something else. Alternatively, you can select specific files for diff to evaluate and print (see below). The command will only print the differences found in the selected files. hg diff browser/
chrome/browser/browser.dtd Attach the patch to an existing bug for reference or review or create a new one if one doesn't currently exist. hg diff > path/to/patchfile ...
QA phase
is allowed. accepted payload. quota: 979.7 KB in use, 150.0 MB available (0.64% used) Your changeset has been successfully pushed to your repository! As you begin to move through your translations, you should commit the changes locally and push your work to this experimental repository. For instance, if you have finished translating all the .dtd and .properties files in your x-testing/browser/
chrome/browser/ directory, then you should run these commands: $ hg status $ hg commit -m "Translated browser/
chrome/browser/" $ hg outgoing $ hg push http://hg.mozilla.org/l10n-central/x-testing Note that due to the distributed nature of Hg, hg commit saves the changes locally (i.e., in your computer's Hg repository). You can see the history of commits with hg log. After doing hg commit, you still ne...
Writing localizable code
t feedback from l10n@. In most cases, you can just as well put the processing into the content code and reference different key-value pairs in l10n. Use a good source directory structure Be sure to put the localizable files in the right place. The addition of new top-level directories is a compromise between module ownership in the cvsroot repository and the ease of localization. Use a good
chrome directory structure For a particular module mod, a target path jar:ab-CD.jar!/locale/ab-CD/mod/foo.dtd has been widely tested and is a good place for your files referenced as
chrome://mod/locale/foo.dtd. Using a directory structure like this eases the localization process without the source code and is especcially recommended to extension authors. JAR Manifests can make this easy. l10n impact ...
Profiling with the Firefox Profiler
a profile when requested by Firefox developers. Interface 1. Timeline The timeline has several rows of tracing markers (colored segments) which indicate interesting events. Hover over them to see more information. Below the tracing markers are rows corresponding with activity on a variety of threads. Tip: Threads that are annotated with "[default]" are in the parent (aka "UI", aka "browser
chrome", aka "main") process and those annotated with "[tab]" are in the Web content (aka "child") processes. Tip: Long-running tasks in the parent process will block all input or drawing with the browser UI (aka "UI jank") whereas long-running tasks in the content process will block interactivity with the page but still allowing the user to pan and zoom around thanks to APZ. Tracing markers Red...
javascript.options.showInConsole
The preference javascript.options.showInConsole controls whether errors or warnings in
chrome code are shown in the Error Console. Type:boolean Default value: false (true in debug builds) Exists by default: yes Application support:Firefox 1.0 Status: Active Introduction:2002-02-26 Bugs: bug 125181 bug 337875 Values false Only errors and warnings from content code are shown. true (default) Errors and warnings from both
chrome and content are shown in the Error Console. Note: Since the Web Console was introduced in Firefox 4 specifically for debugging content, the default value for this preference has changed to true as of Gecko 2.0. ...
nglayout.debug.disable_xul_cache
The XUL cache is serialized and saved between Mozilla sessions in the XUL FastLoad file, which saves a "compiled" version of the XUL and JavaScript in a document to disk for faster startup the next time the application runs. During development of XUL applications, it's convenient to disable the XUL cache so that changes you make to files on disk take effect the next time the window or dialog is loaded (instead of the next time Mozilla starts). ...
Leak Monitor
It will pop-up an alert when a window is closed and JavaScript still links to that window (for example, an observer that is not cleared when the window closes). ...
MailNews automated testing
the available test mechanisms within MailNews, and provide supporting information for developers and testers. Functional testing xpcshell-tests and make check These are core test harnesses to which MailNews adds its own tests. These tests are run against almost every changeset that gets committed to the Thunderbird and SeaMonkey code bases. xpcshell-tests are run in JavaScript without any
chrome present. This makes them especially useful for testing at the component / module level. xpcshell-tests are the quickest tests to run. MailNews provides additional facilities as described on the MailNews automated testing page (see below). "make check" is used to run compiled code tests. These tests can go beyond the limitations of xpcshell-tests (for example, access c++ code) and other testing o...
McCoy
This is in the form of the public part of a cryptographic key included in the original add-on you release. The fir...
NSS_3.12_release_notes.html
ECITEM_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 timeout Bug 361025: Support for Camellia Cipher Suites to ...
JSAPI User Guide
You have no choice but to destroy user A's sandbox and start over. Fine-grained security Another way to keep a snake from eating a mouse is to watch the snake constantly, and if it tries to eat the mouse, intervene. SpiderMonkey is designed to support custom, application-defined security models. For example, the Firefox browser has a complex and powerful security model. Some JavaScript code ("
chrome") has full access to the system. Scripts from web pages ("content") have very limited access. The same origin policy governs a script's access to data and functions from other web pages. The SpiderMonkey security model is based on the Java principals security model. This model provides a common security interface, but the actual security implementation is up to you. To use SpiderMonkey's fine-g...
Mozilla Projects
is a static analysis tool that is capable of performing analysis of general JavaScript code. L20n L20n lets localizers reach higher levels of free linguistic expression by sharpening the divide between localization and application logic. Leak Monitor Leak Monitor is a Firefox extension by L. David Baron that helps extension and
chrome developers to find memory leaks. It will pop-up an alert when a window is closed and JavaScript still links to that window (for example, an observer that is not cleared when the window closes). MailNews MailNews stands for "Mail and Newsgroups". MailNews is the back end of the messaging parts of SeaMonkey and Thunderbird. It p...
Setting up an update server
eb browser to navigate to http://127.0.0.1:8000/update.xml and make sure that you get the XML file you created earlier. Installing the update You may want to start by deleting any pending updates to ensure that no previously found updates interfere with installing the desired update. You can use this command with Firefox's browser console to determine the update directory: const {FileUtils} =
ChromeUtils.import("resource://gre/modules/FileUtils.jsm"); FileUtils.getDir("UpdRootD", [], false).path Once you have determined the update directory, close Firefox, browse to the directory and remove the subdirectory called updates. Next, you need to change the update URL to point to the local XML file. This can be done most reliably with an enterprise policy. The policy file location depends on the...
Gecko Roles
e chooser. ROLE_FILE_CHOOSER A file chooser. A specialized dialog that displays the files in the directory and lets the user select a file, browse a different directory, or specify a filename. May use the directory pane to show the contents of a directory. ROLE_FONT_CHOOSER A font chooser. A font chooser is a component that lets the user pick various attributes for fonts. ROLE_
CHROME_WINDOW Frame role. A top level window with a title bar, border, menu bar, etc. It is often used as the primary window for an application. ROLE_GLASS_PANE A glass pane. A pane that is guaranteed to be painted on top of all panes beneath it. ROLE_HTML_CONTAINER A document container for HTML, whose children represent the document content. ROLE_ICON A small fixed size pict...
History Service Design
and visits Pages (intended as URIs) are stored into a table shared by both History and Bookmarks, every url is unique in this table and is associated with a place id, commonly used as the foreign key on other tables. This table has common attributes for a page like typed, hidden and frecency. Certain scheme are excluded from history, so they will never be added, for example: about, view-source,
chrome. If a page can be added we first check if it exists already, then it is added or updated accordingly to the previous check, and common attributes are set based on concurrent visit properties. Typed means the page as a typed visit, hidden means the page should not be shown in autocomplete, while frecency is the relevance the page will have in locationbar queries. Finally observers are notified a n...
Manipulating bookmarks using Places
ed when my add-on is loaded onLoad: function() { bmsvc.addObserver(myExt_bookmarkListener, false); }, // This function is called when my add-on is unloaded onUnLoad: function() { bmsvc.removeObserver(myExt_bookmarkListener); }, doSomething: function() { alert("Did something."); } }; See also nsINavBookmarksService nsINavBookmarkObserver Places Using XPCOM without
chrome - Bookmark Observer ...
Querying Places
ch result The history service: nsINavHistoryService, executes the query The first first step is to create the query and options, and fill them with the parameters you want. Use nsINavHistoryService.getNewQuery() and nsINavHistoryService.getNewQueryOptions() to retrieve empty objects. The defaults for these objects will result in a query that returns all of your browser history in a flat list:
ChromeUtils.defineModuleGetter(this, "PlacesUtils", "resource://gre/modules/PlacesUtils.jsm"); // No query options set will get all history, sorted in database order, // which is nsINavHistoryQueryOptions.SORT_BY_NONE. let options = PlacesUtils.history.getNewQueryOptions(); // No query parameters will return everything let query = PlacesUtils.history.getNewQuery(); // e...
Using the Places favicon service
service's "moz-anno:" protocol handler notices annotations called "favicon" and forwards these to the favicon service. These annotation URIs are described in more detail in Using the Places annotation service. You should always use nsIFaviconService.getFaviconImageForPage() to get the favicon for a page. If the page has no favicon, or we have never heard of the page, this function will return a "
chrome:" URI of the default favicon. This allows efficient caching, since the default favicon will probably be cached in its decoded form by the image library. If there is an error loading the favicon for an annotation URI, the default favicon data will be returned by the annotation service's protocol handler. However, since the URI will be different from the default favicon, the decoded image will not ...
Using the Places history service
y, 1 is returned when there are one or more pages in history.Deprecated, use hasHistoryEntries instead. nsINavHistoryService.hasHistoryEntries: Exactly the same as nsIBrowserHistory.count, except with a better name and actually returning a boolean. Preferred over "count". nsINavHistory.canAddURI: Determines whether the given URI will be stored by the history system. Many types of URIs, such as "
chrome:" URIs, are not stored when addURI is called. This function allows you to determine whether it will be or not. Advanced querying See Querying Places for more detailed examples on how to used the advanced querying functionality of NavHistory. nsINavHistoryService.getNewQuery: Returns a new query object initialized to the default values. You can pass this to executeQueries(). nsINavHisto...
XML Extras
tware: Difference Microsoft Mozilla Member names Case insensitive? Begins with lower case letter XMLHttpRequest Creation new ActiveXObject("Msxml2.XMLHTTP") new XMLHttpRequest() XMLHttpRequest.send("some string") ok ok starting with milestone 0.9.7 (actually nightly 2001-11-28). With older builds, passing strings to send() works only in
chrome, see post.html sample. The "workaround" is to use DOMParser object's parseFromString() method to create a document from string, and pass the temporary document into send(). XMLHttpRequest.open("aHost") ok file:// documents can access http:// documents but you need to enable UniversalBrowserRead privilege in your scripts - see the JavaScript Security: Signed Scripts document for mor...
How to build an XPCOM component in JavaScript
See XPCOM changes in Gecko 2.0 for more details. Installation For extensions: Copy HelloWorld.js, and HelloWorld.xpt (only if you defined and compiled the IDL) to {extensiondir}/components/. Delete compreg.dat and xpti.dat from your profile directory. Restart application. For Firefox: Copy H...
Receiving startup notifications
e. Receiving startup notifications in Gecko 2.0 (Firefox 4) and later In order to improve startup times, changes were made to the XPCOM startup process. See The startup process for details on how this now works, if you're interested in specifics. The important thing to note is that now instead of registering with the Category Manager programmatically as was done in the past, you add lines to your
chrome.manifest to let the application handle it for you. For example: category profile-after-change MyComponent @foobar/mycomponent;1 Important: In the past, the contract ID of the category entry started with "service," if the component was implemented as a service. This is no longer the case, so be sure to remove that when migrating existing code. Additionally, the earliest startup time notification y...
XPCOM guide
e an IDL inheritance hierarchy, and a corresponding C++ implementation hierarchy, you run into multiple inheritance. That's not inherently multiple inheritance, though, because you only mix in interfaces (i.e. the problem would not exist with Java's interfaces).Making cross-thread calls using runnablesIn the Mozilla platform, most activities such as layout, DOM operations, content JavaScript, and
chrome JavaScript run on the main thread. However, it may be useful for C++ code in the Mozilla platform to run tasks on another thread.Mozilla internal string guideMost of the Mozilla code uses a C++ class hierarchy to pass string data, rather than using raw pointers. This guide documents the string classes which are visible to code within the Mozilla codebase (code which is linked into libxul). mo...
How To Pass an XPCOM Object to a New Window
contextHelp.js#61 If you want to be able to call functions within an XPCOM object from a XUL window's code, you can do so if you pass the XPCOM object as one of the arguments to the window creation method. For example: var ww = Components.classes["@mozilla.org/embedcomp/window-watcher;1"]. getService(Components.interfaces.nsIWindowWatcher); var win = ww.openWindow(null, "
chrome://myextension/content/debug.xul", "debug history", "
chrome,centerscreen,resizable", myObject); Note in this example that myObject is passed to the openWindow() method; you can pass any XPCOM object (or any other value, for that matter) in this way. To access the XPCOM object from the window's code, you can access the window.arguments[] array, as shown in the example below: Components.uti...
Components.utils.import
is used for sharing code between different scopes easily. For example, you can import XPCOMUtils.jsm to avoid copy/pasting long XPCOM component registration boilerplate in your component files. See Using JavaScript code modules for more details. Note: Prior to Gecko 2.0, JavaScript code modules could only be loaded using file: or resource: URLs. Gecko 2.0 adds support for loading modules from
chrome: URLs, even those inside JAR archives. Syntax Components.utils.import(url [, scope]); // Or, if you use a tool such as jslint which reports compiler errors for the above, Components.utils["import"](url [, scope]); Parameters url A string of the URL of the script to be loaded. The URL must point to a file on the disk, possibly in a JAR. scope An optional object to import onto; if omitt...
Components.utils
be called from JavaScript code. nondeterministicGetWeakMapKeys() Return the keys in a weak map. This operation is non-deterministic because it is affected by the scheduling of the garbage collector and the cycle collector. This should only be used to write tests of the interaction of the GC and CC with weak maps. Obsolete since Gecko 45 the function was moved to ThreadSafe
ChromeUtils nukeSandbox() recomputeWrappers() To be called from JS only. This is for Gecko internal use only, and may disappear at any moment. reportError() Reports a JavaScript Error object to the Error Console. setWantXrays() To be called from JS only. This is for Gecko internal use only, and may disappear at any moment. schedulePreciseGC...
Components.utils.reportError
IConsoleService for logging, as it logs the messages with normal severity, unlike reportError. function myDump(aMessage) { var consoleService = Components.classes["@mozilla.org/consoleservice;1"] .getService(Components.interfaces.nsIConsoleService); consoleService.logStringMessage("My component: " + aMessage); } Firefox 3: The Error Console will not display
chrome errors by default. To show them, set the preference 'javascript.options.showInConsole' to true, or use nsConsoleService instead to show a message. Firefox 4: The preference 'javascript.options.showInConsole' is set to true by default in this version. Examples Usage in an exception handler: try { this.could.raise.an.exception; } catch(e) { Components.utils.reportError(e); // report the err...
Components.utils.schedulePreciseGC
sometime in the future, when no JavaScript code is executing. This is useful particularly when testing for memory leaks, because normal garbage collection is conservative when JavaScript code is running to ensure that in-use memory isn't inadvertently collected. Note: Garbage collection is a very expensive operation and should only be forced when it is known to be absolutely necessary. Requires
chrome privileges. Using schedulePreciseGC() When you call Components.utils.schedulePreciseGC(), you specify a callback that is executed in once the scheduled garbage collection has been completed: Components.utils.schedulePreciseGC( function() { // This code is executed when the garbage collection has completed } ); Since the garbage collection doesn't occur until some time in the future (unli...
Profiling XPCShell
Or you might want to have a more reproducible testcase. In those cases, an xpcshell script can help. You can just call the code you want to test. But then, you can't use the Venkman UI. ...
IJSDebugger
ebugger;1 as a service: var jsDebugger = Components.classes["@mozilla.org/jsdebugger;1"] .createInstance(Components.interfaces.IJSDebugger); Note: You should almost never directly use this service; instead, you should use the JavaScript code module that does this for you. The only time you should directly use this interface to create the Debugger object is if you need to debug
chrome; due to bug 707237, the JavaScript code module doesn't work in that case. See the JavaScript Debugger API Guide for details on using the Debugger API. Method overview [implicit_jscontext] void addClass(); Methods addClass() Defines the global Debugger constructor. On return, the Debugger object has been added to the global context. [implicit_jscontext] void addClass(); Para...
imgICache
alternatively, tools.getImgCacheForChannel(relevantChannel) If there is no relevant document or channel, null may be passed, but this will cause any image cache requests to use the permanent storage cache (ie. any images from windows in private browsing mode will not be present in the cache returned from a call with a null parameter). Method overview void clearCache(in boolean
chrome); nsIProperties findEntryProperties(in nsIURI uri); void removeEntry(in nsIURI uri); Methods clearCache() Evict images from the cache. void clearCache( in boolean
chrome ); Parameters
chrome If true, evict only
chrome images. If false, evict everything except
chrome images. findEntryProperties() Find Properties Used to get properties su...
nsIAboutModule
key 2.1) Method overview unsigned long getURIFlags(in nsIURI aURI); nsIChannel newChannel(in nsIURI aURI); Constants Constant Value Description URI_SAFE_FOR_UNTRUSTED_CONTENT (1 << 0) A flag that indicates whether a URI is safe for untrusted content. If it is, web pages and so forth will be allowed to link to this about: URI. Otherwise, only
chrome will be able to link to it. ALLOW_SCRIPT (1 << 1) A flag that indicates whether script should be enabled for the given about: URI even if it's disabled in general. HIDE_FROM_ABOUTABOUT (1 << 2) A flag that indicates whether this about: URI doesn't want to be listed in about:about, especially if it's not useful without a query string. Methods getURIFlags() A ...
nsIAccelerometerUpdate
Method overview void accelerationChanged(in double x, in double y, in double z); Methods accelerationChanged() void accelerationChanged( in double x, in double y, in double z ); Parameters x y z The coordinates of the nsIAcceleration data. ...
nsIAccessibleRole
SER 73 A file chooser. A specialized dialog that displays the files in the directory and lets the user select a file, browse a different directory, or specify a filename. May use the directory pane to show the contents of a directory. Also refer to ROLE_DIRECTORY_PANE. ROLE_FONT_CHOOSER 74 A font chooser. A font chooser is a component that lets the user pick various attributes for fonts. ROLE_
CHROME_WINDOW 75 Frame role. A top level window with a title bar, border, menu bar, etc. It is often used as the primary window for an application. ROLE_GLASS_PANE 76 A glass pane. A pane that is guaranteed to be painted on top of all panes beneath it. Also refer to ROLE_ROOT_PANE. ROLE_HTML_CONTAINER 77 A document container for HTML, whose children represent the document content. ROLE_ICON 78 A s...
nsIContentFrameMessageManager
IDL file: mozilla-central/source/dom/base/nsIMessageManager.idl Inherits from: nsISyncMessageSender This interface provides the environment for scripts that are loaded into content frames using the nsIFrameScriptLoader interface. It enables these scripts to receive messages from the
chrome process and send messages back to the
chrome process. Frame scripts can send either synchronous or asynchronous messages to the
chrome process: for details on these messaging APIs see the documentation for the nsIContentFrameMessageManager's parent classes nsISyncMessageSender and nsIMessageSender. Methods void dump(in DOMString aStr); DOMString atob(in DOMString aAsciiString); DOMString btoa(in DOMString aBase64Data); dump() Prints the specified string to stan...
nsIContentViewManager
g all of the content views that intersect with the specified rectangle in the browser. Note: The rectangle is specified using an anchor point, then four distances to indicate how far in each direction to expand the rectangle. This lets you, for example, take the coordinates at which the user clicked (or touched) the screen, and expand outward to create a rectangle from that point. Pixels are in
chrome device pixels and are relative to the browser element. void getContentViewsIn( in float aXPx, in float aYPx, in float aTopSize, in float aRightSize, in float aBottomSize, in float aLeftSize, out unsigned long aLength, Optional [retval, array, size_is(aLength)] out nsIContentView aResult ); Parameters aXPx The X coordinate of the anchor point of the rectangle, in CSS pixels.
nsIDOMWindowInternal
ates whether the referenced window is closed or not. crypto nsIDOMCrypto Readonly: Returns the browser crypto object, which can then be used to manipulate various browser security features. pkcs11 nsIDOMPkcs11 Obsolete: this property is not supported in newer versions of Firefox. controllers nsIControllers Readonly: Returns the XUL controllers of the
chrome window. opener nsIDOMWindowInternal Returns a reference to the window that opened this current window. status DOMString Sets the text in the status bar at the bottom of the browser or returns the previously set text. defaultStatus DOMString Gets/sets the status bar text for the given window. location nsIDOMLocation Readonly: Returns a n...
nsIDownloadProgressListener
tants. aDownload The download whose state changed. onStatusChange() Obsolete since Gecko 1.9.1 (Firefox 3.5 / Thunderbird 3.0 / SeaMonkey 2.0) Called when the status of a download request has changed. The received status message is intended to be displayed visibly to the user. Note: If source and destination are identical, which is possible in case of file URLs or
chrome URLs, this is called even in Gecko 1.9.2. In such a situation no further event handlers are called and the stop flag is set; if there are more pending downloads in such a situation not yet started they never start. In normal situations this is never called. The method even if never called must be implemented in the listener, because the WebProgress used to do the physical part of the download req...
nsIDragSession
his so the native system can render the correct feedback. dataTransfer nsIDOMDataTransfer The data transfer object for the current drag operation. dragAction unsigned long Sets the action (copy, move, link and so on) for the current drag. (See nsIDragService) numDropItems unsigned long Get the number of items that were dropped. Read only. only
ChromeDrop boolean Indicates if the drop event should be dispatched only to
chrome. This allows
chrome to handle a drag that was refused by content. sourceDocument nsIDOMDocument The document where the drag was started, which will be null if the drag originated outside the application. Useful for determining if a drop originated in the same document. Read only. sourceNode ...
nsIDroppedLinkHandler
alue A uri, or null if there is no valid link to be dropped. Exceptions thrown NS_ERROR_DOM_SECURITY_ERR Error will be thrown and the event canceled if the receiving target should not load the uri for security reasons. This will occur if the source of the drag initiated a link for dragging that it itself cannot access. This prevents a source document from tricking the user into a dragging a
chrome url for example. dropLinks() Given a drop event, determines the link being dragged. If non-empty links array is returned the caller can, for instance, load it. If empty links array is returned, there is no valid link to be dropped. void dropLinks( in nsIDOMDragEvent aEvent, [optional] in boolean aDisallowInherit, [optional] out unsigned long aCount, [retval, array, size_is(aCount)] ou...
nsIFileView
return jpg files. void setFilter( in AString filterString ); Parameters filterString The filter to be applied to the file list. sort() Set the method used for sorting. void sort( in short sortType, in boolean reverseSort ); Parameters sortType One of the sort* constants. reverseSort true, results will be sorted in ascending order. ...
nsIGlobalHistory2
rface replaces and deprecates nsIGlobalHistory Method overview void addURI(in nsIURI aURI, in boolean aRedirect, in boolean aToplevel, in nsIURI aReferrer); boolean isVisited(in nsIURI aURI); void setPageTitle(in nsIURI aURI, in AString aTitle); Methods addURI() Add a URI to global history. Note: Docshell will not filter out URI schemes like
chrome:, data:, about: and view-source:. Embedders should consider filtering out these schemes and others, for example mailbox:, for the main nsIURI and the referrer. void addURI( in nsIURI aURI, in boolean aRedirect, in boolean aToplevel, in nsIURI aReferrer ); Parameters aURI The nsIURI of the page being added. aRedirect Whether the URI was redirected to another ...
Using nsILoginManager
nInfo = new nsLoginInfo( 'http://www.example.com', null, 'ExampleCo Login', 'alice', 'SeCrEt321', "", "" ); This would correspond to a login on http://www.example.com when the server sends a reply such as: HTTP/1.0 401 Authorization Required Server: Apache/1.3.27 WWW-Authenticate: Basic realm="ExampleCo Login" Creating a local extension login var extLoginInfo = new nsLoginInfo( '
chrome://firefoo', null, 'User Registration', 'bob', '123sEcReT', "", "" ); From a component creating a new info block is done slightly differently: var nsLoginInfo = new Constructor("@org/manager/Ci.init"); var extLoginInfo = new aFormSubmitURL, aUsername, aUsernameField, ...
nsIMessageWakeupService
d on desktop until Gecko 13.0 (Firefox 13). There is no IDL for this interface. The parentprocessmessagemanager is used for this, so messages send from childprocessmessagemanagers will be heard. Requesting wakeups To request a wakeup, a wakeup condition must be registered with the category manager in the "wakeup-request" category. The easiest way to do this is to add the appropriate entry to the
chrome manifest that registers your component (see category in "
Chrome registration"). To indicate a wakeup request in a manifest file, add a line that looks something like this: category wakeup-request nsComponent @mozilla.org/myservice;1,nsIMyInterface,getService,myMessage1,myMessage2[,..] The category entry value consists of a comma separate string that contains: The contract ID for your component...
nsIMsgIncomingServer
biffMinutes long biffState unsigned long canBeDefaultServer boolean Read only. canCompactFoldersOnServer boolean Read only. canCreateFoldersOnServer boolean canDelete boolean can this server be removed from the account manager? for instance, local mail is not removable, but an imported folder is. canEmptyTrashOnExit boolean Read only. canFileMessagesOnSer...
nsINavHistoryResultNode
m was created. For other nodes, this value is 0. Read only. icon AUTF8String This URI can be used as an image source URI and will give you the favicon for the page. It is not the actual URI of the favicon, but, rather, is something that will resolve to the actual image. In most cases, this is an annotation URI that will query the favicon service. If the entry doesn't have a favicon, this is the
chrome URI of the default favicon. If the favicon originally lived in
chrome, this will be the original
chrome URI of the icon. Read only. Note: Prior to Gecko 1.9.2, this was an nsIURI. indentLevel long This is the number of levels between this node and the top of the hierarchy. The members of result.children have an indentLevel value of zero, their children have an indentLevel of 1, and so forth. T...
nsINavHistoryService
markPageAsFollowedLink() Designates the specified URL as coming from a link explicitly followed by the user (for example by clicking on it). void markPageAsFollowedLink( in nsIURI aURI ); Parameters aURI The URL that is to be marked as explicitly followed by the user. canAddURI() This method checks if the given URI would be added to the history or not. Many types of URIs, such as "
chrome:" URIs, are not stored when addURI is called. This function allows you to determine whether it will be or not. You don't have to worry about calling this, addPageToSession/addURI will always check before actually adding the page. This function is public because some components may want to check if this page would go in the history (That is for annotations). boolean canAddURI( in nsIURI aURI )...
nsIPromptService
S_0) +(BUTTON_TITLE_CANCEL * BUTTON_POS_1) STD_YES_NO_BUTTONS 1027 selects the standard set of Yes/No buttons. (BUTTON_TITLE_YES *BUTTON_POS_0) +(BUTTON_TITLE_NO * BUTTON_POS_1) Methods alert() alert shows an alert dialog with an OK button. It works the same way as window.alert, but accepts a title for the dialog. You should use this method instead of window.alert in
chrome code. void alert( in nsIDOMWindow aParent, in wstring aDialogTitle, in wstring aText ); Parameters aParent The parent window for the dialog, or null, in which case the parent window will be nsIWindowWatcher.activeWindow. aDialogTitle Text to appear in the title of the dialog. aText Text to appear in the body of the dialog. See also the alert_example. alertCheck() ...
nsIPushSubscription
or", () => { Cu.reportError("Error sending subscription to server"); }); request.send(JSON.stringify({ endpoint: subscription.endpoint, // Base64-encode the key and authentication secret. ...
nsIScriptableIO
ding and writing data to them. For your convenience, this API is published through a global IO object. For more details about how to use this object, see the File and Stream Guide. network/base/public/nsIScriptableIO.idlScriptable Please add a summary to this article. Last changed in Gecko 1.9 (Firefox 3) Inherits from: nsISupports A scriptable IO object can be used in an extension or
chrome code by referring to the global IO object. For example: IO.getFile("Profile", "cookies.txt"); From an XPCOM component, however, you will need to get a reference as with other components: var scriptableIO = Components.classes["@mozilla.org/io/scriptable-io;1"] .getService(); scriptableIO.getFile("Profile", "cookies.txt"); Method overview nsIFile getFil...
nsIStyleSheetService
Constant Value Description AGENT_SHEET 0 USER_SHEET 1 AUTHOR_SHEET 2 Methods loadAndRegisterSheet() Synchronously loads a style sheet from sheetURI and adds it to the list of user or agent style sheets. A user sheet loaded via this API will come before userContent.css and user
Chrome.css in the cascade (so the rules in it will have lower precedence than rules in those sheets). An agent sheet loaded via this API will come after ua.css in the cascade (so the rules in it will have higher precedence than rules in ua.css). The relative ordering of two user or two agent sheets loaded via this API is undefined. Sheets added via this API take effect on all documents, including alread...
nsIWebProgressListener
pt to get access to the DOM Window. This example here shows you how to detect what flags are popping up where. It puts the messages into the Browser Console. /** * This example assumes that it's being run within the context of a browser * window, and uses a frame script that will be loaded into every * browser tab. */ let mm = window.getGroupMessageManager("browsers"); mm.loadFrameScript("
chrome://path/to/some/example-framescript.js", true); mm.addMessageListener("MyAddonMessage", (message) => { let data = message.data; let browser = message.target; let outerWindowID = data.outerWindowID; // browser is now the <xul:browser> that saw the web progress activity // occur. If you need to hold onto an identifier for whichever frame // (be it the top-level, or a subframe) was using ...
nsIXPConnect
ssing Description Return value Missing Description Exceptions thrown Missing Exception Missing Description Native code only!getCOWForObject Obsolete since Gecko 2.0 (Firefox 4 / Thunderbird 3.3 / SeaMonkey 2.1)This feature is obsolete. Although it may still work in some browsers, its use is discouraged since it could be removed at any time. Try to avoid using it. Wrap a jsval in a
chrome object wrapper. JSVal getCOWForObject( in JSContextPtr aJSContext, in JSObjectPtr aParent, in JSObjectPtr aWrappedObj ); Parameters aJSContext A context to use to create objects. aParent The parent to create the wrapper with. aWrappedObj The object to wrap. Return value Missing Description Exceptions thrown Missing Exception Missing Description getDefaultSecurityManager...
nsIXULRuntime
pecially unusual processor or compiler combinations. The result takes the form <processor>-<compilerABI>, for example: x86-msvc ppc-gcc3. This value should almost always be used in combination with OS. May throw NS_ERROR_NOT_AVAILABLE. Read only. Constants Process type constants Constant Value Description PROCESS_TYPE_DEFAULT 0 The default (
chrome) process. PROCESS_TYPE_PLUGIN 1 A plugin subprocess. PROCESS_TYPE_CONTENT 2 A content subprocess. PROCESS_TYPE_IPDLUNITTEST 3 IPDL unit testing subprocess. Methods invalidateCachesOnRestart() Signal the apprunner to invalidate caches on the next restart. This will cause components to be auto registered and all fast load data to be re-created. ...
nsPIPromptService
he dialog. eDelayButtonEnable The value is 6. If this is not 0, the all buttons are disabled when the dialog is shown. And they will be enabled later. eSoundEventId The value is 7. This is the sound event ID which should be played when the dialog is shown. See also nsISound.playEventSound(). Method overview void doDialog(in nsIDOMWindow aParent, in nsIDialogParamBlock aParamBlock, in string a
ChromeURL); Methods doDialog() Opens a dialog. void doDialog( in nsIDOMWindow aParent, in nsIDialogParamBlock aParamBlock, in string a
ChromeURL ); Parameters aParent The parent window of the dialog. aParamBlock Various parameters for the dialog. a
ChromeURL The URL of the dialog implementation. ...
Setting HTTP request headers
e "http-on-modify-request") we need to create an observer. An observer is a component implementing nsIObserver interface. And once the observer is registered for a topic, it will get notified about the topic by having its observe method called. ...
The Thread Manager
The Thread Manager, introduced in Firefox 3, offers an easy to use mechanism for creating threads and dispatching events to them for processing. Only C++ code may use the thread manager and XPCOM thread. Application/Extension JavaScript should consider using a
ChromeWorker instead.") Interfaces There are several interfaces that provide threading support: nsIThreadManager The Thread Manager itself lets you create threads. nsIThread The nsIThread interface encapsulates an operating system thread, providing easy cross-platform access to multithreading in your code. nsIThreadPool A thread pool provides a limited set of worker threads. When you dispatch an event to the pool, the pool selects an available worker thread to process the event. nsIThreadInternal A subclass of nsIThread that ...
Using nsIDirectoryService
as in your application that points to this directory and the resource ID of this alias goes into your 'cfrg' resource. On platforms which use PATH environment variables, you will need to set one of these paths to the /bin directory. Application Level nsAppDirectoryServiceDefs.h The first group listed is for locations that are relative to the application: for instance, the name and location of the
chrome folder, or the default location of user profiles. The nsIDirectoryServiceProvider which normally provides these locations is at mozilla/xpcom/io/. This provider is installed by SeaMonkey after initializing XPCOM. It is also installed by default by NS_InitEmbedding. The second group listed is for locations which are relative to the current user profile. In SeaMonkey, the profile service is an nsID...
wrappedJSObject
See XPCNativeWrapper for detailed documentation. Regular XPConnect wrappers which you can encounter, for example, when using XPCOM components implemented in JS. ...
Add New Tab
var aURL = "
chrome://myext/mytab.xul"; let tabmail = getMail3Pane().document.getElementById("tabmail"); tabmail.openTab("
chromeTab", {
chromePage: aUrl }); ...
Add Toolbar Button
Example XUL overlay file: <?xml version="1.0"?> <?xml-stylesheet href="
chrome://demo/skin/overlay.css" type="text/css" ?> <overlay id="messengerWindow" xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"> <script type="application/x-javascript" src="overlay.js" /> <toolbarpalette id="MailToolbarPalette"> <toolbarbutton id="demo-button" class="demo-button toolbarbutton-1" label="Demo" type="button" oncommand="Demo.load();" /> </toolbarpalette> </overlay> Add this to the css file you referenced in your xul file: #demo-button, [place="palette"] > #demo-button { list-style-image: url("
chrome://demo/skin/icon.png") !important; } ...
Toolkit version format
the Extension Manager, Software Update, and other parts of the platform. Versions in at least the following places must conform to this format: Addon's and target application's version in install and update manifests. The following preferences: app.extensions.version, extensions.lastAppVersion Versions returned by nsIXULAppInfo. application.ini in XULRunner applications appversion flag in
chrome manifests. You can use nsIVersionComparator to compare versions from your application. See Older version formats below for description of the older version format used in Firefox/Thunderbird 1.0. Version format A version string consists of one or more version parts, separated with dots. Each version part is itself parsed as a sequence of four parts: <number-a><string-b><number-c><string-d>.
Using tab-modal prompts
.0 introduces tab modal prompts, which only block the tab with which they're associated. Only the window.alert() method gets this by default; you get this by default. Tab-modal alert. Disabling tab-modal prompts You can disable tab-modal prompts and get back window-modal prompts by setting the prompts.tab_modal.enabled preference to false. Using tab-modal prompts from
chrome code Currently, nsIPrompt defaults to using window-modal prompts. You can force a prompt to be tab-modal using code like this: var theWindow = gBrowser.contentWindow; let prompt = Components.classes["@mozilla.org/prompter;1"] .getService(Components.interfaces.nsIPromptFactory) .getPrompt(theWindow, Components.interfaces.nsIPrompt); let bag = prompt.QueryInterface(Comp...
Using COM from js-ctypes
CLSID and IID of SpVoice and ISpVoice description here. COM types and functions Needs COM types (GUID) and functions (CoInitialize etc) description here. Converted js-ctypes code Here's converted code. This example uses busy loop and thus Firefox won't respond until the speaking is done. If this code were used in a production add-on, then to avoid Firefox locking up, run this code from a
ChromeWorker. let { ctypes } = Components.utils.import("resource://gre/modules/ctypes.jsm", {}); // SOME GROUNDWORK let is64bit; if (ctypes.voidptr_t.size == 4 /* 32-bit */) { is64bit = false; } else if (ctypes.voidptr_t.size == 8 /* 64-bit */) { is64bit = true; } let WINABI = is64bit ? ctypes.default_abi : ctypes.winapi_abi; let CALLBACK_ABI = is64bit ? ctypes.default_abi : ctypes.stdcall_abi...
Using Objective-C from js-ctypes
x!"), ctypes.unsigned_long(NSUTF8StringEncoding)); Converted js-ctypes code Finally, we have our converted code. This can run with a copy-and-paste into a JavaScript shell. This example uses a busy loop, and thus, Firefox won't respond until the speaking is done. If this code were to be used in a production add-on, then to avoid Firefox locking up, run this code from a
ChromeWorker. let { ctypes } = Components.utils.import("resource://gre/modules/ctypes.jsm", {}); let id = ctypes.StructType("objc_object").ptr; let SEL = ctypes.StructType("objc_selector").ptr; let BOOL = ctypes.signed_char; let lib = ctypes.open(ctypes.libraryName("objc")); let objc_getClass = lib.declare("objc_getClass", ctypes.default_abi, id, ctypes.char.ptr); let...
Standard OS Libraries
splay); Components.utils.reportError(rootX.value + "," + rootY.value); X11.close(); Resources for X11 Extended Window Manager Hints GitHubGISTS :: Noitidart / Search . x11 - X11 js-ctypes snippets that can be copied and pasted to scratchpad XCB All the above methods, GDK, GTK, and X11/Xlib are meant to be used on the main thread. If you would like to do stuff off of the main thread, in
ChromeWorker's, then you should use XCB. XCB is thread safe. Resources for XCB GitHub :: Noitidart - ostypes / ostypes_x11.jsm - Some method and type signatures XCB Freedesktop :: xproto.h Mac OS X Mac OS X has two categories of C-based API (Carbon, Core Foundation) and Objective-C based API (Cocoa). Note: You cannot use Carbon routines from your add-on; Firefox is a 64-bit application, and y...
Using js-ctypes
lly shown!!'); } else { console.error('Failed to show notification... :('); } for (var cfstr in myCFStrs) { if (myCFStrs.hasOwnProperty(cfstr)) { var rez_CFRelease = CFRelease(myCFStrs[cfstr]); // returns void } } libcf.close(); Calling LibC routines on Linux/POSIX This example demonstrates how to use ctypes to call a libc function on Linux. ...
Tutorial: Set a breakpoint - Firefox Developer Tools
enever it is hit. This tutorial was tested against Firefox 58 Beta and Nightly. It does not work in Firefox 57. Since the Debugger API is only available to privileged JavaScript code, you'll need to use the Browser Content Toolbox to try it out. To do this, open the Firefox developer tools, click on the options gear at the upper right of the toolbox, and make sure that both "Enable browser
chrome and add-on debugging toolboxes" and "Enable remote debugging" are checked. These are located at the bottom right of the options panel; you may need to scroll to see them. Once they're checked, you can close the developer tools. Save the following text to an HTML file: <div onclick="report('the best div');">Click me!</div> <div onclick="report('another great div');">Or me!</div> <script> ...
Migrating from Firebug - Firefox Developer Tools
can click the Persist button within the toolbar to keep the logged messages between page navigations and reloads. In the DevTools this option is called Enable persistent logs and is available within the Toolbox Options panel. Server logs Firebug extensions like FirePHP allow to log server-side messages to the Firebug console. This functionality is already integrated into the DevTools using the
ChromeLogger protocol and doesn't require any extensions to be installed. Command history The command history available through a button in Firebug's command line, is available by pressing ?/? within the DevTools command line. Inspect object properties By clicking on an object logged within the console you can inspect the object's properties and methods within the DOM panel. In the Firefox DevTools ...
Use the Inspector API - Firefox Developer Tools
Attributes and functions: .selection - information about the inspector's selection: .isNode() - returns true if selection is node. .node - returns the actual element from the page .window - the window object of the frame the selection is in. .markDirty() - marks that the page has been changed by the inspector - a warning will be shown when leaving the page, since changes made through the inspector are rewritten on reload. Bindable events using on: markuploaded Called when the left panel has been refreshed, after page change. ...
Debugging Firefox Desktop - Firefox Developer Tools
guide explains how you can use the Firefox Developer Tools to debug a different instance of desktop Firefox running on the same machine. In this guide, the instance of Firefox being debugged is called the debuggee, and the instance of Firefox doing the debugging is called the debugger. Enable remote debugging First, you'll need to ensure that both debugger and debuggee have the "Enable browser
chrome and add-on debugging toolboxes" and "Enable remote debugging" settings checked in the Developer Tools Settings. You only need to do this once: the setting values persist across restarts. Start the debugger server Next, you need to start the debugger server in the debuggee. Run the debuggee from the command line, passing it the --start-debugger-server option: /path/to/firefox --start-debugg...
Settings - Firefox Developer Tools
ted by this option. Note that this option was called "Disable Cache" in Firefox versions previous to 49, but it was renamed to make it clearer that this affects the HTTP cache, and not Service Workers/the Cache API. Disable JavaScript Reload the current tab with JavaScript disabled. Enable Service Workers over HTTP Enable Service Worker registrations from insecure websites. Enable browser
chrome and add-on debugging toolboxes Enable you to use developer tools in the context of the browser itself, and not only web content. Enable remote debugging Enable the developer tools to debug remote Firefox instances. Enable worker debugging Enable a panel within the debugger to debug workers. Note: This option got removed from the UI in Firefox 56, because this version ships with a new Debugg...
View Source - Firefox Developer Tools
when highlighting XML source. While the tokenizer has support for processing instructions when highlighting XML source, that's the only XML-specific capability provided. Because of this, doctypes that have an internal subset are not highlighted correctly, and entity references to custom entities are also not highlighted correctly. This mishighlighting can be seen by viewing the source of Firefox
chrome files (such as XUL documents). However, this shouldn't be a problem in practice when viewing typical XML files. ...
Web Console remoting - Firefox Developer Tools
[ { "actor": "conn0.tab2", "consoleActor": "conn0.console7", "title": "", "url": "https://tbpl.mozilla.org/?tree=Fx-Team" }, // ... ] } Notice that the consoleActor is also available as a global actor. When you attach to the global consoleActor you receive all of the network requests, page errors, and the other events from all of the tabs and windows, including
chrome errors and network events. This actor is used for the Browser Console implementation and for debugging remote Firefox/B2G instances. startListeners(listeners, onResponse) The new startListeners packet: { "to": "conn0.console9", "type": "startListeners", "listeners": [ "PageError", "ConsoleAPI", "NetworkActivity", "FileActivity" ] } The reply is: { "startedListeners...
about:debugging - Firefox Developer Tools
ns that came preinstalled with Firefox. If you click Inspect, the Add-on Debugger will start in a new tab. See the page on the Add-on Debugger for all the things you can do with this tool. Workers The Workers section shows all the workers you've got registered on your Firefox, categorised as follows: All registered Service Workers All registered Shared Workers Other workers, including
Chrome Workers and Dedicated Workers You can connect the developer tools to each worker, and send push notifications to service workers. Service worker state The list of service workers shows the state of the service worker in its lifecycle. Three states are possible: Registering: this covers all states between the service worker's initial registration, and its assuming control of pages. That i...
Firefox Developer Tools
t browsers or even different devices. about:debugging Debug add-ons, content tabs, and workers running in the browser. Connecting to Firefox for Android Connect the developer tools to an instance of Firefox running on an Android device. Connecting to iframes Connect the developer tools to a specific iframe in the current page. Connecting to other browsers Connect the developer tools to
Chrome on Android and Safari on iOS. Debugging the browser By default, the developer tools are attached to a web page or web app. But you can also connect them to the browser as a whole. This is useful for browser and add-on development. Browser Console See messages logged by the browser itself and by add-ons, and run JavaScript code in the browser's scope. Browser Toolbox Attach the Develope...
Attr - Web APIs
s property always returns true. Originally, it returned true if the attribute was explicitly specified in the source code or by a script, and false if its value came from the default one defined in the document's DTD. value The attribute's value. Note: DOM Level 3 defined namespaceURI, localName and prefix on the Node interface. In DOM4 they were moved to Attr. This change is implemented in
Chrome since version 46.0 and Firefox since version 48.0. Deprecated properties and methods The following properties have been deprecated. Where available, the appropriate replacement is noted. attributes This property now always returns NULL. childNodes Obsolete since Gecko 14 This property now always returns an empty NodeList. firstChild Obsolete since Gecko 14 This property now always retu...
AudioContext() - Web APIs
ts a user agent should support, or minimum or maximum latency requirements (if any), so these details can vary from browser to browser. Be sure to check the values if they matter to you. In particular, the specification doesn't indicate a maximum or minimum number of audio contexts that must be able to be open at the same time, so this is left up to the browser implementations to decide. Google
Chrome Per-tab audio context limitation in
Chrome Prior to version 66 Google
Chrome only supported up to six audio contexts per tab at a time. Non-standard exceptions in
Chrome If the value of the latencyHint property isn't valid,
Chrome throws a TypeError exception with the message "The provided value '...' is not a valid enum value of type AudioContextLatencyCategory". Example This example crea...
AudioContext.createMediaStreamDestination() - Web APIs
on nodes, check out the MediaStreamAudioDestinationNode reference page. Syntax var audioCtx = new AudioContext(); var destination = audioCtx.createMediaStreamDestination(); Returns A MediaStreamAudioDestinationNode. Examples In the following simple example, we create a MediaStreamAudioDestinationNode, an OscillatorNode and a MediaRecorder (the example will therefore only work in Firefox and
Chrome at this time.) The MediaRecorder is set up to record information from the MediaStreamDestinationNode. When the button is clicked, the oscillator starts, and the MediaRecorder is started. When the button is stopped, the oscillator and MediaRecorder both stop. Stopping the MediaRecorder causes the dataavailable event to fire, and the event data is pushed into the chunks array. After that, the stop...
AudioNode - Web APIs
oth, however there are advantages to using the constructors: All parameters can be set during construction time and don't need to be set individually. You can sub-class an audio node. While the actual processing is done internally by the browser and cannot be altered, you could write a wrapper around an audio node to provide custom properties and methods. Slightly better performance: In both
Chrome and Firefox, the factory methods call the constructors internally. Keep in mind that Microsoft Edge does not yet appear to support the constructors; it will throw a "Function expected" error when you use the constructors. Brief history: The first version of the Web Audio spec only defined the factory methods. After a design review in October 2013, it was decided to add constructors because the...
BatteryManager - Web APIs
hange event; This event is sent when the battery level is updated. Methods Inherited from EventTarget: EventTarget.addEventListener() Registers an event handler of a specific event type on the EventTarget. EventTarget.removeEventListener() Removes an event listener from the EventTarget. EventTarget.dispatchEvent() Dispatches an event to this EventTarget. Additional methods in Mozilla
chrome codebase Mozilla includes a couple of extensions for use by JS-implemented event targets to implement onevent properties. See also WebIDL bindings. void setEventHandler(DOMString type, EventHandler handler) EventHandler getEventHandler(DOMString type) Specifications Specification Status Comment Battery Status API Candidate Recommendation Initial defi...
BeforeUnloadEvent - Web APIs
ntDefault(); }); WebKit-derived browsers don't follow the spec for the dialog box. An almost-cross-browser working example would be close to the below example. window.addEventListener("beforeunload", function (e) { var confirmationMessage = "\o/"; (e || window.event).returnValue = confirmationMessage; // Gecko + IE return confirmationMessage; /* Safari,
Chrome, and other * WebKit-derived browsers */ }); Specifications Specification Status Comment HTML Living StandardThe definition of 'BeforeUnloadEvent' in that specification. Living Standard Initial definition ...
BluetoothDevice - Web APIs
ble name for the device. BluetoothDevice.gatt Read only A reference to the device's BluetoothRemoteGATTServer. BluetoothDevice.uuids Read only Lists the UUID's of GATT services provided by the device, that the current origin is allowed to access. BluetoothDevice.watchingAdvertisements Read only If advertisments were activated using BluetoothDevice.watchAdvertisements(). Non-standard
Chrome OS properties These properties were only implemented on Google's
Chrome OS 45 and removed from
Chrome 52. BluetoothDevice.adData Read only An instance of BluetoothAdvertisingData containing the most recent advertising data received for the device. BluetoothDevice.deviceClass Read only A number representing the Bluetooth devices "Class of Device". BluetoothDevice.vendorIDSource ...
CSSOMString - Web APIs
r USVString. While browser implementations that use UTF-8 internally to represent strings in memory can use USVString when the specification says CSSOMString, implementations that already represent strings as 16-bit sequences might choose to use DOMString instead. Implementation differences Browser DOMString or USVString for CSSOMString Firefox (Gecko) USVString
Chrome (Blink) USVString Safari (WebKit) USVString Edge (EdgeHTML) - Opera (Blink) USVString Specifications Specification Status Comment CSS Object Model (CSSOM)The definition of 'CSSOMString' in that specification. Working Draft Initial definition. ...
Cache - Web APIs
iple caches. It maps a shorthand identifier for a cache to a specific, versioned cache name. The code also deletes all caches that aren't named in CURRENT_CACHES. In the code example, caches is a property of the ServiceWorkerGlobalScope. It holds the CacheStorage object, by which it can access the CacheStorage interface. This is an implementation of the WindowOrWorkerGlobalScope mixin. Note: In
Chrome, visit
chrome://inspect/#service-workers and click on the "inspect" link below the registered service worker to view logging statements for the various actions the service-worker.js script is performing. var CACHE_VERSION = 1; var CURRENT_CACHES = { font: 'font-cache-v' + CACHE_VERSION }; self.addEventListener('activate', function(event) { // Delete all caches that aren't named in CURRENT_C...
CacheStorage - Web APIs
The CacheStorage interface represents the storage for Cache objects. The interface: Provides a master directory of all the named caches that can be accessed by a ServiceWorker or other type of worker or window scope (you're not limited to only using it with service workers, even though the Service Workers spec defines it). Note:
Chrome and Safari only expose `CacheStorage` to the windowed context over HTTPS. window.caches will be undefined unless an SSL certificate is configured. Maintains a mapping of string names to corresponding Cache objects. Use CacheStorage.open() to obtain a Cache instance. Use CacheStorage.match() to check if a given Request is a key in any of the Cache objects that the CacheStorage object tracks. You can access CacheStorage through the global caches proper...
CanvasRenderingContext2D.drawWidgetAsOnScreen() - Web APIs
y CanvasRenderingContext2D.drawWidgetAsOnScreen() method of the Canvas 2D API renders the root widget of a window into the canvas. Unlike drawWindow(), this API uses the operating system to snapshot the widget on-screen, rather than reading from Gecko's own compositor. This API cannot be used by Web content. It is only supported on Windows, only on widgets that use OMTC, and only from within the
chrome process. Syntax void ctx.drawWidgetAsOnScreen(window); Parameters window The Window to render. Specifications Not part of any current specification or draft. This is a non-standard and internal only API. ...
Clients.matchAll() - Web APIs
nts who share the same origin as the current service worker. Otherwise, it returns only the service worker clients controlled by the current service worker. The default is false. type: Sets the type of clients you want matched. Available values are "window", "worker", "sharedworker", and "all". The default is "all". Return value A Promise that resolves to an array of Client objects. In
Chrome 46/Firefox 54 and later, this method returns clients in most recently focused order, correct as per spec. Examples clients.matchAll(options).then(function(clientList) { for (var i = 0 ; i < clientList.length ; i++) { if (clientList[i].url === 'index.html') { clients.openWindow(clientList[i]); // or do something else involving the matching client } } }); Specifications ...
Clients.openWindow() - Web APIs
The openWindow() method of the Clients interface creates a new top level browsing context and loads a given URL. If the calling script doesn't have permission to show popups, openWindow() will throw an InvalidAccessError. In Firefox, the method is allowed to show popups only when called as the result of a notification click event. In
Chrome for Android, the method may instead open the URL in an existing browsing context provided by a standalone web app previously added to the user's home screen. As of recently, this also works on
Chrome for Windows. Syntax self.clients.openWindow(url).then(function(windowClient) { // Do something with your WindowClient }); Parameters url A USVString representing the URL of the client you want to open in the window. Generally this value must be a URL ...
console.assert() - Web APIs
.. console.log('the word is %s', 'foo'); // output: the word is foo ...the use of such a string does not currently work as intended as a parameter for console.assert in all browsers: console.assert(false, 'the word is %s', 'foo'); // correct output in Node.js and some browsers // (e.g. Firefox v60.0.2): // Assertion failed: the word is foo // incorrect output in some browsers // (e.g.
Chrome v67.0.3396.87): // Assertion failed: the word is %s foo See Outputting text to the console in the documentation of console for further details. Specifications Specification Status Comment Console APIThe definition of 'console.assert()' in that specification. Living Standard Initial definition ...
Console.group() - Web APIs
Creates a new inline group in the Web Console log. This indents following console messages by an additional level, until console.groupEnd() is called. Note: This feature is available in Web Workers. Syntax console.group([label]); Parameters label Label for the group. Optional. (
Chrome 59 tested) Does not work with console.groupEnd(). Using groups in the console Requires Gecko 9.0(Firefox 9.0 / Thunderbird 9.0 / SeaMonkey 2.6) You can use nested groups to help organize your output by visually associating related messages. To create a new nested block, call console.group(). The console.groupCollapsed() method is similar, but the new block is collapsed and requires clicking a disclosure button to read it. Note: From Gecko 9 until Gecko 51, the groupCollapsed() method was the...
Console.warn() - Web APIs
Syntax console.warn(obj1 [, obj2, ..., objN]); console.warn(msg [, subst1, ..., substN]); Parameters obj1 ... objN A list of JavaScript objects to output. The string representations of each of these objects are appended together in the order listed and output. msg A JavaScript string containing zero or more substitution strings. subst1 ... substN JavaScript objects with which to replace substitution strings within msg. ...
console - Web APIs
%i Outputs an integer. Number formatting is supported, for example console.log("Foo %.2d", 1.1) will output the number as two significant figures with a leading 0: Foo 01 %s Outputs a string. %f Outputs a floating-point value. Formatting is supported, for example console.log("Foo %.2f", 1.1) will output the number to 2 decimal places: Foo 1.10 Note: Precision formatting doesn't work in
Chrome Each of these pulls the next argument after the format string off the parameter list. For example: for (var i=0; i<5; i++) { console.log("Hello, %s. You've called me %d times.", "Bob", i+1); } The output looks like this: [13:14:13.481] Hello, Bob. You've called me 1 times. [13:14:13.483] Hello, Bob. You've called me 2 times. [13:14:13.485] Hello, Bob. You've called me 3 times. [13:14:13.4...
Console API - Web APIs
s and usage The Console API started as a largely proprietary API, with different browsers implementing it, albeit it in inconsistent ways. The Console API spec was created to define consistent behavior, and all modern browsers eventually settled on implementing this behavior -- although some implementations still have their own additional proprietary functions. Find out about these at: Google
Chrome DevTools implementation Safari DevTools implementation Usage is very simple -- the console object -- available via window.console, or WorkerGlobalScope.console in workers; accessible using just console -- contains many methods that you can call to perform rudimentary debugging tasks, generally focused around logging various values to the browser's Web Console. By far the most commonly-used me...
Detecting device orientation - Web APIs
s half the size of the ball // It center the positioning point to the center of the ball ball.style.top = (maxY*y/180 - 10) + "px"; ball.style.left = (maxX*x/180 - 10) + "px"; } window.addEventListener('deviceorientation', handleOrientation); Click here to open this example in a new window; because deviceorientation doesn't work in a cross-origin <iframe> in all browsers. Warning:
Chrome and Firefox do not handle the angles the same way, so on some axes the direction are reversed. Processing motion events Motion events are handled the same way as the orientation events except that they have their own event's name: devicemotion window.addEventListener("devicemotion", handleMotion, true); What's really changed are the information provided within the DeviceMotionEvent object pa...
DeviceMotionEvent - Web APIs
Take care about this while using them. Constructor DeviceMotionEvent.DeviceMotionEvent() Creates a new DeviceMotionEvent. Properties DeviceMotionEvent.accelerationRead only An object giving the acceleration of the device on the three axis X, Y and Z. Acceleration is expressed in m/s2. ...
DeviceOrientationEvent - Web APIs
Take care about this while using them. Constructor DeviceOrientationEvent.DeviceOrientationEvent() Creates a new DeviceOrientationEvent. Properties DeviceOrientationEvent.absolute Read only A boolean that indicates whether or not the device is providing orientation data absolutely. ...
Document.applets - Web APIs
Since then, calling document.applets in those browsers always returns an empty HTMLCollection. Removal is being considered in WebKit and Edge. Syntax var nodeList = document.applets; Value An HTMLCollection. Example // When you know the second applet is the one you want my_java_app = document.applets[1]; Specifications Specification Status Comment HTML Living StandardThe definition of 'Document.applets' in that specification. ...
Document.createDocumentFragment() - Web APIs
or to create a new fragment: let fragment = new DocumentFragment(); Example This example creates a list of major web browsers in a DocumentFragment, then adds the new DOM subtree to the document to be displayed. HTML <ul id="ul"> </ul> JavaScript var element = document.getElementById('ul'); // assuming ul exists var fragment = document.createDocumentFragment(); var browsers = ['Firefox', '
Chrome', 'Opera', 'Safari', 'Internet Explorer']; browsers.forEach(function(browser) { var li = document.createElement('li'); li.textContent = browser; fragment.appendChild(li); }); element.appendChild(fragment); Result Specifications Specification Status Comment DOMThe definition of 'Document.createDocumentFragment()' in that specification. Living ...
Document.createElement() - Web APIs
= document.createElement(tagName[, options]); Parameters tagName A string that specifies the type of element to be created. The nodeName of the created element is initialized with the value of tagName. Don't use qualified names (like "html:a") with this method. When called on an HTML document, createElement() converts tagName to lower case before creating the element. In Firefox, Opera, and
Chrome, createElement(null) works like createElement("null"). options Optional An optional ElementCreationOptions object, containing a single property named is, whose value is the tag name of a custom element previously defined via customElements.define(). See Web component example for more details. Return value The new Element. Examples Basic example This creates a new <div> and inserts it befo...
Document.open() - Web APIs
Starting with Gecko 1.9, this method is subject to the same same-origin policy as other properties, and does not work if doing so would change the document's origin. Starting with Gecko 1.9.2, document.open() uses the principal of the document whose URI it uses, instead of fetching the principal off the stack. As a result, you can no longer call document.write() into an untrusted document from
chrome, even using wrappedJSObject. See Security check basics for more about principals. Three-argument document.open() There is a lesser-known and little-used three-argument version of document.open() , which is an alias of Window.open() (see its page for full details). This call, for example opens github.com in a new window, with its opener set to null: document.open('https://www.github.com','', '...
Document.write() - Web APIs
in the W3C XHTML FAQ. Note: Using document.write() in deferred or asynchronous scripts will be ignored and you'll get a message like "A call to document.write() from an asynchronously-loaded external script was ignored" in the error console. Note: In Edge only, calling document.write() more than once in an <iframe> causes the error "SCRIPT70: Permission denied". Note: Starting with version 55,
Chrome will not execute <script> elements injected via document.write() when specific conditions are met. For more information, refer to Intervening against document.write(). Specifications Specification Status Comment HTML Living StandardThe definition of 'document.write(...)' in that specification. Living Standard Document Object Model (DOM) Level 2 HTML S...
DocumentOrShadowRoot.nodeFromPoint() - Web APIs
Syntax var node = document.nodeFromPoint(x, y); Parameters x A double representing the horizontal coordinate of a point. y A double representing the vertical coordinate of a point. Returns A Node object. ...
Element.setAttribute() - Web APIs
ibute() is used to set attributes on a <button>. HTML <button>Hello World</button> JavaScript var b = document.querySelector("button"); b.setAttribute("name", "helloButton"); b.setAttribute("disabled", ""); This demonstrates two things: The first call to setAttribute() above shows changing the name attribute's value to "helloButton". You can see this using your browser's page inspector (
Chrome, Edge, Firefox, Safari). To set the value of a Boolean attribute, such as disabled, you can specify any value. An empty string or the name of the attribute are recommended values. All that matters is that if the attribute is present at all, regardless of its actual value, its value is considered to be true. The absence of the attribute means its value is false. By setting the value of the disabl...
Element - Web APIs
Returns a String with the name of the tag for the given element. Element.undoManager Read only Returns the UndoManager associated with the element. Element.undoScope Is a Boolean indicating if the element is an undo scope host, or not. Note: DOM Level 3 defined namespaceURI, localName and prefix on the Node interface. In DOM4 they were moved to Element. This change is implemented in
Chrome since version 46.0 and Firefox since version 48.0. Properties included from Slotable The Element interface includes the following property, defined on the Slotable mixin. Slotable.assignedSlotRead only Returns a HTMLSlotElement representing the <slot> the node is inserted in. Event handlers Element.onfullscreenchange An event handler for the fullscreenchange event, which is sent whe...
EventSource - Web APIs
s like social media status updates, news feeds, or delivering data into a client-side storage mechanism like IndexedDB or web storage. When not used over HTTP/2, SSE suffers from a limitation to the maximum number of open connections, which can be specially painful when opening various tabs as the limit is per browser and set to a very low number (6). The issue has been marked as "Won't fix" in
Chrome and Firefox. This limit is per browser + domain, so that means that you can open 6 SSE connections across all of the tabs to www.example1.com and another 6 SSE connections to www.example2.com. (from Stackoverflow). When using HTTP/2, the maximum number of simultaneous HTTP streams is negotiated between the server and the client (defaults to 100). Constructor EventSource() Creates a new Even...
EventTarget.removeEventListener() - Web APIs
m the event target. options Optional An options object that specifies characteristics about the event listener. The available options are: capture: A Boolean which indicates that events of this type will be dispatched to the registered listener before being dispatched to any EventTarget beneath it in the DOM tree. mozSystemGroup: Available only in code running in XBL or in Firefox'
chrome, it is a Boolean defining if the listener is added to the system group. useCapture Optional Specifies whether the EventListener to be removed is registered as a capturing listener or not. If this parameter is absent, a default value of false is assumed. If a listener is registered twice, one with capture and one without, remove each one separately. Removal of a capturing listener does not ...
EventTarget - Web APIs
er-events: all;} Constructor EventTarget() Creates a new EventTarget object instance. Methods EventTarget.addEventListener() Registers an event handler of a specific event type on the EventTarget. EventTarget.removeEventListener() Removes an event listener from the EventTarget. EventTarget.dispatchEvent() Dispatches an event to this EventTarget. Additional methods in Mozilla
chrome codebase Mozilla includes a couple of extensions for use by JS-implemented event targets to implement onevent properties. See also WebIDL bindings. void setEventHandler(DOMString type, EventHandler handler) EventHandler getEventHandler(DOMString type) Example Simple implementation of EventTarget var EventTarget = function() { this.listeners = {}; }; EventTarget.prototype.listener...
ExtendableEvent - Web APIs
cessfully. The promise resolves when all resources have been fetched and cached, or else when any exception occurs. The code snippet also shows a best practice for versioning caches used by the service worker. Though there's only one cache in this example, the same approach can be used for multiple caches. It maps a shorthand identifier for a cache to a specific, versioned cache name. Note: In
Chrome, logging statements are visible via the "Inspect" interface for the relevant service worker accessed via
chrome://serviceworker-internals. var CACHE_VERSION = 1; var CURRENT_CACHES = { prefetch: 'prefetch-cache-v' + CACHE_VERSION }; self.addEventListener('install', function(event) { var urlsToPrefetch = [ './static/pre_fetched.txt', './static/pre_fetched.html', 'https://www.chr...
Fetch API - Web APIs
te session using fetch. Set-Cookie headers from other sites are silently ignored. fetch() won't send cookies, unless you set credentials: 'same-origin'. In August 2017, the spec changed the default credentials policy to 'same-origin'. The following browsers shipped and outdated native fetch, and were updated in these versions: Firefox version 61.0b13. Safari version 12.
Chrome version 68. If you are targetting older versions of these browsers, be sure to include credentials: 'same-origin' init option on all api requests that may be affected by cookies/user login state. Note: Find out more about using the Fetch API features in Using Fetch, and study concepts in Fetch basic concepts. Aborting a fetch Browsers have started to add experimental suppor...
FileError - Web APIs
g troubleshooting. Don't run your app from file:// For security reasons, browsers do not allow you to run your app from file://. In fact, many of the powerful storage APIs (such as File System, BlobBuilder, and FileReader) throw errors if you run the app locally from file://. When you're just testing your app, and you don't want to set up a web server, you can bypass the security restriction on
Chrome. Just start
Chrome with the --allow-file-access-from-files flag. Use the flag only for testing purposes. Attribute Attribute Type Description code unsigned short The most appropriate error code for the condition. See Error codes for possible values. Error codes Note: Do not rely on the numeric values of the constants, which might change as the specifica...
FileReader.error - Web APIs
The FileReader error property returns the error that occurred while reading the file. Syntax var error = instanceOfFileReader.error Value A DOMError containing the relevant error. In
Chrome 48+/Firefox 58+ this property returns a DOMException because DOMError has been removed from the DOM standard. Specifications Specification Status Comment File APIThe definition of 'FileReader: error' in that specification. Working Draft Initial definition ...
FileSystemEntrySync - Web APIs
ntries API (otherwise known as the File System API) but you should try to avoid using it. Basic concepts The FileSystemEntrySync interface includes methods that you would expect for manipulating files and directories, but it also include a really handy method for getting a URL of the entry: toURL(). It also introduces a new URL scheme: filesystem:. You can use the filesystem: scheme on Google
Chrome to see all the files and folders that are stored in the origin of your app. Just use filesystem: scheme for the root directory of the origin of the app. For example, if your app is in http://ww.html5rocks.com, open filesystem:http://www.html5rocks.com/temporary/ in a tab.
Chrome shows a read-only list of all the files and folders stored the origin of your app. Method overview Metadata ...
Using FormData Objects - Web APIs
Submitting forms and uploading files via AJAX without FormData objects If you want to know how to serialize and submit a form via AJAX without using FormData objects, please read this paragraph. ...
Gamepad.buttons - Web APIs
many modern gamepads. The values are normalized to the range 0.0 - 1.0, with 0.0 representing a button that is not pressed, and 1.0 representing a button that is fully pressed. Syntax readonly attribute GamepadButton[] buttons; Example The following code is taken from my Gamepad API button demo (you can view the demo live, and find the source code on Github.) Note the code fork -- in
Chrome Navigator.getGamepads needs a webkit prefix and the button values are stores as an array of double values, whereas in Firefox Navigator.getGamepads doesn't need a prefix, and the button values are stored as an array of GamepadButton objects; it is the GamepadButton.value or GamepadButton.pressed properties of these we need to access, depending on what type of buttons they are. In this simple exam...
HTMLAudioElement - Web APIs
Basic usage You can create a HTMLAudioElement entirely with JavaScript using the Audio() constructor: var audioElement = new Audio('car_horn.wav'); then you can invoke the play() method on the element audioElement.play(); A common gotcha is trying to play an audio element immediately on page load. Modern browser's default autoplay policy will block that from happening. Refer to firefox and
chrome for best practices and work arounds. Some of the more commonly used properties of the audio element include src, currentTime, duration, paused, muted, and volume. This snippet copies the audio file's duration to a variable: var audioElement = new Audio('car_horn.wav'); audioElement.addEventListener('loadeddata', () => { let duration = audioElement.duration; // The duration variable now hol...
HTMLCanvasElement.mozFetchAsStream() - Web APIs
when ready, would provide the contents of the canvas as image data. However, this non-standard and internal method has been removed. Syntax void canvas.mozFetchAsStream(callback, type); Parameters callback An nsIInputStreamCallback. type Optional A DOMString indicating the image format. The default type is image/png. Return value None. Examples Save to disk with mozFetchAsStream (
Chrome context only) This technique also converts it to ico, however it will not work in Windows XP as WinXP cannot convert from PNG to ICO. It saves to the desktop it uses FileUtils.jsm. Also uses NetUtil.jsm var canvas = document.getElementById('canvas'); var d = canvas.width; ctx = canvas.getContext('2d'); ctx.beginPath(); ctx.moveTo(d / 2, 0); ctx.lineTo(d, d); ctx.lineTo(0, d); ctx.closePath(); c...
HTMLCanvasElement.toDataURL() - Web APIs
ng a representation of the image in the format specified by the type parameter (defaults to PNG). The returned image is in a resolution of 96 dpi. If the height or width of the canvas is 0 or larger than the maximum canvas size, the string "data:," is returned. If the requested type is not image/png, but the returned value starts with data:image/png, then the requested type is not supported.
Chrome also supports the image/webp type. Syntax canvas.toDataURL(type, encoderOptions); Parameters type Optional A DOMString indicating the image format. The default format type is image/png. encoderOptions Optional A Number between 0 and 1 indicating the image quality to use for image formats that use lossy compression such as image/jpeg and image/webp. If this argument is anything else, t...
HTMLElement.dir - Web APIs
e has its dir set to "rtl", the column order is arranged from right to left. When an element has its dir set to "auto", the direction of the element is determined based on its first strong directionality character, or default to the directionality of its parent element. Browsers might allow users to change the directionality of <input> and <textarea>s in order to assist with authoring content.
Chrome and Safari provide a directionality option in the contextual menu of input fields while Internet Explorer and Edge use the key combinations Ctrl + Left Shift and Ctrl + Right Shift. Firefox uses Ctrl/Cmd + Shift + X but does NOT update the dir attribute value. Syntax var currentWritingDirection = elementNodeReference.dir; elementNodeReference.dir = newWritingDirection; currentWritingDirect...
HTMLInputElement.setSelectionRange() - Web APIs
as set by the user clicking and dragging from the end of the selected text toward the beginning. This method updates the HTMLInputElement.selectionStart, selectionEnd, and selectionDirection properties in one call. Note that accordingly to the WHATWG forms spec selectionStart, selectionEnd properties and setSelectionRange method apply only to inputs of types text, search, URL, tel and password.
Chrome, starting from version 33, throws an exception while accessing those properties and method on the rest of input types. For example, on input of type number: "Failed to read the 'selectionStart' property from 'HTMLInputElement': The input element's type ('number') does not support selection". If you wish to select all text of an input element, you can use the HTMLInputElement.select() method inst...
Recommended Drag Types - Web APIs
gged only by their URLs. To do this, use the text/uri-list type as with other URLs. The data should be the URL of the image, or a data: URI if the image is not stored on a web site or disk. As with links, the data for the text/plain type should also contain the URL. However, a data: URL is not usually useful in a text context, so you may wish to exclude the text/plain data in this situation. In
chrome or other privileged code, you may also use the image/jpeg, image/png or image/gif types, depending on the type of image. The data should be an object which implements the nsIInputStream interface. When this stream is read, it should provide the data bits for the image, as if the image was a file of that type. You should also include the application/x-moz-file type if the image is located on disk...
ImageCapture.getPhotoCapabilities() - Web APIs
The getPhotoCapabilities() method of the ImageCapture interface returns a Promise that resolves with a PhotoCapabilities object containing the ranges of available configuration options. Syntax const capabilitiesPromise = imageCaptureObj.getPhotoCapabilities() Return value A Promise that resolves with a PhotoCapabilities object. Example The following example, extracted from
Chrome's Image Capture / Photo Resolution Sample, uses the results from getPhotoCapabilities() to modify the size of an input range. This example also shows how the ImageCapture object is created using a MediaStreamTrack retrieved from a device's MediaStream. const input = document.querySelector('input[type="range"]'); var imageCapture; navigator.mediaDevices.getUserMedia({video: true}) .then(mediaStream => { docu...
ImageCapture.getPhotoSettings() - Web APIs
er agent selects the closest width value to this setting if it only supports discrete heights. imageWidth: The desired image width as an integer. The user agent selects the closest width value to this setting if it only supports discrete widths. redEyeReduction: A boolean indicating whether the red-eye reduction should be used if it is available. Example The following example, extracted from
Chrome's Image Capture / Photo Resolution Sample, uses the results from getPhotoSettings() to modify the size of an input range. This example also shows how the ImageCapture object is created using a MediaStreamTrack retrieved from a device's MediaStream. const input = document.querySelector('input[type="range"]'); var imageCapture; navigator.mediaDevices.getUserMedia({video: true}) .then(mediaStream...
ImageCapture - Web APIs
PhotoCapabilities object containing the ranges of available configuration options. ImageCapture.getPhotoSettings() Returns a Promise that resolves with a PhotoSettings object containing the current photo configuration settings. ImageCapture.grabFrame() Takes a snapshot of the live video in a MediaStreamTrack, returning an ImageBitmap, if successful. Example The following code is taken from
Chrome's Grab Frame - Take Photo Sample. Since ImageCapture requires some place to capture an image from, the example below starts with a device's media device (in other words a camera). This example shows, roughly, a MediaStreamTrack extracted from a device's MediaStream. The track is then used to create an ImageCapture object so that takePhoto() and grabFrame() can be called. Finally, it shows how to...
Basic concepts - Web APIs
QL. In addition, be aware that browsers can wipe out the database, such as in the following conditions: The user requests a wipe out. Many browsers have settings that let users wipe all data stored for a given website, including cookies, bookmarks, stored passwords, and IndexedDB data. The browser is in private browsing mode. Some browsers, have "private browsing" (Firefox) or "incognito" (
Chrome) modes. At the end of the session, the browser wipes out the database. The disk or quota limit has been reached. The data is corrupt. An incompatible change is made to the feature. The exact circumstances and browser capabilities change over time, but the general philosophy of the browser vendors is to make the best effort to keep the data when possible. Next steps With these big concepts ...
InstallEvent - Web APIs
s when all resources have been fetched and cached, or when any exception occurs. The code snippet also shows a best practice for versioning caches used by the service worker. Although this example has only one cache, you can use this approach for multiple caches. The code maps a shorthand identifier for a cache to a specific, versioned cache name. Note: Logging statements are visible in Google
Chrome via the "Inspect" interface for the relevant service worker accessed via
chrome://serviceworker-internals. var CACHE_VERSION = 1; var CURRENT_CACHES = { prefetch: 'prefetch-cache-v' + CACHE_VERSION }; self.addEventListener('install', function(event) { var urlsToPrefetch = [ './static/pre_fetched.txt', './static/pre_fetched.html', 'https://www.chromium.org/_/rsrc/1302286216006/c...
InstallTrigger - Web APIs
enabled Indicates whether or not Software Installation is enabled for this client machine. getVersion Returns an object representing the version number from the Client Version Registry for the specified component. It is used in both trigger scripts and installation scripts. install Installs one or more XPI files on the local machine. install
Chrome Installs new skin or locale packages in Netscape 6 and Mozilla. startSoftwareUpdate Triggers the downloading and installation of the software at the specified URL. ...
LocalFileSystem - Web APIs
hod lets you ask for PERSISTENT or TEMPORARY storage. Persistent storage is storage that stays in the browser unless the app or the user removes it, but the user must grant you permission before you can use it. In contrast, temporary storage is automatically granted without any user permission, but it can be expunged by the browser at any time. To use PERSISTENT storage with the File System API,
Chrome exposes a requestQuota API. So to request storage, you need to do something like the following: var requestedBytes = 1024*1024*10; // 10MB navigator.webkitPersistentStorage.requestQuota ( requestedBytes, function(grantedBytes) { window.requestFileSystem(PERSISTENT, grantedBytes, onInitFs, errorHandler); }, function(e) { console.log('Error', e); } ); Your user must grant your...
MIDIMessageEvent - Web APIs
or a slider is moved. Constructor MIDIMessageEvent.MIDIMessageEvent Creates a new MIDIMessageEvent object instance. Properties MIDIConnectionEvent.data A Uint8Array containing the data bytes of a single MIDI message. See the MIDI specification for more information on its form. Note: Even though the Web MIDI API specifies a receivedTime property that returns a DOMHighResTimeStamp,
Chrome (the only implementation at the time of writing) does not support that property since the basic Event.timeStamp property already returns a DOMHighResTimeStamp in
Chrome. Examples // Printing all messages to console navigator.requestMIDIAccess().then(midiAccess => { Array.from(midiAccess.inputs).forEach(input => { input[1].onmidimessage = console.log; }) }); Specifications Sp...
MediaSettingsRange - Web APIs
idth. A PhotoCapabilities object can be retrieved by calling ImageCapture.PhotoCapabilities(). Properties MediaSettingsRange.max Returns the maximum value of this settings. MediaSettingsRange.min Returns the minimum value of this setting. MediaSettingsRange.step Returns the minimum difference between consecutive values of this setting. Example The following example, extracted from
Chrome's Image Capture / Photo Resolution Sample, uses the results from getPhotoCapabilities().imageWidth to modify the size of an input range. const input = document.querySelector('input[type="range"]'); var imageCapture; navigator.mediaDevices.getUserMedia({video: true}) .then(mediaStream => { document.querySelector('video').srcObject = mediaStream; const track = mediaStream.getVideoTracks()...
MediaStream.getVideoTracks() - Web APIs
order of the tracks is not defined by the specification, and may not be the same from one call to getVideoTracks() to another. Early versions of this API included a special VideoStreamTrack interface which was used as the type for each entry in the list of video streams; however, this has since been merged into the main MediaStreamTrack interface. Example The following example, extracted from
Chrome's Image Capture / Photo Resolution Sample, uses getVideoTracks() to retrieve a track for passing to the ImageCapture() constructor. var imageCapture; navigator.mediaDevices.getUserMedia({video: true}) .then(mediaStream => { document.querySelector('video').srcObject = mediaStream; const track = mediaStream.getVideoTracks()[0]; imageCapture = new ImageCapture(track); return imageCaptur...
MediaStream Image Capture API - Web APIs
ut device capabilities such as image size, red-eye reduction and whether or not there is a flash and what they are currently set to. Conversely, the API allows the capabilities to be configured within the constraints what the device allows. MediaStream image capture concepts and usage The process of retrieving an image or video stream happens as described below. The example code is adapted from
Chrome's Image Capture examples. First, get a reference to a device by calling MediaDevices.getUserMedia(). The example below simply says give me whatever video device is available, though the getUserMedia() method allows more specific capabilities to be requested. This method returns a Promise that resolves with a MediaStream object. navigator.mediaDevices.getUserMedia({ video: true }) .then(mediaS...
Transcoding assets for Media Source Extensions - Web APIs
If you wish to employ adaptive bitrate streaming, you'll have to create encodings at multiple resolutions. While MSE is flexible enough to allow you to make your implementation, it's highly recommended to use an existing DASH cli...
MutationEvent - Web APIs
rvers (W3C DOM4). Preface The mutation events have been marked as deprecated in the DOM Events specification, as the API's design is flawed (see details in the "DOM Mutation Events Replacement: The Story So Far / Existing Points of Consensus" post to public-webapps). Mutation Observers are the proposed replacement for mutation events in DOM4. They are expected to be included in Firefox 14 and
Chrome 18. The practical reasons to avoid the mutation events are performance issues and cross-browser support. Performance Adding DOM mutation listeners to a document profoundly degrades the performance of further DOM modifications to that document (making them 1.5 - 7 times slower!). Moreover, removing the listeners does not reverse the damage. The performance effect is limited to the documents th...
Navigator.cookieEnabled - Web APIs
false. Note: When the browser is configured to block third-party cookies, and navigator.cookieEnabled is invoked inside a third-party iframe, it returns true in Safari, Edge Spartan and IE (while trying to set a cookie in such scenario would fail). It returns false in Firefox and Chromium-based browsers. Note: Web browsers may prevent writing certain cookies in certain scenarios. For example,
Chrome 80+ does not allow creating cookies with SameSite=None attribute, unless they are created over HTTPS and with Secure attribute. Example if (!navigator.cookieEnabled) { // The browser does not support or is blocking cookies from being set. } Specifications Specification Status Comment HTML Living StandardThe definition of 'Navigator.cookieEnabled' in that specifi...
Navigator.oscpu - Web APIs
Specifications Specification Status Comment HTML Living StandardThe definition of 'NavigatorID: oscpu' in that specification. Living Standard Initial definition ...
Navigator.productSub - Web APIs
d number of the current browser. Syntax prodSub = window.navigator.productSub prodSub is a string. Example <script> function prodsub() { var dt = document.getElementById("d").childNodes[0]; dt.data = window.navigator.productSub; } </script> <button onclick="prodsub();">productSub</button> // returns: 20010725 Notes On IE, this property returns undefined. On Apple Safari and Google
Chrome this property always returns 20030107. Specifications Specification Status Comment HTML Living StandardThe definition of 'NavigatorID: productSub' in that specification. Living Standard Initial definition ...
NavigatorID.platform - Web APIs
the platform on which the browser is running, or an empty string if the browser declines to (or is unable to) identify the platform. platform is a string that must be an empty string or a string representing the platform on which the browser is executing. For example: "MacIntel", "Win32", "FreeBSD i386", "WebTV OS" Example console.log(navigator.platform); Usage notes Most browsers, including
Chrome, Edge, and Firefox 63 and later, return "Win32" even if running on a 64-bit version of Windows. Internet Explorer and versions of Firefox prior to version 63 still report "Win64". Specifications Specification Status Comment HTML Living StandardThe definition of 'NavigatorID.platform' in that specification. Living Standard Initial definition. ...
Online and offline events - Web APIs
he .ononline or .onoffline properties on document or document.body to a JavaScript Function object. (Note: using window.ononline or window.onoffline will not work for compatibility reasons.) by specifying ononline="..." or onoffline="..." attributes on the <body> tag in the HTML markup. Example There's a simple test case that you can run to verify that the events are working (does not work in
Chrome due to attaching the event listener to document.body). Here's the JavaScript part: window.addEventListener('load', function() { var status = document.getElementById("status"); var log = document.getElementById("log"); function updateOnlineStatus(event) { var condition = navigator.onLine ? "online" : "offline"; status.className = condition; status.innerHTML = condition.toUppe...
NavigatorPlugins.plugins - Web APIs
x) and namedItem("name") methods. Examples The following example function returns the version of the Shockwave Flash plugin. function getFlashVersion() { var flash = navigator.plugins.namedItem('Shockwave Flash'); if (typeof flash != 'object') { // flash is not present return undefined; } if(flash.version){ return flash.version; } else { //No version property (e.g. in
Chrome) return flash.description.replace(/Shockwave Flash /,""); } } The following example displays information about the installed plugin(s). var pluginsLength = navigator.plugins.length; document.body.innerHTML = pluginsLength + " Plugin(s)<br>" + '<table id="pluginTable"><thead>' +'<tr><th>Name</th><th>Filename</th><th>description</th><th>version</th></tr>' +'</thead><tbody></tbody></...
NetworkInformation.downlink - Web APIs
megabits per second, rounded to the nearest multiple of 25 kilobits per seconds. This value is based on recently observed application layer throughput across recently active connections, excluding connections made to a private address space. In the absence of recent bandwidth measurement data, the attribute value is determined by the properties of the underlying connection technology. Note that
Chrome-based browsers do not conform to the specification, and arbitrarily cap the reported downlink at a maximum of 10 Mbps as an anti-fingerprinting measure. Similar caps exist for the reported latency. Syntax var downLink = NetworkInformation.downlink Value A double. Specifications Specification Status Comment Network Information APIThe definition of 'downlink' in that s...
Node.getRootNode() - Web APIs
ode = node.getRootNode(); This more complex example shows the difference between returning a normal root, and a root incuding the shadow root. ...
Node.nodePrincipal - Web APIs
This feature is obsolete. Although it may still work in some browsers, its use is discouraged since it could be removed at any time. Try to avoid using it. The Node.nodePrincipal read-only property returns the nsIPrincipal object representing current security context of the node. Note: This property exists on all nodes (HTML, SVG, MathML, XUL, etc.), but only if the script trying to use it has
chrome privileges. Syntax principalObj = Node.nodePrincipal Value An nsIPrincipal object representing the node's security context. Notes This property is read-only; attempting to write to it will throw an exception. In addition, this property may only be accessed from privileged code. Specifications Not in any specification. This is a Firefox-specific property. ...
Notification.requestPermission() - Web APIs
stPermission().then(function (permission) { // If the user accepts, let's create a notification if (permission === "granted") { var notification = new Notification("Hi there!"); } }); } // At last, if the user has denied notifications, and you // want to be respectful there is no need to bother them any more. } We no longer show a live sample on this page, as
Chrome and Firefox no longer allow notification permissions to be requested from cross-origin <iframe>s, with other browsers to follow. To see a example in action, check out our To-do list example (also see the app running live.) Note: In the above example we spawn notifications in response to a user gesture (clicking a button). This is not only best practice -- you should not be spamming users with n...
Notification - Web APIs
stPermission().then(function (permission) { // If the user accepts, let's create a notification if (permission === "granted") { var notification = new Notification("Hi there!"); } }); } // At last, if the user has denied notifications, and you // want to be respectful there is no need to bother them any more. } We no longer show a live sample on this page, as
Chrome and Firefox no longer allow notification permissions to be requested from cross-origin <iframe>s, with other browsers to follow. To see a example in action, check out our To-do list example (also see the app running live.) Note: In the above example we spawn notifications in response to a user gesture (clicking a button). This is not only best practice -- you should not be spamming users with n...
Payment processing concepts - Web APIs
ecifics of the service, and a given processing service may have multiple URLs used, depending on the version of their API, their communication technology, and so forth. https://apple.com/apple-pay Payments are handled using the Apple Pay service. Currently, Apple Pay is only supported by Safari. https://google.com/pay Payments are processed by Google Pay. This is currently supported only by
Chrome and Chromium-based browsers. Functions of a payment handler A user agent may provide built-in support for certain types of payments. In addition, the Payment Handler API can be used to establish support for additional payment method providers, in browsers that support it. In either case, the payment handler is responsible for: Making sure a payment can be made. The conditions that make paym...
Performance - Web APIs
about the operations included in the times listed in timing, including whether the page was a load or a refresh, how many redirections occurred, and so forth. Not available in workers. Performance.timing Read only A legacy PerformanceTiming object containing latency-related performance information. Not available in workers. Performance.memory Read only A non-standard extension added in
Chrome, this property provides an object with basic memory usage information. You should not use this non-standard API. Performance.timeOrigin Read only Returns the high resolution timestamp of the start time of the performance measurement. Methods The Performance interface doesn't inherit any methods. Performance.clearMarks() Removes the given mark from the browser's performance entry buffe...
PerformanceObserverEntryList.getEntries() - Web APIs
ry, having the following fields: "name", the name of a performance entry. "entryType", the entry type. The valid entry types are listed in the PerformanceEntry.entryType method. "initiatorType", the type of the initiating resource (for example an HTML element). The values are defined by the PerformanceResourceTiming.initiatorType interface. This parameter is currently not supported on
Chrome or Opera. Return value A list of explicitly observed PerformanceEntry objects that meets the criteria of the filter. The items will be in chronological order based on the entries' startTime. If no objects that meet the filter are found, an empty list is returned. If no argument is given, all entries are returned. Example function print_perf_entry(pe) { console.log("name: " + pe.name...
Pointer Lock API - Web APIs
u cannot try to lock another iframe and transfer the target to it; pointer lock will error out. To avoid this limitation, first unlock the locked iframe, and then lock the other. While iframes work by default, "sandboxed" iframes block Pointer lock. The ability to avoid this limitation, in the form of the attribute/value combination <iframe sandbox="allow-pointer-lock">, is expected to appear in
Chrome soon. Specifications Specification Status Comment Pointer Lock Candidate Recommendation Initial specification. ...
PopStateEvent - Web APIs
event is only triggered by doing a browser action such as a clicking on the back button (or calling history.back() in JavaScript). And the event is only triggered when the user navigates between two history entries for the same document. Note: Browsers used to handle the popstate event differently on page load, but now they behave the same. Firefox never emitted a popstate event on page load.
Chrome did until version 34, while Safari did until version 10.0. Syntax window.onpopstate = funcRef; funcRef is a handler function. The popstate event As an example, a page at http://example.com/example.html running the following code will generate alerts as indicated: window.onpopstate = function(event) { alert("location: " + document.location + ", state: " + JSON.stringify(event.state));...
PublicKeyCredential.getClientExtensionResults() - Web APIs
edential.getClientExtensionResults() Parameters None. Return value An ArrayBuffer containing the result of the processing of the different extensions by the client. This object contains a map between the extensions' identifiers and their results from the processing. Warning! As of March 2019, only appId (used during creation with PublicKeyCredentialRequestOptions.extensions) is supported by
Chrome and Edge. Firefox does not seem to support any extension. Examples var publicKey = { // Here are the extensions (as "inputs") extensions: { "loc": true, // This extension has been defined to include location information in attestation "uvi": true // user verification index: how the user was verified }, challenge: new Uint8Array(16) /* from the server */, rp: { name: "Exa...
PublicKeyCredentialCreationOptions.extensions - Web APIs
entialRequestOptions.extensions. Syntax extensions = publicKeyCredentialCreationOptions.extensions Value An object with various keys and values. Here is the current (as of March 2019) list of potential extensions which may be used during the registration operation. Warning! As of June 2020, only appId (used during creation with PublicKeyCredentialRequestOptions.extensions) is supported by
Chrome and Edge. Firefox does not seem to support any extension. Also
Chrome doesn't plan to support any other extension in future Extension identifier Type Description authnSel Array of BufferSource Authenticator selection. Restricts the list of authenticator models which may be used. If no matching authenticator is available, the credential is still generated with a...
PublicKeyCredentialRequestOptions.extensions - Web APIs
e creation operation (navigators.credentials.create()), see PublicKeyCredentialCreationOptions.extensions. Syntax extensions = publicKeyCredentialRequestOptions.extensions Value An object with various keys and values. Here is the current (as of March 2019) list of potential extensions which may be used during the registration operation. Warning! As of June 2020, only appid is supported by
Chrome and Edge. Firefox does not seem to support any extension. Also
Chrome doesn't plan to support any other extension in future Extension identifier Type Description appid USVString FIDO appID. An appID which was used with legacy FIDO JS APIs to identify the current relying party. txAuthSimple USVString Simple transaction authorization. This text is ...
PushManager.subscribe() - Web APIs
server will use to authenticate your application server. If specified, all messages from your application server must use the VAPID authentication scheme, and include a JWT signed with the corresponding private key. This key IS NOT the same ECDH key that you use to encrypt the data. For more information, see "Using VAPID with WebPush". Note: This parameter is required in some browsers like
Chrome and Edge. Returns A Promise that resolves to a PushSubscription object. Example this.onpush = function(event) { console.log(event.data); // From here we can write the data to IndexedDB, send it to any open // windows, display a notification, etc. } navigator.serviceWorker.register('serviceworker.js'); // Use serviceWorker.ready to ensure that you can subscribe for push navigator.
Push API - Web APIs
ult in increased resource usage, particularly of the battery. Different browsers have different schemes for handling this, there is currently no standard mechanism. Firefox allows a limited number (quota) of push messages to be sent to an application, although Push messages that generate notifications are exempt from this limit. The limit is refreshed each time the site is visited. In comparison,
Chrome applies no limit, but requires that every push message causes a notification to be displayed. Note: As of Gecko 44, the allowed quota of push messages per application is not incremented when a new notification fires, when another is still visible, for a period of three seconds. This handles cases where a burst of Push messages is received, and not all generate a visible notification. Note: C...
RTCPeerConnection.addStream() - Web APIs
ode to instead use the addTrack() method: navigator.getUserMedia({video:true, audio:true}, function(stream) { var pc = new RTCPeerConnection(); stream.getTracks().forEach(function(track) { pc.addTrack(track, stream); }); }); The newer addTrack() API avoids confusion over whether later changes to the track-makeup of a stream affects a peer connection (they do not). The exception is in
Chrome, where addStream() does make the peer connection sensitive to later stream changes (though such changes do not fire the negotiationneeded event). If you are relying on the
Chrome behavior, note that other browsers do not have it. You can write web compatible code using feature detection instead: // Add a track to a stream and the peer connection said stream was added to: stream.addTrack(track);...
SVGAnimationElement: repeatEvent event - Web APIs
time the element repeats, after the first iteration. Note: Associated with the repeatEvent event is an integer that indicates which repeat iteration is beginning; this can be found in the detail property of the event object. The value is a 0-based integer, but the repeat event is not raised for the first iteration and so the observed values will be >= 1. This is supported in Firefox, but not in
Chrome. Bubbles No Cancelable No Interface TimeEvent Event handler property onrepeat Examples Animated circle <svg xmlns="http://www.w3.org/2000/svg" width="300px" height="100px"> <title>SVG SMIL Animate with Path</title> <circle cx="0" cy="50" r="50" fill="blue" stroke="black" stroke-width="1"> <animateMotion path="M 0 0 H 300 Z"...
Screen - Web APIs
screen orientation (only works in fullscreen or for installed apps) Methods inherited from EventTarget: EventTarget.addEventListener() Registers an event handler of a specific event type on the EventTarget. EventTarget.removeEventListener() Removes an event listener from the EventTarget. EventTarget.dispatchEvent() Dispatches an event to this EventTarget. Additional methods in Mozilla
chrome codebase Mozilla includes a couple of extensions for use by JS-implemented event targets to implement onevent properties. See also WebIDL bindings. void setEventHandler(DOMString type, EventHandler handler) EventHandler getEventHandler(DOMString type) Example if (screen.pixelDepth < 8) { // use low-color version of page } else { // use regular, colorful page } Specification ...
Using the Screen Capture API - Web APIs
API and its getDisplayMedia() method to capture part or all of a screen for streaming, recording, or sharing during a WebRTC conference session. Note: It may be useful to note that recent versions of the WebRTC adapter.js shim include implementations of getDisplayMedia() to enable screen sharing on browsers that support it but do not implement the current standard API. This works with at least
Chrome, Edge, and Firefox. Capturing screen contents Capturing screen contents as a live MediaStream is initiated by calling navigator.mediaDevices.getDisplayMedia(), which returns a promise that resolves to a stream containing the live screen contents. Starting screen capture: async/await style async function startCapture(displayMediaOptions) { let captureStream = null; try { captureStre...
Selection - Web APIs
mn from a <table>). However, browsers other than Gecko did not implement multiple ranges, and the specification also requires the selection to always have a single range. Selection and input focus Selection and input focus (indicated by Document.activeElement) have a complex relationship that varies by browser. In cross-browser compatible code, it's better to handle them separately. Safari and
Chrome (unlike Firefox) currently focus the element containing selection when modifying the selection programmatically; it's possible that this may change in the future (see W3C bug 14383 and WebKit bug 38696). Behavior of Selection API in terms of editing host focus changes The Selection API has a common behavior (i.e., shared between browsers) that governs how focus behavior changes for editing host...
Using server-sent events - Web APIs
rver sends a message with the event field set to "ping"; it then parses the JSON in the data field and outputs that information. When not used over HTTP/2, SSE suffers from a limitation to the maximum number of open connections, which can be especially painful when opening multiple tabs, as the limit is per browser and is set to a very low number (6). The issue has been marked as "Won't fix" in
Chrome and Firefox. This limit is per browser + domain, which means that you can open 6 SSE connections across all of the tabs to www.example1.com and another 6 SSE connections to www.example2.com (per Stackoverflow). When using HTTP/2, the maximum number of simultaneous HTTP streams is negotiated between the server and the client (defaults to 100). Sending events from the server The server-side scri...
ShadowRoot.delegatesFocus - Web APIs
The delegatesFocus read-only property of the ShadowRoot interface returns a boolean that indicates whether delegatesFocus was set when the shadow was attached (see Element.attachShadow()). This is currently an experimental non-standard feature, available only in
Chrome. Syntax var df = shadowRoot.delegatesFocus Value A boolean value -- true if the shadow root does delegate focus, false if it doesn't. Examples let customElem = document.querySelector('my-shadow-dom-element'); let shadow = customElem.shadowRoot; ... // Does it delegate focus? let hostElem = shadow.delegatesFocus; Specifications This feature is not currently in a specification. ...
SpeechRecognition - Web APIs
Your audio is sent to a web service for recognition processing, so it won't work offline. Constructor SpeechRecognition.SpeechRecognition() Creates a new SpeechRecognition object. ...
SpeechSynthesis.onvoiceschanged - Web APIs
a speech synthesis application is running. Syntax speechSynthesisInstance.onvoiceschanged = function() { ... }; Examples This could be used to populate a list of voices that the user can choose between when the event fires (see our Speak easy synthesis demo.) Note that Firefox doesn't support it at present, and will just return a list of voices when SpeechSynthesis.getVoices() is fired. With
Chrome however, you have to wait for the event to fire before populating the list, hence the bottom if statement seen below. var voices = []; function populateVoiceList() { voices = synth.getVoices(); for(i = 0; i < voices.length ; i++) { var option = document.createElement('option'); option.textContent = voices[i].name + ' (' + voices[i].lang + ')'; if(voices[i].default) { opt...
Using readable streams - Web APIs
ware of the high-level concepts. If not, we suggest that you first read the Streams concepts and usage overview and dedicated Streams API concepts article, then come back. Note: If you are looking for information on writable streams try Using writable streams instead. Browser support You can consume Fetch Body objects as streams and create your own custom readable streams in Firefox 65+ and
Chrome 42+ (and equivalent Chromium-based browsers). Pipe chains are only supported in
Chrome at the moment, and that functionality is subject to change. Finding some examples We will look at various examples in this article, taken from our dom-examples/streams repo. You can find the full source code there, as well as links to the examples. Consuming a fetch as a stream The Fetch API allows you to f...
Using writable streams - Web APIs
able streams, and are aware of the high-level concepts. If not, we suggest that you first read the Streams concepts and usage overview and dedicated Streams API concepts article, then come back. Note: If you are looking for information about readable streams, try Using readable streams instead. Browser support The Streams API is experimental, and support is at an early stage right now. Only
Chrome currently has basic writable streams implemented. Introducing an example In our dom-examples/streams repo you'll find a Simple writer example (see it live also). This takes a given message and writes it into a writable stream, displaying each chunk on the UI as it is written to the stream and also displaying the whole message on the UI when writing has finished. How writable streams work Let'...
Stylesheet.href - Web APIs
Specifications Specification Status Comment CSS Object Model (CSSOM)The definition of 'StyleSheet: href' in that specification. Working Draft ...
TextEncoder() - Web APIs
The TextEncoder() constructor returns a newly created utf-8 TextEncoder object. Syntax encoder = new TextEncoder(); Parameters TextEncoder() takes no parameters since Firefox 48 and
Chrome 53 Note: Prior to Firefox 48 and
Chrome 53, an encoding type label was accepted as a paramer to the TextEncoder object, since then both browers have removed support for any encoder type other than utf-8, to match the spec. Any type label passed into the TextEncoder constructor will now be ignored and a utf-8 TextEncoder will be created. Exceptions TextEncoder() throws no exceptions since Firefox 48 and
Chrome 53 Note: Prior to Firefox 48 and
Chrome 53 an exception would be thrown for an unknown encoding type. Specifications Specification Status Comment Encoding...
TouchEvent - Web APIs
hich case the earliest Touch in the TouchList gets canceled. Using with addEventListener() and preventDefault() It's important to note that in many cases, both touch and mouse events get sent (in order to let non-touch-specific code still interact with the user). If you use touch events, you should call preventDefault() to keep the mouse event from being sent as well. The exception to this is
Chrome, starting with version 56 (desktop,
Chrome for android, and android webview), where the default value for the passive option for touchstart and touchmove is true and calls to preventDefault() will have no effect. To override this behavior, you need to set the passive option to false, after which calling preventDefault() will work as specified. The change to treat listeners as passive by default p...
Using Touch Events - Web APIs
icle. The pointer event model can simplify an application's input processing since a pointer represents input from any input device. Additionally, the pointer event types are very similar to mouse event types (for example, pointerdown pointerup) thus code to handle pointer events closely matches mouse handling code. The implementation status of pointer events in browsers is relatively high with
Chrome, Firefox, IE11 and Edge having complete implementations. Examples and demos The following documents describe how to use touch events and include example code: Touch Events Overview Implement Custom Gestures Introduction to Touch events in JavaScript Add touch screen support to your website (The easy way) Touch event demonstrations: Paint Program (by Rick Byers) Touch/pointer tests a...
Using WebGL extensions - Web APIs
ext = ( gl.getExtension('OES_vertex_array_object') || gl.getExtension('MOZ_OES_vertex_array_object') || gl.getExtension('WEBKIT_OES_vertex_array_object') ); Note that, vendor prefix have been discouraged more and more and thus most browser implement experimental extensions behind a feature flag rather than vendor prefix. The feature flags are: webgl.enable-draft-extensions in Firefox
chrome://flags/#enable-webgl-draft-extensions in Chromium based browsers (
Chrome, Opera). Naming conventions WebGL extensions are prefixed with "ANGLE", "OES", "EXT" or "WEBGL". These prefixes reflect origin and intent: ANGLE_: Extensions that are written by the ANGLE library authors. OES_ and KHR_: Extensions that mirror functionality from OpenGL ES (OES) or OpenGL API extensions approved by the...
WebGL: 2D and 3D graphics for the web - Web APIs
ce interactive 3D and 2D graphics within any compatible web browser without the use of plug-ins. WebGL does so by introducing an API that closely conforms to OpenGL ES 2.0 that can be used in HTML5 <canvas> elements. This conformance makes it possible for the API to take advantage of hardware graphics acceleration provided by the user's device. Support for WebGL is present in Firefox 4+, Google
Chrome 9+, Opera 12+, Safari 5.1+, Internet Explorer 11+, and Microsoft Edge build 10240+; however, the user's device must also have hardware that supports these features. The WebGL 2 API introduces support for much of the OpenGL ES 3.0 feature set; it's provided through the WebGL2RenderingContext interface. The <canvas> element is also used by the Canvas API to do 2D graphics on web pages. Reference...
Improving compatibility using WebRTC adapter.js - Web APIs
h browser that supports WebRTC, adapter.js implements the needed polyfills, establishes the non-prefixed names of APIs, and applies any other changes needed to make the browser run code written to the WebRTC specification. For example, on Firefox versions older than 38, the adapter adds the RTCPeerConnection.urls property; Firefox doesn't natively support this property until Firefox 38, while on
Chrome, the adapter adds support for the Promise based API is added if it's not present. These are just a couple of examples; there are of course other adjustments made for you by the shim. The WebRTC adapter currently supports Mozilla Firefox, Google
Chrome, Apple Safari, and Microsoft Edge. Using adapter.js In order to use adapter.js, you need to include adapter.js on any page that uses WebRTC APIs...
Writing a WebSocket server in C# - Web APIs
Introduction If you would like to use the WebSocket API, it is useful if you have a server. In this article I will show you how to write one in C#. You can do it in any server-side language, but to keep things simple and more understandable, I chose Microsoft's language. This server conforms to RFC 6455 so it will only handle connections from
Chrome version 16, Firefox 11, IE 10 and over. First steps WebSockets communicate over a TCP (Transmission Control Protocol) connection. Luckily, C# has a TcpListener class which does as the name suggests. It is in the System.Net.Sockets namespace. It is a good idea to include the namespace with the using keyword in order to write less. It allows usage of a namespace's classes without typing the full namespace every time. TcpListener Constr...
Web Animations API Concepts - Web APIs
SVG elements, could not be used from CSS, and was very complex -- often leading to inconsistent implementations. Ten years later, the Safari team introduced the CSS Animations and CSS Transitions specs. The Internet Explorer team requested an animations API to consolidate and normalize animation functionality across all browsers, and thus efforts began in earnest among Mozilla Firefox and Google
Chrome developers to create the one animation spec to rule them all: the Web Animations API. Now we've got the WAAPI for future animation specifications to piggyback on, allowing them to to remain consistent and play well together. It also provides a point of reference all browsers can adhere to with the currently available specs. The Two Models: Timing and Animation The Web Animations API runs on t...
Advanced techniques: Creating and sequencing audio - Web APIs
need to pass real and imaginary values into the BaseAudioContext.createPeriodicWave() method.: let wave = audioCtx.createPeriodicWave(wavetable.real, wavetable.imag); Note: In our example the wavetable is held in a separate JavaScript file (wavetable.js), because there are so many values. It is taken from a repository of wavetables, which can be found in the Web Audio API examples from Google
Chrome Labs. The Oscillator Now we can create an OscillatorNode and set its wave to the one we've created: function playSweep() { let osc = audioCtx.createOscillator(); osc.setPeriodicWave(wave); osc.frequency.value = 440; osc.connect(audioCtx.destination); osc.start(); osc.stop(audioCtx.currentTime + 1); } Controlling amplitude This is great, but wouldn't it be nice ...
Tools for analyzing Web Audio usage - Web APIs
While working on your Web Audio API code, you may find that you need tools to analyze the graph of nodes you create or to otherwise debug your work. This article discusses tools available to help you do that.
Chrome A handy web audio inspector can be found in the
Chrome Web Store. Edge Add information for developers using Microsoft Edge. Firefox Firefox offers a native Web Audio Editor. Safari Add information for developers working in Safari. ...
Web Audio API - Web APIs
nnerNode The StereoPannerNode interface represents a simple stereo panner node that can be used to pan an audio stream left or right. Audio processing in JavaScript Using audio worklets, you can define custom audio nodes written in JavaScript or WebAssembly. Audio worklets implement the Worklet interface, a lightweight version of the Worker interface. Audio worklets are enabled by default for
Chrome 66 or later. AudioWorklet The AudioWorklet interface is available through the AudioContext object's audioWorklet, and lets you add modules to the audio worklet to be executed off the main thread. AudioWorkletNode The AudioWorkletNode interface represents an AudioNode that is embedded into an audio graph and can pass messages to the corresponding AudioWorkletProcessor. AudioWorkletProce...
The structured clone algorithm - Web APIs
The lastIndex property of RegExp objects is not preserved. Property descriptors, setters, getters, and similar metadata-like features are not duplicated. For example, if an object is marked readonly with a property descriptor, it will be read/write in the duplicate, since that's the default. The prototype chain is not walked or duplicated. Note: Native Error types can be cloned in
Chrome, and Firefox is working on it. Supported types Object type Notes All primitive types However, not symbols. Boolean objects String objects Date RegExp lastIndex is not preserved. Blob File FileList ArrayBuffer ArrayBufferView Including other typed arrays...
Web Workers API - Web APIs
vers that sit between web applications, the browser, and the network (when available). They are intended, among other things, to enable the creation of effective offline experiences, intercept network requests and take appropriate action based on whether the network is available, and update assets residing on the server. They will also allow access to push notifications and background sync APIs.
Chrome Workers are a Firefox-only type of worker that you can use if you are developing add-ons and want to use workers in extensions and have access to js-ctypes in your worker. See
ChromeWorker for more details. Audio Workers provide the ability for direct scripted audio processing to be done inside a web worker context. Note: As per the Web workers Spec, worker error events should not bubble (se...
Window: beforeunload event - Web APIs
ods may be ignored during this event. See the HTML specification for more details. Examples The HTML specification states that authors should use the Event.preventDefault() method instead of using Event.returnValue. However, this is not supported by all browsers. window.addEventListener('beforeunload', (event) => { // Cancel the event as stated by the standard. event.preventDefault(); //
Chrome requires returnValue to be set. event.returnValue = ''; }); Specifications Specification Status Comment HTML Living StandardThe definition of 'beforeunload' in that specification. Living Standard HTML5The definition of 'beforeunload' in that specification. Recommendation Initial definition ...
Window.controllers - Web APIs
Syntax controllers = window.controllers controllers is an object of type XULControllers (nsIControllers). Specification XUL-specific. Not part of specification. By default, a window's controller contains the code that supports the global window commands.
Chrome code can add controllers (to be used in conjunction with the goDoCommand and goUpdateCommand functions in globalOverlay.js). However, the added controllers must be explicitly removed when the window is unloaded, as this is not done automatically. ...
Window.outerHeight - Web APIs
Notes To change the size of a window, see window.resizeBy() and window.resizeTo(). To get the inner height of a window, i.e. the height of the page being displayed, see window.innerHeight. Graphical example The following figure shows the difference between outerHeight and innerHeight. ...
Window.outerWidth - Web APIs
Notes To change the size of a window, see window.resizeBy() and window.resizeTo(). To get the inner width of a window, i.e. the width of the page being displayed, see window.innerWidth. ...
Window: popstate event - Web APIs
being presented while remaining on the same Document. Note that just calling history.pushState() or history.replaceState() won't trigger a popstate event. The popstate event will be triggered by doing a browser action such as a click on the back or forward button (or calling history.back() or history.forward() in JavaScript). Browsers tend to handle the popstate event differently on page load.
Chrome (prior to v34) and Safari always emit a popstate event on page load, but Firefox doesn't. Note: When writing functions that process popstate event it is important to take into account that properties like window.location will already reflect the state change (if it affected the current URL), but document might still not. If the goal is to catch the moment when the new document state is already ...
window.postMessage() - Web APIs
s property if you expect messages from IDN sites. This value will eventually be consistently IDN, but for now you should handle both IDN and punycode forms. The value of the origin property when the sending window contains a javascript: or data: URL is the origin of the script that loaded the URL. Using window.postMessage in extensions window.postMessage is available to JavaScript running in
chrome code (e.g., in extensions and privileged code), but the source property of the dispatched event is always null as a security restriction. (The other properties have their expected values.) It is not possible for content or web context scripts to specify a targetOrigin to communicate directly with an extension (either the background script or a content script). Web or content scripts can use wind...
WindowEventHandlers.onbeforeunload - Web APIs
oreunload. Example This example prompts the user before unloading. The HTML specification states that authors should use the Event.preventDefault() method instead of using Event.returnValue to prompt the user. ...
WindowOrWorkerGlobalScope.fetch() - Web APIs
ms, USVString, or ReadableStream object. Note that a request using the GET or HEAD method cannot have a body. mode The mode you want to use for the request, e.g., cors, no-cors, or same-origin. credentials The request credentials you want to use for the request: omit, same-origin, or include. To automatically send cookies for the current domain, this option must be provided. Starting with
Chrome 50, this property also takes a FederatedCredential instance or a PasswordCredential instance. cache The cache mode you want to use for the request. redirect The redirect mode to use: follow (automatically follow redirects), error (abort with an error if a redirect occurs), or manual (handle redirects manually). In
Chrome the default is follow (before
Chrome 47 it defaulted to manual). r...
Worker - Web APIs
arent page. (Note: nested workers are not yet implemented in WebKit). Not all interfaces and functions are available to scripts inside a Worker. Workers may use XMLHttpRequest for network communication, but its responseXML and channel attributes are always null. (fetch is also available, with no such restrictions.) In Firefox extensions, if you want to use workers with access to js-ctypes, use
ChromeWorker object instead. Constructors Worker() Creates a dedicated web worker that executes the script at the specified URL. This also works for Blob URLs. Properties Inherits properties from its parent, EventTarget, and implements properties from AbstractWorker. Event handlers AbstractWorker.onerror An EventListener called whenever an ErrorEvent of type error bubbles through to the wo...
Worklet - Web APIs
rs. The Worklet interface abstracts properties and methods common to all kind of worklets, and cannot be created directly. Instead, you can use one of the following classes: Name Description Location Specification PaintWorklet For programmatically generating an image where a CSS property expects a file. Access this interface through CSS.paintWorklet.
Chrome: Main thread Gecko: Paint thread CSS Painting API AudioWorklet For audio processing with custom AudioNodes. Web Audio render thread Web Audio API AnimationWorklet For creating scroll-linked and other high performance procedural animations. Compositor thread CSS Animation Worklet API LayoutWorklet For defining the positioning and dimensions of...
How to check the security state of an XMLHTTPRequest over SSL - Web APIs
on was established, that is, on readyState LOADED, INTERACTIVE or COMPLETED. By setting the mozBackgroundRequest property of the request object and modifying the example appropriately, you can create your own alert dialog to handle SSL exceptions in your Firefox extension or XULRunner application. // Adapted from the patch for mozTCPSocket error reporting (bug 861196). ...
XMLHttpRequest.sendAsBinary() - Web APIs
Use ArrayBufferView instead. Another possible approach to send binary data is the StringView Non native typed arrays superclass in conjunction with the send() method. ...
XSLTProcessor - Web APIs
ull value for namespaceURI is treated the same as an empty string. void XSLTProcessor.clearParameters() Removes all set parameters from the XSLTProcessor. The XSLTProcessor will then use the defaults specified in the XSLT stylesheet. void XSLTProcessor.reset() Removes all parameters and stylesheets from the XSLTProcessor. Properties Non-Web-exposed properties The following properties are [
ChromeOnly] and not exposed to Web content: [
ChromeOnly] attribute unsigned long XSLTProcessor.flags Flags that tweak the behavior of the processor. Not reset by calling XSLTProcessor.reset(). Default value: 0 Possible values are: Name Value Effect (None) 0 None DISABLE_ALL_LOADS 1 Disable loading external documents (via e.g. <x...
ARIA annotations - Accessibility
pport multiple IDs -- this makes sense, for example you can easily envisage having multiple comments relating to the same bit of text. ARIA annotation roles and objects are currently exposed in: Firefox from version 75 onwards, on Windows and Linux (on macOS, we are first waiting for Apple to define what Safari will expose as Apple-dialect attributes to VoiceOver, and will then follow suit.)
Chrome from version 81 onwards, currently behind the #enable-accessibility-expose-aria-annotations flag (go to
chrome://flags to enable this.) Unfortunately, you won't be able to use any of these yet, as screenreader support is currently not there. For the moment, you can see the annotations data being exposed with tools like Firefox Accessibility Inspector. The annotations should just work once scree...
How to file ARIA-related bugs - Accessibility
Genre Software Where to file Notes Screen readers Freedom Scientific JAWS JAWS technical support form GW Micro Window Eyes Window-Eyes comments, questions, and feedback (email) Non Visual Desktop Access (NVDA) File NVDA bugs Discuss NVDA issues Browsers Apple Safari File WebKit.org bugs Google
Chrome File Chromium bugs Microsoft Internet Explorer File IE bugs Microsoft Edge File MS Edge Bugs View existing MS Edge ARIA bugs Mozilla Firefox File Firefox bugs Use Component: Disability Access APIs Opera File Opera bugs Use [ARIA] in the summary field JS Libraries Dojo Toolkit ...
An overview of accessible web applications and widgets - Accessibility
escribe these panels. --> <div id="ch1Panel" role="tabpanel" aria-labelledby="ch1Tab">Chapter 1 content goes here</div> <div id="ch2Panel" role="tabpanel" aria-labelledby="ch2Tab">Chapter 2 content goes here</div> <div id="quizPanel" role="tabpanel" aria-labelledby="quizTab">Quiz content goes here</div> </div> ARIA is well supported by all major browsers, including Firefox, Safari, Opera,
Chrome, and Internet Explorer, and many assistive technologies. Presentational changes Dynamic presentational changes include using CSS to change the appearance of content (such as a red border around invalid data, or changing the background color of a checked checkbox), as well as showing or hiding content. State changes ARIA provides attributes for declaring the current state of a UI widget. Examp...
Web accessibility for seizures and physical reactions - Accessibility
how a user accesses the controls. prefers-reduced-motion Support for prefers-reduced-motion in modern browsers is growing. @media screen and (prefers-reduced-motion: reduce) { } @media screen and (prefers-reduced-motion) { } To see a great example of how to use the code prefers-reduced-motion, visit the MDN document, prefers-reduced-motion, or see the example below from the section on New in
Chrome 74. button { animation: vibrate 0.3s linear infinite both; } @media (prefers-reduced-motion: reduce) { button { animation: none; } } prefers-color-scheme This can be useful if the ambient light API is not available. Support is emerging. @media (prefers-color-scheme: dark) { /* adust styles for dark mode */ } Window.matchMedia() There is a powerful tool available to developer...
-moz-image-region - CSS: Cascading Style Sheets
<image> elements where the icon is specified using list-style-image. It will not work with XUL <image src="url" />.InheritedyesComputed valueas specifiedAnimation typediscrete Formal syntax <shape> | autowhere <shape> = rect(<top>, <right>, <bottom>, <left>) Examples Clipping an image #example-button { /* display only the 4x4 area from the top left of this image */ list-style-image: url("
chrome://example/skin/example.png"); -moz-image-region: rect(0px, 4px, 4px, 0px); } #example-button:hover { /* use the 4x4 area to the right of the first for the hovered button */ -moz-image-region: rect(0px, 8px, 4px, 4px); } Specifications Not part of any standard. ...
::-webkit-file-upload-button - CSS: Cascading Style Sheets
The ::-webkit-file-upload-button CSS pseudo-element represents the button of an <input> of type="file". This pseudo-element is non-standard and only supported in WebKit/Blink compatible browsers like
Chrome, Opera and Safari (indicated by the -webkit prefix). Syntax selector::-webkit-file-upload-button Examples HTML <form> <label for="fileUpload">Upload file</label><br> <input type="file" id="fileUpload"> </form> CSS input, label { display: block; } input[type=file]::-webkit-file-upload-button { border: 1px solid grey; background: #FFFAAA; } Below is the example for you to try. The screenshot to the left shows what the button will look like if you are without access to
Chrome, Opera or Safari. ScreenshotLive sample Specifications Not part of any standard. ...
::-webkit-meter-inner-element - CSS: Cascading Style Sheets
::-webkit-meter-inner-element is a proprietary WebKit CSS pseudo-element for selecting and applying styles to to the outer containing element of a <meter> element. Additional markup to render the meter element as read-only. Syntax ::-webkit-meter-inner-element Specifications Not part of any standard. Examples This will only work in WebKit and Blink-based browsers, such as Safari,
Chrome, and Chromium-based versions of Edge. HTML <meter min="0" max="10" value="6">Score out of 10</meter> CSS meter { /* Reset the default appearance */ -webkit-appearance: none; -moz-appearance: none; appearance: none; } meter::-webkit-meter-inner-element { -webkit-appearance: inherit; box-sizing: inherit; border: 1px solid #aaa; } Result ...
::-webkit-scrollbar - CSS: Cascading Style Sheets
CSS Scrollbar Selectors You can use the following pseudo elements to customize various parts of the scrollbar for webkit browsers: ::-webkit-scrollbar -- the entire scrollbar. ::-webkit-scrollbar-button -- the buttons on the scrollbar (arrows pointing upwards and downwards). ::-webkit-scrollbar-thumb -- the draggable scrolling handle. ...
-webkit-animation - CSS: Cascading Style Sheets
Apple has a description in Safari CSS Reference. Note: This media feature is only supported by WebKit. If possible, use an @supports feature query instead. Syntax The -webkit-animation media feature is a Boolean whose value is true if the vendor-prefixed CSS animation properties are supported. Values true The browser supports -webkit prefixed CSS animations. false The browser doesn't support these prefixed CSS animations. ...
-webkit-transform-2d - CSS: Cascading Style Sheets
Apple has a description in Safari CSS Reference. Syntax -webkit-transform-2d is a Boolean CSS media feature whose value is true if the browser supports -webkit prefixed CSS 2D transforms. Values true The browser supports the 2D CSS transforms with the -webkit prefix. false The 2D CSS transforms prefixed with -webkit are not supported by the browser. Examples Basic example @media (-webkit-transform-2d) { div { -webkit-transform: translate(100px, 100px); } } This media feature is only supported by WebKit. ...
-webkit-transform-3d - CSS: Cascading Style Sheets
Note: This media feature is only supported by WebKit and Blink. If possible, use an @supports feature query instead. Syntax -webkit-transform-3d is a Boolean CSS media feature whose value is true if the browser supports -webkit prefixed CSS 3D transforms. Values true The browser supports the 3D CSS transforms with the -webkit prefix. false The 3D CSS transforms prefixed with -webkit are not supported by the browser. ...
-webkit-transition - CSS: Cascading Style Sheets
It was never supported in browsers not based on WebKit or Blink. Apple has a description in Safari CSS Reference; this is now called simply transition there. Note: You should not use this media feature; it was never specified, has never been widely implemented, and has been removed from all browsers. Use an @supports feature query instead. Syntax @media (-webkit-transition) { /* CSS to use if transitions are supported */ } Examples Use @supports instead Do not use the -webkit-transition media feature. ...
display-mode - CSS: Cascading Style Sheets
oth apply to the top-level browsing context and any child browsing contexts. The feature query applies regardless of whether a web app manifest is present. Syntax The display-mode feature is specified as a keyword value chosen from the list below. Display mode Description Fallback display mode fullscreen All of the available display area is used and no user agent
chrome is shown. standalone standalone The application will look and feel like a standalone application. This can include the application having a different window, its own icon in the application launcher, etc. In this mode, the user agent will exclude UI elements for controlling navigation, but can include other UI elements such as a status bar. minimal-ui minimal-ui The ...
@media - CSS: Cascading Style Sheets
reen? height Height of the viewport hover Does the primary input mechanism allow the user to hover over elements? Added in Media Queries Level 4. inverted-colors Is the user agent or underlying OS inverting colors? Added in Media Queries Level 5. light-level Light level of the environment Added in Media Queries Level 5. mono
chrome Bits per pixel in the output device's mono
chrome frame buffer, or zero if the device isn't mono
chrome orientation Orientation of the viewport overflow-block How does the output device handle content that overflows the viewport along the block axis? Added in Media Queries Level 4. overflow-inline Can content that overflows the viewport along the in...
Alternative style sheets - CSS: Cascading Style Sheets
Specifying alternative style sheets in a web page provides a way for users to see multiple versions of a page, based on their needs or preferences. Firefox lets the user select the stylesheet using the View > Page Style submenu. Internet Explorer also supports this feature (beginning with IE 8), also accessed from View > Page Style.
Chrome requires an extension to use the feature (as of version 48). The web page can also provide its own user interface to let the user switch styles. An example: specifying the alternative stylesheets The alternate stylesheets are commonly specified using a <link> element with rel="alternate stylesheet" and title="..." attributes. For example: <link href="reset.css" rel="stylesheet" type="text/css"> <link href="default.css" rel="stylesheet" type="text/css" ti...
Detecting CSS animation support - CSS: Cascading Style Sheets
this property and changing its name to AnimationName instead. Once this code is finished running, the value of animation will be false if CSS animation support isn't available, or it will be true. If it is true then both the animation property name and the keyframe prefix will be the right ones. So if you use a new Firefox, the property will be MozAnimation and the keyframe prefix -moz- and with
Chrome it'll be WebkitAnimation and -webkit-. Notice browsers don't make it easy with the switching between camelCase and hyphen-ation. Animating using the correct syntax for different browsers Now that you know if CSS animation is supported or not, we can animate. if( animation === false ) { // animate in JavaScript fallback } else { elem.style[ animationstring ] = 'rotate 1s linear infinite';...
Mastering Wrapping of Flex Items - CSS: Cascading Style Sheets
is set to visibility: collapse and therefore the flex container is retaining a strut of the height required to display this item. If you remove visibility: collapse from the CSS or change the value to visible, you will see the item disappear and the space redistribute between non-collapsed items; the height of the flex container should not change. Note: Use Firefox for the below two examples as
Chrome and Safari treat collapse as hidden. When dealing with multiple-line flex containers however you need to understand that the wrapping is re-done after collapsing. So the browser needs to re-do the wrapping behaviour to account for the new space that the collapsed item has left in the inline direction. This means that items might end up on a different line to the one they started on. In the c...
Cross-browser Flexbox mixins - CSS: Cascading Style Sheets
This article provides a set of mixins for those who want to mess around with flexbox using the native support of current browsers. This set uses: Fallbacks using 2009 'box' syntax (FF and Older WebKit) and prefixed syntaxes (IE10, WebKit browsers without flex wrapping) Final standards syntax (FF, Safari,
Chrome, IE11+, Edge, Opera) This was inspired by: http://dev.opera.com/articles/view/advanced-cross-browser-flexbox/ With help from: http://w3.org/tr/css3-flexbox/ http://the-echoplex.net/flexyboxes/ http://msdn.microsoft.com/en-us/library/ie/hh772069(v=vs.85).aspx http://css-tricks.com/using-flexbox/ A Complete Guide to Flexbox | CSS-Tricks Visual Guide to CSS3 Flexbox: Flexbox Playground | Note: Mixins are not currently supported natively in browsers. Instead, you will n...
Relationship of flexbox to other layout methods - CSS: Cascading Style Sheets
kground colour behind the nested sub children. If you remove display: contents in this live example you will see that the direct child we are removing has an orange background colour. This also disappears when the box disappears. Browser support for display:contents is limited and required for this demo to work. Firefox supports display: contents already, and the value is being implemented in
Chrome. Once there is better browser support this feature will be very useful in circumstances where you need the markup for semantic reasons but do not want to display the box that it would generate by default. ...
Shapes From Images - CSS: Cascading Style Sheets
ork, however if your images are hosted on a different domain such as on a CDN you should ensure that they are sending the correct headers to enable them to be used for Shapes. Due to this requirement for CORS compatible images, if you are previewing your file locally without using a local web server, your shape will not work. Is it a CORS issue? DevTools can help you to identify CORS errors. In
Chrome the Console will alert you to CORS problems. In Firefox if you inspect the property you will be alerted to the fact that the image could not be loaded. This should alert you to the fact that your image cannot be used as the source of a shape due to CORS. Setting a threshold The shape-image-threshold property enables the creation of shapes from areas which are not fully transparent. If the value...
Mozilla CSS extensions - CSS: Cascading Style Sheets
tonhovertext -moz-default-background-color -moz-default-color -moz-cellhighlight -moz-cellhighlighttext -moz-field -moz-fieldtext -moz-dialog -moz-dialogtext -moz-dragtargetzone -moz-mac-accentdarkestshadow -moz-mac-accentdarkshadow -moz-mac-accentface -moz-mac-accentlightesthighlight -moz-mac-accentlightshadow -moz-mac-accentregularhighlight -moz-mac-accentregularshadow -moz-mac-
chrome-active -moz-mac-
chrome-inactive -moz-mac-focusring -moz-mac-menuselect -moz-mac-menushadow -moz-mac-menutextselect -moz-menuhover -moz-menuhovertext -moz-win-communicationstext -moz-win-mediatext -moz-nativehyperlinktext display -moz-box -moz-inline-block -moz-inline-box -moz-inline-gridObsolete since Gecko 62 -moz-inline-stackObsolete since Gecko 62 -moz-inline-table ...
WebKit CSS extensions - CSS: Cascading Style Sheets
These extensions are generally prefixed with -webkit-. Most -webkit- prefixed properties also work with an -apple- prefix. A few are prefixed with -epub-. WebKit-only properties Note: Avoid using on websites. These properties will only work in WebKit applications. ...
calc() - CSS: Cascading Style Sheets
t size will scale if the page is zoomed. MDN Understanding WCAG, Guideline 1.4 explanations Understanding Success Criterion 1.4.4 | W3C Understanding WCAG 2.0 Usage with integers When calc() is used where an <integer> is expected, the value will be rounded to the nearest integer. For example: .modal { z-index: calc(3 / 2); } This will give .modal a final z-index value of 2. Note: The
Chrome browser currently won't accept some values returned by calc() when an integer is expected. This includes any division, even if it results in an integer. ie. z-index: calc(4 / 2); will not be accepted. Examples Positioning an object on screen with a margin calc() makes it easy to position an object with a set margin. In this example, the CSS creates a banner that stretches across the window, w...
<color> - CSS: Cascading Style Sheets
lHighlightText Text color for highlighted items in HTML <select>s. Should be used with the -moz-html-CellHighlight background color. Prior to Gecko 1.9, use -moz-CellHighlightText. -moz-mac-accentdarkestshadow -moz-mac-accentdarkshadow -moz-mac-accentface -moz-mac-accentlightesthighlight -moz-mac-accentlightshadow -moz-mac-accentregularhighlight -moz-mac-accentregularshadow -moz-mac-
chrome-active -moz-mac-
chrome-inactive -moz-mac-focusring -moz-mac-menuselect -moz-mac-menushadow -moz-mac-menutextselect -moz-MenuHover Background color for hovered menu items. Often similar to Highlight. Should be used with the -moz-MenuHoverText or -moz-MenuBarHoverText foreground color. -moz-MenuHoverText Text color for hovered menu items. Often similar to HighlightText. Sho...
cross-fade() - CSS: Cascading Style Sheets
function allows for multiple images and for each image to have transparency values independent of the other values. This was not always the case. The original syntax, which has been implemented in some browsers, only allowed for two images, with the sum of the transparency of those two images being exactly 100%. The original syntax is supported in Safari and supported with the -webkit- prefix in
Chrome, Opera, and other blink-based browsers. cross-fade(url(white.png), url(black.png), 0%); /* fully black */ cross-fade(url(white.png), url(black.png), 25%); /* 25% white, 75% black */ cross-fade(url(white.png), url(black.png), 50%); /* 50% white, 50% black */ cross-fade(url(white.png), url(black.png), 75%); /* 75% white, 25% black */ cross-fade(url(white.png), url(black.png), 100%); /* fully ...
list-style-position - CSS: Cascading Style Sheets
applied to list items, i.e., elements with display: list-item;. By default this includes <li> elements. Because this property is inherited, it can be set on the parent element (normally <ol> or <ul>) to let it apply to all list items. Note that there is variance among browsers regarding behavior when a block element is placed first within a list element declared as list-style-position: inside.
Chrome and Safari both place this element on the same line as the marker box, whereas Firefox, Internet Explorer, and Opera place it on the next line. For more information on this, see bug 36854. Syntax /* Keyword values */ list-style-position: inside; list-style-position: outside; /* Global values */ list-style-position: inherit; list-style-position: initial; list-style-position: unset; The list-s...
list-style-type - CSS: Cascading Style Sheets
Traditional Chinese informal numbering. E.g. ????????? upper-armenian * Example disclosure-open Symbol indicating that a disclosure widget such as <details> is opened. disclosure-closed Symbol indicating that a disclosure widget, like <details> is closed. Non-standard extensions A few more predefined types are provided by Mozilla (Firefox), Blink (
Chrome and Opera) and WebKit (Safari) to support list types in other languages. See the compatibility table to check which browsers supports which extension. -moz-ethiopic-halehame Example -moz-ethiopic-halehame-am Example ethiopic-halehame-ti-er -moz-ethiopic-halehame-ti-er Example ethiopic-halehame-ti-et -moz-ethiopic-halehame-ti-et Example hangul -moz...
overflow - CSS: Cascading Style Sheets
uto Depends on the user agent. If content fits inside the padding box, it looks the same as visible, but still establishes a new block formatting context. Desktop browsers provide scrollbars if content overflows. overlay Behaves the same as auto, but with the scrollbars drawn on top of content instead of taking up space. Only supported in WebKit-based (e.g., Safari) and Blink-based (e.g.,
Chrome or Opera) browsers. Mozilla extensions -moz-scrollbars-none [1] Use overflow: hidden instead. -moz-scrollbars-horizontal [1] Use overflow-x: scroll and overflow-y: hidden, or overflow: hidden scroll instead. -moz-scrollbars-vertical [1] Use overflow-x: hidden and overflow-y: scroll, or overflow: scroll hidden instead. -moz-hidden-unscrollable Intended mainly for internal use and ...
overscroll-behavior - CSS: Cascading Style Sheets
underlying contacts window would start to scroll too, which is not desirable. This can be stopped using overscroll-behavior-y (overscroll-behavior would also work) on the chat window, like this: .messages { height: 220px; overflow: auto; overscroll-behavior-y: contain; } We also wanted to get rid of the standard overscroll effects when the contacts are scrolled to the top or bottom (e.g.
Chrome on Android refreshes the page when you scroll past the top boundary). This can be prevented by setting overscroll-behavior: none on the <body> element: body { margin: 0; overscroll-behavior: none; } Specifications Specification Status Comment CSS Overscroll Behavior Module Level 1The definition of 'overscroll-behavior' in that specification. Working Draft ...
transform-box - CSS: Cascading Style Sheets
so the rectangle spins in place. Without it, the transform origin is the center of the SVG canvas, and so you get a very different effect. svg{ width:80vh; border:1px solid #d9d9d9; position:absolute; margin: auto; top: 0; right: 0; bottom: 0; left: 0; } #box{ transform-origin:50% 50%; /*+++++++++++++++++++++++++++*/ /* if I remove this rule the pen won't work properly on
Chrome for Mac, FF, Safari Will still work properly on
Chrome for PC & Opera*/ transform-box: fill-box; /*Alternatively I can use transform-origin:15px 15px;*/ /*+++++++++++++++++++++++++++*/ animation: rotateBox 3s linear infinite; } @keyframes rotateBox { to { transform: rotate(360deg); } Full credit for this example goes to Pogany; see this codepen for a live version. Specificat...
user-select - CSS: Cascading Style Sheets
The user-select CSS property controls whether the user can select text. This doesn't have any effect on content loaded as
chrome, except in textboxes. /* Keyword values */ user-select: none; user-select: auto; user-select: text; user-select: contain; user-select: all; /* Global values */ user-select: inherit; user-select: initial; user-select: unset; /* Mozilla-specific values */ -moz-user-select: none; -moz-user-select: text; -moz-user-select: all; /* WebKit-specific values */ -webkit-user-select: none; -webkit-user-select: text; -webkit-user-select: all; /* Doesn't work in Safari; use only "none" or "text", or else it will allow typing in the <html> container */ /* Microsoft-specific values */ -ms-user-select: none; -ms-user-selec...
width - CSS: Cascading Style Sheets
lass="em_length">Width measured in em</div> Percentage .percent { width: 20%; background-color: silver; border: 1px solid red; } <div class="percent">Width in percentage</div> max-content p.maxgreen { background: lightgreen; width: intrinsic; /* Safari/WebKit uses a non-standard name */ width: -moz-max-content; /* Firefox/Gecko */ width: -webkit-max-content; /*
Chrome */ width: max-content; } <p class="maxgreen">The Mozilla community produces a lot of great software.</p> min-content p.minblue { background: lightblue; width: -moz-min-content; /* Firefox */ width: -webkit-min-content; /*
Chrome */ width: min-content; } <p class="minblue">The Mozilla community produces a lot of great software.</p> Specifications Specification St...
will-change - CSS: Cascading Style Sheets
e given name on the element in the near future. If the property given is a shorthand, it indicates the expectation for all the longhands the shorthand expands to. It cannot be one of the following values: unset, initial, inherit, will-change, auto, scroll-position, or contents. The spec doesn't define the behavior of particular value, but it is common for transform to be a compositing layer hint.
Chrome currently takes two actions, given particular CSS property idents: establish a new compositing layer or a new stacking context. Via stylesheet It may be appropriate to include will-change in your style sheet for an application that does page flips on key presses like an album or a slide deck presentation where the pages are large and complex. This will let browser prepare the transition ahead ...
Video player styling basics - Developer guides
re when a <progress> element is being "faked"; when it's in this state the background colour needs to be set. The internal <span> element used as the actual progressing part of the faked progress bar has its width initially set to 0% (it is updated via JavaScript) and it also has its background colour set. There are some browser-specific properties that need to be set to ensure that Firefox and
Chrome use the required colour for the progress bar: .controls progress::-moz-progress-bar { background-color:#0095dd; } .controls progress::-webkit-progress-value { background-color:#0095dd; } Although the same properties are set to the same value, these rules need to be defined separately, otherwise
Chrome ignores it. JavaScript That's really it for the immediate styling; the next task is m...
Web Audio playbackRate explained - Developer guides
he media resets; for example, if we change the source of the video, or (in some browsers) when an ended event is generated. So defaultPlaybackRate allows us to set the playback rate before playing the media, while playbackRate allows us to change it during media playback. There is also an event available called ratechange, which fires every time the playbackRate changes. Browser support
Chrome 20+ ? Firefox 20+ ? IE 9+ ? Safari 6+ ? Opera 15+ ? Mobile
Chrome (Android) ? Mobile Firefox 24+ ? IE Mobile ? Mobile Safari 6+ (iOS) ? Opera Mobile ? Notes Most browsers stop playing audio outside playbackRate bounds of 0.5 and 4, leaving the video playing silently. For most applications, it's recommended that you limit the range to between 0.5 and 4. The pitch of the audio track ...
Creating a cross-browser video player - Developer guides
Another user defined function -- setFullscreenData() -- is also called, which simply sets the value of a data-fullscreen attribute on the videoContainer (this makes use of data-states). var setFullscreenData = function(state) { videoContainer.setAttribute('data-fullscreen', !!state); } This is used simply to set some basic CSS to improve the styling of the custom cont...
Audio and Video Delivery - Developer guides
load it into a source and play it (Try it for yourself). Find more about Web Audio API basics in Using the Web Audio API. getUserMedia / Stream API It's also possible to retrieve a live stream from a webcam and/or microphone using getUserMedia and the Stream API. This makes up part of a wider technology known as WebRTC (Web Real-Time Communications) and is compatible with the latest versions of
Chrome, Firefox and Opera. To grab the stream from your webcam, first set up a <video> element: <video id="webcam" width="480" height="360"></video> Next, if supported connect the webcam source to the video element: if (navigator.mediaDevices) { navigator.mediaDevices.getUserMedia({ video: true, audio: false }) .then(function onSuccess(stream) { var video = document.getElementById('webcam');...
Block formatting context - Developer guides
dren of the element with display: grid or inline-grid) if they are neither flex nor grid nor table containers themselves. Multicol containers (elements where column-count or column-width isn't auto, including elements with column-count: 1). column-span: all should always create a new formatting context, even when the column-span: all element isn't contained by a multicol container (Spec change,
Chrome bug). Formatting contexts affect layout, but typically, we create a new block formatting context for the positioning and clearing floats rather than changing the layout, because an element that establishes a new block formatting context will: contain internal floats. exclude external floats. suppress margin collapsing. Note: a Flex/Grid container(display: flex/grid/inline-flex/inline-gr...
Mouse gesture events - Developer guides
may also be large incompatibilities between implementations and the behavior may change in the future. Gecko 1.9.1 added support for several Mozilla-specific DOM events used to handle mouse gestures. These are special movements that can be made with a mouse or trackpad and can be interpreted to perform specific tasks. Note: These gesture events are available to add-ons and other browser
chrome code, but are never sent to regular web page content. Note: Some operating systems, including Mac OS X and Windows 7, provide default actions when gesture events occur. If you handle a gesture event and wish to prevent the default action from taking place as well, be sure to call the event's preventDefault() method. Types of gesture events MozSwipeGesture The MozSwipeGesture event is sent when ...
Mutation events - Developer guides
stead if possible. Preface The mutation events have been marked as deprecated in the DOM Events specification, as the API's design is flawed (see details in the "DOM Mutation Events Replacement: The Story So Far / Existing Points of Consensus" post to public-webapps). Mutation Observers are the proposed replacement for mutation events in DOM4. They are expected to be included in Firefox 14 and
Chrome 18. The practical reasons to avoid the mutation events are performance issues and cross-browser support. Performance Adding DOM mutation listeners to a document profoundly degrades the performance of further DOM modifications to that document (making them 1.5 - 7 times slower!). Moreover, removing the listeners does not reverse the damage. The performance effect is limited to the documents th...
Making content editable - Developer guides
generation Use of contenteditable across different browsers has been painful for a long time because of the differences in generated markup between browsers. For example, even something as simple as what happens when you press Enter/Return to create a new line of text inside an editable element was handled differently across the major browsers (Firefox inserted <br> elements, IE/Opera used <p>,
Chrome/Safari used <div>). Fortunately, in modern browsers things are somewhat more consistent. As of Firefox 60, Firefox will be updated to wrap the separate lines in <div> elements, matching the behavior of
Chrome, modern Opera, Edge, and Safari. Try it out in the above example. Note: Internet Explorer, which is no longer being developed, uses <p> elements instead of <div>. If you want to use a ...
Writing forward-compatible websites - Developer guides
out of your way to run different code based on either object detection or UA sniffing if one of the codepaths involved actually works in all browsers. There is a good chance of browsers changing behavior to converge with each other and hence breaking the site for those you've sent down one or more of the alternative paths. Testing Test with all major engines Test your code at least in Firefox,
Chrome, Safari, Opera, and Internet Explorer. If you are following the advice given above so that you have a single code path for all current and unknown browsers, testing that this single code path works in all the major engines makes it extremely probable that your code won't break in the future. Sometimes browsers implement a given feature slightly differently. If you have a single code path that wo...
Applying color to HTML elements using CSS - HTML: Hypertext Markup Language
n that item. Browse websites that let you look at lots of existing color palettes and images to find inspiration. When trying to decide upon a base color, you may find that browser extensions that let you select colors from web content can be particularly handy. Some of these are even specifically designed to help with this sort of work. For example, the website ColorZilla offers an extension (
Chrome / Firefox) that offers an eyedropper tool for picking colors from the web. It can also take averages of the colors of pixels in various sized areas or even a selected area of the page. The advantage to averaging colors can be that often what looks like a solid color is actually a surprisingly varied number of related colors all used in concert, blending to create a desired effect. Picking just ...
<a>: The Anchor element - HTML: Hypertext Markup Language
acters are converted to underscores (_). Filesystems may forbid other characters in filenames, so browsers will adjust the suggested name if necessary. Notes: download only works for same-origin URLs, or the blob: and data: schemes. If Content-Disposition has a different filename than download, the header takes priority. (If Content-Disposition: inline, Firefox prefers the header while
Chrome prefers download.) href The URL that the hyperlink points to. Links are not restricted to HTTP-based URLs -- they can use any URL scheme supported by browsers: Sections of a page with fragment URLs Pieces of media files with media fragments Telephone numbers with tel: URLs Email addresses with mailto: URLs While web browsers may not support other URL schemes, web sites can ...
<applet>: The Embed Java Applet element - HTML: Hypertext Markup Language
Removal is being considered in WebKit and Edge. The obsolete HTML Applet Element (<applet>) embeds a Java applet into the document; this element has been deprecated in favor of <object>. Use of Java applets on the Web is deprecated; most browsers no longer support use of plug-ins, including the Java plug-in. Content categories Flow content, phrasing content, embedded content, interactive content, palpable content. Permitted content Zero or more <param> elements, then transparent. Tag omission None, both the starting and ending tag are mandatory. Permitted parents Any element that accepts embedded content. ...
<audio>: The Embed Audio element - HTML: Hypertext Markup Language
to set the current playback position well before the beginning of the media, and would fail. The getStartDate() method can be used to determine the beginning point of the media timeline's reference frame. disableRemotePlayback A Boolean attribute used to disable the capability of remote playback in devices that are attached using wired (HDMI, DVI, etc.) and wireless technologies (Miracast,
Chromecast, DLNA, AirPlay, etc). See this proposed specification for more information. In Safari, you can use x-webkit-airplay="deny" as a fallback. duration Read only A double-precision floating-point value which indicates the duration (total length) of the audio in seconds, on the media's timeline. If no media is present on the element, or the media is not valid, the returned value is NaN. If th...
<canvas>: The Graphics Canvas element - HTML: Hypertext Markup Language
tributes directly on the <canvas> elements, either directly in the HTML or by using JavaScript. Maximum canvas size The maximum size of a <canvas> element is very large, but the exact size depends on the browser. The following is some data we've collected from various tests and other sources (e.g. ...
<datalist>: The HTML Data List element - HTML: Hypertext Markup Language
RIA role listbox Permitted ARIA roles No role permitted DOM interface HTMLDataListElement Attributes This element has no other attributes than the global attributes, common to all elements. Examples <label for="myBrowser">Choose a browser from this list:</label> <input list="browsers" id="myBrowser" name="myBrowser" /> <datalist id="browsers"> <option value="
Chrome"> <option value="Firefox"> <option value="Internet Explorer"> <option value="Opera"> <option value="Safari"> <option value="Microsoft Edge"> </datalist> Result Specifications Specification Status Comment HTML Living StandardThe definition of '<datalist>' in that specification. Living Standard HTML5The definition of '<datalist>' in that s...
<details>: The Details disclosure element - HTML: Hypertext Markup Language
al implementations as the element was standardized, so we'll have to use multiple approaches for a while. The <summary> element supports the list-style shorthand property and its longhand properties, such as list-style-type, to change the disclosure triangle to whatever you choose (usually with list-style-image). For example, we can remove the disclosure widget icon by setting list-style: none.
Chrome doesn't support this yet, however, so we also need to use its non-standard ::-webkit-details-marker pseudo-element to customize the appearance in that browser. CSS details { font: 16px "Open Sans", Calibri, sans-serif; width: 620px; } details > summary { padding: 2px 6px; width: 15em; background-color: #ddd; border: none; box-shadow: 3px 3px 4px black; cursor: pointer; list-s...
<input type="number"> - HTML: Hypertext Markup Language
ber entry box. <input id="ticketNum" type="number" name="ticketNum" list="defaultNumbers"> <span class="validity"></span> <datalist id="defaultNumbers"> <option value="10045678"> <option value="103421"> <option value="11111111"> <option value="12345678"> <option value="12999922"> </datalist> Use of the list attribute with number inputs is not supported in all browsers. It works in
Chrome and Opera, for example, but not in Firefox. Validation We have already mentioned a number of validation features of number inputs, but let's review them now: <input type="number"> elements automatically invalidate any entry that isn't a number (or empty, unless required is specified). You can use the required attribute to make an empty entry invalid. (In other words, the input must be fill...
<input type="submit"> - HTML: Hypertext Markup Language
. See accesskey for further details. Here's the previous example with the s access key added: <form> <div> <label for="example">Let's submit some text</label> <input id="example" type="text" name="text"> </div> <div> <input type="submit" value="Send" accesskey="s"> </div> </form> For example, in Firefox for Mac, pressing Control-Option-S triggers the Send button, while
Chrome on Windows uses Alt+S. The problem with the above example is that the user will not know what the access key is! This is especially true since the modifiers are typically non-standard to avoid conflicts. When building a site, be sure to provide this information in a way that doesn't interfere with the site design (for example by providing an easily accessible link that points to information on...
<input type="tel"> - HTML: Hypertext Markup Language
e level of validation yourself. See Validation, below, for details. Custom keyboards One of the main advantages of <input type="tel"> is that it causes mobile browsers to display a special keyboard for entering phone numbers. For example, here's what the keypads look like on a couple of devices. Examples of custom keyboards on mobile devices. Firefox for Android WebKit iOS (Safari/
Chrome/Firefox) A simple tel input In its most basic form, a tel input can be implemented like this: <label for="telNo">Phone number:</label> <input id="telNo" name="telNo" type="tel"> There is nothing magical going on here. When submitted to the server, the above input's data would be represented as, for example, telNo=+12125553151. Placeholders Sometimes it's helpful to...
<isindex> - HTML: Hypertext Markup Language
. Tim Berners-Lee explains the purpose of isindex resulting in aggregated search results. Kevin replies that he doesn't like the boolean nature of isindex and would prefer a system where everything is searchable and proposes to extend the current WWW Framework with a specific httpd configuration and defined that some URIs mapping create search queries. In 2016, after it was removed from Edge and
Chrome, it was proposed to remove isindex from the standard; this removal was completed the next day, after which Safari and Firefox also removed support. HTML Reference The HTML Standard classifies it as a obsolete and non-conforming feature. ISINDEX element deprecated in HTML 4.01 ISINDEX in HTML 3.2 ISINDEX in HTML 2.0 as well the description of the behavior in Queries and Indexes (HTML 2.0) ...
theme-color - HTML: Hypertext Markup Language
he name attribute of the <meta> element indicates a suggested color that user agents should use to customize the display of the page or of the surrounding user interface. If specified, the content attribute must contain a valid CSS <color>. Example <meta name="theme-color" content="#4285f4"> The following image shows the effect that the <meta> element above will have on a document displayed in
Chrome running on an Android mobile device. Image credit: from Icons & Browser Colors, created and shared by Google and used according to terms described in the Creative Commons 4.0 Attribution License. Specifications Specification HTML Living StandardThe definition of 'theme-color' in that specification. ...
<track>: The Embed Text Track element - HTML: Hypertext Markup Language
he global attributes. default This attribute indicates that the track should be enabled unless the user's preferences indicate that another track is more appropriate. This may only be used on one track element per media element. kind How the text track is meant to be used. If omitted the default kind is subtitles. If the attribute contains an invalid value, it will use metadata (Versions of
Chrome earlier than 52 treated an invalid value as subtitles). The following keywords are allowed: subtitles Subtitles provide translation of content that cannot be understood by the viewer. For example dialogue or text that is not English in an English language film. Subtitles may contain additional content, usually extra background information. For example the text at the beginning of ...
accesskey - HTML: Hypertext Markup Language
indows Linux Mac Firefox Alt + Shift + key On Firefox 57 or newer: Control + Option + key or Control + Alt + key On Firefox 14 or newer: Control + Alt + key On Firefox 13 or older: Control + key Internet Explorer Alt + key Alt + Shift + key N/A Edge N/A Control + Option + key Control + Option + Shift + key Google
Chrome Alt + Shift + key Safari N/A Opera 15+ Alt + key Control + Alt + key Opera 12 Shift + Esc opens a contents list which are accessible by accesskey, then, can choose an item by pressing key Accessibility concerns In addition to poor browser support, there are numerous concerns with the accesskey attribute: An accesskey value can conflict...
dir - HTML: Hypertext Markup Language
possible. That way, the text will display correctly even on a browser that doesn't support CSS or has the CSS deactivated. The auto value should be used for data with an unknown directionality, like data coming from user input, eventually stored in a database. Browsers might allow users to change the directionality of <input> and <textarea>s in order to assist with authoring content.
Chrome and Safari provide a directionality option in the contextual menu of input fields while Internet Explorer and Edge use the key combinations Ctrl + Left Shift and Ctrl + Right Shift. Firefox uses Ctrl/Cmd + Shift + X but does NOT update the dir attribute value. Specifications Specification Status Comment HTML Living StandardThe definition of 'dir' in that specification. ...
Preloading content with rel="preload" - HTML: Hypertext Markup Language
fine, but isn't useful for the current page! In addition, browsers will give prefetch resources a lower priority than preload ones -- the current page is more important than the next. See Link prefetching FAQ for more details. <link rel="prerender"> renders a specified webpage in the background, speeding up its load if the user navigates to it. Because of the potential to waste users bandwidth,
Chrome treats prerender as a NoState prefetch instead. <link rel="subresource"> was supported in
Chrome a while ago, and was intended to tackle the same issue as preload, but it had a problem: there was no way to work out a priority for the items (as didn't exist back then), so they all got fetched with fairly low priority. There are a number of script-based resource loaders out there, but they don'...
Using the application cache - HTML: Hypertext Markup Language
e files have been successfully retrieved, they are moved into the real offline cache automatically, and a cached event is sent to the applicationCache object. Since the document has already been loaded into the browser from the cache, the updated document will not be rendered until the document is reloaded (either manually or programatically). Storage location and clearing the offline cache In
Chrome you can clear the offline cache by selecting "Clear browsing data..." in the preferences or by visiting
chrome://appcache-internals/. Safari has a similar "Empty cache" setting in its preferences but a browser restart may also be required. In Firefox, the offline cache data is stored separately from the Firefox profile--next to the regular disk cache: Windows Vista/7: C:\Users\<username>\AppD...
HTTP authentication - HTTP
the Apache example above. location /status { auth_basic "Access to the staging site"; auth_basic_user_file /etc/apache2/.htpasswd; } Access using credentials in the URL Many clients also let you avoid the login prompt by using an encoded URL containing the username and the password like this: https://username:password@www.example.com/ The use of these URLs is deprecated. In
Chrome, the username:password@ part in URLs is even stripped out for security reasons. In Firefox, it is checked if the site actually requires authentication and if not, Firefox will warn the user with a prompt "You are about to log in to the site "www.example.com" with the username "username", but the website does not require authentication. This may be an attempt to trick you." ...
Cross-Origin Resource Policy (CORP) - HTTP
otects certain resources (of Content-Type HTML, JSON and XML) against cross-origin reads. If the application does not serve a no-sniff directive, Chromium will attempt to guess the Content-Type and apply the protection anyway. Cross-Origin Resource Policy is an opt-in response header which can protect any resource; there is no need for browsers to sniff MIME types. Usage Note: Due to a bug in
Chrome, setting Cross-Origin-Resource-Policy can break PDF rendering, preventing visitors from being able to read past the first page of some PDFs. Exercise caution using this header in a production environment. Web applications set a Cross-Origin Resource Policy via the Cross-Origin-Resource-Policy HTTP response header, which accepts one of three values: same-site Only requests from the same Si...
Accept-Charset - HTTP
/1.1, a default character encoding was defined: ISO-8859-1. This is no longer recommended, and now each content-type may have its own default. UTF-8 is now well-supported and the overwhelmingly preferred character encoding. To guarantee better privacy through less configuration-based entropy, all browsers omit the Accept-Charset header: Internet Explorer 8+, Safari 5+, Opera 11+, Firefox 10+ and
Chrome 27+ no longer send it. Header type Request header Forbidden header name yes Syntax Accept-Charset: <charset> // Multiple types, weighted with the quality value syntax: Accept-Charset: utf-8, iso-8859-1;q=0.5 Directives <charset> A character encoding name, like utf-8 or iso-8859-15. * Any charset not mentioned elsewhere in the header; * is used as a wildca...
Connection - HTTP
The Connection general header controls whether or not the network connection stays open after the current transaction finishes. If the value sent is keep-alive, the connection is persistent and not closed, allowing for subsequent requests to the same server to be done. Connection-specific header fields such as Connection and Keep-Alive are prohibited in HTTP/2.
Chrome and Firefox ignore them in HTTP/2 responses, but Safari conforms to the HTTP/2 spec requirements and won't load any response which contains them. Except for the standard hop-by-hop headers (Keep-Alive, Transfer-Encoding, TE, Connection, Trailer, Upgrade, Proxy-Authorization and Proxy-Authenticate), any hop-by-hop headers used by the message must be listed in the Connection header, so that the first proxy knows it has to consum...
CSP: form-action - HTTP
The HTTP Content-Security-Policy (CSP) form-action directive restricts the URLs which can be used as the target of a form submissions from a given context. Whether form-action should block redirects after a form submission is debated and browser implementations of this aspect are inconsistent (e.g. Firefox 57 doesn't block the redirects whereas
Chrome 63 does). CSP version 2 Directive type Navigation directive default-src fallback No. Not setting this allows anything. Syntax One or more sources can be set for the form-action policy: Content-Security-Policy: form-action <source>; Content-Security-Policy: form-action <source> <source>; Sources <source> can be one of the following: <host-source> Internet hosts by name or IP address, as wel...
CSP: worker-src - HTTP
CSP) worker-src directive specifies valid sources for Worker, SharedWorker, or ServiceWorker scripts. CSP version 3 Directive type Fetch directive Fallback If this directive is absent, the user agent will first look for the child-src directive, then the script-src directive, then finally for the default-src directive, when governing worker execution.
Chrome 59 and higher skips the child-src directive. Edge 17 skips the script-src directive (bug). Syntax One or more sources can be allowed for the worker-src policy: Content-Security-Policy: worker-src <source>; Content-Security-Policy: worker-src <source> <source>; Sources <source> can be one of the following: <host-source> Internet hosts by name or IP address, as well as an o...
Cross-Origin-Resource-Policy - HTTP
Due to a bug in Firefox, setting Cross-Origin-Resource-Policy can prevent some resources (such as PDFs) from being downloaded in some circumstances. Exercise caution using this header in a production environment. The HTTP Cross-Origin-Resource-Policy response header conveys a desire that the browser blocks no-cors cross-origin/cross-site requests to the given resource. ...
Expect-CT - HTTP
Root CAs manually added to the trust store override and suppress Expect-CT reports/enforcement. Browsers will not remember an Expect-CT policy, unless the site has 'proven' it can serve a certificate satisfying the certificate transparency requirements. Browsers implement their own trust model regarding which CT logs are considered trusted for the certificate to have been logged to. Builds of
Chrome are designed to stop enforcing the Expect-CT policy 10 weeks after the installation's build date. Specifications Specification Title Internet Draft Expect-CT Extension for HTTP ...
Feature-Policy: autoplay - HTTP
wsing contexts and all nested browsing contexts (iframes). 'self': The feature is allowed by default in top-level browsing contexts and in nested browsing contexts (iframes) in the same origin. The feature is not allowed in cross-origin documents in nested browsing contexts. 'none': The feature is disabled in top-level and nested browsing contexts. Default policy The default value in Google
Chrome is 'self'. Specifications Specification Status Comment Feature Policy Editor's Draft Initial definition. ...
Feature-Policy: picture-in-picture - HTTP
and all nested browsing contexts (iframes). 'self': The feature is allowed by default in top-level browsing contexts and in nested browsing contexts (iframes) in the same origin. The feature is not allowed in cross-origin documents in nested browsing contexts. 'none': The feature is disabled in top-level and nested browsing contexts. Default policy As of June 2019, the spec draft and Google
Chrome set default allow list to *. Specifications Specification Status Comment Feature Policy Editor's Draft Initial definition. ...
Index - HTTP
be used to indicate whether or not a browser should be allowed to render a page in a <frame>, <iframe>, <embed> or <object> . Sites can use this to avoid clickjacking attacks, by ensuring that their content is not embedded into other sites. 122 X-XSS-Protection HTTP, Reference, Security, XSS, header The HTTP X-XSS-Protection response header is a feature of Internet Explorer,
Chrome and Safari that stops pages from loading when they detect reflected cross-site scripting (XSS) attacks. Although these protections are largely unnecessary in modern browsers when sites implement a strong Content-Security-Policy that disables the use of inline JavaScript ('unsafe-inline'), they can still provide protections for users of older web browsers that don't yet support CSP. ...
Keep-Alive - HTTP
The Keep-Alive general header allows the sender to hint about how the connection may be used to set a timeout and a maximum amount of requests. The Connection header needs to be set to "keep-alive" for this header to have any meaning. Connection-specific header fields such as Connection and Keep-Alive are prohibited in HTTP/2.
Chrome and Firefox ignore them in HTTP/2 responses, but Safari conforms to the HTTP/2 spec requirements and won't load any response which contains them. Header type General header Forbidden header name yes Syntax Keep-Alive: parameters Directives parameters A comma-separated list of parameters, each consisting of an identifier and a value separated by the equal sign ('='). The following identifiers are possible: timeout: ind...
Set-Cookie - HTTP
cs, /docs/Web/, and /docs/Web/HTTP will all match. Secure Optional A secure cookie is only sent to the server when a request is made with the https: scheme. (However, confidential information should never be stored in HTTP Cookies, as the entire mechanism is inherently insecure and doesn't encrypt any information.) Note: Insecure sites (http:) can't set cookies with the Secure attribute (since
Chrome 52 and Firefox 52). HttpOnly Optional Forbids JavaScript from accessing the cookie, for example, through the Document.cookie property. Note that a cookie that has been created with HttpOnly will still be sent with JavaScript-initiated requests, e.g. when calling XMLHttpRequest.send() or fetch(). This mitigates attacks against cross-site scripting (XSS). SameSite=<samesite-value> Optional ...
Strict-Transport-Security - HTTP
wing the guidelines and successfully submitting your domain, browsers will never connect to your domain using an insecure connection. While the service is hosted by Google, all browsers have stated an intent to use (or actually started using) the preload list. However, it is not part of the HSTS specification and should not be treated as official. Information regarding the HSTS preload list in
Chrome : https://www.chromium.org/hsts Consultation of the Firefox HSTS preload list : nsSTSPreloadList.inc Examples All present and future subdomains will be HTTPS for a max-age of 1 year. This blocks access to pages or sub domains that can only be served over HTTP. Strict-Transport-Security: max-age=31536000; includeSubDomains In the following example, max-age is set to 2 years, raised from what...
X-XSS-Protection - HTTP
The HTTP X-XSS-Protection response header is a feature of Internet Explorer,
Chrome and Safari that stops pages from loading when they detect reflected cross-site scripting (XSS) attacks. Although these protections are largely unnecessary in modern browsers when sites implement a strong Content-Security-Policy that disables the use of inline JavaScript ('unsafe-inline'), they can still provide protections for users of older web browsers that don't yet support CSP.
Chrome has removed their XSS Auditor Firefox have not, and will not implement X-XSS-Protection Edge have retired their XSS filter This means that if you do not need to support legacy browsers, it is recommended that you use Content-Security-Policy without allowing unsafe-inline scripts instead. Header type Respon...
HTTP headers - HTTP
g, but not enforcing, their effects. These violation reports consist of JSON documents sent via an HTTP POST request to the specified URI. 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. When a site enables the Expect-CT header, they are requesting that
Chrome check that any certificate for that site appears in public CT logs. Feature-Policy Provides a mechanism to allow and deny the use of browser features in its own frame, and in iframes that it embeds. Strict-Transport-Security (HSTS) Force communication using HTTPS instead of HTTP. Upgrade-Insecure-Requests Sends a signal to the server expressing the client's preference for an encrypted and a...
Link prefetching FAQ - HTTP
but requires an If-Modified-Since or If-None-Match validation request before the serving the document out of the browser's cache. As a server admin, can I distinguish prefetch requests from normal requests? Yes, we send the following header along with each prefetch request: X-moz: prefetch Of course, this request header is not at all standardized, and it may change in future Mozilla releases.
Chrome uses "X-Purpose: prefetch" or "Purpose: prefetch" header. Is there a preference to disable link prefetching? Yes, there is a hidden preference that you can set to disable link prefetching. Add this line to your prefs.js file located in your profile directory (or make the appropriate change via about:config): user_pref("network.prefetch-next", false); However, the theory is that if link prefe...
HTTP Public Key Pinning (HPKP) - HTTP
via a special HTTP header which public keys belong to it, the client stores this information for a given period of time. When the client visits the server again, it expects at least one certificate in the certificate chain to contain a public key whose fingerprint is already known via HPKP. If the server delivers an unknown public key, the client should present a warning to the user. Firefox and
Chrome disable pin validation for pinned hosts whose validated certificate chain terminates at a user-defined trust anchor (rather than a built-in trust anchor). This means that for users who imported custom root certificates all pinning violations are ignored. Enabling HPKP To enable this feature for your site, you need to return the Public-Key-Pins HTTP header when your site is accessed over HTTPS: ...
Redirections in HTTP - HTTP
ver configuration, this is likely a redirection loop. Sometimes, the server won't detect it: a redirection loop can spread over several servers which each don't have the full picture. In this case, browsers will detect it and display an error message. Firefox displays: Firefox has detected that the server is redirecting the request for this address in a way that will never complete. ...while
Chrome displays: This Webpage has a redirect loop In both cases, the user can't do much (unless a corruption is happening on their side, like a mismatch of cache or cookies). It is important to avoid redirection loops, as they completely break the user experience. ...
408 Request Timeout - HTTP
ns that the server would like to shut down this unused connection. It is sent on an idle connection by some servers, even without any previous request by the client. A server should send the "close" Connection header field in the response, since 408 implies that the server has decided to close the connection rather than continue waiting. This response is used much more since some browsers, like
Chrome, Firefox 27+, and IE9, use HTTP pre-connection mechanisms to speed up surfing. Note: some servers merely shut down the connection without sending this message. Status 408 Request Timeout Specifications Specification Title RFC 7231, section 6.5.7: 408 Request Timeout Hypertext Transfer Protocol (HTTP/1.1): Semantics and Content ...
HTTP response status codes - HTTP
given by the user agent. 407 Proxy Authentication Required This is similar to 401 but authentication is needed to be done by a proxy. 408 Request Timeout This response is sent on an idle connection by some servers, even without any previous request by the client. It means that the server would like to shut down this unused connection. This response is used much more since some browsers, like
Chrome, Firefox 27+, or IE9, use HTTP pre-connection mechanisms to speed up surfing. Also note that some servers merely shut down the connection without sending this message. 409 Conflict This response is sent when a request conflicts with the current state of the server. 410 Gone This response is sent when the requested content has been permanently deleted from server, with no forwarding address. C...
About JavaScript - JavaScript
CMA-262 Edition 5 compliant. Several major runtime optimizations such as TraceMonkey (Firefox 3.5), JagerMonkey (Firefox 4) and IonMonkey were added to the SpiderMonkey JavaScript engine over time. Work is always ongoing to improve JavaScript execution performance. Besides the above implementations, there are other popular JavaScript engines such as:- Google's V8, which is used in the Google
Chrome browser and recent versions of Opera browser. This is also the engine used by Node.js. The JavaScriptCore (SquirrelFish/Nitro) used in some WebKit browsers such as Apple Safari. Carakan in old versions of Opera. The Chakra engine used in Internet Explorer (although the language it implements is formally called "JScript" in order to avoid trademark issues). Each of Mozilla's JavaScript engine...
Introduction - JavaScript
ed when programming with JavaScript, consult the article JavaScript technologies overview. JavaScript documentation versus the ECMAScript specification The ECMAScript specification is a set of requirements for implementing ECMAScript. It is useful if you want to implement standards-compliant language features in your ECMAScript implementation or engine (such as SpiderMonkey in Firefox, or V8 in
Chrome). The ECMAScript document is not intended to help script programmers. Use the JavaScript documentation for information when writing scripts. The ECMAScript specification uses terminology and syntax that may be unfamiliar to a JavaScript programmer. Although the description of the language may differ in ECMAScript, the language itself remains the same. JavaScript supports all functionality outli...
Inheritance and the prototype chain - JavaScript
there is no other JavaScript on the webpage other than the below code). For the best learning experience, it is highly recommended that you open a console, navigate to the "console" tab, copy-and-paste in the below JavaScript code, and run it by pressing the Enter/Return key. (The console is included in most web browser's Developer Tools. More information is available for Firefox Developer Tools,
Chrome DevTools, and Edge DevTools.) function doSomething(){} console.log( doSomething.prototype ); // It does not matter how you declare the function, a // function in JavaScript will always have a default // prototype property. // (Ps: There is one exception that arrow function doesn't have a default prototype property) var doSomething = function(){}; console.log( doSomething.prototype ); As se...
Memory Management - JavaScript
. Node.js Node.js offers additional options and tools for configuring and debugging memory issues that may not be available for JavaScript executed within a browser environment. ...
RangeError: radix must be an integer - JavaScript
e an integer at least 2 and no greater than 36" occurs when the optional radix parameter of the Number.prototype.toString() or the BigInt.prototype.toString() method was specified and is not between 2 and 36. Message RangeError: invalid argument (Edge) RangeError: radix must be an integer at least 2 and no greater than 36 (Firefox) RangeError: toString() radix argument must be between 2 and 36 (
Chrome) Error type RangeError What went wrong? The optional radix parameter of the Number.prototype.toString() or the BigInt.prototype.toString() method was specified. Its value must be an integer (a number) between 2 and 36, specifying the base of the number system to be used for representing numeric values. For example, the decimal (base 10) number 169 is represented in hexadecimal (base 16) as A...
SyntaxError: invalid regular expression flag "x" - JavaScript
The JavaScript exception "invalid regular expression flag" occurs when the flags, defined after the second slash in regular expression literal, are not one of g, i, m, s, u, or y. Message SyntaxError: Syntax error in regular expression (Edge) SyntaxError: invalid regular expression flag "x" (Firefox) SyntaxError: Invalid regular expression flags (
Chrome) Error type SyntaxError What went wrong? There are invalid regular expression flags in the code. In a regular expression literal, which consists of a pattern enclosed between slashes, the flags are defined after the second slash. They can also be defined in the constructor function of the RegExp object (second parameter). Regular expression flags can be used separately or together in any order, but there are only six of them in ECMAScript...
TypeError: X.prototype.y called on incompatible type - JavaScript
n a function (on a given object), is called with a this not corresponding to the type expected by the function. Message TypeError: 'this' is not a Set object (EdgE) TypeError: Function.prototype.toString called on incompatible object (Firefox) TypeError: Function.prototype.bind called on incompatible target (Firefox) TypeError: Method Set.prototype.add called on incompatible receiver undefined (
Chrome) TypeError: Bind must be called on a function (
Chrome) Error type TypeError What went wrong? When this error is thrown, a function (on a given object), is called with a this not corresponding to the type expected by the function. This issue can arise when using the Function.prototype.call() or Function.prototype.apply() methods, and providing a this argument which does not have the expected...
ReferenceError: can't access lexical declaration`X' before initialization - JavaScript
laration `variable' before initialization" occurs when a lexical variable was accessed before it was initialized. This happens within any block statement, when let or const declarations are accessed before they are defined. Message ReferenceError: Use before delaration (Edge) ReferenceError: can't access lexical declaration `X' before initialization (Firefox) ReferenceError: 'x' is not defined (
Chrome) Error type ReferenceError What went wrong? A lexical variable was accessed before it was initialized. This happens within any block statement, when let or const declarations are accessed before they are defined. Examples Invalid cases In this case, the variable "foo" is redeclared in the block statement using let. function test() { let foo = 33; if (true) { let foo = (foo + 55);...
TypeError: can't assign to property "x" on "y": not an object - JavaScript
The JavaScript strict mode exception "can't assign to property" occurs when attempting to create a property on primitive value such as a symbol, a string, a number or a boolean. Primitive values cannot hold any property. Message TypeError: can't assign to property "x" on {y}: not an object (Firefox) TypeError: Cannot create property 'x' on {y} (
Chrome) Error type TypeError. What went wrong? In Strict_mode, a TypeError is raised when attempting to create a property on primitive value such as a symbol, a string, a number or a boolean. Primitive values cannot hold any property. The problem might be that an unexpected value is flowing at an unexpected place, or that an object variant of a String or a Number is expected. Examples Invalid cases 'use strict'; var foo = "my string"; // The ...
TypeError: can't define property "x": "obj" is not extensible - JavaScript
s when Object.preventExtensions() marked an object as no longer extensible, so that it will never have properties beyond the ones it had at the time it was marked as non-extensible. Message TypeError: Cannot create property for a non-extensible object (Edge) TypeError: can't define property "x": "obj" is not extensible (Firefox) TypeError: Cannot define property: "x", object is not extensible. (
Chrome) Error type TypeError What went wrong? Usually, an object is extensible and new properties can be added to it. However, in this case Object.preventExtensions() marked an object as no longer extensible, so that it will never have properties beyond the ones it had at the time it was marked as non-extensible. Examples Adding new properties to a non-extensible objects In strict mode, attempti...
TypeError: property "x" is non-configurable and can't be deleted - JavaScript
The JavaScript exception "property is non-configurable and can't be deleted" occurs when it was attempted to delete a property, but that property is non-configurable. Message TypeError: Calling delete on 'x' is not allowed in strict mode (Edge) TypeError: property "x" is non-configurable and can't be deleted. (Firefox) TypeError: Cannot delete property 'x' of #<Object> (
Chrome) Error type TypeError in strict mode only. What went wrong? It was attempted to delete a property, but that property is non-configurable. The configurable attribute controls whether the property can be deleted from the object and whether its attributes (other than writable) can be changed. This error happens only in strict mode code. In non-strict code, the operation returns false. Examples Attempting to delete ...
TypeError: can't redefine non-configurable property "x" - JavaScript
The JavaScript exception "can't redefine non-configurable property" occurs when it was attempted to redefine a property, but that property is non-configurable. Message TypeError: Cannot modify non-writable property {x} (Edge) TypeError: can't redefine non-configurable property "x" (Firefox) TypeError: Cannot redefine property: "x" (
Chrome) Error type TypeError What went wrong? It was attempted to redefine a property, but that property is non-configurable. The configurable attribute controls whether the property can be deleted from the object and whether its attributes (other than writable) can be changed. Usually, properties in an object created by an object initializer are configurable. However, for example, when using Object.defineProperty(), the property isn't configurable by default.
TypeError: cyclic object value - JavaScript
The JavaScript exception "cyclic object value" occurs when object references were found in JSON. JSON.stringify() doesn't try to solve them and fails accordingly. Message TypeError: cyclic object value (Firefox) TypeError: Converting circular structure to JSON (
Chrome and Opera) TypeError: Circular reference in value argument not supported (Edge) Error type TypeError What went wrong? The JSON format per se doesn't support object references (although an IETF draft exists), hence JSON.stringify() doesn't try to solve them and fails accordingly. Examples Circular references In a circular structure like the following var circularReference = {otherData: 123}; circularReference.myself = circularReference; JSON.stringify() will fail JSON.stringify(circularReference); // TypeError: cyclic...
SyntaxError: applying the 'delete' operator to an unqualified name is deprecated - JavaScript
exception "applying the 'delete' operator to an unqualified name is deprecated" occurs when variables are attempted to be deleted using the delete operator. Message SyntaxError: Calling delete on expression not allowed in strict mode (Edge) SyntaxError: applying the 'delete' operator to an unqualified name is deprecated (Firefox) SyntaxError: Delete of an unqualified identifier in strict mode. (
Chrome) Error type SyntaxError in strict mode only. What went wrong? Normal variables in JavaScript can't be deleted using the delete operator. In strict mode, an attempt to delete a variable will throw an error and is not allowed. The delete operator can only delete properties on an object. Object properties are "qualified" if they are configurable. Unlike what common belief suggests, the delete...
Warning: Date.prototype.toLocaleFormat is deprecated - JavaScript
rowser support, available in Firefox only). var today = new Date(); var date = today.toLocaleFormat('%A, %e. %B %Y'); console.log(date); // In German locale // "Freitag, 10. Marz 2017" Alternative standard syntax using the ECMAScript Intl API The ECMA-402 (ECMAScript Intl API) standard specifies standard objects and methods that enable language sensitive date and time formatting (available in
Chrome 24+, Firefox 29+, IE11+, Safari10+). You can now either use the Date.prototype.toLocaleDateString method if you just want to format one date. var today = new Date(); var options = { weekday: 'long', year: 'numeric', month: 'long', day: 'numeric' }; var date = today.toLocaleDateString('de-DE', options); console.log(date); // "Freitag, 10. Marz 2017" Or, you can make use of the...
TypeError: setting getter-only property "x" - JavaScript
The JavaScript strict mode-only exception "setting getter-only property" occurs when there is an attempt to set a new value to a property for which only a getter is specified. Message TypeError: Assignment to read-only properties is not allowed in strict mode (Edge) TypeError: setting getter-only property "x" (Firefox) TypeError: Cannot set property "prop" of #<Object> which has only a getter (
Chrome) Error type TypeError in strict mode only. What went wrong? There is an attempt to set a new value to a property for which only a getter is specified. While this will be silently ignored in non-strict mode, it will throw a TypeError in strict mode. Examples Property with no setter The example below shows how to set a getter for a property. It doesn't specify a setter, so a TypeError will ...
SyntaxError: identifier starts immediately after numeric literal - JavaScript
The JavaScript exception "identifier starts immediately after numeric literal" occurs when an identifier started with a digit. Identifiers can only start with a letter, underscore (_), or dollar sign ($). Message SyntaxError: Unexpected identifier after numeric literal (Edge) SyntaxError: identifier starts immediately after numeric literal (Firefox) SyntaxError: Unexpected number (
Chrome) Error type SyntaxError What went wrong? The names of variables, called identifiers, conform to certain rules, which your code must adhere to! A JavaScript identifier must start with a letter, underscore (_), or dollar sign ($). They can't start with a digit! Only subsequent characters can be digits (0-9). Examples Variable names starting with numeric literals Variable names can't start with numbers ...
SyntaxError: illegal character - JavaScript
The JavaScript exception "illegal character" occurs when there is an invalid or unexpected token that doesn't belong at this position in the code. Message SyntaxError: Invalid character (Edge) SyntaxError: illegal character (Firefox) SyntaxError: Invalid or unexpected token (
Chrome) Error type SyntaxError What went wrong? There is an invalid or unexpected token that doesn't belong at this position in the code. Use an editor that supports syntax highlighting and carefully check your code against mismatches like a minus sign ( - ) versus a dash ( - ) or simple quotes ( " ) vs non-standard quotation marks ( " ). Examples Mismatched characters Some characters look similar, but will cause the parser to fail interpreting your code. Famous examples of this are quotes, the minus or semicolon ...
RangeError: invalid array length - JavaScript
"Invalid array length" occurs when creating an Array or an ArrayBuffer which has a length which is either negative or larger or equal to 232, or when setting the Array.length property to a value which is either negative or larger or equal to 232. Message RangeError: Array length must be a finite positive integer (Edge) RangeError: invalid array length (Firefox) RangeError: Invalid array length (
Chrome) RangeError: Invalid array buffer length (
Chrome) Error type RangeError What went wrong? An invalid array length might appear in these situations: When creating an Array or an ArrayBuffer which has a length which is either negative or larger or equal to 232, or when setting the Array.length property to a value which is either negative or larger or equal to 232. Why are Array and ArrayB...
TypeError: invalid assignment to const "x" - JavaScript
The JavaScript exception "invalid assignment to const" occurs when it was attempted to alter a constant value. JavaScript const declarations can't be re-assigned or redeclared. Message TypeError: invalid assignment to const "x" (Firefox) TypeError: Assignment to constant variable. (
Chrome) TypeError: Assignment to const (Edge) TypeError: Redeclaration of const 'x' (IE) Error type TypeError What went wrong? A constant is a value that cannot be altered by the program during normal execution. It cannot change through re-assignment, and it can't be redeclared. In JavaScript, constants are declared using the const keyword. Examples Invalid redeclaration Assigning a value to the same constant name in the same block-scope will throw. const COLUMNS = 80; // ... COLUMNS = 120; // TypeError:...
SyntaxError: for-in loop head declarations may not have initializers - JavaScript
occurs when the head of a for...in contains an initializer expression, such as |for (var i = 0 in obj)|. This is not allowed in for-of loops in strict mode. Message SyntaxError: for-in loop head declarations cannot have an initializer (Edge) SyntaxError: for-in loop head declarations may not have initializers (Firefox) SyntaxError: for-in loop variable declaration may not have an initializer. (
Chrome) Error type SyntaxError in strict mode only. What went wrong? The head of a for...in loop contains an initializer expression. That is, a variable is declared and assigned a value |for (var i = 0 in obj)|. In non-strict mode, this head declaration is silently ignored and behaves like |for (var i in obj)|. In strict mode, however, a SyntaxError is thrown. Examples This example throws a Synta...
SyntaxError: a declaration in the head of a for-of loop can't have an initializer - JavaScript
when the head of a for...of loop contains an initializer expression such as |for (var i = 0 of iterable)|. This is not allowed in for-of loops. Message SyntaxError: for-of loop head declarations cannot have an initializer (Edge) SyntaxError: a declaration in the head of a for-of loop can't have an initializer (Firefox) SyntaxError: for-of loop variable declaration may not have an initializer. (
Chrome) Error type SyntaxError What went wrong? The head of a for...of loop contains an initializer expression. That is, a variable is declared and assigned a value |for (var i = 0 of iterable)|. This is not allowed in for-of loops. You might want a for loop that does allow an initializer. Examples Invalid for-of loop let iterable = [10, 20, 30]; for (let value = 50 of iterable) { console.log...
URIError: malformed URI sequence - JavaScript
An argument given to either the decodeURI, encodeURI, encodeURIComponent, or decodeURIComponent function was not valid, so that the function was unable encode or decode properly. ...
SyntaxError: missing = in const declaration - JavaScript
The JavaScript exception "missing = in const declaration" occurs when a const declaration was not given a value in the same statement (like const RED_FLAG;). You need to provide one (const RED_FLAG = '#ff0'). Message SyntaxError: Const must be initalized (Edge) SyntaxError: missing = in const declaration (Firefox) SyntaxError: Missing initializer in const declaration (
Chrome) Error type SyntaxError What went wrong? A constant is a value that cannot be altered by the program during normal execution. It cannot change through re-assignment, and it can't be redeclared. In JavaScript, constants are declared using the const keyword. An initializer for a constant is required; that is, you must specify its value in the same statement in which it's declared (which makes sense, given that it can't...
TypeError: "x" is not a non-null object - JavaScript
The JavaScript exception "is not a non-null object" occurs when an object is expected somewhere and wasn't provided. null is not an object and won't work. Message TypeError: Invalid descriptor for property {x} (Edge) TypeError: "x" is not a non-null object (Firefox) TypeError: Property description must be an object: "x" (
Chrome) TypeError: Invalid value used in weak set (
Chrome) Error type TypeError What went wrong? An object is expected somewhere and wasn't provided. null is not an object and won't work. You must provide a proper object in the given situation. Examples Property descriptor expected When methods like Object.create() or Object.defineProperty() and Object.defineProperties() are used, the optional descriptor parameter expects a property descriptor object. Providing no obj...
TypeError: can't delete non-configurable array element - JavaScript
The JavaScript exception "can't delete non-configurable array element" occurs when it was attempted to shorten the length of an array, but one of the array's elements is non-configurable. Message TypeError: can't delete non-configurable array element (Firefox) TypeError: Cannot delete property '2' of [object Array] (
Chrome) Error type TypeError What went wrong? It was attempted to shorten the length of an array, but one of the array's elements is non-configurable. When shortening an array, the elements beyond the new array length will be deleted, which failed in this situation. The configurable attribute controls whether the property can be deleted from the object and whether its attributes (other than writable) can be changed. Usually, properties in an object created by an array initi...
TypeError: "x" is read-only - JavaScript
The JavaScript strict mode-only exception "is read-only" occurs when a global variable or object property that was assigned to is a read-only property. Message TypeError: Assignment to read-only properties is not allowed in strict mode (Edge) TypeError: "x" is read-only (Firefox) TypeError: 0 is read-only (Firefox) TypeError: Cannot assign to read only property 'x' of #<Object> (
Chrome) TypeError: Cannot assign to read only property '0' of [object Array] (
Chrome) Error type TypeError What went wrong? The global variable or object property that was assigned to is a read-only property. (Technically, it is a non-writable data property.) This error happens only in strict mode code. In non-strict code, the assignment is silently ignored. Examples Invalid cases Read-only properties are not...
SyntaxError: redeclaration of formal parameter "x" - JavaScript
The JavaScript exception "redeclaration of formal parameter" occurs when the same variable name occurs as a function parameter and is then redeclared using a let assignment in a function body again. Message SyntaxError: Let/Const redeclaration (Edge) SyntaxError: redeclaration of formal parameter "x" (Firefox) SyntaxError: Identifier "x" has already been declared (
Chrome) Error type SyntaxError What went wrong? The same variable name occurs as a function parameter and is then redeclared using a let assignment in a function body again. Redeclaring the same variable within the same function or block scope using let is not allowed in JavaScript. Examples Redeclared argument In this case, the variable "arg" redeclares the argument. function f(arg) { let arg = 'foo'; } // SyntaxError: ...
SyntaxError: "x" is a reserved identifier - JavaScript
The JavaScript exception "variable is a reserved identifier" occurs when reserved keywords are used as identifiers. Message SyntaxError: The use of a future reserved word for an identifier is invalid (Edge) SyntaxError: "x" is a reserved identifier (Firefox) SyntaxError: Unexpected reserved word (
Chrome) Error type SyntaxError What went wrong? Reserved keywords will throw in if they are used as identifiers. These are reserved in strict mode and sloppy mode: enum The following are only reserved when they are found in strict mode code: implements interface let package private protected public static Examples Strict and non-strict reserved keywords The enum identifier is generally reserved. var enum = { RED: 0, GREEN: 1, BLUE: 2 }; // SyntaxError: enum is a reserved ident...
RangeError: repeat count must be less than infinity - JavaScript
The JavaScript exception "repeat count must be less than infinity" occurs when the String.prototype.repeat() method is used with a count argument that is infinity. Message RangeError: argument out of range (Edge) RangeError: repeat count must be less than infinity and not overflow maximum string size (Firefox) RangeError: Invalid count value (
Chrome) Error type RangeError What went wrong? The String.prototype.repeat() method has been used. It has a count parameter indicating the number of times to repeat the string. It must be between 0 and less than positive Infinity and cannot be a negative number. The range of allowed values can be described like this: [0, +?). The resulting string can also not be larger than the maximum string size, which can differ in JavaScript engines. In Firefox...
SyntaxError: "use strict" not allowed in function with non-simple parameters - JavaScript
a function with default parameters, rest parameters, or destructuring parameters. Message Edge: Cannot apply strict mode on functions with non-simple parameter list Firefox: SyntaxError: "use strict" not allowed in function with default parameter SyntaxError: "use strict" not allowed in function with rest parameter SyntaxError: "use strict" not allowed in function with destructuring parameter
Chrome: SyntaxError: Illegal 'use strict' directive in function with non-simple parameter list Error type SyntaxError. What went wrong? A "use strict" directive is written at the top of a function that has one of the following parameters: Default parameters Rest parameters Destructuring parameters A "use strict" directive is not allowed at the top of such functions per the ECMAScript specifi...
SyntaxError: function statement requires a name - JavaScript
The JavaScript exception "function statement requires a name" occurs when there is a function statement in the code that requires a name. Message Syntax Error: Expected identifier (Edge) SyntaxError: function statement requires a name [Firefox] SyntaxError: Unexpected token ( [
Chrome] Error type SyntaxError What went wrong? There is a function statement in the code that requires a name. You'll need to check how functions are defined and if you need to provide a name for it, or if the function in question needs to be a function expression, an IIFE, or if the function code is placed correctly in this context at all. Examples Statements vs expressions A function statement (or function declaration) requires a name, this won't work: function () { return 'Hello world'; } // SyntaxError: ...
TypeError: invalid 'instanceof' operand 'x' - JavaScript
The JavaScript exception "invalid 'instanceof' operand" occurs when the right hand side operands of the instanceof operator isn't used with a constructor object, i.e. an object which has a prototype property and is callable. Message TypeError: invalid 'instanceof' operand "x" (Firefox) TypeError: "x" is not a function (Firefox) TypeError: Right-hand side of 'instanceof' is not an object (
Chrome) TypeError: Right-hand side of 'instanceof' is not callable (
Chrome) Error type TypeError What went wrong? The instanceof operator expects the right hand side operands to be a constructor object, i.e. an object which has a prototype property and is callable. Examples instanceof vs typeof "test" instanceof ""; // TypeError: invalid 'instanceof' operand "" 42 instanceof 0; // TypeError: inval...
TypeError: 'x' is not iterable - JavaScript
The JavaScript exception "is not iterable" occurs when the value which is given as the right hand-side of for...of or as argument of a function such as Promise.all or TypedArray.from, is not an iterable object. Message TypeError: 'x' is not iterable (Firefox,
Chrome) TypeError: 'x' is not a function or its return value is not iterable (
Chrome) Error type TypeError What went wrong? The value which is given as the right hand-side of for...of or as argument of a function such as Promise.all or TypedArray.from, is not an iterable object. An iterable can be a built-in iterable type such as Array, String or Map, a generator result, or an object implementing the iterable protocol. Examples Iterating over Object properties In JavaScript, Objects are not iterable unless they implement the ite...
Arrow function expressions - JavaScript
g lexical context, strict mode rules with regard to this are ignored. var f = () => { 'use strict'; return this; }; f() === window; // or the global object All other strict mode rules apply normally. CORRECTION: START NOTE: the previous statement seems false. Strict mode should prevent creating global variables when assigning to an undeclared identifier in a function. ...
Error.prototype.stack - JavaScript
le location, the line number. (Note that the Error object also possesses the fileName, lineNumber and columnNumber properties for retrieving these from the error thrown (but only the error, and not its trace).) Note that this is the format used by Firefox. There is no standard formatting. However, Safari 6+ and Opera 12- use a very similar format. Browsers using the V8 JavaScript engine (such as
Chrome, Opera 15+, Android Browser) and IE10+, on the other hand, uses a different format (see the archived MSDN error.stack docs). Argument values in the stack: Prior to Firefox 14, the function name would be followed by the argument values converted to string in parentheses immediately before the at (@) sign. While an object (or array, etc.) would appear in the converted form "[object Object]", and a...
Function.prototype.apply() - JavaScript
responsible for handling the arguments. Since ECMAScript 5th Edition, you can also use any kind of object which is array-like. In practice, this means it's going to have a length property, and integer ("index") properties in the range (0..length - 1). For example, you could use a NodeList, or a custom object like { 'length': 2, '0': 'eat', '1': 'bananas' }. Note: Many older browsers--including
Chrome <17 and Internet Explorer <9--don't accept array-like objects, and will throw an exception. Examples Using apply to append an array to another You can use push to append an element to an array. And, because push accepts a variable number of arguments, you can also push multiple elements at once. But, if you pass an array to push, it will actually add that array as a single element, instead o...
Object.setPrototypeOf() - JavaScript
ntity = sName; } var george = Object.appendChain(new Person('George'), 'console.log("Hello guys!!");'); console.log(george.identity); // 'George' george(); // 'Hello guys!!' Polyfill Using the older Object.prototype.__proto__ property, we can easily define Object.setPrototypeOf if it isn't available already: if (!Object.setPrototypeOf) { // Only works in
Chrome and FireFox, does not work in IE: Object.prototype.setPrototypeOf = function(obj, proto) { if(obj.__proto__) { obj.__proto__ = proto; return obj; } else { // If you want to return prototype of Object.create(null): var Fn = function() { for (var key in obj) { Object.defineProperty(this,...
Promise.all() - JavaScript
to contribute to the interactive demo project, please clone https://github.com/mdn/interactive-examples and send us a pull request. Syntax Promise.all(iterable); Parameters iterable An iterable object such as an Array. Return value An already resolved Promise if the iterable passed is empty. An asynchronously resolved Promise if the iterable passed contains no promises. Note, Google
Chrome 58 returns an already resolved promise in this case. A pending Promise in all other cases. This returned promise is then resolved/rejected asynchronously (as soon as the stack is empty) when all the promises in the given iterable have resolved, or if any of the promises reject. See the example about "Asynchronicity or synchronicity of Promise.all" below. Returned values will be in order of the P...
Set - JavaScript
h.sqrt(25)) // true mySet.has('Some Text'.toLowerCase()) // true mySet.has(o) // true mySet.size // 5 mySet.delete(5) // removes 5 from the set mySet.has(5) // false, 5 has been removed mySet.size // 4, since we just removed one value console.log(mySet) // logs Set(4) [ 1, "some text", {...}, {...} ] in Firefox // logs Set(4) { 1, "some text", {...}, {...} } in
Chrome Iterating Sets // iterate over items in set // logs the items in the order: 1, "some text", {"a": 1, "b": 2}, {"a": 1, "b": 2} for (let item of mySet) console.log(item) // logs the items in the order: 1, "some text", {"a": 1, "b": 2}, {"a": 1, "b": 2} for (let item of mySet.keys()) console.log(item) // logs the items in the order: 1, "some text", {"a": 1, "b": 2}, {"a": 1, "b": 2} for (let i...
Planned changes to shared memory - JavaScript
cts again, but changes are needed in order to be use these across threads (i.e., postMessage() for SharedArrayBuffer objects throws by default). These changes provide further isolation between sites and help reduce the impact of attacks with high-resolution timers, which can be created with shared memory. Starting with Firefox 79, the features described in this document are enabled by default.
Chrome intends to implement similar restrictions. New HTTP header bonanza As a baseline requirement, documents will need to be in a secure context. For top-level documents, two headers will need to be set: Cross-Origin-Opener-Policy with same-origin as value (protects your origin from attackers) Cross-Origin-Embedder-Policy with require-corp as value (protects victims from your origin) With th...
SharedArrayBuffer() constructor - JavaScript
The SharedArrayBuffer() constructor is used to create a SharedArrayBuffer object representing a generic, fixed-length raw binary data buffer, similar to the ArrayBuffer object. The source for this interactive example is stored in a GitHub repository. If you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request. ...
String.prototype.replaceAll() - JavaScript
The replaceAll() method returns a new string with all matches of a pattern replaced by a replacement. The pattern can be a string or a RegExp, and the replacement can be a string or a function to be called for each match. The original string is left unchanged. The source for this interactive example is stored in a GitHub repository. If you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request. ...
WeakSet.prototype.add() - JavaScript
s a pull request. Syntax ws.add(value); Parameters value Required. The object to add to the WeakSet collection. Return value The WeakSet object. Examples Using add var ws = new WeakSet(); ws.add(window); // add the window object to the WeakSet ws.has(window); // true // Weakset only takes objects as arguments ws.add(1); // results in "TypeError: Invalid value used in weak set" in
Chrome // and "TypeError: 1 is not a non-null object" in Firefox Specifications Specification ECMAScript (ECMA-262)The definition of 'WeakSet.prototype.add' in that specification. ...
typeof - JavaScript
nc = new Function(); typeof func; // It will return 'function' Need for parentheses in Syntax // Parentheses can be used for determining the data type of expressions. let iData = 99; typeof iData + ' Wisen'; // 'number Wisen' typeof (iData + ' Wisen'); // 'string' Regular expressions Callable regular expressions were a non-standard addition in some browsers. typeof /s/ === 'function'; //
Chrome 1-12 Non-conform to ECMAScript 5.1 typeof /s/ === 'object'; // Firefox 5+ Conform to ECMAScript 5.1 Errors Before ECMAScript 2015, typeof was always guaranteed to return a string for any operand it was supplied with. Even with undeclared identifiers, typeof will return 'undefined'. Using typeof could never generate an error. But with the addition of block-scoped let and Statements/const usi...
Strict mode - JavaScript
e, then, you can't name or use variables or arguments with these names. function package(protected) { // !!! 'use strict'; var implements; // !!! interface: // !!! while (true) { break interface; // !!! } function private() { } // !!! } function fun(static) { 'use strict'; } // !!! Two Mozilla-specific caveats: First, if your code is JavaScript 1.7 or greater (for example in
chrome code or when using the right <script type="">) and is strict mode code, let and yield have the functionality they've had since those keywords were first introduced. But strict mode code on the web, loaded with <script src=""> or <script>...</script>, won't be able to use let/yield as identifiers. Second, while ES5 unconditionally reserves the words class, enum, export, extends, import, and super,...
display - Web app manifests
y CSS to your app based on the display mode, using the display-mode media feature. This can be used to provide a consistent user experience between launching a site from an URL and launching it from a desktop icon. Values The possible values are: Display Mode Description Fallback Display Mode fullscreen All of the available display area is used and no user agent
chrome is shown. standalone standalone The application will look and feel like a standalone application. This can include the application having a different window, its own icon in the application launcher, etc. In this mode, the user agent will exclude UI elements for controlling navigation, but can include other UI elements such as a status bar. minimal-ui minimal-ui The ...
icons - Web app manifests
. The purpose of this member is to allow a user agent to quickly ignore images with media types it does not support. purpose Defines the purpose of the image, for example if the image is intended to serve some special purpose in the context of the host OS (i.e., for better integration). purpose can have one or more of the following values, separated by spaces: mono
chrome: A user agent can present this icon where a mono
chrome icon with a solid fill is needed. The color information in the icon is discarded and only the alpha data is used. The icon can then be used by the user agent like a mask over any solid fill. maskable: The image is designed with icon masks and safe zone in mind, such that any part of the image outside the safe zone can safely be ignored a...
Web app manifests
e of the manifest file should return Content-Type: application/manifest+json). Browsers generally support manifests with other appropriate extensions like .json (Content-Type: application/json). Note: If the manifest requires credentials to fetch - the crossorigin attribute must be set to use-credentials, even if the manifest file is in the same origin as the current page. Splash screens In
Chrome 47 and later, a splash screen is displayed for sites launched from a homescreen. This splashscreen is auto-generated from properties in the web app manifest, specifically: name background_color The icon in the icons array that is closest to 128dpi for the device. Specifications Specification Status Comment Web App Manifest Working Draft Initial definition. ...
Authoring MathML - MathML
ring sniffing will allow to detect the rendering engines with native MathML support (Gecko and WebKit). Note that UA string sniffing is not the most reliable method and might break from version to version: var ua = navigator.userAgent; var isGecko = ua.indexOf("Gecko") > -1 && ua.indexOf("KHTML") === -1 && ua.indexOf('Trident') === -1; var isWebKit = ua.indexOf('AppleWebKit') > -1 && ua.indexOf('
Chrome') === -1; Mathematical fonts In order to get a good layout or to allow different style, it's important to have mathematical fonts available. It's always good to provide a link to MDN's Font Instructions, so that your visitors can verify whether they have appropriate fonts installed on their system. It's also good to provide a fallback with Web fonts. Prior to Gecko 31.0 (Firefox 31.0 / Thunde...
Autoplay guide for media and Web Audio APIs - Web media technologies
ther user interface features If the autoplay feature policy is used to grant autoplay support to an <iframe> and its document. Otherwise, the playback will likely be blocked. The exact situations that result in blocking, and the specifics of how sites become whitelisted vary from browser to browser, but the above are good guidelines to go by. For details, see the auto-play policies for Google
Chrome and WebKit. Note: Put another way, playback of any media that includes audio is generally blocked if the playback is programmatically initiated in a tab which has not yet had any user interaction. Browsers may additionally choose to block under other circumstances. Autoplay of media elements Now that we've covered what autoplay is and what can prevent autoplay from being allowed, we'll look ...
OpenSearch description format
(See Reference Material for links to other browsers' documentation.) Firefox also supports additional features not in the OpenSearch standard, such as search suggestions and the <SearchForm> element. ...
How to make PWAs re-engageable using Notifications and Push - Progressive web apps (PWAs)
rn the subscription object and move to the subscription part. If not, we initialize a new subscription: const response = await fetch('./vapidPublicKey'); const vapidPublicKey = await response.text(); const convertedVapidKey = urlBase64ToUint8Array(vapidPublicKey); The app fetches the server's public key and converts the response to text; then it needs to be converted to a Uint8Array (to support
Chrome). To learn more about VAPID keys you can read the Sending VAPID identified WebPush Notifications via Mozilla's Push Service blog post. The app can now use the PushManager to subscribe the new user. There are two options passed to the PushManager.subscribe() method -- the first is userVisibleOnly: true, which means all the notifications sent to the user will be visible to them, and the second one...
Mobile first - Progressive web apps (PWAs)
y for production deployment, in a www-built folder. volo build base=www-built: runs the built version through the server instead of the development version. Built-in features of the Mortar template Mortar templates contain a number of built-in features. In this sample app, I have used a couple of the built-in features to: Include an install button that works for Firefox OS, Firefox Aurora,
Chrome and iOS app installs (as explained on the Install GitHub page). To make the install button work, all you have to do is put a <button> on the page with an ID of install-btn. Magic! Selectively include JavaScript libraries according to media query and feature tests (require.js is built in, which is helpful and very easy to use.) HTML structure For this example app, the HTML structure is going t...
The building blocks of responsive design - Progressive web apps (PWAs)
o a gallery. You can then view previously-captured images and delete them. Other articles will discuss the functionality in more detail, but here we're interested in the layout. Note: You can find the Snapshot app on Github; check out the code and help improve it. You can also see Snapshot running live. Note that getUserMedia() is an experimental technology, which currently only works in Google
Chrome and Firefox desktop. More functionality and a clean up of the styling of Snapshot are planned for a future date. Our desktop layout for Snapshot is three columns, containing the camera viewer, image capture view, and gallery, respectively. The markup is very simple: <x-deck selected-index="0"> <x-card> ... </x-card> <x-card> ... </x-card> <x-card> ... </x-card> </x-d...
Compatibility sources - SVG: Scalable Vector Graphics
The following sources are used for the compatibility tables on SVG elements and attributes: https://developer.mozilla.org/En/SVG_in_Firefox together with its revision history for Firefox http://www.webkit.org/projects/svg/status.xml together with its recorded archive for WebKit, Safari and
Chrome http://www.opera.com/docs/specs/opera9/svg/ and accompanying pages for Opera >= 9, http://www.opera.com/docs/specs/opera8/ for Opera 8 http://blogs.msdn.com/b/ie/archive/2010/03/18/svg-in-ie9-roadmap.aspx for hints on IE9 support status The SVG support charts at Codedread.com for basic checks against the W3C test suite Wikipedia for basic hints, not normative ...
SVG animation with SMIL - SVG: Scalable Vector Graphics
Firefox 4 introduced support for animating SVG using Synchronized Multimedia Integration Language (SMIL). SMIL allows you to: animate the numeric attributes of an element (x, y, ...) animate transform attributes (translation or rotation) animate color attributes follow a motion path This is done adding an SVG element like <animate> inside the SVG element to animate. Below are examples for the four different ways. Animating attributes of an element The following example animates the cx attribute of a circle. To do so, we add an <animate> element inside the <circle> element. ...
SVG fonts - SVG: Scalable Vector Graphics
a font description technology was added to SVG to provide this ability. It was not meant for compatibility with other formats like PostScript or OTF, but rather as a simple means of embedding glyph information into SVG when rendered. SVG Fonts are currently supported only in Safari and Android Browser. Internet Explorer hasn't considered implementing this, the functionality has been removed from
Chrome 38 (and Opera 25) and Firefox has postponed its implementation indefinitely to concentrate on WOFF. Other tools however like the Adobe SVG Viewer plugin, Batik and parts of Inkscape support SVG font embedding. The base for defining an SVG font is the <font> element. Defining a font There are some ingredients required for embedding a font in SVG. Let's show an example declaration (the one from ...
Tools for SVG - SVG: Scalable Vector Graphics
Mobile devices with Webkit-based browsers also support SVG. On older or smaller devices, chances are that SVG Tiny is supported. Inkscape URL: www.inkscape.org One of the most important tools for a graphics format is a decent drawing program. ...
How to turn off form autocompletion - Web security
, and if the user agrees, the browser will autofill those fields the next time the user visits the page. If a site sets autocomplete="off" for username and password <input> fields, then the browser still offers to remember this login, and if the user agrees, the browser will autofill those fields the next time the user visits the page. This is the behavior in Firefox (since version 38), Google
Chrome (since 34), and Internet Explorer (since version 11). Preventing autofilling with autocomplete="new-password" If you are defining a user management page where a user can specify a new password for another person, and therefore you want to prevent autofilling of password fields, you can use autocomplete="new-password". This is a hint, which browsers are not required to comply with. However mode...
HTML Imports - Web Components
Although it may still work in some browsers, its use is discouraged since it could be removed at any time. Try to avoid using it. Firefox will not ship HTML Imports in its current form. See this status update for more information. Until there is a consensus on the standard or alternative mechanisms are worked out, you can use a polyfill such as Google's webcomponents.js. HTML Imports is intended to be the packaging mechanism for web components, but you can also use HTML Imports by itself. You import an HTML file by using a <link> tag in an HTML document like this: <link rel="import" href="myfile.html"> The import link type is new. ...