Search completed in 1.41 seconds.
Browser Detection and Cross Browser Support - Archive of obsolete content
improper b
rowser detection can lead to web maintenance nightmares.
... rethinking the basics of when and how to detect user agents is crucial to creating maintainable, cross b
rowser web content.
... this article reviews several approaches to b
rowser detection, their usefulness in specific circumstances to arrive at a common sense approach to b
rowser detection.
...And 131 more matches
Inner-browsing extending the browser navigation paradigm - Archive of obsolete content
introduction when you click a link on a web page, your web b
rowser makes a request to a web server which usually results in a new web page as a response.
...recently, however, modern b
rowsers and enriched web standards have begun to make new navigational and presentational models possible.
... one such model is inner-b
rowsing, which is our name for a model in which all navigation occurs within a single page, as in a typical application interface.
...And 22 more matches
Tabbed browser - Archive of obsolete content
here you should find a set of useful code snippets to help you work with firefox's tabbed b
rowser.
...these snippets assume they are run in the context of a b
rowser window.
... if you need to work with tabs from a non-b
rowser window, you need to obtain a reference to one first, see working with windows in chrome code for details.
...And 60 more matches
Browser API
the html b
rowser api is an extension of the html <iframe> element that allows web apps to implement b
rowsers or b
rowser-like applications.
... b
rowser api concepts and usage the b
rowser api consists of two major parts: custom <iframe> attributes: by adding a mozb
rowser attribute to the <iframe> element we can make it appear like a top-level b
rowser window to the embedded content.
... b
rowser api interfaces to support the requirement of a b
rowser <iframe>, the htmliframeelement dom interface has been extended with new methods that give the <iframe> some super powers.
...And 56 more matches
Browser detection using the user agent - HTTP
serving different web pages or services to different b
rowsers is usually a bad idea.
... the web is meant to be accessible to everyone, regardless of which b
rowser or device they're using.
... there are ways to develop your website to progressively enhance itself based on the availability of features rather than by targeting specific b
rowsers.
...And 51 more matches
Introduction to cross browser testing - Learn web development
overview: cross b
rowser testing next this article starts the module off by providing an overview of the topic of (cross) b
rowser testing, answering questions such as "what is cross b
rowser testing?", "what are the most common types of problems you'll encounter?", and "what are the main approaches for testing, identifying, and fixing problems?" prerequisites: familiarity with the core html, css, and javascript languages.
... objective: to gain an understanding of the high-level concepts involved in cross b
rowser testing.
... what is cross b
rowser testing?
...And 48 more matches
Supporting private browsing mode - Archive of obsolete content
this interface is deprecated since firefox 20, and will probably be completely removed in firefox 21.see supporting per-window private b
rowsing for details.
... firefox 3.5 introduced private b
rowsing mode, in which potentially private information is not recorded.
...when private b
rowsing mode is enabled, temporary, databases are created to be used for cookies and local storage; these databases are thrown away when private b
rowsing mode is turned off, and the regular databases are re-activated.
...And 43 more matches
Supporting older browsers - Learn web development
however, there will be visitors to your site who use older b
rowsers, or b
rowsers which do not support the methods you have used.
... this will always be the case on the web — as new features are developed, different b
rowsers will prioritise different things.
... prerequisites: html basics (study introduction to html), and an idea of how css works (study introduction to css and styling boxes.) objective: to understand how to provide support for your layouts on older b
rowsers that might not support the features you want to use.
...And 37 more matches
browser - Archive of obsolete content
« xul reference home [ examples | attributes | properties | methods | related ] a xul <b
rowser> element represents a frame which is expected to contain a view of a web document.
... are you here looking for information about the firefox web b
rowser, or because you'd like to download the latest version of firefox?
... get firefox most of the properties and methods of the b
rowser will rarely be used and can only be called from chrome urls.
...And 35 more matches
tabbrowser - Archive of obsolete content
it is similar to the b
rowser element, except that multiple documents can be displayed, each in a separate tab.
... attributes autocompleteenabled, autocompletepopup, autoscroll, contentcontextmenu, contenttooltip, handlectrlpageupdown, onbookmarkgroup, onnewtab, tabmodalpromptshowing properties b
rowsers, cangoback, cangoforward, contentdocument, contenttitle, contentvieweredit, contentviewerfile, contentwindow, currenturi, docshell, documentcharsetinfo, homepage, markupdocumentviewer, securityui, selectedb
rowser, selectedtab, sessionhistory, tabcontainer, tabs, visibletabs, webb
rowserfind, webnavigation, webprogress methods addprogresslistener, addtab, addtabsprogresslistener,appendgroup, getb
rowseratindex, getb
rowseri...
...ndexfordocument, getb
rowserfordocument, getb
rowserfortab, geticon, getnotificationbox, gettabforb
rowser, gettabmodalpromptbox, goback, gobackgroup, goforward, goforwardgroup, gohome, gotoindex, loadgroup, loadonetab, loadtabs, loaduri, loaduriwithflags, movetabto, pintab, reload, reloadalltabs, reloadtab, reloadwithflags, removealltabsbut, removecurrenttab, removeprogresslistener, removetab, removetabsprogresslistener,replacegroup, selecttabatindex, seticon, showonlythesetabs, stop, unpintab attributes autocompleteenabled type: boolean set to true to enable autocomplete of fields.
...And 34 more matches
Browser Console - Firefox Developer Tools
the b
rowser console is like the web console, but applied to the whole b
rowser rather than a single content tab.
...however, rather than logging this information for a single content tab, it logs information for all content tabs, for add-ons, and for the b
rowser's own code.
... if you also want to use the other web developer tools in the regular web toolbox with add-on or b
rowser code, consider using the b
rowser toolbox.
...And 29 more matches
Populating the page: how browsers work - Web Performance
to understand how to improve performance and perceived performance, it helps to understand how the b
rowser works.
... two major issues in web performance are understanding issues having to do with latency and issues having to do with the fact that for the most part, b
rowsers are single threaded.
... for the most part, b
rowsers are considered single threaded.
...And 28 more matches
Using the Browser API
the html b
rowser api is an extension of the html <iframe> element that allows web apps to implement b
rowsers or b
rowser-like applications.
... it was originally used in firefox os to implement b
rowser 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 mozb
rowser attribute to the <iframe> element we can make it appear like a top-level b
rowser window to the embedded content.
...And 26 more matches
Creating a cross-browser video player - Developer guides
this article describes a simple html5 video player that uses the media and fullscreen apis and works across most major desktop and mobile b
rowsers.
... as well as working fullscreen, the player features custom controls rather than just using the b
rowser defaults.
...doing things this way still allows users who have javascript turned off (for whatever reason) to still have access to the b
rowser's native controls.
...And 26 more matches
HTML forms in legacy browsers - Learn web development
our worst curse is legacy b
rowsers.
... okay, let's admit it, when we said "legacy b
rowser" we all have in mind safari or old versions of internet explorer, but they are far from the only ones.
... in the mobile world, when neither the b
rowser nor the os can be updated such as on older android phones or iphones, the stock b
rowsers that don't update are also legacy b
rowsers.
...And 24 more matches
Cross-browser audio basics - Developer guides
this article provides: a basic guide to creating a cross-b
rowser html5 audio player with all the associated attributes, properties, and events explained a guide to custom controls created using the media api basic audio example the code below is an example of a basic audio implementation using html5: <audio controls> <source src="audiofile.mp3" type="audio/mpeg"> <source src="audiofile.ogg" type="audio/ogg"> <!-- fallback for non supporting b
rowsers goes here --> <p>your b
rowser does not support html5 audio, but you can still <a href="audiofile.mp3">download the music</a>.</p> </audio> note: you can also use an mp4 file instead of mp3.
...(currently, b
rowsers that support mp3 also support mp4 audio).
... here we define an <audio> element with multiple sources — we do this as not all b
rowsers support the same audio formats.
...And 22 more matches
Developing cross-browser and cross-platform pages - Archive of obsolete content
an important practice when doing cross-b
rowser, cross-platform pages and dhtml development involves the ability to determine the capabilities of the b
rowser which loads your web page.
...there are 2 known approaches for such goals: the b
rowser identification approach (also known as useragent string detection and often referred as "b
rowser sniffing") and the object/feature support detection approach.
... the b
rowser identification approach is now known to be complicated, unreliable and difficult to maintain.
...And 21 more matches
Installing plugins to Gecko embedding browsers on Windows - Archive of obsolete content
this document presents the windows registry keys plugin installers can parse to determine where to install a given plugin (for mozilla b
rowsers) on windows.
... since the prospect of embedded gecko b
rowsers raises the scenario of more than one gecko-based b
rowser that a netscape-style plugin can work with, it becomes important to let plugin developers know how to discover these b
rowsers on a windows machine.
... this information applies to mozilla based b
rowsers that pull the mozilla codebase after the mozilla 0.9.1 milestone release.
...And 20 more matches
nsIPrivateBrowsingService
netwerk/base/public/nsiprivateb
rowsingservice.idlscriptable provides access to information about the state of the private b
rowsing service.
... the nsiprivateb
rowsingservice interface provides access to information about the state of the private b
rowsing feature offered in firefox 3.5 and later.
... when firefox is in private b
rowsing mode, firefox shouldn't save any potentially private information.
...And 13 more matches
nsIWebBrowser
embedding/b
rowser/webb
rowser/nsiwebb
rowser.idlscriptable this interface is implemented by web b
rowser objects.
... embedders use this interface during initialization to associate the new web b
rowser instance with the embedders chrome and to register any listeners.
...method overview void addwebb
rowserlistener(in nsiweakreference alistener, in nsiidref aiid); void removewebb
rowserlistener(in nsiweakreference alistener, in nsiidref aiid); attributes attribute type description containerwindow nsiwebb
rowserchrome the chrome object associated with the b
rowser instance.
...And 13 more matches
Roll your own browser: An embedding how-to
contained within this directory are a couple of makefiles: baseb
rowser-unix baseb
rowser-win the xpinstall packager follows the same format.
...it should include all of the base support that you need to get a web b
rowser started up.
...(screenshot) xparts: kde extension that allows mozilla to be embedded into the konqueror b
rowser.
...And 12 more matches
Browser storage limits and eviction criteria - Web APIs
the process by which the b
rowser works out how much space to allocate to web data storage and what to delete when that limit is reached is not simple, and differs between b
rowsers.
... this article describes how b
rowsers 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 b
rowsers, but b
rowser specifics are called out where known.
...And 12 more matches
What are browser developer tools? - Learn web development
every modern web b
rowser includes a powerful suite of developer tools.
...this article explains how to use the basic functions of your b
rowser's devtools.
... how to open the devtools in your b
rowser the devtools live inside your b
rowser in a subwindow that looks roughly like this, depending on what b
rowser you are using: how do you pull it up?
...And 11 more matches
browser.type - Archive of obsolete content
the type of b
rowser, which can be used to set access of the document loaded inside the b
rowser.
... if this is not set, the loaded document has the same access as the window containing the b
rowser.
...subdocuments of chrome documents are of chrome type, unless the container element (one of iframe, b
rowser 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.
...And 10 more matches
arrowscrollbox - Archive of obsolete content
« xul reference home [ examples | attributes | properties | methods | related ] a box which provides scroll ar
rows along its edges for scrolling through the contents of the box.
... the user only needs to hover the mouse over the ar
rows to scroll the box.
... hovering the mouse over one of the (active) ar
rows triggers a scroll event.
...And 10 more matches
Browser chrome tests
the b
rowser 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 b
rowser window and report results using the same functions as the mochitest test framework.
... running the b
rowser chrome tests to run mochitest, first build mozilla with your changes; then run ./mach mochitest -f b
rowser this will launch your build and open a "b
rowser chrome tests" window, and report the results in the ui and to stdout.
...And 10 more matches
Using the viewport meta tag to control layout on mobile browsers
background the b
rowser's viewport is the area of the window in which web content can be seen.
... this is often not the same size as the rendered page, in which case the b
rowser provides scrollbars for the user to scroll around and access all the content.
...many other mobile b
rowsers now support this tag, although it is not part of any web standard.
...And 10 more matches
private-browsing - Archive of obsolete content
check whether a given object is private, so an add-on can respect private b
rowsing usage per-window private b
rowsing private b
rowsing status is a property of an individual b
rowser window.
... the user enters private b
rowsing by opening a new private b
rowser window.
... opting into private b
rowsing add-ons built using the sdk must opt into private b
rowsing by setting the following key in their package.json file: "permissions": {"private-b
rowsing": true} if an add-on has not opted in, then the high-level sdk modules will not expose private windows, or objects (such as tabs) that are associated with private windows: the windows module will not list any private b
rowser windows, generate any events for private b
rowser windows, or let the add-on open any private b
rowser windows the tabs module will not list any tabs that belong to private b
rowser windows, and the add-on won't receive any eve...
...And 9 more matches
Supporting per-window private browsing - Archive of obsolete content
firefox 20 introduced per-window private b
rowsing mode, in which private user data is stored and accessed concurrently with public user data from another window.
... detecting private b
rowsing mode determining whether or not a given dom window is private is simple: import resource://gre/modules/privateb
rowsingutils.jsm and use privateb
rowsingutils.iswindowprivate(window).
... try { // firefox 20+ components.utils.import("resource://gre/modules/privateb
rowsingutils.jsm"); if (!privateb
rowsingutils.iswindowprivate(window)) { ...
...And 9 more matches
Browser Side Plug-in API - Plugins
« previousnext » this chapter describes methods in the plug-in api that are available from the b
rowser.
... the names of all of these methods begin with npn_ to indicate that they are implemented by the b
rowser and called by the plug-in.
... npn_getauthenticationinfo this function is called by plug-ins to get http authentication information from the b
rowser.
...And 9 more matches
Updating addons broken by private browsing changes - Archive of obsolete content
if your code refers to any of the following interfaces: ff 15: nsidomstoragemanager ff 16: nsitransferable ff 18: imgicache moziasyncfavicons nsifaviconservice nsiwebb
rowserpersist ff 19: nsicontentprefservice nsidownloadmanager nsidownload nsihttpauthmanager nsistricttransportsecurityservice ff 20: nsiprivateb
rowsingservice nsirecentbadcertservice furthermore, if your code uses any of these common chrome apis: ff 19: saveurl saveinternal openlinkin ff 20: openb
rowserwindow gprivateb
rowsingui finally, if your code watches for any of these observer notificat...
...ions: private-b
rowsing private-b
rowsing-cancel-vote private-b
rowsing-change-granted private-b
rowsing-transition-complete then your addon will require updating to correctly support the new per-window private b
rowser feature in firefox 20 (and will require updating to work correctly in releases of firefox since the ones listed).
... nsiwebb
rowserpersist: saveuri gained a new argument; see the nsiwebb
rowserpersist docs for more information.
...And 8 more matches
Cross browser testing - Learn web development
this module focuses on testing web projects across different b
rowsers.
...what users, b
rowsers, and devices do you most need to worry about?), how to go about doing testing, the main issues that you'll face with different types of code and how to mitigate them, what tools are most useful in helping you test and fix problems, and how to use automation to speed up testing.
... guides introduction to cross b
rowser testing this article starts the module off by providing an overview of the topic of cross b
rowser testing, answering questions such as "what is cross b
rowser testing?", "what are the most common types of problems you'll encounter?", and "what are the main approaches for testing, identifying, and fixing problems?" strategies for carrying out testing next, we drill down into carrying out testing, looking at identifying a target au...
...And 8 more matches
Browser Toolbox - Firefox Developer Tools
the b
rowser toolbox enables you to debug add-ons and the b
rowser's own javascript code rather than just web pages like the normal toolbox.
... the b
rowser toolbox's context is the whole b
rowser rather than just single page on a single tab.
... use the b
rowser toolbox for add-ons that are neither.
...And 8 more matches
Metro browser chrome tests - Archive of obsolete content
the metro b
rowser chrome test suite is an automated testing framework designed to allow testing of the 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 b
rowser and report results using the same functions as the mochitest test framework.
... running the metro b
rowser chrome tests to run mochitest, first build mozilla with your changes; then run ./mach mochitest-metro this will launch metro b
rowser chrome tests in the default immersive b
rowser.
...And 7 more matches
mozbrowserasyncscroll
the mozb
rowserasyncscroll event is fired when the content of a b
rowser <iframe> is scrolled.
... general info specification non standard interface customevent bubbles yes cancelable yes target <iframe> default action none properties property type description target read only eventtarget the b
rowser iframe type read only domstring the type of event.
... details the details property returns an anonymous javascript object with the following properties: top the scroll top position in css pixels of the document within the b
rowser <iframe>.
...And 7 more matches
nsIWebBrowserChrome
embedding/b
rowser/webb
rowser/nsiwebb
rowserchrome.idlscriptable corresponds to the top-level, outermost window containing an embedded gecko web b
rowser.
... inherits from: nsisupports last changed in gecko 0.9.6 method overview void destroyb
rowserwindow(); void exitmodaleventloop(in nsresult astatus); boolean iswindowmodal(); void setstatus(in unsigned long statustype, in wstring status); void showasmodal(); void sizeb
rowserto(in long acx, in long acy); attributes attribute type description chromeflags unsigned long the chrome flags for this b
rowser chrome.
... webb
rowser nsiwebb
rowser the currently loaded webb
rowser.
...And 7 more matches
Defining Cross-Browser Tooltips - Archive of obsolete content
learn how to define "tooltips" in a cross-b
rowser, standards-friendly way.
... authors are used to using the alt attribute to create "tooltips" in web b
rowsers.
... the classic example is a "tooltip" of an image; when the user pauses the mouse pointer over an image, the contents of the alt attribute are displayed as a "tooltip." gecko-based b
rowsers such as mozilla, netscape 6+, and compuserve 7 do not support this behavior.
...And 6 more matches
nsIBrowserSearchService
netwerk/base/public/nsib
rowsersearchservice.idlscriptable please add a summary to this article.
... 1.0 66 introduced gecko 1.8 inherits from: nsisupports last changed in gecko 2.0 (firefox 4 / thunderbird 3.3 / seamonkey 2.1) implemented by: @mozilla.org/b
rowser/search-service;1.
... to access this service, use: var b
rowsersearchservice = components.classes["@mozilla.org/b
rowser/search-service;1"] .getservice(components.interfaces.nsib
rowsersearchservice); attempting to use any method or attribute of this interface before init() has completed will force the service to fall back to a slower, synchronous, initialization.
...And 5 more matches
Browser compatibility and Scroll Snap - CSS: Cascading Style Sheets
in this article, we consider questions that might arise related to compatibility across b
rowsers and versions of b
rowsers when adding support for scroll-snap to your web site or app.
...this will ensure your scroll snapping works in all b
rowsers which implement the specification, including firefox.
... in this initial example we have used the old specification alongside the current specification in order to make scroll snapping work in all b
rowsers which support some form of scroll snapping.
...And 5 more matches
rows - Archive of obsolete content
« xul reference home [ examples | attributes | properties | methods | related ] defines the
rows of a grid.
... child row elements define the individual
rows to appear in the grid.
... each child of a
rows element should be a row element.
...And 4 more matches
mozbrowserloadend
although implementations may change in the future and it is not supported widely across b
rowsers, it is suitable for use in code dedicated to firefox os apps.
... the mozb
rowserloadend event is fired when the b
rowser <iframe> has finished loading all its assets, or has failed to load.
... general info specification non standard interface customevent bubbles yes cancelable yes target <iframe> default action none properties property type description target read only eventtarget the b
rowser iframe type read only domstring the type of event.
...And 4 more matches
nsIWebBrowserPersist
embedding/components/webb
rowserpersist/nsiwebb
rowserpersist.idlscriptable interface for persisting dom documents and uris to local or remote storage.
... inherits from: nsicancelable last changed in gecko 36.0 (firefox 36.0 / thunderbird 36.0 / seamonkey 2.33) implemented by: @mozilla.org/embedding/b
rowser/nswebb
rowser;1 and @mozilla.org/embedding/b
rowser/nswebb
rowserpersist;1.
... to create an instance, use: var webb
rowserpersist = components.classes["@mozilla.org/embedding/b
rowser/nswebb
rowserpersist;1"] .createinstance(components.interfaces.nsiwebb
rowserpersist); method overview void cancelsave(); void savechannel(in nsichannel achannel, in nsisupports afile); void savedocument(in nsidomdocument adocument, in nsisupports afile, in nsisupports adatapath, in string aoutputcontenttype, in unsigned long aencodingflags, in unsigned long awrapcolumn); void saveuri(in nsiuri auri, in nsisupports acachekey, in nsiuri areferrer, in long areferrerpolicy, in nsiinputstream apostdata, in string aextraheaders, in nsisupports afile, in nsiloadcontext aprivacycontext); void saveprivacyawareuri(in nsiuri auri,...
...And 4 more matches
grid-template-rows - CSS: Cascading Style Sheets
the grid-template-
rows css property defines the line names and track sizing functions of the grid
rows.
... syntax /* keyword value */ grid-template-
rows: none; /* <track-list> values */ grid-template-
rows: 100px 1fr; grid-template-
rows: [linename] 100px; grid-template-
rows: [linename1] 100px [linename2 linename3]; grid-template-
rows: minmax(100px, 1fr); grid-template-
rows: fit-content(40%); grid-template-
rows: repeat(3, 200px); grid-template-
rows: subgrid; /* <auto-track-list> values */ grid-template-
rows: 200px repeat(auto-fill, 100px) 300px; grid-template-
rows: minmax(100px, max-content) repeat(auto-fill, 200px) 20%; grid-template-
rows: [linename...
...1] 100px [linename2] repeat(auto-fit, [linename3 linename4] 300px) 100px; grid-template-
rows: [linename1 linename2] 100px repeat(auto-fit, [linename1] 300px) [linename3]; /* global values */ grid-template-
rows: inherit; grid-template-
rows: initial; grid-template-
rows: unset; this property may be specified as: either the keyword value none or a <track-list> value or an <auto-track-list> value.
...And 4 more matches
Browser Feature Detection - Archive of obsolete content
among the methods of b
rowser detection, many people recommend using the existence of specific properties or methods in a b
rowser's dom to detect the b
rowser type and whether it supports a given operation.
... this test takes that idea to the extreme and tests a large number of properties and methods to determine the level of support a b
rowser has for particular standards and reports a rating as the percentage of names the b
rowser defines.
... b
rowser sniffing via api name detection the following tables list the api names defined for specific w3c dom apis and lists the percentage of names that your b
rowser actually defines followed by a list of each of the api names tested along with an indication of whether the name was defined for your b
rowser.
...And 3 more matches
mozbrowsercontextmenu
the mozb
rowsercontextmenu event is fired when the user tried to access a context menu over a b
rowser <iframe>.
... general info specification non standard interface customevent bubbles yes cancelable yes target <iframe> default action none properties property type description target read only eventtarget the b
rowser iframe type read only domstring the type of event.
... details the details property returns an anonymous javascript object with the following properties: clientx the x value of the coordinate that was clicked inside the b
rowser <iframe>'s viewport.
...And 3 more matches
Internationalized Domain Names (IDN) Support in Mozilla Browsers
introduction netscape 7.1 is the first commercial b
rowser that has built-in support for internationalized domain name under the new ietf rfc's established in 2003.
... how idn works when a b
rowser sees a host name such as http://developer.mozilla.org, it passes a request to the dns resolver service (usually built into an os), which in turn sends a request to a nearest domain name server to return an ip address that corresponds to the host name.
... idn allows host/domain names with non-ascii characters for user input into a b
rowser's location bar or url's embedded in web pages.
...And 3 more matches
nsIWebBrowserFind
embedding/components/find/public/nsiwebb
rowserfind.idlscriptable searches for text in a web b
rowser.
... inherits from: nsisupports last changed in gecko 1.7 get one by doing a getinterface on an nsiwebb
rowser.
... by default, the implementation will search the focused frame, or if there is no focused frame, the web b
rowser content area.
...And 3 more matches
Flash Activation: Browser Comparison - Plugins
each of the major b
rowsers has now implemented a feature where adobe flash content does not run by default, but each of the b
rowsers has implemented this feature and the user interface in slightly different ways.
... this guide will help outline the similarities and differences between the b
rowsers so web developers can provide the best user experience.
... in each b
rowser, the decision to enable flash is made by users on a per-site basis.
...And 3 more matches
grid-auto-rows - CSS: Cascading Style Sheets
the grid-auto-
rows css property specifies the size of an implicitly-created grid row track or pattern of tracks.
... if a grid item is positioned into a row that is not explicitly sized by grid-template-
rows, implicit grid tracks are created to hold it.
... this can happen either by explicitly positioning into a row that is out of range, or by the auto-placement algorithm creating additional
rows.
...And 3 more matches
XULBrowserWindow - Archive of obsolete content
the xulb
rowserwindow object provides methods and properties that let the b
rowser update the user interface of the enclosing xul window.
... in order to do so it implements the following interfaces: nsisupports nsixulb
rowserwindow nsiwebprogresslistener nsiwebprogresslistener2 nsisupportsweakreference note: this page is not complete at this time.
...you may also wish to refer to the implementation of xulb
rowserwindow in b
rowser/base/content/b
rowser.js.
...And 2 more matches
Supporting private browsing in plugins - Archive of obsolete content
firefox 3.5 introduced private b
rowsing, a mode in which potentially private information is not recorded in any way.
... it also introduced a mechanism by which plugins can determine whether or not private b
rowsing mode is in effect.
... plugins should be updated to monitor the state of private b
rowsing mode and only save private information when private b
rowsing is disabled.
...And 2 more matches
Browsing context - MDN Web Docs Glossary: Definitions of Web-related terms
a b
rowsing context is the environment a b
rowser displays a document.
... in modern b
rowsers, it usually is a tab, but can be a window or even only parts of a page, like a frame or an iframe.
... each b
rowsing context has a specific origin, the origin of the active document and a history that memorize all the displayed documents, in order.
...And 2 more matches
mozbrowseractivitydone
the mozb
rowseractivitydone event is fired when something inside the b
rowser <iframe> triggers a web activity, and that web activity's message is consumed by the receiving app.
... note: for activities where the receiving app's activity definition in its manifest does not include returnvalue or returnvalue is false, no mozb
rowseractivitydone event will be generated as of the landing of bug 1194525 in firefox os 2.5.
... general info specification non standard interface customevent bubbles yes cancelable yes target <iframe> default action none properties property type description target read only eventtarget the b
rowser iframe type read only domstring the type of event.
...And 2 more matches
mozbrowsercaretstatechanged
the mozb
rowsercaretstatechanged event is fired when the user selects content in a page loaded in a b
rowser <iframe>.
... general info specification non standard interface customevent bubbles yes cancelable yes target <iframe> default action none properties property type description target read only eventtarget the b
rowser iframe type read only domstring the type of event.
... commands an object that defines what commands can currently be executed in the b
rowser <iframe>.
...And 2 more matches
mozbrowsericonchange
the mozb
rowsericonchange event is sent when a new icon (e.g.
... <link rel="icon"> or <link rel="apple-touch-icon">) is available in the b
rowser <iframe>'s content.
... general info specification non standard interface customevent bubbles yes cancelable yes target <iframe> default action none properties property type description target read only eventtarget the b
rowser iframe type read only domstring the type of event.
...And 2 more matches
mozbrowseropenwindow
the mozb
rowseropenwindow event is fired when a new window is required — usually when the content of a b
rowser <iframe> successfully calls the window.open() method, or the user clicks on a link with an unknown target.
... general info specification non standard interface customevent bubbles yes cancelable yes target <iframe> default action none properties property type description target read only eventtarget the b
rowser iframe type read only domstring the type of event.
... name a domstring representing the name of the new b
rowser window.
...And 2 more matches
mozbrowserselectionstatechanged
the mozb
rowserselectionstatechanged event is fired when the text selected inside the b
rowser <iframe> content changes.
... note that this is deprecated, and current implementations should use mozb
rowsercaretstatechanged instead.
... general info specification non standard interface customevent bubbles yes cancelable yes target <iframe> default action none properties property type description target read only eventtarget the b
rowser iframe type read only domstring the type of event.
...And 2 more matches
mozbrowsershowmodalprompt
the mozb
rowsershowmodalprompt event is fired when the content of a b
rowser <iframe> calls the window.alert(), window.confirm(), or window.prompt() methods.
... general info specification non standard interface customevent bubbles yes cancelable yes target <iframe> default action none properties property type description target read only eventtarget the b
rowser iframe type read only domstring the type of event.
... message a domstring representing the value passed to the window.alert(), window.confirm(), or window.prompt() methods within the b
rowser <iframe>'s content.
...And 2 more matches
nsIWebBrowserChrome2
embedding/b
rowser/webb
rowser/nsiwebb
rowserchrome2.idlscriptable an extension to nsiwebb
rowserchrome.
... 1.0 66 introduced gecko 1.9 inherits from: nsiwebb
rowserchrome 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 nsiwebb
rowserchrome.setstatus().
...And 2 more matches
nsIWebBrowserFindInFrames
embedding/components/find/public/nsiwebb
rowserfind.idlscriptable controls how find behaves when multiple frames or iframes are present.
... inherits from: nsisupports last changed in gecko 1.7 get an instance by doing a queryinterface from nsiwebb
rowserfind.
...setting nsiwebb
rowserfind.searchframes to true sets this to true.
...And 2 more matches
HTMLTableElement.rows - Web APIs
the read-only htmltableelement property
rows returns a live htmlcollection of all the
rows in the table, including the
rows contained within any <thead>, <tfoot>, and <tbody> elements.
... syntax htmlcollectionobject = table.
rows; value an htmlcollection providing a live-updating list of the htmltablerowelement objects representing all of the <tr> elements contained in the table.
... this provides quick access to all of the table
rows, without having to manually search for them.
...And 2 more matches
::-ms-browse - Archive of obsolete content
the ::-ms-b
rowse css pseudo-element is a microsoft extension that represents the button that opens the file picker of <input type="file">.
... permitted properties only the following css properties can be used in a rule with ::-ms-b
rowse in its selector.
...-top-style border-top-width box-shadow box-sizing color cursor display (values block, inline-block, none) @font-face font-size font-style font-weight height margin-bottom margin-left margin-right margin-top opacity outline-color outline-style outline-width padding-bottom padding-left padding-right padding-top transform transform-origin visibility width syntax ::-ms-b
rowse example html <label>select image: <input type="file"></label> css input[type="file"]::-ms-b
rowse { color: red; background-color: yellow; } result output example specifications not part of any specification.
... b
rowser compatibility historically supported in internet explorer and edge before version 79.
mozbrowseraudioplaybackchange
the mozb
rowseraudioplaybackchange event is fired when audio starts or stops playing within a b
rowser <iframe>.
... general info specification non standard interface customevent bubbles yes cancelable yes target <iframe> default action none properties property type description target read only eventtarget the b
rowser iframe type read only domstring the type of event.
... details read only boolean indicates whether audio is playing in the b
rowser.
... examples var b
rowser = document.queryselector("iframe"); b
rowser.addeventlistener("mozb
rowseraudioplaybackchange", function(event) { console.log(event.details); }); related events mozb
rowserclose mozb
rowsercontextmenu mozb
rowsererror mozb
rowsericonchange mozb
rowserloadend mozb
rowserloadstart mozb
rowserlocationchange mozb
rowseropenwindow mozb
rowsersecuritychange mozb
rowsertitlechange mozb
rowserusernameandpasswordrequired ...
mozbrowsererror
the mozb
rowsererror event is fired when an error occurs while trying to load content within a b
rowser <iframe>.
... general info specification non standard interface customevent bubbles yes cancelable yes target <iframe> default action none properties property type description target read only eventtarget the b
rowser iframe type read only domstring the type of event.
...found connectionfailure netinterrupt nettimeout cspblocked phishingblocked malwareblocked unwantedblocked offline malformeduri redirectloop unknownsockettype netreset notcached isprinting deniedportaccess proxyresolvefailure proxyconnectfailure contentencodingfailure remotexul unsafecontenttype corruptedcontenterror certerror other example var b
rowser = document.queryselector("iframe"); b
rowser.addeventlistener("mozb
rowsererror", function( event ) { console.log("an error occurred:" + event.detail); }); related events mozb
rowserasyncscroll mozb
rowserclose mozb
rowsercontextmenu mozb
rowsericonchange mozb
rowserloadend mozb
rowserloadstart mozb
rowserlocationchange mozb
rowseropenwindow mozb
rowsersecuritychange mozb
rowsershowmodalpro...
...mpt mozb
rowsertitlechange mozb
rowserusernameandpasswordrequired ...
mozbrowserfindchange
the mozb
rowserfindchange event is fired when a search method is invoked in the b
rowser <iframe> content.
... general info specification non standard interface customevent bubbles yes cancelable yes target <iframe> default action none properties property type description target read only eventtarget the b
rowser iframe type read only domstring the type of event.
... example var b
rowser = document.queryselector("iframe"); b
rowser.addeventlistener("mozb
rowserfindchange", function(event) { console.log("currently highlighted: " + event.details.activematchordinal + " out of " + event.details.numberofmatches); }); related events mozb
rowserasyncscroll mozb
rowsercontextmenu mozb
rowsererror mozb
rowsericonchange mozb
rowserloadend mozb
rowserloadstart mozb
rowse...
...rlocationchange mozb
rowseropenwindow mozb
rowsersecuritychange mozb
rowsershowmodalprompt mozb
rowsertitlechange mozb
rowserusernameandpasswordrequired ...
mozbrowserlocationchange
the mozb
rowserlocationchange event is fired when a b
rowser <iframe>'s location changes — it is fired every time navigation occurs.
... general info specification non standard interface customevent bubbles yes cancelable yes target <iframe> default action none properties property type description target read only eventtarget the b
rowser iframe type read only domstring the type of event.
... var b
rowser = document.queryselector("iframe"); b
rowser.addeventlistener('mozb
rowserlocationchange', function (event) { urlbar.value = event.detail.url; }); related events mozb
rowserasyncscroll mozb
rowserclose mozb
rowsercontextmenu mozb
rowsererror mozb
rowsericonchange mozb
rowserloadend mozb
rowserloadstart mozb
rowseropenwindow mozb
rowsersecuritychange mozb
rowsershowmodalprompt mozb
rowsertit...
...lechange mozb
rowserusernameandpasswordrequired ...
mozbrowsermanifestchange
the mozb
rowsermanifestchange event is fired when the manifest location of the app loaded in the b
rowser <iframe> changes.
... general info specification non standard interface customevent bubbles yes cancelable yes target <iframe> default action none properties property type description target read only eventtarget the b
rowser iframe type read only domstring the type of event.
... example var b
rowser = document.queryselector("iframe"); b
rowser.addeventlistener("mozb
rowsermanifestchange", function(event) { console.log("new manifest url: " + event.details.href); }); related events mozb
rowserasyncscroll mozb
rowsercontextmenu mozb
rowsererror mozb
rowsericonchange mozb
rowserloadend mozb
rowserloadstart mozb
rowserlocationchange mozb
rowseropenwindow mozb
rowsersecuritychange mozb
rowsershow...
...modalprompt mozb
rowsertitlechange mozb
rowserusernameandpasswordrequired ...
mozbrowsermetachange
the mozb
rowsermetachange event is fired when a <meta> element related to web applications is added, removed or changed.
... general info specification non standard interface customevent bubbles yes cancelable yes target <iframe> default action none properties property type description target read only eventtarget the b
rowser iframe type read only domstring the type of event.
... example var b
rowser = document.queryselector("iframe"); b
rowser.addeventlistener("mozb
rowsermetachange", function(event) { console.log("a meta tag has been " + event.details.type + ".
... its name is " + event.details.name + ", and its content is " + event.details.content + "."); }); related events mozb
rowserasyncscroll mozb
rowsercontextmenu mozb
rowsererror mozb
rowsericonchange mozb
rowserloadend mozb
rowserloadstart mozb
rowserlocationchange mozb
rowseropenwindow mozb
rowsersecuritychange mozb
rowsershowmodalprompt mozb
rowsertitlechange mozb
rowserusernameandpasswordrequired ...
mozbrowseropensearch
the mozb
rowseropensearch event is fired when a link to a search engine is found — i.e.
... general info specification non standard interface customevent bubbles yes cancelable yes target <iframe> default action none properties property type description target read only eventtarget the b
rowser iframe type read only domstring the type of event.
... example var b
rowser = document.queryselector("iframe"); b
rowser.addeventlistener("mozb
rowseropensearch", function( event ) { console.log("new search engine encountered: " + event.details.title); }); related events mozb
rowserasyncscroll mozb
rowserclose mozb
rowsercontextmenu mozb
rowsererror mozb
rowsericonchange mozb
rowserloadend mozb
rowserloadstart mozb
rowserlocationchange mozb
rowseropenwindow mozbro...
...wsersecuritychange mozb
rowsertitlechange ...
mozbrowserresize
the mozb
rowserresize event is fired when a b
rowser <iframe> viewport is resized in some way.
... general info specification non standard interface customevent bubbles yes cancelable yes target <iframe> default action none properties property type description target read only eventtarget the b
rowser iframe type read only domstring the type of event.
... example var b
rowser = document.queryselector("iframe"); b
rowser.addeventlistener("mozb
rowserresize", function( event ) { console.log("the new window size is " + event.details.width + " x " + event.details.height + "."); }); related events mozb
rowserasyncscroll mozb
rowserclose mozb
rowsercontextmenu mozb
rowsererror mozb
rowsericonchange mozb
rowserloadend mozb
rowserloadstart mozb
rowserlocationchange moz...
...b
rowsersecuritychange mozb
rowsertitlechange mozb
rowserusernameandpasswordrequired ...
mozbrowserscroll
the mozb
rowserscroll event is fired when the b
rowser <iframe> content scrolls.
... general info specification non standard interface customevent bubbles yes cancelable yes target <iframe> default action none properties property type description target read only eventtarget the b
rowser iframe type read only domstring the type of event.
... example var b
rowser = document.queryselector("iframe"); b
rowser.addeventlistener("mozb
rowserscroll", function( event ) { console.log("the new scroll position is " + event.details.left + " across and " + event.details.top + "down."); }); related events mozb
rowserasyncscroll mozb
rowserclose mozb
rowsercontextmenu mozb
rowsererror mozb
rowsericonchange mozb
rowserloadend mozb
rowserloadstart mo...
...zb
rowserlocationchange mozb
rowsersecuritychange mozb
rowsertitlechange mozb
rowserusernameandpasswordrequired ...
mozbrowserscrollareachanged
the mozb
rowserscrollareachanged event is fired when the available scrolling area in the b
rowser <iframe> changes.
... this can occur on resize and when the page size changes (while loading for example.) general info specification non standard interface customevent bubbles yes cancelable yes target <iframe> default action none properties property type description target read only eventtarget the b
rowser iframe type read only domstring the type of event.
... example var b
rowser = document.queryselector("iframe"); b
rowser.addeventlistener("mozb
rowserscrollareachanged", function( event ) { console.log("the new scroll area is " + event.details.width + " x " + event.details.height + "."); }); related events mozb
rowserasyncscroll mozb
rowserclose mozb
rowsercontextmenu mozb
rowsererror mozb
rowsericonchange mozb
rowserloadend mozb
rowserloadstart mozb...
...
rowserlocationchange mozb
rowsersecuritychange mozb
rowsertitlechange mozb
rowserusernameandpasswordrequired ...
mozbrowserscrollviewchange
the mozb
rowserscrollviewchange event is fired when asynchronous scrolling (i.e.
... general info specification non standard interface customevent bubbles yes cancelable yes target <iframe> default action none properties property type description target read only eventtarget the b
rowser iframe type read only domstring the type of event.
... example var b
rowser = document.queryselector("iframe"); b
rowser.addeventlistener("mozb
rowserscrollviewchange", function( event ) { console.log("scrolling has " + event.details.state + "."); }); related events mozb
rowserasyncscroll mozb
rowserclose mozb
rowsercontextmenu mozb
rowsererror mozb
rowsericonchange mozb
rowserloadend mozb
rowserloadstart mozb
rowserlocationchange mozb
rowsersecuritychange mozbrow...
...sertitlechange mozb
rowserusernameandpasswordrequired ...
mozbrowsersecuritychange
the mozb
rowsersecuritychange event is fired when the b
rowser <iframe> has connected to the server, and when the mixed content state changes.
... general info specification non standard interface customevent bubbles yes cancelable yes target <iframe> default action none properties property type description target read only eventtarget the b
rowser iframe type read only domstring the type of event.
... example var b
rowser = document.queryselector("iframe"); b
rowser.addeventlistener("mozb
rowsersecuritychange", function( event ) { console.log("the ssl state is:" + event.details.state); }); related events mozb
rowserasyncscroll mozb
rowserclose mozb
rowsercontextmenu mozb
rowsererror mozb
rowsericonchange mozb
rowserloadend mozb
rowserloadstart mozb
rowserlocationchange mozb
rowseropenwindow mozb
rowsertitlec...
...hange mozb
rowserusernameandpasswordrequired ...
mozbrowserusernameandpasswordrequired
the mozb
rowserusernameandpasswordrequired event is fired when the content within a b
rowser <iframe> requires an http authentification.
... general info specification non standard interface customevent bubbles yes cancelable yes target <iframe> default action none properties property type description target read only eventtarget the b
rowser iframe type read only domstring the type of event.
... example var b
rowser = document.queryselector("iframe[mozb
rowser]"); b
rowser.addeventlistener("mozb
rowserusernameandpasswordrequired", function( event ) { console.log("the auth realm is:" + event.detail.realm); }); related events mozb
rowserasyncscroll mozb
rowserclose mozb
rowsercontextmenu mozb
rowsererror mozb
rowsericonchange mozb
rowserloadend mozb
rowserloadstart mozb
rowserlocationchange mozb
rowserope...
...nwindow mozb
rowsersecuritychange mozb
rowsertitlechange ...
mozbrowservisibilitychange
the mozb
rowservisibilitychange event is fired when the visibility state of the current b
rowser iframe <iframe> changes, for example due to a call to setvisible().
... general info specification non standard interface customevent bubbles yes cancelable yes target <iframe> default action none properties property type description target read only eventtarget the b
rowser iframe type read only domstring the type of event.
... details the details property returns an anonymous javascript object with the following properties: visible a boolean that indicates whether the b
rowser iframe is visible (true) or not (false).
... example var b
rowser = document.queryselector("iframe"); b
rowser.addeventlistener("mozb
rowservisibilitychange", function( event ) { if(event.details.visible) { console.log("the b
rowser is visible."); } else { console.log("the b
rowser is hidden."); } }); related events mozb
rowserasyncscroll mozb
rowserclose mozb
rowsercontextmenu mozb
rowsererror mozb
rowsericonchange mozb
rowserloadend mozb
rowserloadstart mozb
rowserlocationchange mozb
rowseropenwindow mozb
rowsersecuritychange mozb
rowsertitlechange ...
browser.download.lastDir.savePerSite
b
rowser.download.lastdir.savepersite controls whether the directory preselected in the file picker for saving a file download is being remembered on a per-website (host) base.
...if no download directory for the current website has been stored, b
rowser.download.lastdir will be used.
... false the last used directory for any download (stored in b
rowser.download.lastdir) will be the preselected directory in the file picker.
... related b
rowser.download.lastdir ...
nsIBrowserHistory
toolkit/components/places/public/nsib
rowserhistory.idlscriptable a b
rowser-specific interface to global history.
... it adds functions used by the basic b
rowser like, marking pages as typed in the url bar, and removing pages as from the history interface.
... inherits from: nsiglobalhistory2 last changed in gecko 22.0 (firefox 22.0 / thunderbird 22.0 / seamonkey 2.19) implemented by: @mozilla.org/b
rowser/nav-history-service;1.
... to use this service, use: var b
rowserhistory = components.classes["@mozilla.org/b
rowser/nav-history-service;1"] .getservice(components.interfaces.nsib
rowserhistory); method overview void addpagewithdetails(in nsiuri auri, in wstring atitle, in long long alastvisited); obsolete since gecko 15.0 void markpageasfollowedlink(in nsiuri auri); obsolete since gecko 22.0 void markpageastyped(in nsiuri auri); obsolete since gecko 22.0 void registeropenpage(in nsiuri auri); obsolete since gecko 9.0 void removeallpages(); void removepage(in nsiuri auri); void removepages([array, size_is(alength)] in nsiuri auris, in unsigned long alength, in boolean adobatchnotify); void removepagesbytimeframe(in long lon...
nsIXULBrowserWindow
xpfe/appshell/public/nsixulb
rowserwindow.idlscriptable provides methods that may be called from the internals of the b
rowser area to tell the containing xul window to update its user interface.
... inherits from: nsisupports last changed in gecko 2.0 (firefox 4 / thunderbird 3.3 / seamonkey 2.1) the xulb
rowserwindow attribute exists on the nsixulwindow interface although both firefox and seamonkey also store their nsixulb
rowserwindow reference in the global xulb
rowserwindow object accessible from javascript code.
... note: the xulb
rowserwindow object offered to javascript code provides a great many more methods and attributes than those listed here, which are only the ones available to c++ code.
... see the documentation for xulb
rowserwindow for details.
Hiding browser chrome - Archive of obsolete content
there are times in which an extension may find it useful to hide b
rowser chrome (that is, toolbars, the location bar, and so forth), in order to reduce clutter when presenting a particular user interface.
...this can be accomplished by augmenting the behavior of the xulb
rowserwindow object's hidechromeforlocation() method.
...var prevfunc = xulb
rowserwindow.hidechromeforlocation; xulb
rowserwindow.hidechromeforlocation = function(alocation) { return (/* your test goes here */) || prevfunc.apply(xulb
rowserwindow, [alocation]); } this works by saving a reference to the current implementation of the hidechromeforlocation() method, then replacing it with a new method that calls through to the previous implementation.
rows - Archive of obsolete content
« xul reference home
rows type: integer the number of
rows to display in the element.
... if the element contains more than this number of
rows, a scrollbar will appear which the user can use to scroll to the other
rows.
... to get the actual number of
rows in the element, use the getrowcount method.
Opening a Link in the Default Browser - Archive of obsolete content
xulrunner applications may have situation where they wish to open a uri in the default b
rowser.
...to suppress this warning for particular protocols that are safe to open in the default application, you must set default prefs (thunderbird sets the following prefs): // suppress external-load warning for standard b
rowser schemes pref("network.protocol-handler.warn-external.http", false); pref("network.protocol-handler.warn-external.https", false); pref("network.protocol-handler.warn-external.ftp", false); you can also check whether an external handler for a scheme exists.
...w you do it: var extps = components.classes["@mozilla.org/uriloader/external-protocol-service;1"] .getservice(components.interfaces.nsiexternalprotocolservice); if (extps.externalprotocolhandlerexists("http")) { // handler for http:// urls exists } link within an iframe to enable a link inside an html document that is the "src" of an iframe to be opened in the default b
rowser, setting the preference: pref("network.protocol-handler.expose-all", false); seems to work.
Browser - MDN Web Docs Glossary: Definitions of Web-related terms
a web b
rowser or b
rowser is a program that retrieves and displays pages from the web, and lets users access further pages through hyperlinks.
... a b
rowser is the most familiar type of user agent.
... learn more download a b
rowser mozilla firefox google chrome microsoft edge opera b
rowser ...
mozbrowserclose
the mozb
rowserclose event is fired when the content of a b
rowser <iframe> calls the window.close() method.
... example var b
rowser = document.queryselector("iframe"); b
rowser.addeventlistener("mozb
rowserclose", function() { console.log("b
rowser window has been closed; iframe will be destroyed."); }); related events mozb
rowserasyncscroll mozb
rowsercontextmenu mozb
rowsererror mozb
rowsericonchange mozb
rowserloadend mozb
rowserloadstart mozb
rowserlocationchange mozb
rowseropenwindow mozb
rowsersecuritychange mozbr...
...owsershowmodalprompt mozb
rowsertitlechange mozb
rowserusernameandpasswordrequired ...
mozbrowserdocumentfirstpaint
the mozb
rowserdocumentfirstpaint event is fired when a new paint occurs on any document in the b
rowser <iframe>.
... example var b
rowser = document.queryselector("iframe"); b
rowser.addeventlistener("mozb
rowserdocumentfirstpaint", function() { console.log("first content painted."); }); related events mozb
rowserasyncscroll mozb
rowsercontextmenu mozb
rowsererror mozb
rowsericonchange mozb
rowserloadend mozb
rowserloadstart mozb
rowserlocationchange mozb
rowseropenwindow mozb
rowsersecuritychange mozb
rowsershowmodalprompt ...
...mozb
rowsertitlechange mozb
rowserusernameandpasswordrequired ...
mozbrowserfirstpaint
the mozb
rowserfirstpaint event is fired when the <iframe> paints content for the first time (this doesn't include the initial paint from about:blank).
... example var b
rowser = document.queryselector("iframe"); b
rowser.addeventlistener("mozb
rowserfirstpaint", function(event) { console.log("first content painted."); }); related events mozb
rowserasyncscroll mozb
rowsercontextmenu mozb
rowsererror mozb
rowsericonchange mozb
rowserloadend mozb
rowserloadstart mozb
rowserlocationchange mozb
rowseropenwindow mozb
rowsersecuritychange mozb
rowsershowmodalprompt moz...
...b
rowsertitlechange mozb
rowserusernameandpasswordrequired ...
mozbrowserloadstart
the mozb
rowserloadstart event is fired when the b
rowser <iframe> starts to load a new page.
... example in this example the mozb
rowserloadend and mozb
rowserloadstart events are used to change the icon shown on the stop/reload button between stop (x) and reload (r), as appropriate.
... var b
rowser = document.queryselector("iframe"); b
rowser.addeventlistener('mozb
rowserloadstart',function() { stopreload.textcontent = 'x'; }); b
rowser.addeventlistener('mozb
rowserloadend',function() { stopreload.textcontent = 'r'; }); related events mozb
rowserasyncscroll mozb
rowserclose mozb
rowsercontextmenu mozb
rowsererror mozb
rowsericonchange mozb
rowserloadend mozb
rowserlocationchange mozb
rowseropenwindow mozb
rowsersecuritychange mozb
rowsershowmodalprompt mozb
rowsertitlechange mozb
rowserusernameandpasswordrequired ...
mozbrowseropentab
the mozb
rowseropentab event is fired when a new tab is opened within a b
rowser <iframe> as a result of the user issuing a command to open a link target in a new tab (for example ctrl/cmd + click.) general info specification non standard interface customevent bubbles yes cancelable yes target <iframe> default action none properties property type description target read only eventtarget the b
rowser iframe type read only domstring the t...
... example var b
rowser = document.queryselector("iframe"); b
rowser.addeventlistener("mozb
rowseropentab", function( event ) { console.log("a new document has opened containing the content at " + event.details.url + "."); }); related events mozb
rowserasyncscroll mozb
rowserclose mozb
rowsercontextmenu mozb
rowsererror mozb
rowsericonchange mozb
rowserloadend mozb
rowserloadstart mozb
rowserlocationchange mozbro...
...wsersecuritychange mozb
rowsertitlechange mozb
rowserusernameandpasswordrequired ...
mozbrowsertitlechange
the mozb
rowsertitlechange event is fired when the title of a b
rowser <iframe> (i.e.
... general info specification non standard interface customevent bubbles yes cancelable yes target <iframe> default action none properties property type description target read only eventtarget the b
rowser iframe type read only domstring the type of event.
... example var b
rowser = document.queryselector("iframe"); b
rowser.addeventlistener("mozb
rowsertitlechange", function( event ) { console.log("the title of the document is:" + event.detail); }); related events mozb
rowserasyncscroll mozb
rowserclose mozb
rowsercontextmenu mozb
rowsererror mozb
rowsericonchange mozb
rowserloadend mozb
rowserloadstart mozb
rowserlocationchange mozb
rowseropenwindow mozb
rowsersecuritychange mozb
rowsershowmodalprompt mozb
rowserusernameandpasswordrequired ...
JS_ThrowStopIteration
syntax bool js_th
rowstopiteration(jscontext *cx); name type description cx jscontext * the context in which to throw the stopiteration object.
... description js_th
rowstopiteration th
rows the appropriate stopiteration object for the function currently executing in cx.
... see also mxr id search for js_th
rowstopiteration js_isstopiteration bug 390947 ...
nsIBrowserBoxObject
layout/xul/base/public/nsib
rowserboxobject.idlscriptable please add a summary to this article.
... inherits from: nsicontainerboxobject last changed in gecko 1.9 (firefox 3) the boxobject belonging to a xul b
rowser element implements this interface.
...the b
rowser.xml binding uses this property to gain access to the webnavigation, contentdocument, contentwindow, webb
rowserfind, webprogress and sessionhistory properties.
nsIWebBrowserChrome3
embedding/b
rowser/webb
rowser/nsiwebb
rowserchrome3.idlscriptable an extension to nsiwebb
rowserchrome2.
... 1.0 66 introduced gecko 2.0 inherits from: nsiwebb
rowserchrome2 last changed in gecko 2.0 (firefox 4 / thunderbird 3.3 / seamonkey 2.1) method overview astring onbeforelinktraversal(in astring originaltarget, in nsiuri linkuri, in nsidomnode linknode, in prbool isapptab); methods onbeforelinktraversal() determines the appropriate target for a link.
...see also nsiwebb
rowserchrome2 ...
Accessibility: What users can do to browse more safely - Accessibility
use reader mode on b
rowsers enable content blockers; gets rid of ads, reduces and/or removes distractions enables text-to-speech in certain b
rowsers, enable fonts by choice enable page zoom turn off animated gifs in the b
rowser b
rowsers offer much power to their users; it's just a matter of knowing where to go.
...to reverse it, you will have to change the value back to "normal" use b
rowser extensions gif blocker for chrome, gif blocker is an extension available at the web store.
...there is a github repository for it at https://github.com/0ui/gif-scrubber beeline reader beeline reader has a b
rowser extension that allows you to set up for grayscale and dyslexi font, among other things take advantage operating system accessibility features most operating systems such as windows 10, have accessibility options that are surprisingly powerful.
Writing Web Audio API code that works in every browser - Developer guides
furthermore, as a result of the spec being still in flux, some b
rowsers use deprecated properties and method names that are not present in standards-compliant b
rowsers: safari uses the old method names, firefox uses the new ones, and chrome and opera use both.
...this little library will "normalise" the interfaces for you and make it look as if your code is running in a standards compliant b
rowser, by aliasing prefixed names to the unprefixed versions.
...in the meantime, you can explicitly specify 'equalpower' instead: var panner = new audiocontext.pannernode(); panner.panningmodel = 'equalpower'; note that there's a list of projects built with the web audio api, specifying which ones use the standard audiocontext and which b
rowsers do they work on.
browserid - Archive of obsolete content
« xul reference home b
rowserid type: string the id of the b
rowser element to which the findbar is attached.
... you should use the b
rowser property to get and set this value from a script.
getBrowserIndexForDocument - Archive of obsolete content
« xul reference home getb
rowserindexfordocument( document ) return type: integer returns the index of the b
rowser for the specified document in the tabb
rowser the method was invoked on.
... the returned index is dependent on the tabs in the tabb
rowser and is invalidated when the tab ordering changes.
Browser-side plug-in API - Archive of obsolete content
this chapter describes methods in the plug-in api that are provided by the b
rowser; these allow call back to the b
rowser to request information, tell the b
rowser to repaint part of the window, and so forth.
... the names of all of these methods begin with npn_ to indicate that they are implemented by the b
rowser and called by the plug-in.
browser.dom.window.dump.file
b
rowser.dom.window.dump.file redirects the ouput of window.dump() calls to a file whose address is specified in this preference if b
rowser.dom.window.dump.enabled is set to true.
... related b
rowser.dom.window.dump.enabled ...
Browser security
an important aspect of developing code for any b
rowser, including firefox, as well as any web-oriented project, is its security.
...y work.exploitable crashesthis article will help you determine if a crash is exploitable, find crashes which are exploitable, and to fix exploitable crashes.handling mozilla security bugsthis document describes how the new security organizational structure will work, and how security-related mozilla bug reports will be handled.pinning violation reportsif a site makes use of key pinning, and your b
rowser sees a certificate chain for that site which does not match the pin, firefox will reject the connection and display an error page.
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 b
rowsers.
... this set uses: fallbacks using 2009 'box' syntax (ff and older webkit) and prefixed syntaxes (ie10, webkit b
rowsers without flex wrapping) final standards syntax (ff, safari, chrome, ie11+, edge, opera) this was inspired by: http://dev.opera.com/articles/view/advanced-cross-b
rowser-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 b
rowsers.
browser.urlbar.trimURLs
the preference b
rowser.urlbar.trimurls controls whether the protocol http and the trailing slash behind domain name (if the open page is exactly the domain name) are hidden.
nsIWebBrowserChromeFocus
embedding/b
rowser/webb
rowser/nsiwebb
rowserchromefocus.idlscriptable implemented by the same object as nsiembeddingsitewindow.
Browser Differences - Web APIs
b
rowser differences netscape 7.x (all platforms) and internet explorer 6 (windows) support the w3c xslt 1.0 standard (http://www.w3.org/tr/xslt).
Index - Web APIs
in some b
rowsers, older implementations of this interface return undefined.
...in some b
rowsers older implementations of this interface return void.
...in some b
rowsers older implementations of this interface return void.
...And 321 more matches
Index - Archive of obsolete content
found 3833 pages: # page tags and summary 1 archive of obsolete content archive, landing here at mdn, we try to avoid outright deleting content that might be useful to people targeting legacy platforms, operating systems, and b
rowsers.
... perhaps your target audience is people that are using older hardware, for example, and can't upgrade to the latest and greatest b
rowsers.
... 53 private-b
rowsing add-on sdk check whether a given object is private, so an add-on can respect private b
rowsing 54 querystring add-on sdk utility functions for working with query strings.
...And 203 more matches
Index - MDN Web Docs Glossary: Definitions of Web-related terms
adobe flash can run from supporting web b
rowsers via a b
rowser plug-in.
... 19 apple safari glossary, navigation, webmechanics safari is a web b
rowser developed by apple and bundled with both macos and ios.
... 20 application context codingscripting, glossary an application context is a top-level b
rowsing context that has a manifest applied to it.
...And 84 more matches
Handling common JavaScript problems - Learn web development
previous overview: cross b
rowser testing next now we'll look at common cross-b
rowser javascript problems and how to fix them.
... this includes information on using b
rowser dev tools to track down and fix problems, using polyfills and libraries to work around problems, getting modern javascript features working in older b
rowsers, and more.
... prerequisites: familiarity with the core html, css, and javascript languages; an idea of the high-level principles of cross b
rowser testing.
...And 70 more matches
Gecko Compatibility Handbook - Archive of obsolete content
they are actually replaced by ''-(example removed)-'' the goal of this handbook is to help you update websites to work with standards-based b
rowsers and properly detect gecko.
... gecko is an embeddable b
rowser, developed as part of the mozilla open source project and based on w3 standards rather than the proprietary approaches of the past.
... adhering to web standards simplifies cross-b
rowser web development and enables accessibility.
...And 63 more matches
Handling common HTML and CSS problems - Learn web development
previous overview: cross b
rowser testing next with the scene set, we'll now look specifically at the common cross-b
rowser problems you will come across in html and css code, and what tools can be used to prevent problems from happening, or fix problems that occur.
... this includes linting code, handling css prefixes, using b
rowser dev tools to track down problems, using polyfills to add support into b
rowsers, tackling responsive design problems, and more.
... prerequisites: familiarity with the core html, css, and javascript languages; an idea of the high level principles of cross b
rowser testing.
...And 60 more matches
Drawing and Event Handling - Plugins
it is drawn in a target called a drawable, which corresponds to either the b
rowser window or an off-screen bitmap.
...a windowless plug-in draws itself only in response to a paint message from the b
rowser.
... for windowless plug-ins, the b
rowser calls the npp_setwindow method with an npwindow structure that represents a drawable.
...And 52 more matches
Setting up your own test automation environment - Learn web development
previous overview: cross b
rowser testing in this article, we will teach you how to install your own automation environment and run your own tests using selenium/webdriver and a testing library such as selenium-webdriver for node.
... prerequisites: familiarity with the core html, css, and javascript languages; an idea of the high-level principles of cross b
rowser testing, and automated testing.
... objective: to show how to set up a selenium testing environment locally and run tests with it, and how to integrate it with tools like lambdatest, sauce labs, and b
rowserstack.
...And 48 more matches
Index - Archive of obsolete content
30 b
rowser.type xul attributes, xul reference type: one of the values below.the type of b
rowser, which can be used to set access of the document loaded inside the b
rowser.
... 31 b
rowserid xul, xul reference no summary!
... 56 clicktoscroll clicktoscroll, if true, the ar
rows must be clicked to scroll the scrollbox content.
...And 46 more matches
Introduction to automated testing - Learn web development
previous overview: cross b
rowser testing next manually running tests on several b
rowsers and devices, several times per day, can get tedious, and time-consuming.
...in this article, we look at what is available, how to use task runners, and how to use the basics of commercial b
rowser test automation apps such as lambdatest, sauce labs, b
rowserstack, and testingbot.
... prerequisites: familiarity with the core html, css, and javascript languages; an idea of the high level principles of cross-b
rowser testing.
...And 46 more matches
Streams - Plugins
streams can be produced by the b
rowser and consumed by a plug-in instance, or produced by an instance and consumed by the b
rowser.
... streams produced by the b
rowser can be automatically sent to or requested by the plug-in instance.
... the b
rowser calls the plug-in methods npp_newstream, npp_writeready, npp_write, and npp_destroystream to, respectively, create a stream, find out how much data the plug-in can handle, push data into the stream, and delete it.
...And 46 more matches
HTTP Index - HTTP
it was designed for communication between web b
rowsers and web servers, but it can also be used for other purposes.
... 2 a typical http session http in client-server protocols, like http, sessions consist of three phases: 3 an overview of http html, http, overview, webmechanics, l10n:priority http isthe foundation of any data exchange on the web and it is a client-server protocol, which means requests are initiated by the recipient, usually the web b
rowser.
... 11 resource urls guide, http, intermediate, resource resource urls, urls prefixed with the resource: scheme, are used by firefox and firefox b
rowser extensions to load resources internally, but some of the information is available to sites the b
rowser connects to as well.
...And 46 more matches
Strategies for carrying out testing - Learn web development
previous overview: cross b
rowser testing next this article starts the module off by providing an overview of the topic of (cross) b
rowser testing, answering questions such as "what is cross-b
rowser testing?", "what are the most common types of problems you'll encounter?", and "what are the main approaches for testing, identifying, and fixing problems?" prerequisites: familiarity with the core html, css, and javascript languages; an idea of the high level principles of cross-b
rowser testing.
... objective: to gain an understanding of the high-level concepts involved in cross-b
rowser testing.
... when doing cross-b
rowser testing, you need to work out a list of b
rowsers you will need to test on to start with.
...And 44 more matches
Window.open() - Web APIs
the window interface's open() method loads the specified resource into the new or existing b
rowsing context (window, <iframe> or tab) with the specified name.
... if the name doesn't exist, then a new b
rowsing context is opened in a new tab or a new window, and the specified resource is loaded into it.
...this can be a path or url to an html page, image file, or any other resource that is supported by the b
rowser.
...And 41 more matches
Using XPInstall to Install Plugins - Archive of obsolete content
xpinstall is a javascript-based installer technology that works across all the platforms that mozilla and netscape b
rowsers based on mozilla (such as netscape 7) are deployed.
... it can be a way to ensure a smooth user-experience when obtaining plugins, without obliging the user to exit the b
rowsing environment to launch a binary installer (the classic setup.exe experience on windows) or obliging the user to restart their b
rowser.
...exe) installer, xpinstall can wrap this native installer and run it so that the user never has to leave the b
rowsing environment and click on the exe to run it.
...And 40 more matches
Theme changes in Firefox 2 - Archive of obsolete content
b
rowser changes requiring theme updates there are a number of changed and deleted files in the b
rowser that may require you to make changes to your theme.
... filename css file details b
rowser/base/searchdialog.xul b
rowser/base/content/searchdialog.css removed from firefox 2.
... safeb
rowsing/warning-overlay.xul safeb
rowsing/b
rowser-protection.css new file containing the overlay that's drawn over the b
rowser when you b
rowse to a suspected phishing site.
...And 40 more matches
Index - Learn web development
to help you achieve this, this module will cover general best practices (which are demonstrated throughout the html, css, and javascript topics), cross b
rowser testing, and some tips on enforcing accessibility from the start.
... beginner, express, flask, learn, node, php, python, django, lamp, server-side, servers throughout most of the learning area, we tell you to just open your examples directly in a b
rowser — this can be done by double clicking the html file, dragging and dropping it into the b
rowser window, or choosing file > open...
... 25 what are b
rowser developer tools?
...And 39 more matches
Index
the mozilla javascript engine will perform garbage collection automatically when the javascript heap g
rows beyond a certain size.
... 111 using xpcom components xpcom applications like the mozilla b
rowser are sophisticated, modularized clients of xpcom components.
... in fact, virtually all of the functionality that you associate with a b
rowser - navigation, window management, managing cookies, bookmarks, security, searching, rendering, and other features - is defined in xpcom components and accessed by means of those component interfaces.
...And 39 more matches
Plug-in Basics - Plugins
next » how plug-ins are used plug-ins offer a rich variety of features that can increase the flexibility of gecko-based b
rowsers.
... with the plug-in api, you can create dynamically loaded plug-ins that can: register one or more mime types draw into a part of a b
rowser window receive keyboard and mouse events obtain data from the network using urls post data to urls add hyperlinks or hotspots that link to new urls draw into sections on an html page communicate with javascript/dom from native code you can see which plug-ins are installed on your system and have been properly associated with the b
rowser by consulting the installed plug-ins page.
...a helper application is a separate, free-standing application that can be started from the b
rowser.
...And 39 more matches
Migrate apps from Internet Explorer to Mozilla - Archive of obsolete content
introduction when netscape started the mozilla b
rowser, it made the conscious decision to support w3c standards.
...b
rowsers, like internet explorer 4, that were built before the conception of w3c standards inherited many quirks.
... in this article, i will describe mozilla's quirks mode, which provides strong backwards html compatibility with internet explorer and other legacy b
rowsers.
...And 35 more matches
Event reference
this article offers a list of events that can be sent; some are standard events defined in official specifications, while others are events used internally by specific b
rowsers; for example, mozilla-specific events are listed so that add-ons can use them to interact with the b
rowser.
... network events event name fired when online the b
rowser has gained access to the network.
... offline the b
rowser has lost access to the network.
...And 33 more matches
HTML documentation index - HTML: Hypertext Markup Language
if so, the b
rowser modifies its widget to allow editing.
... 15 draggable global attributes, html, reference the draggable global attribute is an enumerated attribute that indicates whether the element can be dragged, either with native b
rowser behavior or the html drag and drop api.
... 51 the html autocomplete attribute addresses, attribute, email addresses, forms, html, input, phone numbers, reference, select, text, usernames, autocomplete, form, passwords, textarea autocomplete lets web developers specify what if any permission the user agent has to provide automated assistance in filling out form field values, as well as guidance to the b
rowser as to the type of information expected in the field.
...And 33 more matches
CSS property compatibility table for form controls - Learn web development
how to read the tables values for each property, there are four possible values: yes there's reasonably consistent support for the property across b
rowsers.
...here are two possible renderings: n (normal) indicates that the property is applied as it is t (tweaked) indicates that the property is applied with the extra rule below: * { /* turn off the native look and feel */ -webkit-appearance: none; appearance: none; /* for internet explorer */ background: none; } compatibility tables global behaviors some behaviors are common to many b
rowsers at a global level: border, background, border-radius, height using one of these properties can partially or fully turn off the native look & feel of widgets on some b
rowsers.
... line-height this property is supported inconsistently across b
rowsers and you should avoid it.
...And 31 more matches
Overview of Mozilla embedding APIs
much of the gecko functionality is exposed through a component called the nswebb
rowser.
...each webb
rowser instance represents the "client-area" of a typical b
rowser window.
... the webb
rowser exposes a set of interfaces which allow the embedding application to control activity and respond to changes within this client area.
...And 31 more matches
Using the application cache - HTML: Hypertext Markup Language
this application cache (appcache) interface lists resources that b
rowsers should cache to be available offline.
... an application cache gives the following benefits: offline b
rowsing users can navigate a site even when they are offline.
... reduced server load the b
rowser only downloads resources that have changed from the server.
...And 30 more matches
Chapter 5: Let's build a Firefox extension - Archive of obsolete content
although it may still work in some b
rowsers, its use is discouraged since it could be removed at any time.
... create a development profile if you want to partition your everyday b
rowsing environment from your development environment in firefox, set up a second profile for development.
... true b
rowser.dom.window.dump.enabled (not present in firefox 3.5+) enables use of the dump method for debugging.
...And 29 more matches
Audio and Video Delivery - Developer guides
this article is intended as a starting point for exploring the various delivery mechanisms of web based media and compatibility with popular b
rowsers.
... the audio and video elements whether we are dealing with pre-recorded audio files or live streams, the mechanism for making them available through the b
rowser's <audio> and <video> elements remains pretty much the same.
... currently, to support all b
rowsers we need to specify two formats, although with the adoption of mp3 and mp4 formats in firefox and opera, this is changing fast.
...And 29 more matches
Plug-in Development Overview - Gecko Plugin API Reference
plan your plug-in: decide on the services you want the plug-in software to provide and how it will interact with the b
rowser and the special media for which the plug-in is created.
...also see making plug-ins scriptable for more information about making plug-ins accessible from the b
rowser.
...to see your plug-in in action, simply display the html page that calls it in the b
rowser.
...And 28 more matches
Plug-in Development Overview - Plugins
plan your plug-in: decide on the services you want the plug-in software to provide and how it will interact with the b
rowser and the special media for which the plug-in is created.
...also see making plug-ins scriptable for more information about making plug-ins accessible from the b
rowser.
...to see your plug-in in action, simply display the html page that calls it in the b
rowser.
...And 28 more matches
Web video codec guide - Web media technologies
the primary drawback to av1 at this time is that it is very new, and support is still in the process of being integrated into most b
rowsers.
...roma subsampling main 8 or 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 b
rowser 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 organ...
... non-web b
rowser implementations of webrtc (any implementation which doesn't include the javascript apis) are required to support avc as a codec in webrtc calls.
...And 28 more matches
Using the Right Markup to Invoke Plugins - Archive of obsolete content
the object element: w3c standards and cross-b
rowser issues the object element is part of the html 4.01 specification, and is the recommended mechanism to invoke plugins.
... traditionally, the object element has been used differently by microsoft internet explorer and by mozilla-based b
rowsers such as netscape 7.
... b
rowsers such as netscape 7 will not render the flash plugin if the above kind of markup is used, because netscape 7 does not support activex or activex-based component invocations, with the exception of windows media player in netscape 7.1.
...And 27 more matches
Video and audio content - Learn web development
a really simple example looks like this: <video src="rabbit320.webm" controls> <p>your b
rowser doesn't support html5 video.
... controls users must be able to control video and audio playback (it's especially critical for people who have epilepsy.) you must either use the controls attribute to include the b
rowser's own control interface, or build your interface using the appropriate javascript api.
... the paragraph inside the <video> tags this is called fallback content — this will be displayed if the b
rowser accessing the page doesn't support the <video> element, allowing us to provide a fallback for older b
rowsers.
...And 27 more matches
Anatomy of a video game - Game development
modern b
rowsers strive to call methods right as they are needed and idle (or do their other tasks) in the gaps.
...being more specific with the b
rowser about when your function needs to be called allows the b
rowser to optimize when it is called.
... some code needs to be run frame-by-frame so why attach that function to anything other than the b
rowser's redraw schedule?
...And 26 more matches
nsIAnnotationService
1.0 66 introduced gecko 1.9 inherits from: nsisupports last changed in gecko 2.0 (firefox 4 / thunderbird 3.3 / seamonkey 2.1) implemented by: "@mozilla.org/b
rowser/annotation-service;1".
... to use this service, use: var annotationservice = components.classes["@mozilla.org/b
rowser/annotation-service;1"] .getservice(components.interfaces.nsiannotationservice); note: the annotation service is not thread-safe.
... this means that if you create an annotation on an unvisited uri, it will get deleted when the b
rowser shuts down.
...And 25 more matches
<textarea> - HTML: Hypertext Markup Language
rows and cols attributes to allow you to specify an exact size for the <textarea> to take.
... setting these is a good idea for consistency, as b
rowser defaults can differ.
... autocapitalize this is a non-standard attribute supported by webkit on ios (therefore nearly all b
rowsers 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.
...And 25 more matches
List of Mozilla-Based Applications - Archive of obsolete content
abstract accounting tool adobe acrobat and adobe reader portable document format (pdf) software uses mozilla spidermonkey adobe flash player popular b
rowser plug-in uses nss in linux version adwatch content management system uses xul and xpcom aicpcu/iia exam app exam delivery software aliwal geocoder geocoding & data on a map amarok xul remote remote control for amarok music player ample sdk javascript gui-framework aol instant messenger im client uses...
...ed to use nss with mod_nss ssl module apicawatch site performance monitoring tool uses firefox as part of its monitoring package astyle css editor editing tool atmail webmail client aviva for java mainframe connectivity product uses mozilla rhino babelgum internet tv service basilisk pre-servo xul-based web b
rowser uses most of the firefox 55 source code batik java-based toolkit uses mozilla rhino bitbox security focused b
rowser seemingly based on firefox blackbird b
rowser for african american community bluegriffon wysiwyg editor next generation version of composer buzzbird twitter client built on xulrunner camino b...
...
rowser 2.5m downloads and ~400,000 active users ...
...And 24 more matches
Content Panels - Archive of obsolete content
in the mozilla b
rowser window, the area where the web page is displayed is created by using an iframe.
... iframe example example 1 : source view <toolbox> <toolbar id="nav-toolbar"> <toolbarbutton label="back" /> <toolbarbutton label="forward" /> <textbox id="urlfield" /> </toolbar> </toolbox> <iframe id="content-body" src="http://www.mozilla.org/index.html" flex="1" /> the example here has created a very simple interface for a web b
rowser.
... b
rowsers there is a second type of content panel, using the b
rowser tag.
...And 24 more matches
XUL Structure - Archive of obsolete content
when you type the url of an html page into the b
rowser's address field, the b
rowser locates the web site and downloads the content.
... this chrome package registration is the way firefox extensions are able to add features to the b
rowser.
...the extension will hook into the b
rowser using a xul specific feature called an overlay which allows the xul from the extension to mesh with the xul in the b
rowser.
...And 24 more matches
Window - Web APIs
in a tabbed b
rowser, each tab is represented by its own window object; the global window seen by javascript code running within a given tab always represents the tab in which the code is running.
... that said, even in a tabbed b
rowser, some properties and methods still apply to the overall window that contains the tab, such as resizeto() and innerheight.
... window.console read only returns a reference to the console object which provides access to the b
rowser's debugging console.
...And 24 more matches
Codecs used by WebRTC - Web media technologies
this guide reviews the codecs that b
rowsers are required to implement as well as other codecs that some or all b
rowsers support for webrtc.
...however, rfc 7742 specifies that all webrtc-compatible b
rowsers must support vp8 and h.264's constrained baseline profile for video, and rfc 7874 specifies that b
rowsers must support at least the opus codec as well as g.711's pcma and pcmu formats.
...this guide reviews the codecs that b
rowsers are required to implement as well as other codecs that some or all b
rowsers support for webrtc.
...And 24 more matches
Trees - Archive of obsolete content
a tree may be used to display
rows of text in columns.
... it can be used with
rows either in a flat list or arranged into a hierarchy.
...both can be used to create tables of data with multiple
rows and columns, and both may contain column headers.
...And 23 more matches
Mozilla Web Developer FAQ
this document answers questions that web authors ask frequently specifically in connection with firefox and other gecko-based b
rowsers.
...in the quirks mode—for the purpose of backwards compatibility—gecko mimics some behaviors of legacy b
rowsers in ways that are spec violations.
... since also other contemporary b
rowsers have a standards mode, activating the standards mode or the almost standards mode in other b
rowsers as well (using the above-mentioned exact doctypes) is the best way to get consistent css layout results across different b
rowsers.
...And 23 more matches
Places Developer Guide
overview places is the umbrella term for a set of apis for managing b
rowsing history and uri metadata first introduced in firefox 3.
...bookmarks the toolkit bookmarks service is nsinavbookmarksservice: var bookmarks = cc["@mozilla.org/b
rowser/nav-bookmarks-service;1"] .getservice(ci.nsinavbookmarksservice); this service provides methods for adding, editing and deleting items in the bookmarks collection.
...however, firefox developers can take advantage of several helper apis that are b
rowser-specific: fuel - a collection of wrapper apis for easing access to a number of firefox utilities and services nsiplacestransactionsservice - a firefox service for modifying bookmarks in a transactional manner, providing facilities for undo/redo places utilities for javascript - accessors and helper functions for firefox and extensions creating bookmarks, folders and other items creating...
...And 23 more matches
nsISessionStore
b
rowser/components/sessionstore/nsisessionstore.idlscriptable provides a means for extensions and other code to store data in association with b
rowser sessions, tabs, and windows.
... the api operates on top-level b
rowser.xul and navigator.xul windows; see note on windows for details.
... 1.0 66 introduced gecko 1.8 inherits from: nsisupports last changed in gecko 2.0 (firefox 4 / thunderbird 3.3 / seamonkey 2.1) in versions of firefox prior to 3.5, the user preference b
rowser.sessionstore.enabled must be true for these calls to be successful.
...And 23 more matches
Writing forward-compatible websites - Developer guides
this page explains how to write websites that do not break when new b
rowser versions are released.
... what this means is that any time you access a global variable in an event handler content attribute, including calling any function declared globally, you can end up with a name collision if a specification adds a new dom property to elements or documents which has the same name as your function or variable, and a b
rowser implements it.
... as a simple example, don't assume that any b
rowser in which "filter" in body.style tests true must be microsoft internet explorer and therefore e.g.
...And 23 more matches
jspage - Archive of obsolete content
value)?"textnode":"whitespace";}}else{if(typeof a.length=="number"){if(a.callee){return"arguments"; }else{if(a.item){return"collection";}}}}return typeof a;}function $unlink(c){var b;switch($type(c)){case"object":b={};for(var e in c){b[e]=$unlink(c[e]); }break;case"hash":b=new hash(c);break;case"array":b=[];for(var d=0,a=c.length;d<a;d++){b[d]=$unlink(c[d]);}break;default:return c;}return b;}var b
rowser=$merge({engine:{name:"unknown",version:0},platform:{name:(window.orientation!=undefined)?"ipod":(navigator.platform.match(/mac|win|linux/i)||["other"])[0].tolowercase()},features:{xpath:!!(document.evaluate),air:!!(window.runtime),query:!!(document.queryselector)},plugins:{},engines:{presto:function(){return(!window.opera)?false:((arguments.callee.caller)?960:((document.getelementsbyclassname)?
...950:925)); },trident:function(){return(!window.activexobject)?false:((window.xmlhttprequest)?((document.queryselectorall)?6:5):4);},webkit:function(){return(navigator.taintenabled)?false:((b
rowser.features.xpath)?((b
rowser.features.query)?525:420):419); },gecko:function(){return(!document.getboxobjectfor&&window.mozinnerscreenx==null)?false:((document.getelementsbyclassname)?19:18);}}},b
rowser||{});b
rowser.platform[b
rowser.platform.name]=true; b
rowser.detect=function(){for(var b in this.engines){var a=this.engines[b]();if(a){this.engine={name:b,version:a};this.engine[b]=this.engine[b+a]=true; break;}}return{name:b,version:a};};b
rowser.detect();b
rowser.request=function(){return $try(function(){return new xmlhttprequest();},function(){return new activexobject("msxml2.xmlhttp"); },function(){retu...
...rn new activexobject("microsoft.xmlhttp");});};b
rowser.features.xhr=!!(b
rowser.request());b
rowser.plugins.flash=(function(){var a=($try(function(){return navigator.plugins["shockwave flash"].description; },function(){return new activexobject("shockwaveflash.shockwaveflash").getvariable("$version");})||"0 r0").match(/\d+/g);return{version:parseint(a[0]||0+"."+a[1],10)||0,build:parseint(a[2],10)||0}; })();function $exec(b){if(!b){return b;}if(window.execscript){window.execscript(b);}else{var a=document.createelement("script");a.setattribute("type","text/javascript"); a[(b
rowser.engine.webkit&&b
rowser.engine.version<420)?"innertext":"text"]=b;document.head.appendchild(a);document.head.removechild(a);}return b;}native.uid=1; var $uid=(b
rowser.engine.trident)?function(a){return(a.uid||(a.uid=[nativ...
...And 22 more matches
Windows Media in Netscape - Archive of obsolete content
detecting the right b
rowser like internet explorer, netscape 7.1 and later versions can play windows media files using the popular windows media player activex control.
...netscape 7.1 is the first netscape gecko™ b
rowser to support the windows media player as an activex control -- previous netscape b
rowsers did not support any activex controls, and thus detecting which versions of netscape support the windows media activex control is an important first step towards building multimedia experiences using html, javascript, and the windows media activex control.
... the windows media 9 series sdk documentation for netscape b
rowsers says that versions of netscape (including 6.2 and 7.0) support the embedding of the windows media player control using a java applet.
...And 22 more matches
How CSS works - Learn web development
in this lesson we will take a look at how a b
rowser takes css and html and turns that into a webpage.
... prerequisites: basic computer literacy, basic software installed, basic knowledge of working with files, and html basics (study introduction to html.) objective: to understand the basics of how css and html are parsed by the b
rowser, and what happens when a b
rowser encounters css it does not understand.
... when a b
rowser displays a document, it must combine the document's content with its style information.
...And 22 more matches
Implementing feature detection - Learn web development
previous overview: cross b
rowser testing next feature detection involves working out whether a b
rowser supports a certain block of code, and running different code depending on whether it does (or doesn't), so that the b
rowser can always provide a working experience rather than crashing/erroring in some b
rowsers.
... prerequisites: familiarity with the core html, css, and javascript languages; an idea of the high-level principles of cross-b
rowser testing.
... the concept of feature detection the idea behind feature detection is that you can run a test to determine whether a feature is supported in the current b
rowser, and then conditionally run code to provide an acceptable experience both in b
rowsers that do support the feature, and b
rowsers that don't.
...And 22 more matches
<input>: The Input (Form Input) element - HTML: Hypertext Markup Language
<input type="checkbox" name="checkbox"/> color a control for specifying a color; opening a color picker when active in supporting b
rowsers.
...opens a date picker or numeric wheels for year, month, day when active in supporting b
rowsers.
...opens a date picker or numeric wheels for date- and time-components when active in supporting b
rowsers.
...And 22 more matches
<video>: The Video Embed element - HTML: Hypertext Markup Language
in a similar manner to the <img> element, we include a path to the media we want to display inside the src attribute; we can include other attributes to specify information such as video width and height, whether we want it to autoplay and loop, whether we want to show the b
rowser's default video controls, etc.
... the content inside the opening and closing <video></video> tags is shown as a fallback in b
rowsers that don't support the element.
... in some b
rowsers (e.g.
...And 22 more matches
Cross-Origin Resource Sharing (CORS) - HTTP
cross-origin resource sharing (cors) is a mechanism that uses additional http headers to tell b
rowsers to give a web application running at one origin, access to selected resources from a different origin.
... for security reasons, b
rowsers restrict cross-origin http requests initiated from scripts.
... the cors mechanism supports secure cross-origin requests and data transfers between b
rowsers and servers.
...And 22 more matches
The building blocks of responsive design - Progressive web apps (PWAs)
for web developers, it is now fairly common to be called upon to create a web site or app that changes its user interface depending on the b
rowser or device accessing the site to provide an optimized experience.
... one approach to this is to create different versions of your site/app for different platforms or b
rowsers and serve them appropriately after detecting which b
rowser or platform is looking at your site.
... but this is increasingly inefficient: b
rowser sniffing is inherently error prone, and maintaining multiple copies of your code can turn out to be a nightmare.
...And 22 more matches
tabs/utils - Archive of obsolete content
functions for working with xul tabs and the xul tabb
rowser object.
... window : window a b
rowser window.
... gettabb
rowser(window) get the tabb
rowser element for the given b
rowser window.
...And 21 more matches
The Essentials of an Extension - Archive of obsolete content
this is important because the appearance of the b
rowser is very different for each operating system.
...this is what a chrome uri looks like: chrome://packagename/section/path/to/file so, for instance, if i want to access the file b
rowseroverlay.xul in the extension, the chrome uri would be chrome://xulschoolhello/content/b
rowseroverlay.xul.
...so, to access the dtd file in the hello world extension, the chrome path is chrome://xulschoolhello/locale/b
rowseroverlay.dtd.
...And 21 more matches
NPAPI plugin reference - Archive of obsolete content
b
rowser-side plug-in api this chapter describes methods in the plug-in api that are provided by the b
rowser; these allow call back to the b
rowser to request information, tell the b
rowser to repaint part of the window, and so forth.
... the names of all of these methods begin with npn_ to indicate that they are implemented by the b
rowser and called by the plug-in.
... np_getvalue allows the b
rowser to query the plug-in for information.
...And 21 more matches
Beginner's guide to media queries - Learn web development
previous overview: css layout next the css media query gives you a way to apply css only when the b
rowser and device environment matches a rule that you specify, for example "viewport is wider than 480 pixels".
... media query basics the simplest media query syntax looks like this: @media media-type and (media-feature-rule) { /* css rules go here */ } it consists of: a media type, which tells the b
rowser what kind of media this code is for (e.g.
...it will not apply when the page is loaded in a b
rowser.
...And 21 more matches
Responsive images - Learn web development
this kind of problem didn't exist when the web first existed, in the early to mid 90s — back then the only devices in existence to b
rowse the web were desktops and laptops, so b
rowser engineers and spec writers didn't even think to implement solutions.
... responsive image technologies were implemented recently to solve the problems indicated above by letting you offer the b
rowser several image files, either all showing the same thing but containing different numbers of pixels (resolution switching), or different images suitable for different space allocations (art direction).
... note: the new features discussed in this article — srcset/sizes/<picture> — are all supported in release versions of modern desktop and mobile b
rowsers (including microsoft's edge b
rowser, although not internet explorer.) how do you create responsive images?
...And 21 more matches
Client-side storage - Learn web development
previous overview: client-side web apis modern web b
rowsers support a number of ways for web sites to store data on the user's computer — with the user's permission — then retrieve it when necessary.
...most major modern web sites are dynamic — they store data on the server using some kind of database (server-side storage), then run server-side code to retrieve needed data, insert it into static page templates, and serve the resulting html to the client to be displayed by the user's b
rowser.
... note: there are limits to the amount of data you can store using client-side storage apis (possibly both per individual api and cumulatively); the exact limit varies depending on the b
rowser and possibly based on user settings.
...And 21 more matches
Embedding Tips
get thensiwebnavigation interface on your webb
rowser and call the loaduri method with the appropriate uri and flags.
... implement the nsiwebprogresslistener interface and register it with the appropriate web b
rowser object via the nsiwebb
rowser::addwebb
rowserlistener() method.
... implement the nsiuricontentlistener interface, and register it with the appropriate web b
rowser object via the nsiwebb
rowser::parenturicontentlistener attribute.
...And 21 more matches
Building the WebLock UI
in this chapter, however, we are going to be building a user interface for the weblock component that's meant to be added to the existing mozilla b
rowser[other-mozlike-b
rowsers].
...specifically, the user interface we create in this chapter will be overlaid into the statusbar of the b
rowser component, where it will provide a small icon the user can click to access the web lock interface.
... weblock indicator in b
rowser user interface package list the user interface described in this section is comprised of four files: weblockoverlay.xul is the file that defines the little status icon in the b
rowser.
...And 21 more matches
Using feature queries - CSS: Cascading Style Sheets
feature queries are created using the css at-rule @supports, and are useful as they give web developers a way to test to see if a b
rowser has support for a certain feature, and then provide css that will only run based on the result of that test.
...the difference is that with a media query you are testing something about the environment in which the web page is running, whereas with feature queries you are testing b
rowser support for css features.
...you may not test for a bare property name such as display; the rule requires a property name and a value: @supports (property: value) { css rules to apply } if you want to check if a b
rowser supports the row-gap property, for example, you would write the following feature query.
...And 21 more matches
Basic Concepts of grid layout - CSS: Cascading Style Sheets
a grid is a set of intersecting horizontal and vertical lines defining columns and
rows.
...the grid layout specification is flexible enough to add additional
rows and columns when needed.
...in a web b
rowser, you won’t see any difference to how these items are displayed before turning them into a grid, as grid has created a single column grid for the items.
...And 21 more matches
Media container formats (file types) - Web media technologies
see codecs used by webrtc for information about codecs commonly used for making webrtc calls, as well as b
rowser compatibility information around codec support in webrtc.
...not all of these are broadly supported by b
rowsers, however; some combinations of container and codec are sometimes given their own file extensions and mime types as a matter of convenience, or because of their ubiquity.
... index of media container formats (file types) to learn more about a specific container format, find it in this list and click through to the details, which include information about what the container is typically useful for, what codecs it supports, and which b
rowsers support it, among other specifics.
...And 21 more matches
Grids - Archive of obsolete content
the grid does not display anything itself; it is used only to position elements in a tabular form with
rows and columns.
... a grid contains elements that are aligned in
rows just like tables.
... inside a grid, you declare two things, the columns that are used and the
rows that are used.
...And 20 more matches
Advanced form styling - Learn web development
unfortunately, the behavior of this property's original implementations was very different across b
rowsers, making it not very usable.
... newer implementations are more consistent in behavior; interestingly enough, both chromium-based b
rowsers (chrome, opera, edge), safari, and firefox all support the -webkit- prefixed version (-webkit-appearance).
...prefixed usually means "work in progress", so in the future b
rowser vendors may come to a consensus to drop the prefix.
...And 20 more matches
Application Translation with Mercurial
firefox and fx-* denote branches of firefox for desktop, the b
rowser for desktops and notebooks running, windows, mac os or linux.
... fennec and fennec-* denote branches of firefox for mobile, the firefox b
rowser for the android operating system.
... seamonkey and sea-* denote branches of seamonkey, the suite consisting of b
rowser, mail and chat client and more.
...And 20 more matches
<input type="datetime-local"> - HTML: Hypertext Markup Language
the control's ui varies in general from b
rowser to b
rowser; at the moment support is patchy, with only chrome/opera and edge on desktop and most modern versions of mobile b
rowsers having usable implementations.
... in other b
rowsers, these degrade gracefully to simple <input type="text"> controls.
...some mobile b
rowsers (particularly on ios) do not currently implement this correctly.
...And 20 more matches
Mozilla Application Framework in Detail - Archive of obsolete content
the gecko rendering engine gecko is the revolutionary rendering engine that offers advanced features for internet b
rowsing anywhere across applications, computing platforms and devices.
... this innovation in b
rowser technology offers small size, speed and industry leading standards support.
...as personal connectivity expands from the desktop computer to new web-enabled products and devices, gecko is a b
rowser engine that has been designed from the ground up to power a new generation of desktop b
rowsers and b
rowsing devices and to accelerate the growth and development of the next-generation internet.
...And 19 more matches
Tree View Details - Archive of obsolete content
this is a fairly tricky process as it involves keeping track of which items have children and also which
rows are open and closed.
...the topmost
rows are at level 0, the children of those
rows are at level 1, their children at level 2 and so on.
...the view will need to return 0 for the outermost
rows and higher values for inner
rows.
...And 19 more matches
Client-side form validation - Learn web development
when you enter data, the b
rowser and/or the web server will check to see that the data is in the correct format and within the constraints set by the application.
... validation done in the b
rowser is called client-side validation, while validation done on the server is called server-side validation.
... if the user tries to send the data, the b
rowser will submit the form, provided there is nothing else stopping it from doing so (e.g., javascript).
...And 19 more matches
Introduction to events - Learn web development
in this article, we discuss some important concepts surrounding events, and look at how they work in b
rowsers.
... objective: to understand the fundamental theory of events, how they work in b
rowsers, and how events may differ in different programming environments.
... in the case of the web, events are fired inside the b
rowser window, and tend to be attached to a specific item that resides in it — this might be a single element, set of elements, the html document loaded in the current tab, or the entire b
rowser window.
...And 19 more matches
What is JavaScript? - Learn web development
b
rowser apis are built into your web b
rowser, and are able to expose data from the surrounding computer environment, or do useful complex things.
... note: many of the above demos won't work in an older b
rowser — when experimenting, it's a good idea to use a modern b
rowser like firefox, chrome, edge or opera to run your code in.
... you will need to consider cross b
rowser testing in more detail when you get closer to delivering production code (i.e.
...And 19 more matches
Client-Server Overview - Learn web development
previous overview: first steps next now that you know the purpose and potential benefits of server-side programming we're going to examine in detail what happens when a server receives a "dynamic request" from a b
rowser.
... web servers and http (a primer) web b
rowsers communicate with web servers using the hypertext transfer protocol (http).
... when you click a link on a web page, submit a form, or run a search, the b
rowser sends an http request to the server.
...And 19 more matches
Handling common accessibility problems - Learn web development
previous overview: cross b
rowser testing next next we turn our attention to accessibility, providing information on common problems, how to do simple testing, and how to make use of auditing/automation tools for finding accessibility issues.
... prerequisites: familiarity with the core html, css, and javascript languages; an idea of the high level principles of cross b
rowser testing.
... users on alternative b
rowsing devices such as tvs, watches, etc.
...And 19 more matches
Initialization and Destruction - Plugins
initialization: the b
rowser calls the plug-in api function np_initialize when the plug-in code is first loaded.
... instance creation: the b
rowser calls the plug-in api function npp_new when the instance is created.
... instance destruction: the plug-in instance is deleted when the user leaves the instance page or closes the instance window; the b
rowser calls the function npp_destroy to tell the plug-in that the instance is being deleted.
...And 19 more matches
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 b
rowsers almost simultaneously, and we now have css grid layout support in the public versions of firefox, chrome, opera, safari and edge.
... however, while evergreen b
rowsers 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 b
rowsers to contend with.
... the supporting b
rowsers other than in internet explorer, css grid layout is unprefixed in safari, chrome, opera, firefox and edge.
...And 19 more matches
Image file type and format guide - Web media technologies
in this guide, we'll cover the image file types generally supported by web b
rowsers, and provide insights that will help you select the most appropriate formats to use for your site's imagery.
...however, the ones listed below are generally recognized as usable on the web, though bmp is generally not recommended as b
rowser support is potentially constrained; it should usually be avoided for web content.
... abbreviation file format mime type file extension(s) b
rowser 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 chro...
...And 19 more matches
requiredFeatures - SVG: Scalable Vector Graphics
it determines whether or not all of the named features are supported by the b
rowser; if all of them are supported, the attribute evaluates to true end the element is rendered; otherwise, the attribute evaluates to false and the current element and its children are skipped and thus will not be rendered.
...determines whether all of the named features are supported by the b
rowser.
...in some cases the feature strings map directly to a set of attributes, properties or elements, in others they represent some functionality of the b
rowser.
...And 19 more matches
SVG documentation index - SVG: Scalable Vector Graphics
svg: scalable vector graphics 2d graphics, graphics, icons, images, reference, responsive design, svg, scalable graphics, scalable images, vector graphics, web, l10n:priority scalable vector graphics (svg) are an xml-based markup language for describing two-dimensional based vector graphics.xml 2 applying svg effects to html content css, guide, html, svg modern b
rowsers support using svg within css styles to apply graphical effects to html content.
...versions of svg viewers prior to the release of firefox 1.5 unfortunately paid scant attention to namespaces, but they are essential to multi-xml dialect supporting user agents such as gecko-based b
rowsers which must be very strict.
... 107 image-rendering needsexample, svg, svg attribute the image-rendering attribute provides a hint to the b
rowser about how to make speed vs.
...And 19 more matches
MCD, Mission Control Desktop, AKA AutoConfig - Archive of obsolete content
objective the objective is to provide users with a mailer agent, a web b
rowser, and a news reader which are automatically configured (preferences) at startup to the current user connected on the computer.
... firefox 22 omni.jar archive file became omni.ja since http://blog.ffextensionguru.com/2011/11/16/omni-jar-to-become-omni-ja/ [root@localhost firefox]# unzip -l /usr/lib/firefox/b
rowser/omni.ja | grep defaults/pr warning [/usr/lib/firefox/b
rowser/omni.ja]: 3598815 extra bytes at beginning or within zipfile (attempting to process anyway) error [/usr/lib/firefox/b
rowser/omni.ja]: reported length of central directory is -3598815 bytes too long (atari stzip zipfile?
... [root@calaz firefox]# cat firefox.cfg //put everything in a try/catch try { //privacy & security defaultpref("signon.remembersignons", false); //proxy and cache, as it is on nfs volume, we don't want cache lockpref("b
rowser.cache.disk.capacity", 0); lockpref("network.cookie.cookiebehavior", 0); defaultpref("network.proxy.autoconfig_url", "http://wpad.int-evry.fr/wpad.dat"); defaultpref("network.proxy.type", 2); lockpref("network.protocol-handler.app.mailto", "/usr/bin/thunderbird"); //firefox3 urlclassifier3.sqlite iowait/cpu pb //http://forums.mozillazine.org/viewtopic.php?p=3381133#3381133 defaultpref("b
rowser.
...And 18 more matches
Download Manager preferences - Archive of obsolete content
preference description b
rowser.download.antivirus.dontclean note: in gecko 1.9.1.
... b
rowser.download.manager.addtorecentdocs a boolean value that indicates whether or not new downloads should be added to the recent documents list.
... b
rowser.download.manager.alertonexeopen a boolean value that indicates whether the ui should alert the user about the dangers of opening (executing) an exe.
...And 18 more matches
Debugging CSS - Learn web development
this article will give you guidance on how to go about debugging a css problem, and show you how the devtools included in all modern b
rowsers can help you to find out what is going on.
... prerequisites: basic computer literacy, basic software installed, basic knowledge of working with files, html basics (study introduction to html), and an idea of how css works (study css first steps.) objective: to learn the basics of what b
rowser devtools are, and how to do simple inspection and editing of css.
... how to access b
rowser devtools the article what are b
rowser developer tools is an up-to-date guide explaining how to access the tools in various b
rowsers and platforms.
...And 18 more matches
Version, UI, and Status Information - Plugins
« previousnext » this chapter describes the functions that allow a plug-in to display a message on the status line, get agent information, and check on the current version of the plug-in api and the b
rowser.
... displaying a status line message users are accustomed to checking the ui status line at the bottom of the b
rowser window for updates on the progress of an operation or the url of a link on the page.
...the user might appreciate seeing the percentage completed of the current operation or the url of a button or other link object when the cursor is over it, all of which the b
rowser shows.
...And 18 more matches
Using Service Workers - Web APIs
setting up to play with service workers many service workers features are now enabled by default in newer versions of supporting b
rowsers.
... 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 b
rowser.
... chrome canary: go to chrome://flags and turn on experimental-web-platform-features; restart b
rowser (note that some features are now enabled by default in chrome.) opera: go to opera://flags and enable support for serviceworker; restart b
rowser.
...And 18 more matches
Accessibility documentation index - Accessibility
4 aria test cases aria, accessibility for each example we test the "expected" results with assistive technologies, for each b
rowser that at supports wai-aria in.
... where a failure occurs we will test the b
rowser for api incorrectness, using tools such as msaa inspect.
... this must be done in order to determine where to file a bug (b
rowser or at).
...And 18 more matches
Overview of events and handlers - Developer guides
this overview of events and event handling explains the code design pattern used to react to incidents occurring when a b
rowser accesses a web page, and it summarizes the types of such incidents modern web b
rowsers can handle.
... events and event handling provide a core technique in javascript for reacting to incidents occurring when a b
rowser accesses a web page, including events from preparing a web page for display, from interacting with the content of the web page, relating to the device on which the b
rowser is running, and from many other causes such as media stream playback or animation timing.
... events and event handling become central to web programming with the addition of the language to b
rowsers, accompanying a switch in the rendering architecture of b
rowsers from fetch and load page rendering to event driven, reflow based, page rendering.
...And 18 more matches
<input type="time"> - HTML: Hypertext Markup Language
the control's user interface will vary from b
rowser to b
rowser.
... support is good in modern b
rowsers, with safari being the sole major b
rowser not yet implementing it; in safari, and any other b
rowsers that don't support <time>, it degrades gracefully to <input type="text">.
... 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 ar
rows to increment and decrement the currently selected component.
...And 18 more matches
Index - HTTP
b
rowsers set adequate values for this header depending on the context where the request is done: when fetching a css stylesheet a different value is set for the request than when fetching an image, video or a script.
...b
rowsers usually don't set this header as the default value for each content type is usually correct and transmitting it would allow easier fingerprinting.
...b
rowsers set adequate values for this header according to their user interface language and even if a user can change it, this happens rarely (and is frowned upon as it leads to fingerprinting).
...And 18 more matches
Strict mode - JavaScript
b
rowsers not supporting strict mode will run strict mode code with different behavior from b
rowsers that do, so don't rely on strict mode without feature-testing for support for the relevant aspects of strict mode.
...assignments, which would accidentally create global variables, instead throw an error in strict mode: 'use strict'; // assuming no global variable mistypedvariable exists mistypevariable = 17; // this line th
rows a referenceerror due to the // misspelling of variable second, strict mode makes assignments which would otherwise silently fail to throw an exception.
...in strict mode assigning to nan th
rows an exception.
...And 18 more matches
windows - Archive of obsolete content
enumerate and examine open b
rowser windows, open new windows, and listen for window events.
... usage the windows module provides basic functions for working with b
rowser windows.
... with this module, you can: enumerate the currently opened b
rowser windows open new b
rowser windows listen for common window events such as open and close private windows if your add-on has not opted into private b
rowsing, then you won't see any private b
rowser windows.
...And 17 more matches
Chapter 3: Introduction to XUL—How to build a more intuitive UI - Archive of obsolete content
introduction an overview of xul xul is an xml-based language, and was developed to be the gui markup language for the mozilla b
rowser.
... xul display methods xul is used almost exclusively in mozilla applications like firefox and thunderbird, and extensions for them, but other web b
rowsers based on firefox or the gecko engine, and even web-based content also used xul.
... for example, there is the mozilla amazon b
rowser, which helps with shopping at amazon, and the presentation method in xul, a tool for writing and displaying presentations to try out the code samples in this chapter, save them as text files with .xul extensions and drag and drop them into the firefox b
rowser window.
...And 17 more matches
Observer Notifications
sessionstore-windows-restored sent by the session restore process to indicate that all initial b
rowser windows have opened.
... b
rowser these topics indicate interesting things that happen that the b
rowser alerts you to.
... topic description b
rowser:purge-session-history sent when the sanitizer runs to purge all history and other information.
...And 17 more matches
IAccessibleTable
however, that range includes at least the intervals from the from the first row or column with the index 0 up to the last (but not including) used row or column as returned by n
rows() and ncolumns().
...escription ); [propget] hresult columnextentat([in] long row, [in] long column, [out] long ncolumnsspanned ); [propget] hresult columnheader([out] iaccessibletable accessibletable, [out] long startingrowindex ); [propget] hresult columnindex([in] long cellindex, [out] long columnindex ); [propget] hresult iscolumnselected([in] long column, [out] boolean isselected ); [propget] hresult is
rowselected([in] long row, [out] boolean isselected ); [propget] hresult isselected([in] long row, [in] long column, [out] boolean isselected ); [propget] hresult modelchange([out] ia2tablemodelchange modelchange ); [propget] hresult ncolumns([out] long columncount ); [propget] hresult n
rows([out] long rowcount ); [propget] hresult nselectedchildren([out] long cellcount ); [propget] hresul...
...t nselectedcolumns([out] long columncount ); [propget] hresult nselected
rows([out] long rowcount ); [propget] hresult rowcolumnextentsatindex([in] long index, [out] long row, [out] long column, [out] long rowextents, [out] long columnextents, [out] boolean isselected ); [propget] hresult rowdescription([in] long row, [out] bstr description ); [propget] hresult rowextentat([in] long row, [in] long column, [out] long n
rowsspanned ); [propget] hresult rowheader([out] iaccessibletable accessibletable, [out] long startingcolumnindex ); [propget] hresult rowindex([in] long cellindex, [out] long rowindex ); hresult selectcolumn([in] long column ); [propget] hresult selectedchildren([in] long maxchildren, [out, size_is(,maxchildren), length_is(, nchildren)] long children, [out] long nc...
...And 17 more matches
Backwards Compatibility of Flexbox - CSS: Cascading Style Sheets
flexbox is very well supported across modern b
rowsers, however there are a few issues that you might run into.
... in this guide we will look at how well flexbox is supported in b
rowsers, and look at some potential issues, resources and methods for creating workarounds and fallbacks.
... flexbox was implemented in an experimental way in several web b
rowsers.
...And 17 more matches
<audio>: The Embed Audio element - HTML: Hypertext Markup Language
it may contain one or more audio sources, represented using the src attribute or the <source> element: the b
rowser will choose the most suitable one.
...in a similar manner to the <img> element, we include a path to the media we want to embed inside the src attribute; we can include other attributes to specify information such as whether we want it to autoplay and loop, whether we want to show the b
rowser's default audio controls, etc.
... the content inside the opening and closing <audio></audio> tags is shown as a fallback in b
rowsers that don't support the element.
...And 17 more matches
<input type="date"> - HTML: Hypertext Markup Language
the input ui generally varies from b
rowser to b
rowser; see b
rowser compatibility for further details.
... in unsupported b
rowsers, the control degrades gracefully to <input type="text">.
... among b
rowsers 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.
...And 17 more matches
Web audio codec guide - Web media technologies
of course, individual b
rowsers may or may not choose to support all of these codecs, and their support for which container types can use them may vary as well.
... in addition, b
rowsers may choose to support additional codecs not included on this list.
...supported sample rates 8 khz - 96 khz recommended minimum 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 b
rowser 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 dist...
...And 17 more matches
WAI-ARIA basics - Learn web development
wai-aria is a technology that can help with such problems by adding in further semantics that b
rowsers and assistive technologies can recognize and use to let users know what is going on.
...html5 provides special input types to render such controls: <input type="date"> <input type="range"> these are not well-supported across b
rowsers, and it is also difficult to style them, making them not very useful for integrating with website designs.
... an important point about wai-aria attributes is that they don't affect anything about the web page, except for the information exposed by the b
rowser's accessibility apis (where screenreaders get their information from).
...And 16 more matches
Legacy layout methods - Learn web development
prerequisites: html basics (study introduction to html), and an idea of how css works (study introduction to css and styling boxes.) objective: to understand the fundamental concepts behind the grid layout systems used prior to css grid layout being available in b
rowsers.
...this knowledge will be helpful to you if you need to create fallback code for b
rowsers that do not support newer methods, in addition to allowing you to work on existing projects which use these types of systems.
...try adjusting the width of your b
rowser window to see for yourself.
...And 16 more matches
nsIContentPrefService2
private-b
rowsing context parameters many methods also accept a "context" parameter.
... this parameter relates to private b
rowsing and determines the kind of storage that a method uses, either the usual permanent storage or temporary storage set() aside for private b
rowsing sessions.
...pass an nsiloadcontext to use storage appropriate to the context's useprivateb
rowsing attribute: if useprivateb
rowsing is true, temporary private-b
rowsing storage is used, and otherwise permanent storage is used.
...And 16 more matches
Index - Firefox Developer Tools
6 dom inspector dom, dom:tools, dom_inspector, extensions, extensions:tools, themes, themes:tools, tools, web development, web development:tools, xul, xul:tools the dom inspector (also known as domi) is a developer tool used to inspect, b
rowse, and edit the document object model of documents - usually web pages or xul windows.
... 14 b
rowser console b
rowser, debugging, tools, web development, webdevelopment:tools the b
rowser console is like the web console, but applied to the whole b
rowser rather than a single content tab.
... 15 b
rowser toolbox debug, firefox, javascript the b
rowser toolbox enables you to debug add-ons and the b
rowser's own javascript code rather than just web pages like the normal toolbox.
...And 16 more matches
MediaDevices.getUserMedia() - Web APIs
if the b
rowser cannot find all media tracks with the specified types that meet the constraints given, then the returned promise is rejected with notfounderror.
...the following expresses a preference for 1280x720 camera resolution: { audio: true, video: { width: 1280, height: 720 } } the b
rowser will try to honour this, but may return other resolutions if an exact match is not available, or the user overrides it.
...here's a full example: { audio: true, video: { width: { min: 1024, ideal: 1280, max: 1920 }, height: { min: 576, ideal: 720, max: 1080 } } } an ideal value, when used, has gravity, which means that the b
rowser will try to find the setting (and camera, if you have more than one), with the smallest fitness distance from the ideal values given.
...And 16 more matches
Viewport concepts - CSS: Cascading Style Sheets
in web b
rowser terms, it is generally the same as the b
rowser window, excluding the ui, menu bar, etc.
...the size of the viewport depends on the size of the screen, whether the b
rowser is in fullscreen mode or not, and whether or not the user zoomed in.
... on larger monitors where applications aren't necessarily full screen, the viewport is the size of the b
rowser window.
...And 16 more matches
HTML elements reference - HTML: Hypertext Markup Language
this includes information about styles, scripts and data to help software (search engines, b
rowsers, etc.) use and render the page.
... <title> the html title element (<title>) defines the document's title that is shown in a b
rowser's title bar or a page's tab.
... <bdi> the html bidirectional isolate element (<bdi>) tells the b
rowser's bidirectional algorithm to treat the text it contains in isolation from its surrounding text.
...And 16 more matches
MIME types (IANA media types) - HTTP
important: b
rowsers use the mime type, not the file extension, to determine how to process a url, so it's important that web servers send the correct mime type in the response's content-type header.
... if this is not correctly configured, b
rowsers are likely to misinterpret the contents of files and sites will not work correctly, and downloaded files may be mishandled.
... with the exception of multipart/form-data, used in the post method of html forms, and multipart/byteranges, used with 206 partial content to send part of a document, http doesn't handle multipart documents in a special way: the message is transmitted to the b
rowser (which will likely show a "save as" window if it doesn't know how to display the document).
...And 16 more matches
Styling a Tree - Archive of obsolete content
setting properties instead, you must use the properties attribute on the
rows or cells to set one or more named properties.
...the following is the syntax that needs to be used: treechildren::-moz-tree-row(makeitblue) { background-color: blue; } this style which has a complex selector is used to style the background color of
rows that have the 'makeitblue' property.
...this selector matches some tree
rows inside the treechildren element as pseudo-elements.
...And 15 more matches
The web and web standards - Learn web development
by late 1990, timbl had created all the things needed to run the first version of the web — http, html, the first web b
rowser, which was called worldwideweb, an http server, and some web pages to look at.
... in the next few years that followed, the web exploded, with multiple b
rowsers being released, thousands of web servers being set up, and millions of web pages being created.
...these documents are not very useful for learning how to use the technologies they describe (this is why we have sites like mdn web docs), but instead are intended to be used by software engineers to implement these technologies (usually in web b
rowsers).
...And 15 more matches
What’s in the head? Metadata in HTML - Learn web development
previous overview: introduction to html next the head of an html document is the part that is not displayed in the web b
rowser when the page is loaded.
... let's revisit the simple html document we covered in the previous article: <!doctype html> <html> <head> <meta charset="utf-8"> <title>my test page</title> </head> <body> <p>this is my page</p> </body> </html> the html head is the contents of the <head> element — unlike the contents of the <body> element (which are displayed on the page when loaded in a b
rowser), the head's content is not displayed on the page.
... the <h1> element appears on the page when loaded in the b
rowser — generally this should be used once per page, to mark up the title of your page content (the story title, or news headline, or whatever is appropriate to your usage.) the <title> element is metadata that represents the title of the overall html document (not the document's content.) active learning: inspecting a simple example to start off this active learning, we'd like you to go to o...
...And 15 more matches
CSUN Firefox Materials
firefox 1.5, beyond the status quo "...firefox is a great little b
rowser.
... it's a quick download, occupies very little disk space, and has a clean, no-nonsense interface." - pc magazine firefox 1.5 is a fast, free, standards compliant web b
rowser which is rapidly gaining recognition for its fresh, streamlined approach to b
rowsing the web.
... in addition to winning major awards such as pc world product of the year, firefox has attracted a huge following among savvy users who simply care enough about their web b
rowsing experience to download a new piece of software.
...And 15 more matches
Basic concepts - Web APIs
indexeddb is a way for you to persistently store data inside a user's b
rowser.
... for more information on how the b
rowser handles storing your data in the background, read b
rowser storage limits and eviction criteria.
...transactions have a well-defined lifetime, so attempting to use a transaction after it has completed th
rows exceptions.
...And 15 more matches
WebGL best practices - Web APIs
you can rely on this document to guide your choice of approach, and ensure you're on the right track no matter what b
rowser or hardware your users run.
...for unchanged vaos, b
rowsers can cache the fetch limits, whereas when vaos change, b
rowsers must revalidate and recalculate limits.
... in production code, avoid such entry points, especially on the b
rowser main thread where they can cause the entire page to jank (often including scrolling or even the whole b
rowser).
...And 15 more matches
HTML attribute: rel - HTML: Hypertext Markup Language
link not allowed not allowed dns-prefetch tells the b
rowser to preemptively perform dns resolution for the target resource's origin external resource not allowed not allowed external referenced document is not part of the same site as the current document.
... link link link manifest web app manifest link not allowed not allowed modulepreload tells to b
rowser to preemptively fetch the script and store it in the document's module map for later evaluation.
... not allowed annotation annotation noopener creates a top-level b
rowsing context that is not an auxiliary b
rowsing context if the hyperlink would create either of those to begin with (i.e., has an appropriate target attribute value).
...And 15 more matches
<iframe>: The Inline Frame element - HTML: Hypertext Markup Language
the html inline frame element (<iframe>) represents a nested b
rowsing context, embedding another html page into the current one.
... each embedded b
rowsing context has its own session history and document.
... the b
rowsing context that embeds the others is called the parent b
rowsing context.
...And 15 more matches
<img>: The Image Embed element - HTML: Hypertext Markup Language
a complete guide to image formats supported by web b
rowsers is available.
... abbreviation file format mime type file extension(s) b
rowser 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 gr...
...s 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 each format links to a longer description of the format, its capabilities, and detailed b
rowser compatibility information; including which versions introduced support and specific special features that may have been introduced later.
...And 15 more matches
<input type="month"> - HTML: Hypertext Markup Language
the control's ui varies in general from b
rowser to b
rowser; at the moment support is patchy, with only chrome/opera and edge on desktop — and most modern mobile b
rowser versions — having usable implementations.
... in b
rowsers 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 b
rowser that doesn't support month, the screenshot below shows what it looks like in chrome and opera.
...And 15 more matches
<input type="week"> - HTML: Hypertext Markup Language
the control's user interface varies from b
rowser to b
rowser; cross-b
rowser support is currently a bit limited, with only chrome/opera and microsoft edge supporting it at this time.
... in non-supporting b
rowsers, the control degrades gracefully to function identically to <input type="text">.
...when the above value is submitted to the server, for example, b
rowsers may display it as week 01, 2017, but the submitted value will always look like week=2017-w01.
...And 15 more matches
Web Performance
the performance cost of animating a css property can vary from one property to another, and animating expensive css properties can result in jank as the b
rowser struggles to hit a smooth frame rate.critical rendering paththe critical rendering path is the sequence of steps the b
rowser goes through to convert the html, css, and javascript into pixels on the screen.
... optimizing the critical render path improves render performance.the critical rendering path includes the document object model (dom), css object model (cssom), render tree and layout.css and javascript animation performanceb
rowsers are able to optimize rendering flows.
... navigation and resource timingsnavigation timings are metrics measuring a b
rowser's document navigation events.
...And 15 more matches
XUL Migration Guide - Archive of obsolete content
xul overlays xul overlays are used to modify existing windows such as the main b
rowser window.
... in this way an extension can integrate its user interface into the b
rowser: for example, adding menu items, buttons, and toolbars.
...to add user interface components to the b
rowser, there are a few different options.
...And 14 more matches
An Interview With Douglas Bowman of Wired News - Archive of obsolete content
that approach meant that the content of every column would have to be loaded and calculated before it would be rendered in the b
rowser window.
...i wanted center column content to appear first in b
rowsers that got the un-styled version.
...but adding a third column to the mix created too many width variables for some b
rowsers to dynamically calculate a total.
...And 14 more matches
tree - Archive of obsolete content
« xul reference home [ examples | attributes | properties | methods | related ] a container which can be used to hold a tabular or hierarchical set of
rows of elements.
... the tree may contain any number of
rows and any number of columns.
... each row of the tree may contain child
rows which are displayed indented from the parent.
...And 14 more matches
Adobe Flash - Archive of obsolete content
the focus of this article is to present tips on scripting flash within gecko™-based web b
rowsers.
... detecting the right flash plugin (and b
rowser) adobe flash has exposed the scriptability feature in netscape gecko b
rowsers since flash 6r49 and later.
... versions of flash prior to flash 6r49 (such as flash 5) are not scriptable in netscape gecko b
rowsers.
...And 14 more matches
Responsive design - Learn web development
historic website layouts at one point in history you had two options when designing a website: you could create a liquid site, which would stretch to fill the b
rowser window or a fixed width site, which would be a fixed size in pixels.
...when viewing the example, drag your b
rowser window in and out to see how this looks at different sizes.
...again, observe the result as you change the b
rowser window size.
...And 14 more matches
What is a URL? - Learn web development
it is the mechanism used by b
rowsers to retrieve any published resource on the web.
... deeper dive basics: anatomy of a url here are some examples of urls: https://developer.mozilla.org https://developer.mozilla.org/docs/learn/ https://developer.mozilla.org/search?q=url any of those urls can be typed into your b
rowser's address bar to tell it to load the associated page (resource).
...the first part of the url indicates which protocol the b
rowser must use.
...And 14 more matches
Other form controls - Learn web development
<textarea cols="30"
rows="8"></textarea> this renders like so: the main difference between a <textarea> and a regular single line text field is that users are allowed to include hard line breaks (i.e.
...modern b
rowsers provide a drag handle that you can drag to increase/decrease the size of the text area.
...
rows specifies the number of visible text
rows for the control.
...And 14 more matches
React interactivity: Events and state - Learn web development
all b
rowser events follow this format in jsx – on, followed by the name of the event.
...it should end up looking something like this: function handlesubmit(e) { e.preventdefault(); alert('hello, world!'); } to use this function, add an onsubmit attribute to the <form> element, and set its value to the handlesubmit function: <form onsubmit={handlesubmit}> now if you head back to your b
rowser and click on the "add" button, your b
rowser will show you an alert dialog with the words "hello, world!" — or whatever you chose to write there.
...update it as follows: function handlesubmit(e) { e.preventdefault(); props.addtask("say hello!"); } clicking on the "add" button in your b
rowser will prove that the addtask() callback function works, but it'd be nice if we could get the alert to show us what we're typing in our input field!
...And 14 more matches
Using XPCOM Components
applications like the mozilla b
rowser are sophisticated, modularized clients of xpcom components.
... in fact, virtually all of the functionality that you associate with a b
rowser - navigation, window management, managing cookies, bookmarks, security, searching, rendering, and other features - is defined in xpcom components and accessed by means of those component interfaces.
...for now, what's important to see is how components like the ones in this section are obtained and used by the mozilla b
rowser.
...And 14 more matches
Console messages - Firefox Developer Tools
open url in new tab opens the url in a new b
rowser tab.
...a reflow is the name given to the operation in which the b
rowser calculates the layout of all or part of the page.
... reflows occur when a change has happened to a page that the b
rowser thinks affects the layout.
...And 14 more matches
Using IndexedDB - Web APIs
indexeddb is a way for you to persistently store data inside a user's b
rowser.
... creating and structuring the store using an experimental version of indexeddb in case you want to test your code in b
rowsers that still use a prefix, you can use the following code: // in the following line, you should include the prefixes of implementations you want to test.
...// moreover, you may need references to some window.idb* objects: window.idbtransaction = window.idbtransaction || window.webkitidbtransaction || window.msidbtransaction || {read_write: "readwrite"}; // this line should only be needed if it is needed to support the object's constants for older b
rowsers window.idbkeyrange = window.idbkeyrange || window.webkitidbkeyrange || window.msidbkeyrange; // (mozilla has never prefixed these objects, so we don't need window.mozidb*) beware that implementations that use a prefix may be buggy, or incomplete, or following an old version of the specification.
...And 14 more matches
Navigator - Web APIs
standard navigatorid.appcodename read only returns the internal "code" name of the current b
rowser.
... navigatorid.appname read only returns a domstring with the official name of the b
rowser.
... navigatorid.appversion read only returns the version of the b
rowser as a domstring.
...And 14 more matches
Line-based placement with CSS Grid - CSS: Cascading Style Sheets
the lines are numbered for columns and
rows, and are indexed from 1.
...if you use the firefox grid highlighter you can see how the grid has defined columns and
rows.
... * {box-sizing: border-box;} .wrapper { border: 2px solid #f76707; border-radius: 5px; background-color: #fff4e6; } .wrapper > div { border: 2px solid #ffa94d; border-radius: 5px; background-color: #ffd8a8; padding: 1em; color: #d9480f; } .wrapper { display: grid; grid-template-columns: repeat(3, 1fr); grid-template-
rows: repeat(3, 100px); } <div class="wrapper"> <div class="box1">one</div> <div class="box2">two</div> <div class="box3">three</div> <div class="box4">four</div> </div> positioning items by line number we can use line-based placement to control where these items sit on the grid.
...And 14 more matches
ui/frame - Archive of obsolete content
it occupies the whole width of the b
rowser window and is 18 pixels high on a normal-resolution display or 36 pixels high on a high-resolution (hidpi) display.
...however, they will appear in the b
rowser console.
...a frame creates a separate iframe instance for each b
rowser window.
...And 13 more matches
Listening to events in Firefox extensions - Archive of obsolete content
types of events there are multiple types of events that application and extension authors can use to receive notifications from <xul:b
rowser> and <xul:tabb
rowser> elements to hear about changes relating to loads of the content contained within them.
...} b.addeventlistener("event", callback, false) where b is the b
rowser or tabb
rowser you wish to watch for events from.
... keep in mind that the events may come from any frame within the b
rowser or, for a tabb
rowser, any of the b
rowsers within it.
...And 13 more matches
Manifest Files - Archive of obsolete content
if you just want to try testing privileged xul code in the firefox b
rowser, you can do this easily by just using a manifest with only one line in it: create a new directory somewhere.
...if you aren't sure what the file path is, open that directory in a b
rowser and copy the url from the address field.
...of course, you will need to restart the b
rowser for the changes to take effect.
...And 13 more matches
More Tree Features - Archive of obsolete content
hierarchical trees the tree element is also used to create hierarchical lists, like that found in a file manager or a b
rowser's bookmarks list.
...the tree will query the view for the level of each item in order to determine how to draw the
rows.
...the tree will also handle drawing the
rows with the right level of indenting.
...And 13 more matches
The Business Benefits of Web Standards - Archive of obsolete content
introduction and context doing more with less seems to be the mission impossible for web designers: addressing more customers, a broader audience, more diversity in terms of b
rowsers, more accessibility, users asking for more speed, while spending less to maintain or redesign a web site.
...in the same way that standards hugely reduce the concern we need to have for b
rowser differences, they also reduce the differences between the way search engines rank pages.
...while some b
rowsers have quirks that cause different behavior by platform, mozilla-based b
rowsers are designed to behave identically on all supported platforms (mac, linux, unix, windows...) web content is increasingly being accessed by a growing number of user agents other than b
rowsers, or by b
rowsers on different platforms - for example mobile telephones.
...And 13 more matches
Introduction to CSS layout - Learn web development
normal flow normal flow is how the b
rowser lays out html pages by default when you do nothing to control page layout.
... let's look at a quick html example: <p>i love my cat.</p> <ul> <li>buy cat food</li> <li>exercise</li> <li>cheer up friend</li> </ul> <p>the end!</p> by default, the b
rowser will display this code as follows: note here how the html is displayed in the exact order in which it appears in the source code, with elements stacked up on top of one another — the first paragraph, followed by the unordered list, followed by the second paragraph.
...static positioning is the default in normal flow, but you can cause elements to be laid out differently using other values, for example always fixed to the top of the b
rowser viewport.
...And 13 more matches
Drawing graphics - Learn web development
previous overview: client-side web apis next the b
rowser contains some very powerful graphics programming tools, from the scalable vector graphics (svg) language, to apis for drawing on html <canvas> elements, (see the canvas api and webgl).
... the situation started to improve when b
rowsers began to support the <canvas> element and associated canvas api — apple invented it in around 2004, and other b
rowsers followed by implementing it in the years that followed.
...this became webgl, which gained traction among b
rowser vendors, and was standardized around 2009–2010.
...And 13 more matches
WebRequest.jsm
the webrequest api is modeled on chrome's webrequest extension api, which makes it easier to write cross-b
rowser add-on code.
... in particular, "blocking" may be passed to several event types, and will make the event dispatch synchronous, so the b
rowser will wait for the event listener to return before continuing with the request.
...if you don't pass filter, then the listener is invoked for every web request the b
rowser makes that triggers that particular event.
...And 13 more matches
IAccessibleTable2
method overview [propget] hresult caption([out] iunknown accessible ); [propget] hresult cellat([in] long row, [in] long column, [out] iunknown cell ); [propget] hresult columndescription([in] long column, [out] bstr description ); [propget] hresult iscolumnselected([in] long column, [out] boolean isselected ); [propget] hresult is
rowselected([in] long row, [out] boolean isselected ); [propget] hresult modelchange([out] ia2tablemodelchange modelchange ); [propget] hresult ncolumns([out] long columncount ); [propget] hresult n
rows([out] long rowcount ); [propget] hresult nselectedcells([out] long cellcount ); [propget] hresult nselectedcolumns([out] long columncount ); [propget] hresult nselected
rows([out] long rowco...
...unt ); [propget] hresult rowdescription([in] long row, [out] bstr description ); hresult selectcolumn([in] long column ); [propget] hresult selectedcells([out, size_is(, nselectedcells,)] iunknown cells, [out] long nselectedcells ); [propget] hresult selectedcolumns([out, size_is(, ncolumns)] long selectedcolumns, [out] long ncolumns ); [propget] hresult selected
rows([out, size_is(, n
rows)] long selected
rows, [out] long n
rows ); hresult selectrow([in] long row ); [propget] hresult summary([out] iunknown accessible ); hresult unselectcolumn([in] long column ); hresult unselectrow([in] long row ); methods caption() returns the caption for the table.
...is
rowselected() returns a boolean value indicating whether the specified row is completely selected.
...And 13 more matches
imgIContainer
although it may still work in some b
rowsers, its use is discouraged since it could be removed at any time.
...although it may still work in some b
rowsers, its use is discouraged since it could be removed at any time.
...although it may still work in some b
rowsers, its use is discouraged since it could be removed at any time.
...And 13 more matches
Key Values - Web APIs
learn how to use these key values in javascript using keyboardevent.key special values | modifier keys | whitespace keys | navigation keys | editing keys | ui keys | device keys | ime and composition keys | function keys | phone keys | multimedia keys | audio control keys | tv control keys | media controller keys | speech recognition keys | document keys | application selector keys | b
rowser control keys | numeric keypad keys special values values of key which have special meanings other than identifying a specific key or character.
...toggles the numeric keypad between number entry some other mode (often directional ar
rows).
... vk_space (0x20) kvk_space (0x31) gdk_key_space (0x20) gdk_key_kp_space (0xff80) qt::key_space (0x20) keycode_space (62) [1] older b
rowsers may return "spacebar" instead of " " for the space bar key.
...And 13 more matches
Capabilities, constraints, and settings - Web APIs
figuring this out has often been difficult, and has usually involved looking at some combination of which user agent (or b
rowser) you're running on, which version it is, looking to see if certain objects exist, trying to see whether various things work or not and determining what errors occur, and so forth.
... the twin concepts of constraints and capabilities let the b
rowser and web site or app exchange information about what constrainable properties the b
rowser's implementation supports and what values it supports for each one.
... overview the process works like this (using mediastreamtrack as an example): if needed, call mediadevices.getsupportedconstraints() to get the list of supported constraints, which tells you what constrainable properties the b
rowser knows about.
...And 13 more matches
<tr>: The Table Row element - HTML: Hypertext Markup Language
similarly, you can use the
rowspan attribute on cells to indicate they should span more than one table row.
... deprecated attributes the following attributes may still be implemented in b
rowsers but are no longer part of the html specification and may be missing or may not work as expected.
...there are no groups, no cells that span multiple
rows or columns, no captions, and only the most basic styling to create lines around the components of the table for something resembling clarity.
...And 13 more matches
How to turn off form autocompletion - Web security
by default, b
rowsers remember information that the user submits through <input> fields on websites.
... this enables the b
rowser to offer autocompletion (that is, suggest possible completions for fields that the user has started typing in) or autofill (that is, pre-populate certain fields upon load).
... these features are usually enabled by default, but they can be a privacy concern for users, so b
rowsers can let users disable them.
...And 13 more matches
Index of archived content - Archive of obsolete content
ion guide high-level apis addon-page base64 clipboard context-menu hotkeys indexed-db l10n notifications page-mod page-worker panel passwords private-b
rowsing querystring request selection self simple-prefs simple-storage system tabs timers ui url widget windows low-level apis /loader ...
...a running applications svg animation svg general scrollbar sidebar stringview tabbox toolbar tree uri parsing view source for xul applications windows xml-related code snippets xml:base support in old b
rowsers xpath getattributens common pitfalls communication between html and your extension creating custom firefox extensions with the mozilla build system custom about: urls default preferences deploying a plugin as an extension developing add-ons d...
...nloading json and javascript in extensions enhanced extension installation extension etiquette extension library extension packaging extension samples extension theming guidelines extension versioning, update and compatibility extensions support in seamonkey 2 firefox addons developer guide hiding b
rowser chrome hotfix extension how to convert an overlay extension to restartless inline options install manifests installing extensions and themes from web pages interaction between privileged and non-privileged pages jetpack processes legacy add-ons legacy extensions for firefox for android ...
...And 12 more matches
Venkman Introduction - Archive of obsolete content
the javascript debugger, also called venkman, has been a part of the mozilla b
rowser and the community of web and script developers there for some time.
...first, from within the b
rowser you want to host the debugger application, visit the firefox add-ons page and click on the "install" link for the most recent version.
... when the download is complete, restart your b
rowser (some windows users may also need to restart their computer as well).
...And 12 more matches
iframe - Archive of obsolete content
if you want to run content in a remote process, use a xul b
rowser element.
... attributes showcaret, src, type, transparent properties accessibletype, contentdocument, contentwindow, docshell, webnavigation examples <iframe src="table.php" flex="2" id="b
rowsertable" name="table_frame"/> selecting an url from a menu <menulist oncommand="donav(this);"> <menupopup> <menuitem label="mozilla" value="http://mozilla.org" /> <menuitem label="slashdot" value="http://slashdot.org"/> <menuitem label="sourceforge" value="http://sf.net" /> <menuitem label="freshmeat" value="http://freshmeat.net"/> </menupopup> </menulist> <iframe id="myfr...
... the type of b
rowser, which can be used to set access of the document loaded inside the b
rowser.
...And 12 more matches
Common Firefox theme issues and solutions - Archive of obsolete content
the resolution to this issue is to add the following code to your b
rowser.css file somewhere below where the main-window is made transparent to support aero glass.
...in order to work around this issue, you need to either rename any of the following files that are in your chrome://b
rowser/skin/ folder and fix any references to those files, or copy them to the folder chrome://b
rowser/skin/lion/: keyhole-circle.png toolbar.png toolbarbutton-dropmarker.png tabb
rowser/alltabs-box-bkgnd-icon.png tabview/tabview.png places/toolbar.png linux linux select box fields are showing both drop arrow and spinner ar
rows on linux: the styling of drop down select box fields may show b...
...oth a drop arrow and up/down spinner ar
rows.
...And 12 more matches
Gecko FAQ - Gecko Redirect 1
gecko is the open source b
rowser engine designed to support open internet standards such as html 5, css 3, the w3c dom, xml, javascript, and others.
... gecko is used in multiple b
rowsers, including mozilla firefox, seamonkey, and others.
...it paints the b
rowser's content area, which is the blank area inside the b
rowser window's chrome.
...And 12 more matches
Flexbox - Learn web development
previous overview: css layout next flexbox is a one-dimensional layout method for laying out items in
rows or columns.
... for a long time, the only reliable cross b
rowser-compatible tools available for creating css layouts were things like floats and positioning.
...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 b
rowser (like firefox or chrome), and have a look at the code in your code editor.
...And 12 more matches
Getting started with React - Learn web development
of course, your b
rowser can't read jsx without help.
... also bear in mind that react and reactdom produce apps that only work on a fairly modern set of b
rowsers — ie9+ by way of some polyfills.
... it is recommended that you use a modern b
rowser like firefox, safari, or chrome when working through these tutorials.
...And 12 more matches
Message manager overview
in multiprocess firefox there are (at least) two processes: the chrome process, also called the parent process, runs the b
rowser ui (chrome) code and code inserted by extensions one or more content processes, also called child processes.
... 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 b
rowser frame (essentially, a single b
rowser tab) in the content process.
... these scripts are called frame scripts, and as the name suggests, they are scoped to a specific b
rowser frame.
...And 12 more matches
Using the Places history service
nsib
rowserhistory: adds functions used by the basic b
rowser like marking pages as typed in the url bar, and removing pages as from the history interface.
...using the referrer information in each visit, the b
rowsing path can be reconstructed at any time.
...when the user starts b
rowsing (for example, by typing in a link or following a bookmark), a new session id is created.
...And 12 more matches
EventTarget.addEventListener() - Web APIs
available only in code running in xbl or in the chrome of the firefox b
rowser.
...ideally, you should include it for the widest possible b
rowser compatibility.
...if true, the listener receives synthetic events dispatched by web content (the default is false for b
rowser chrome and true for regular web pages).
...And 12 more matches
Index - Developer guides
6 audio and video delivery audio, guide, html, html5, media, video whether we are dealing with pre-recorded audio files or live streams, the mechanism for making them available through the b
rowser's <audio> and <video> elements remains pretty much the same.
... currently, to support all b
rowsers we need to specify two formats, although with the adoption of mp3 and mp4 formats in firefox and opera, this is changing fast.
... 7 adding captions and subtitles to html5 video html5, media, webvtt, captions, subtitles, track in other articles we looked at how to build a cross b
rowser video player using the htmlmediaelement and window.fullscreen apis, and also at how to style the player.
...And 12 more matches
Link types - HTML: Hypertext Markup Language
<link> <a>, <area>, <form> dns-prefetch hints to the b
rowser that a resource is needed, allowing the b
rowser to do a dns lookup and protocol handshaking before a user clicks the link.
...in the b
rowser, it is usually referred to as the favicon.
... if there are multiple <link rel="icon">s, the b
rowser uses their media, type, and sizes attributes to select the most appropriate icon.
...And 12 more matches
Autoplay guide for media and Web Audio APIs - Web media technologies
in order to give users control over this, b
rowsers often provide various forms of autoplay blocking.
... in this guide, we'll cover autoplay functionality in the various media and web audio apis, including a brief overview of how to use autoplay and how to work with b
rowsers to handle autoplay blocking gracefully.
... that means that both of the following are considered autoplay behavior, and are therefore subject to the b
rowser's autoplay blocking policy: <audio src="/music.mp4" autoplay> and audioelement.play(); the following web features and apis may be affected by autoplay blocking: the html <audio> and <video> elements the web audio api from the user's perspective, a web page or app that spontaneously starts making noise without warning can be jarring, inconvenient, or off-putting.
...And 12 more matches
Critical rendering path - Web Performance
the critical rendering path is the sequence of steps the b
rowser goes through to convert the html, css, and javascript into pixels on the screen.
...the b
rowser engine combines the two to create the render tree.
...the b
rowser then begins parsing the html, converting the received bytes to the dom tree.
...And 12 more matches
window/utils - Archive of obsolete content
functions for working with b
rowser windows.
... usage private windows with this module your add-on will see private b
rowser windows even if it has not explicitly opted into private b
rowsing, so you need to take care not to store any user data derived from private b
rowser windows.
...private windows will not be included in this list if your add-on has not opted into private b
rowsing.
...And 11 more matches
Finding window handles - Archive of obsolete content
note: starting in gecko 2.0, only the top level b
rowser window has an hwnd.
...typically the top level b
rowser window hwnd has no children, although if there are windowed plugins (such as flash) visible in the window, they will have hwnds whose parent is the top level b
rowser window hwnd.
... finding the content window handle hwnd hcontent = 0; // first we need to find the main b
rowser window hwnd hff = ::findwindowex(0, 0, "mozillauiwindowclass", 0); if (hff) { // next we step down through a fixed structure hwnd htemp; htemp = ::findwindowex(hff, 0, "mozillawindowclass", 0); htemp = ::findwindowex(htemp, 0, "mozillawindowclass", 0); // assume only 1 window at this level has children // and the 1 with children is the one we want hwnd hchild = ::getwindow(htemp, gw_child); while (htemp && !hchild) { htemp = ::getwindow(htemp, gw_hwndnext); hchild = ::getwindow(hte...
...And 11 more matches
Images, Tables, and Mysterious Gaps - Archive of obsolete content
however, these techniques may be relevant when the developer cannot assume that users have a modern b
rowser, such as for html-based e-mail messages.
...back in the early days, this approach worked, because b
rowsers would usually make a table cell exactly as wide and tall as an image it contained.
... fast forward to 2001, and the rise of standards-based b
rowsers that lay out pages using html and css instead of their own private layout algorithms.
...And 11 more matches
Tree Selection - Archive of obsolete content
otherwise, the user may select multiple
rows, which will not necessarily be contiguous.
... in the image, there are eight
rows displayed, of which two are selected.
...the
rows that are not displayed are not included in the index count.
...And 11 more matches
Archived Mozilla and build documentation - Archive of obsolete content
see the references section for information on creating extension in earlier b
rowsers.
... creating a mozilla extension a mozilla extension is an installable enhancement to the mozilla b
rowser that provides additional functionality (for example linky, which adds an item to the context menu for opening multiple links in a document or selection).
... migrate apps from internet explorer to mozilla when netscape started the mozilla b
rowser, it made the conscious decision to support w3c standards.
...And 11 more matches
Building a Theme - Archive of obsolete content
an example of the content within a typical xpi file for a theme: example.xpi: /install.rdf /chrome.manifest /preview.png /icon.png /chrome/ b
rowser/ 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.
... global to chrome/global mozapps to chrome/mozapps now that you've copied the global and mozapps folders, a handful of other folders from the b
rowser/omni.ja archive are required.
... it is located in the b
rowser folder in the location mentioned above.
...And 11 more matches
Grids - Learn web development
it lets you lay content out in
rows and columns, and has many features that make building complex layouts straightforward.
... a grid will typically have columns,
rows, and then gaps between each row and column — commonly referred to as gutters.
... the following video provides a nice visual explanation of using css grid: defining a grid as a starting point, download and open the starting point file in your text editor and b
rowser (you can also see it live here).
...And 11 more matches
How can we design for all types of users? - Learn web development
for instance, if in your css you declare this: body { font-size:16px; } … you are telling the b
rowser that whatever happens, the font size must be 16 pixels.
... modern b
rowsers get around this rule by pretending that you're asking for "16 pixels when the user sets a zoom factor of 100%".
... relative units are expressed in em, % and rem: percent-based sizes: % this unit tells your b
rowser that an element's font size must be n% of the previous element whose font size was expressed.
...And 11 more matches
From object to iframe — other embedding technologies - Learn web development
these were embedded in a master document called a frameset, which allowed you to specify the area on the screen that each frame filled, rather like sizing the columns and
rows of a table.
...say you wanted to include the mdn glossary on one of your web pages — you could try something like this: <iframe src="https://udn.realityripple.com/docs/glossary" width="100%" height="500" frameborder="0" allowfullscreen sandbox> <p> <a href="https://udn.realityripple.com/docs/glossary"> fallback link for b
rowsers that don't support iframes </a> </p> </iframe> this example includes the basic essentials needed to use an <iframe>: allowfullscreen if set, the <iframe> is able to be placed in fullscreen mode using the full screen api (somewhat beyond scope for this article.) frameborder if set to 1, this tells the b
rowser to draw a border between this frame and other frames, which is the defaul...
... fallback content in the same way as other similar elements like <video>, you can include fallback content between the opening and closing <iframe></iframe> tags that will appear if the b
rowser doesn't support the <iframe>.
...And 11 more matches
Fetching data from the server - Learn web development
the ajax model involves using a web api as a proxy to more intelligently request data rather than just having the b
rowser reload the entire page.
... xmlhttprequest xmlhttprequest (which is frequently abbreviated to xhr) is a fairly old technology now — it was invented by microsoft in the late '90s, and has been standardized across b
rowsers for quite a long time.
...to fix this, add the following two lines at the bottom of your code (just above the closing </script> tag) to load verse 1 by default, and make sure the <select> element always shows the correct value: updatedisplay('verse 1'); versechoose.value = 'verse 1'; serving your example from a server modern b
rowsers will not run xhr requests if you just run the example from a local file.
...And 11 more matches
Introduction to web APIs - Learn web development
they generally fall into two categories: b
rowser apis are built into your web b
rowser and are able to expose data from the b
rowser and surrounding computer environment and do useful complex things with it.
... for example, the web audio api provides javascript constructs for manipulating audio in the b
rowser — taking an audio track, altering its volume, applying effects to it, etc.
... in the background, the b
rowser is actually using some complex lower-level code (e.g.
...And 11 more matches
Index
instead of simply verifying that the requester of a certificate is in control of an administrative email address at the desired web site's domain, it's required that the ca performs a verification of real world identity documents (such as a company registration document with the country's authority), and it's also required that a b
rowser software performs a revocation check with the ca, prior to granting validity to the certificate.
... in order to distinguish an ev certificate, cas will embed a policy oid in the certificate, and the b
rowser is expected to verify that a trust chain permits the end entity (ee) certificate to make use of the policy.
...(tls is a newer version of ssl with enhanced features.) when establishing an ssl connection to a server, (at least) a server certificate (and its trust chain) is exchanged from the server to the client (e.g., the b
rowser), and the client verifies that the certificate can be verified (including matching the name of the expected destination server).
...And 11 more matches
Bytecode Descriptions
per spec, the latter th
rows a referenceerror if x doesn't exist.
...this th
rows a typeerror if target is not an object.
...this th
rows a typeerror if obj is not an object.
...And 11 more matches
nsIAccessibleTable
es(out unsigned long cellsarraysize, [retval, array, size_is(cellsarraysize)] out long cellsarray); note: renamed from getselectedcells in gecko 1.9.2 void getselectedcolumnindices(out unsigned long columnsarraysize, [retval, array, size_is(columnsarraysize)] out long columnsarray); note: renamed from getselectedcolumns in gecko 1.9.2 void getselectedrowindices(out unsigned long
rowsarraysize, [retval, array, size_is(
rowsarraysize)] out long
rowsarray); note: renamed from getselected
rows in gecko 1.9.2 boolean iscellselected(in long rowindex, in long columnindex); boolean iscolumnselected(in long columnindex); boolean isprobablyforlayout(); boolean is
rowselected(in long rowindex); void selectcolumn(in long columnindex); ...
...obsolete since gecko 1.9.2 rowcount long the number of
rows in the table.
...note: renamed from
rows in gecko 1.9.2 rowheader nsiaccessibletable read only.
...And 11 more matches
Working with windows in chrome code
content windows when a xul window contains a widget capable of displaying a page, such as <b
rowser> or <iframe>, the document in that widget is, naturally, separate from the document of the chrome window itself.
... the same holds for chrome windows opened inside a tab of <tabb
rowser>.
... accessing content documents assume you have a document loaded in a <tabb
rowser>, <b
rowser>, or <iframe> element inside your document.
...And 11 more matches
Memory - Plugins
because plug-ins share memory space with the b
rowser, they can take advantage of any customized memory-allocation scheme the b
rowser has.
... b
rowser memory schemes may be more efficient than standard os memory functions, and can give the b
rowser flexibility in the way it manages memory.
... the methods that handle memory belong to the b
rowser group of methods.
...And 11 more matches
Gecko Plugin API Reference - Plugins
the names of all of these methods begin with npp_ to indicate that they are implemented by the plug-in and called by the b
rowser.
... npp_destroy npp_destroystream npp_getvalue np_getvalue npp_handleevent np_initialize npp_new npp_newstream npp_print npp_setvalue npp_setwindow np_shutdown npp_streamasfile npp_urlnotify npp_write npp_writeready b
rowser side plug-in api this chapter describes methods in the plug-in api that are available from the b
rowser.
... the names of all of these methods begin with npn_ to indicate that they are implemented by the b
rowser and called by the plug-in.
...And 11 more matches
Background Tasks API - Web APIs
concepts and usage the main thread of a web b
rowser is centered around its event loop.
...in addition, the event loop handles interactions with the operating system, updates to the b
rowser's own user interface, and so forth.
...window.requestidlecallback() makes it possible to become actively engaged in helping to ensure that the b
rowser's event loop runs smoothly, by allowing the b
rowser to tell your code how much time it can safely use without causing the system to lag.
...And 11 more matches
ARIA: row role - Accessibility
a group of
rows can be nested within a grid, table or treegrid directly, or within a rowgroup in one of those containers.
... if the row is within a treegrid,
rows can include the aria-expanded attribute, using the attribute to indicate the present status.
... associated wai-aria roles, states, and properties context roles role="rowgroup" an optional contextual row parent, it establishes a relationship between descendant
rows.
...And 11 more matches
Auto-placement in CSS Grid Layout - CSS: Cascading Style Sheets
if you have created additional
rows using the grid-template-
rows property then grid will continue placing items in these
rows.
... if the grid does not have enough
rows in the explicit grid to place all of the items new implicit
rows will be created.
... sizing
rows in the implicit grid the default for automatically created
rows in the implicit grid is for them to be auto-sized.
...And 11 more matches
Using HTML sections and outlines - Developer guides
important: there are no implementations of the proposed outline algorithm in web b
rowsers nor assistive technology; it was never part of a final w3c specification.
...semantic sectioning elements are specifically designed to communicate structural meaning to b
rowsers and other technologies interpreting the document on behalf of users, such as screen readers and voice assistants.
...for example, <div class="navigation"> does not suggest any meaning about its content to a b
rowser; only a human reading the html source can divine the meaning of a class like navigation.
...And 11 more matches
<input type="image"> - HTML: Hypertext Markup Language
image can't be shown formaction the url to which to submit the data formenctype the encoding method to use when submitting the form data formmethod the http method to use when submitting the form formnovalidate a boolean which, if present, indicates that the form shouldn't be validated before submission formtarget a string indicating a b
rowsing context from where to load the results of submitting the form height the height, in css pixels, at which to draw the image src the url from which to load the image width the width, in css pixels, at which to draw the image alt the alt attribute provides an alternate string to use as the button's label if the image cannot be shown (due to error, a use...
...the string must be the name of a b
rowsing context (that is, a tab, window, or <iframe>.
... in addition to the actual names of tabs, windows, or inline frames, there are a few special keywords that can be used: _self loads the response into the same b
rowsing context as the one that contains the form.
...And 11 more matches
<input type="url"> - HTML: Hypertext Markup Language
on b
rowsers that don't support inputs of type url, a url input falls back to being a standard text input.
... tip: use the title attribute to specify text that most b
rowsers will display as a tooltip to explain what the requirements are to match the pattern.
... non-standard attributes the following non-standard attributes are also available on some b
rowsers.
...And 11 more matches
Firefox user agent string reference - HTTP
general form the ua string of firefox itself is broken down into four components: mozilla/5.0 (platform; rv:geckoversion) gecko/geckotrail firefox/firefoxversion mozilla/5.0 is the general token that says the b
rowser is mozilla compatible, and is common to almost every b
rowser today.
... platform describes the native platform the b
rowser is running on (e.g.
...in recent b
rowsers, geckoversion is the same as firefoxversion.
...And 11 more matches
An overview of HTTP - HTTP
it is the foundation of any data exchange on the web and it is a client-server protocol, which means requests are initiated by the recipient, usually the web b
rowser.
...the messages sent by the client, usually a web b
rowser, are called requests and the messages sent by the server as an answer are called responses.
...most of the time the user-agent is a web b
rowser, but it can be anything, for example a robot that crawls the web to populate and maintain a search engine index.
...And 11 more matches
Animation performance and frame rate - Web Performance
the performance cost of animating a css property can vary from one property to another, and animating expensive css properties can result in jank as the b
rowser struggles to hit a smooth frame rate.
... while performance is sensitive to the particular system and its load, performance tools can help you understand the work the b
rowser's doing to render your site, and help you prevent and diagnose problems when they occur.
...let's take a look at how we can use b
rowser tools to inspect the frame rate.
...And 11 more matches
Introduction to progressive web apps - Progressive web apps (PWAs)
you can install a native app so that it works offline, and users love tapping their icons to easily access their favorite apps, rather than navigating to it using a b
rowser.
... progressive, so it's still usable on a basic level on older b
rowsers, but fully-functional on the latest ones.
... responsive, so it's usable on any device with a screen and a b
rowser—mobile phones, tablets, laptops, tvs, refrigerators, etc.
...And 11 more matches
widget - Archive of obsolete content
private windows if your add-on has not opted into private b
rowsing, then your widget will not appear in any private b
rowser windows.
... to learn more about private windows, how to opt into private b
rowsing, and how to support private b
rowsing, refer to the documentation for the private-b
rowsing module.
...widgets.widget({ id: "auto-update-widget", label: "widget that updates content on a timer", content: "0", contentscript: 'settimeout(function() {' + ' document.body.innerhtml++;' + '}, 2000)', contentscriptwhen: "ready" }); // a widget created with a specified width, that g
rows.
...And 10 more matches
Intercepting Page Loads - Archive of obsolete content
some of the techniques presented here apply only to content loaded in the main b
rowser area, while others detect content being loaded in other xul windows, or even detect xul content being loaded.
... the easy way: load events this comes from the tabb
rowser code snippets page.
... this._loadhandler = function() {that._onpageload(); }; gb
rowser.addeventlistener("load", this._loadhandler, true); gb
rowser is a global object that corresponds to the tabb
rowser element in the main b
rowser window.
...And 10 more matches
CSS3 - Archive of obsolete content
at risk: due to insufficient b
rowser support, standardization of the padding-box value may be postponed to the next iteration of this module.
... at risk: due to insufficient b
rowser support, standardization of the pseudo-elements ::value, ::choices, ::repeat-item, and ::repeat-index may be postponed to the next iteration of this module .
... at risk: due to insufficient b
rowser support, standardization of the icon property and the icon value may be postponed to css4.
...And 10 more matches
Menu - Archive of obsolete content
jetpack's menu api allows features to access and modify the b
rowser's built-in menus.
...two namespaces are associated with this api: jetpack.menu, which provides access to the b
rowser's menus, and jetpack.menu, the constructor for making new menus.
... many users, especially those new to firefox, don't realize the distinction between add-ons and the b
rowser itself.
...And 10 more matches
Using Remote XUL - Archive of obsolete content
it contains elements for all common ui widgets (menus, buttons, toolbars, etc.) and many sophisticated ones (trees, b
rowsers, color pickers).
... xul is often used by desktop applications like mozilla but can also be loaded from a web server and rendered inside the content pane of a compatible b
rowser.
... note: the downside to using xul is that it only works with b
rowsers that understand it.
...And 10 more matches
listbox - Archive of obsolete content
you may specify the number of
rows to display in the list using the
rows attribute.
... additional
rows can be viewed using a scroll bar.
...all the
rows in the listbox are the same height, which is the height of the tallest item in the list.
...And 10 more matches
Audio for Web games - Game development
web-based audio is maturing fast, but there are still many b
rowser differences to navigate.
...there are a couple of differences between desktop and mobile b
rowsers that may have caused b
rowser vendors to make choices that can make web audio difficult for game developers to work with.
... autoplay b
rowser autoplay policy now affects desktop and mobile b
rowsers.
...And 10 more matches
What is CSS? - Learn web development
these documents will be readable in a web b
rowser.
...what you are seeing is the b
rowser's default styles — very basic styles that the b
rowser applies to html to make sure it will be basically readable even if no explicit styling is specified by the author of the page.
...using css you can control exactly how html elements look in the b
rowser, presenting your markup using whatever design you like.
...And 10 more matches
Fundamental text and font styling - Learn web development
color can accept any css color unit, for example: p { color: red; } this will cause the paragraphs to become red, rather than the standard b
rowser default black, like so: <h1>tommy the cat</h1> <p>well i remember it as though it were a meal ago...</p> <p>said tommy the cat as he reeled back to clear whatever foreign matter may have nestled its way into his mighty throat.
...but it was a rare occasion such as this that he did.</p> font families to set a different font on your text, you use the font-family property — this allows you to specify a font (or list of fonts) for the b
rowser to apply to the selected elements.
... the b
rowser will only apply a font if it is available on the machine the website is being accessed on; if not, it will just use a b
rowser default font.
...And 10 more matches
How to build custom form controls - Learn web development
.select { /* the computations are made assuming 1em == 16px which is the default value in most b
rowsers.
... is the new font size context for em value in this context */ font-family : verdana, arial, sans-serif; box-sizing : border-box; /* we need extra room for the down arrow we will add */ padding : .1em 2.5em .2em .5em; width : 10em; /* 100px */ border : .2em solid #000; border-radius : .4em; box-shadow : 0 .1em .2em rgba(0,0,0,.45); /* the first declaration is for b
rowsers that do not support linear gradients.
...it is neither future-proof nor will not work on legacy b
rowsers.
...And 10 more matches
Styling web forms - Learn web development
this has historically been difficult — form controls vary greatly in how easy they are to customize with css — but it is getting easier as old b
rowsers are retired and modern b
rowsers give us more features to use.
... form controls were added to html in the html 2 specification in 1995; css wasn't released until late 1996, and wasn't supported very well by b
rowsers for a few years after that.
... b
rowsers relied on the underlying operating system to manage and render form controls.
...And 10 more matches
JavaScript basics - Learn web development
these include: b
rowser application programming interfaces (apis) built into web b
rowsers, providing functionality such as dynamically creating html and setting css styles; collecting and manipulating a video stream from a user's webcam, or generating 3d graphics and audio samples.
... the section below introduces some aspects of the core language, and offers an opportunity to play with a few b
rowser api features too.
...then load index.html in your b
rowser.
...And 10 more matches
Debugging HTML - Learn web development
html is not compiled into a different form before the b
rowser parses it and shows the result (it is interpreted, not compiled).
...the way that b
rowsers parse html is a lot more permissive than how programming languages are run, which is both a good and a bad thing.
... html itself doesn't suffer from syntax errors because b
rowsers parse it permissively, meaning that the page still displays even if there are syntax errors.
...And 10 more matches
Manipulating documents - Learn web development
objective: to gain familiarity with the core dom apis, and the other apis commonly associated with dom and document manipulation the important parts of a web b
rowser web b
rowsers are very complicated pieces of software with a lot of moving parts, many of which can't be controlled or manipulated by a web developer using javascript.
... you might think that such limitations are a bad thing, but b
rowsers are locked down for good reasons, mostly centering around security.
...there are a few really obvious bits you'll reference regularly in your code — consider the following diagram, which represents the main parts of a b
rowser directly involved in viewing web pages: the window is the b
rowser tab that a web page is loaded into; this is represented in javascript by the window object.
...And 10 more matches
Useful string methods - Learn web development
let's enter some examples into the b
rowser developer console.
...try entering the following lines: let b
rowsertype = 'mozilla'; b
rowsertype.length; this should return the number 7, because "mozilla" is 7 characters long.
...inside the square brackets you include the number of the character you want to return, so for example to retrieve the first letter you'd do this: b
rowsertype[0]; remember: computers count from 0, not 1!
...And 10 more matches
Introduction to client-side frameworks - Learn web development
when we remember that the application has to let the user to do all of these things through the b
rowser, however, some cracks start to show.
... the verbosity of dom changes building html elements and rendering them in the b
rowser at the appropriate time takes a surprising amount of code.
...when you follow a link on this very website, your b
rowser communicates with a server and fetches new content to display for you.
...And 10 more matches
Accessibility Features in Firefox
keyboard support "mozilla firefox is a web-b
rowser with superior keyboard support." alan cantor, cantor access consulting firefox includes keyboard access to all of its amazing features: b
rowse with caret allows users to select arbitrary content with the keyboard and move through content as if inside a read-only editor.
... tabbed b
rowsing helps keyboard users by putting all of the b
rowsed documents in one firefox application window rather than cluttering the alt+tab order which makes keyboard navigation within the entire windows os much simpler.
... both history and bookmarks can be searched with a "quick search" field that quickly nar
rows the list down via a substring search.
...And 10 more matches
Embedding API for Accessibility
g code: #include "nsipref.h"; nsresult rv; nscomptr<nsipref> prefs(do_getservice(ns_pref_contractid, &rv)); prefs->setboolpref("bool.pref.name", pr_true /* or pr_false */); prefs->setintpref("int.pref.name", newvalue); prefs->setcharpref("string.pref.name", newcharstarvalue); to manually add a pref to your settings, add a line like the following to your prefs.js: user_pref("accessibility.b
rowsewithcaret", true); accessibility prefs reference the following is a description of what accessibility prefs give us (or will give us), for accessibility: functionality implementation works as of images setintpref("network.image.imagebehavior", behavior); /* behavior: ...
...ntpref("font.size.fixed.x-western", newfontsize); setintpref("font.size.variable.x-western", newfontsize); /* for other i18n charsets, change the name as explained above for font face*/ setcharpref("font.default","serif"); /* or "sans-serif" */ setintpref("b
rowser.use_document_fonts", whichfonts); /* whichfonts: 0=no, 1=yes */ moz 0.8 fonts from operating system?
... setboolpref("b
rowser.use_system_fonts", usesystemfonts); no colors for page setcharpref("b
rowser.display.foreground_color", "#abcdef" /* hex color value */); setcharpref("b
rowser.display.background_color", "#abcdef" /* hex color value */); setboolpref("b
rowser.display.use_system_colors", boolsystemcolors); setboolpref("b
rowser.display.use_document_colors", booluseauthorcolors); /* setting use_document_colors also stops background images from loading */ moz 0.8 link appearance setcharpref("b
rowser.anchor_color", "#abcdef" /* hex col...
...And 10 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 b
rowser ui (chrome) code and code inserted by extensions the content processes, also called the child processes, run all web content.
...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 b
rowser frame (essentially, a single b
rowser tab) in the content process.
... these scripts are called frame scripts, and as the name suggests, they are scoped to a specific b
rowser frame.
...And 10 more matches
URLs - Plugins
plug-ins can request and receive the data associated with urls of any type that the b
rowser can handle, including http, ftp, news, mailto, and gopher.
... url scheme description about locates b
rowser information or "fun" pages.
...b
rowser-specific.
...And 10 more matches
Waterfall - Firefox Developer Tools
the waterfall gives you insight into the sorts of things the b
rowser is doing as it runs your site or app.
... it's based on the idea that the things a b
rowser does when running a site can be divided into various types - running javascript, updating layout, and so on - and that at any given point in time, the b
rowser is doing one of those things.
... so if you see a sign of a performance problem - a drop in the frame rate, for example - you can go to the waterfall to see what the b
rowser was doing at that point in the recording.
...And 10 more matches
Request.cache - Web APIs
it controls how the request will interact with the b
rowser's http cache.
...the available values are: default — the b
rowser looks for a matching request in its http cache.
... if there is a match but it is stale, the b
rowser will make a conditional request to the remote server.
...And 10 more matches
ARIA: cell role - Accessibility
a cell can contain a number of property attributes clarifying the cell's position within the tabular data structure, including aria-colindex, aria-colspan, aria-rowindex, and aria-
rowspan.
...it establishes a relationship between descendant
rows.
...table identifies the cell as being part of a non-interactive table structure containing data arranged in
rows and columns, similar to the native html <table> element.
...And 10 more matches
Web applications and ARIA FAQ - Accessibility
a wide variety of commonly-used b
rowsers, assistive technologies, javascript toolkits, and applications now support aria.
...you may 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 b
rowsers and assistive technologies.
... b
rowsers aria is supported in the following b
rowsers: b
rowser 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.
...And 10 more matches
Subgrid - CSS: Cascading Style Sheets
level 2 of the css grid layout specification includes a subgrid value for grid-template-columns and grid-template-
rows.
... important: this feature is shipped in firefox 71, which is currently the only b
rowser to implement subgrid.
... if you set the value subgrid on grid-template-columns, grid-template-
rows or both, instead of creating a new track listing the nested grid uses the tracks defined on the parent.
...And 10 more matches
background-size - CSS: Cascading Style Sheets
note: background sizing for vector images that lack intrinsic dimensions or proportions is not yet fully implemented in all b
rowsers.
... be careful about relying on the behavior described above, and test in multiple b
rowsers to be sure the results are acceptable.
...rendering of <gradient>s in such cases changed in firefox 8, and at present is generally inconsistent across b
rowsers, which do not all implement rendering in full accordance with the css3 background-size specification and with the css3 image values gradient specification.
...And 10 more matches
<input type="email"> - HTML: Hypertext Markup Language
on b
rowsers that don't support inputs of type email, a email input falls back to being a standard text input.
... tip: use the title attribute to specify text that most b
rowsers will display as a tooltip to explain what the requirements are to match the pattern.
... a simple email input currently, all b
rowsers which implement this element implement it as a standard text input field with basic validation features.
...And 10 more matches
<link>: The External Resource Link element - HTML: Hypertext Markup Language
these provide useful hints to allow the b
rowser to choose the most appropriate icon available.
...take this example: <link rel="preload" href="myfont.woff2" as="font" type="font/woff2" crossorigin="anonymous"> a rel value of preload indicates that the b
rowser should preload this resource (see preloading content with rel="preload" for more details), with the as attribute indicating the specific class of content being fetched.
...the b
rowser may use its own heuristics to decide the priority of the resource.
...And 10 more matches
Using HTTP cookies - HTTP
an http cookie (web cookie, b
rowser cookie) is a small piece of data that a server sends to the user's web b
rowser.
... the b
rowser may store it and send it back with later requests to the same server.
... typically, it's used to tell if two requests came from the same b
rowser — keeping a user logged-in, for example.
...And 10 more matches
Link prefetching FAQ - HTTP
link prefetching is a b
rowser mechanism, which utilizes b
rowser idle time to download or prefetch documents that the user might visit in the near future.
... a web page provides a set of prefetching hints to the b
rowser, and after the b
rowser is finished loading the page, it begins silently prefetching specified documents and stores them in its cache.
... when the user visits one of the prefetched documents, it can be served up quickly out of the b
rowser's cache.
...And 10 more matches
Inheritance and the prototype chain - JavaScript
this is equivalent to the javascript property __proto__ which is non-standard but de-facto implemented by many b
rowsers.
...(the console is included in most web b
rowser's developer tools.
...when you access a property of dosomeinstancing, the b
rowser first looks to see if dosomeinstancing has that property.
...And 10 more matches
Types of attacks - Web security
the user's b
rowser cannot detect the malicious script is untrustworthy, and so gives it access to any cookies, session tokens, or other sensitive site-specific information, or lets the malicious script rewrite the html content.
... the malicious content often includes javascript, but sometimes html, flash, or any other code the b
rowser can execute.
...the victim then retrieves this malicious script from the server when the b
rowser sends a request for data.
...And 10 more matches
Prism - Archive of obsolete content
prism is a simple xulrunner-based b
rowser that hosts web applications without the normal web b
rowser user interface.
... prism is based on a concept called site-specific b
rowsers (ssb).
...it doesn’t have the menus, toolbars and other accoutrements of a traditional web b
rowser.
...And 9 more matches
Implementing controls using the Gamepad API - Game development
this article looks at implementing an effective, cross-b
rowser control system for web games using the gamepad api, allowing you to control your web games using console game controllers.
...eventually, extra drivers and plugins allowed us to use console gamepads with desktop games — either native games or those running in the b
rowser.
... now in the era of html5, we finally have the gamepad api, which gives us the ability to play b
rowser-based games using gamepad controllers without any plugins.
...And 9 more matches
CSS FAQ - Learn web development
b
rowsers use the doctype declaration to choose whether to show the document using a mode that is more compatible with web standards or with old b
rowser bugs.
... using a correct and modern doctype declaration at the start of your html will improve b
rowser standards compliance.
... modern b
rowsers have two main rendering modes: quirks mode: also called backwards-compatibility mode, allows legacy webpages to be rendered as their authors intended, following the non-standard rendering rules used by older b
rowsers.
...And 9 more matches
What is the difference between webpage, website, web server, and search engine? - Learn web development
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 b
rowser such as firefox, google chrome, opera, microsoft internet explorer or edge, or apple's safari.
...search engines are normally accessed through a web b
rowser (e.g.
... web page a web page is a simple document displayable by a b
rowser.
...And 9 more matches
The HTML5 input types - Learn web development
note: most of the features discussed in this article have wide support across b
rowsers.
...if you want more detail on b
rowser support, you should consult our html forms element reference, and in particular our extensive <input> types reference.
...any other content causes the b
rowser to display an error when the form is submitted.
...And 9 more matches
Sending form data - Learn web development
a client (usually a web b
rowser) sends a request to a server (most of the time a web server like apache, nginx, iis, tomcat, etc.), using the http protocol.
...on the other hand, if the form is hosted on a secure page but you specify an insecure http url with the action attribute, all b
rowsers display a security warning to the user each time they try to send data because the data will not be encrypted.
...each time you want to reach a resource on the web, the b
rowser sends a request to a url.
...And 9 more matches
Tips for authoring fast-loading HTML pages - Learn web development
depending on a b
rowser's cache settings, it may send a request with the if-modified-since header for each referenced file, asking whether the file has been modified since the last time it was downloaded.
... too much time spent querying the last modified time of the referenced files can delay the initial display of the web page, since the b
rowser must check the modification time for each of these files, before rendering the page.
...use modern ajax methods to manipulate page content for modern b
rowsers, rather than the older approaches based on document.write().
...And 9 more matches
HTML table basics - Learn web development
overview: tables next this article gets you started with html tables, covering the very basics such as
rows and cells, headings, making cells span multiple columns and
rows, and how to group together all the cells in a column for styling purposes.
... a table is a structured set of data made up of
rows and columns (tabular data).
...this was commonly used because css support across b
rowsers used to be terrible; table layouts are much less common nowadays, but you might still see them in some corners of the web.
...And 9 more matches
Choosing the right approach - Learn web development
b
rowser compatibility really good general support, although the exact support for callbacks in apis depends on the particular api.
... single delayed operation repeating operation multiple sequential operations multiple simultaneous operations yes yes (recursive timeouts) yes (nested timeouts) no code example here the b
rowser will wait two seconds before executing the anonymous function, then will display the alert message (see it running live, and see the source code): let mygreeting = settimeout(function() { alert('hello, mr.
... b
rowser compatibility desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetsettimeoutchrome full support 30edge full support 12firefox full support 1 ...
...And 9 more matches
Functions — reusable blocks of code - Learn web development
built-in b
rowser functions we've made use of functions built in to the b
rowser a lot in this course.
... note: feel free to enter these lines into your b
rowser's javascript console to re-familiarize yourself with their functionality, if needed.
...in fact, some of the code you are calling when you invoke (a fancy word for run, or execute) a built in b
rowser function couldn't be written in javascript — many of these functions are calling parts of the background b
rowser code, which is written largely in low-level system languages like c++, not web languages like javascript.
...And 9 more matches
Website security - Learn web development
as you read, note how threats are most successful when the web application either trusts, or is not paranoid enough about the data coming from the b
rowser.
... cross-site scripting (xss) xss is a term used to describe a class of attacks that allow an attacker to inject client-side scripts through the website into the b
rowsers of other users.
... because the injected code comes to the b
rowser from the site, the code is trusted and can do things like send the user's site authorization cookie to the attacker.
...And 9 more matches
Introducing a complete toolchain - Learn web development
jsx or typescript) in our development process, and then transforms our code so that the production version still runs on a wide variety of b
rowsers, modern and older.
... to configure prettier, give .prettierrc.json the following contents: { "singlequote": true, "trailingcomma": "es5" } with these settings, when prettier formats javascript for you it will use single quotes for all your quoted values, and it won't use trailing commas (a newer feature of ecmascript that will cause errors in older b
rowsers).
... next up, we’ll configure eslint — create another file in the root of your will-it-miss directory called .eslintrc.json, and give it the following contents: { "env": { "es6": true, "b
rowser": true }, "extends": "eslint:recommended", "parseroptions": { "ecmaversion": 6, "sourcetype": "module" }, "rules": { "no-console": 0 } } the above eslint configuration says that we want to use the "recommended" eslint settings, that we're going to allow usage of es6 features (such as map() or set()), that we can use module import statements, and that using console.log() is allowed.
...And 9 more matches
Displaying Places information using views
every xul document containing a built-in view must import the stylesheet b
rowser/components/places/content/places.css and overlay the file b
rowser/components/places/content/placesoverlay.xul: <?xml-stylesheet href="chrome://b
rowser/content/places/places.css" ?> <?xul-overlay href="chrome://b
rowser/content/places/placesoverlay.xul" ?> it's this stylesheet that binds elements with the special type attribute to one of the views.
... <tree type="places" place="place:terms=mozilla&onlybookmarked=1&querytype=1"> <treecols> <treecol id="title" label="my bookmarks" flex="1" primary="true" /> </treecols> <treechildren /> </tree> the next example does the same as the last but uses javascript to set the tree's place attribute: var histserv = cc["@mozilla.org/b
rowser/nav-history-service;1"].
...the treechildren element should be empty: <tree type="places"> <treecols> <treecol id="title" flex="1" primary="true" /> <treecol id="url" flex="1" /> </treecols> <treechildren /> </tree> the tree view is implemented in b
rowser/components/places/content/tree.xml.
...And 9 more matches
Cross Process Object Wrappers
note that from firefox 47 onwards, unsafe cpow usage is no longer permitted in b
rowser code.
... if b
rowser code tries an unsafe cpow operation, the b
rowser will throw an exception and you'll see an "unsafe cpow usage forbidden” error in the b
rowser console.
...one of these shims provides the following behavior: whenever chrome code tries to access content directly (for example, through window.content or b
rowser.contentdocument), it is given back a cpow that wraps the content object.
...And 9 more matches
Mozilla
any performance metrics gathered by such builds are largely unrelated to what would be found in a release b
rowser.
... b
rowser chrome tests the b
rowser 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 b
rowser window and report results using the same functions as the mochitest test framework.
...And 9 more matches
Introduction to the File and Directory Entries API - Web APIs
the app can restart uploads after an interruption, such as the b
rowser being closed or crashing, connectivity getting interrupted, or the computer getting shut down.
... big concepts before you start using the file and directory entries api, you need to understand a few concepts: the file and directory entries api is a virtual representation of a file system the file and directory entries api can use different storage types b
rowsers impose storage quota the file and directory entries api has asynchronous and synchronous versions when using the asynchronous api, always use the error callbacks the file and directory entries api interacts with other apis the file and directory entries api is case-sensitive the file and directory entries api is a virtual representation of a file system the api doesn't give you access t...
...it does not necessarily have a relationship to the local file system outside the b
rowser.
...And 9 more matches
In depth: Microtasks and the JavaScript runtime environment - Web APIs
starting with the addition of timeouts and intervals as part of the web api (settimeout() and setinterval()), the javascript environment provided by web b
rowsers has gradually advanced to include powerful features that enable scheduling of tasks, multi-threaded application development, and so forth.
...other than the main thread—which some b
rowsers share across multiple agents—each component of an agent is unique to that agent.
... your web site or app's code runs in the same thread, sharing the same event loop, as the user interface of the web b
rowser itself.
...And 9 more matches
NavigatorID.userAgent - Web APIs
the navigatorid.useragent read-only property returns the user agent string for the current b
rowser.
... the specification asks b
rowsers to provide as little information via this field as possible.
... never assume that the value of this property will stay the same in future versions of the same b
rowser.
...And 9 more matches
ARIA Test Cases - Accessibility
or copy-paste: http://oaa-accessibility.org/examples/ for each example we test the "expected" results with assistive technologies, for each b
rowser that at supports wai-aria in.
... where a failure occurs we will test the b
rowser for api incorrectness, using tools such as msaa inspect.
... this must be done in order to determine where to file a bug (b
rowser or at).
...And 9 more matches
Live streaming web audio and video - Developer guides
the key consideration when streaming media to a b
rowser is the fact that rather than playing a finite file we are relaying a file that is being created on the fly and has no pre-determined start or end.
...this file sits on a server and can be delivered — like most other files — to the b
rowser.
... live streamed media lacks a finite start and end time as rather than a static file, it is a stream of data that the server passes on down the line to the b
rowser and is often adaptive (see below).
...And 9 more matches
<area> - HTML: Hypertext Markup Language
alt a text string alternative to display on b
rowsers that do not display images.
... ping contains a space-separated list of urls to which, when the hyperlink is followed, post requests with the body ping will be sent by the b
rowser (in the background).
... many b
rowsers, notably internet explorer 4 and higher, support circ, polygon, and rectangle as valid values for shape, but these values are non-standard.
...And 9 more matches
<input type="range"> - HTML: Hypertext Markup Language
if the user's b
rowser doesn't support type range, it will fall back and treat it as a text input.
... see the range control with hash marks below for an example of how the options on a range are denoted in supported b
rowsers max the greatest value in the range of permitted values.
... adding hash marks and labels the html specification gives b
rowsers some flexibility on how to present the range control.
...And 9 more matches
Using Feature Policy - HTTP
for each policy-controlled feature, the b
rowser maintains a list of origins for which the feature is enabled, known as an allowlist.
... allowlist an allowlist is a list of origins that takes one or more of the following values, separated by spaces: *: the feature will be allowed in this document, and all nested b
rowsing contexts (iframes) regardless of their origin.
... 'self': the feature will be allowed in this document, and in all nested b
rowsing contexts (iframes) in the same origin.
...And 9 more matches
Strict-Transport-Security - HTTP
the http strict-transport-security response header (often abbreviated as hsts) lets a web site tell b
rowsers that it should only be accessed using https, instead of using http.
... header type response header forbidden header name no syntax strict-transport-security: max-age=<expire-time> strict-transport-security: max-age=<expire-time>; includesubdomains strict-transport-security: max-age=<expire-time>; preload directives max-age=<expire-time> the time, in seconds, that the b
rowser should remember that a site is only to be accessed using https.
... the http strict transport security header informs the b
rowser that it should never load a site using http and should automatically convert all attempts to access the site using http to https requests instead.
...And 9 more matches
Comparing Reflect and Object methods - JavaScript
th
rows a typeerror if the target was not an object.
...th
rows a typeerror if the target was not an object.
...th
rows a typeerror for non-objects in es5, but coerces non-objects in es2015.
...And 9 more matches
How to make PWAs installable - Progressive web apps (PWAs)
these technologies allow the app to be launched directly from the device's home screen, rather than the user having to open the b
rowser and then navigate to the site by using a bookmark or typing the url.
...this makes the web app easier to access; additionally, you can specify that the app be launched in fullscreen or standalone mode, thus removing the default b
rowser user interface that would otherwise 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 b
rowsers such as chrome, edge, and samsung internet require the service worker.
...And 9 more matches
Learn XPI Installer Scripting by Example - Archive of obsolete content
this article uses the installer script from b
rowser.xpi install package as the basis for discussing xpi installations in general.
... about b
rowser.xpi b
rowser.xpi is the xpi archive in which the main components of the mozilla b
rowser are archived for installation.
... first, a quick scan of the contents of the xpi file (which you can open using with any unzip utility) reveals the following high-level directory structure: install.js bin\ chrome\ components defaults\ icons\ plugins\ res\ note that this high-level structure parallels the directory structure of the installed b
rowser very closely: as you will see in the installation script, the contents of the archive are installed onto the file system in much the same way that they are stored in the archive itself, though it's possible to rearrange things arbitrarily upon installation--to create new directories, to install files in system folders and other areas.
...And 8 more matches
Scrolling Menus - Archive of obsolete content
if the available space is too small, ar
rows will appear on each end of the menu.
... if you move the mouse over the ar
rows, the menu will scroll up and down.
... if the available space is large enough, the ar
rows will not appear.
...And 8 more matches
Common causes of memory leaks in extensions - Extensions
for example, in xul overlay code: var contentwindows = []; function inb
rowserxuloverlay(contentwindow) { // forgetting or failing to pop the content window thing again contentwindows.push(contentwindow); } this will keep the content window compartments alive until the b
rowser window is closed.
... users often only open a single b
rowser window per session and use tabs, in which case the leaked compartments will live for the whole life of the session.
...consider the following example code that could be part of your b
rowser.xul overlay: gb
rowser.addeventlistener("domcontentloaded", function(evt) { var contentdoc = evt.originaltarget; var i = 0; // refresh the title once each second setinterval(function() { contentdoc.title = ++i; }, 1000); }, false); one would normally expect that the interval (or timer) would be destroyed as soon as the document unloads, in the same way that event listeners are ...
...And 8 more matches
Efficient animation for web games - Game development
help the b
rowser help you if you are using dom for your ui, which i would certainly recommend, you really ought to use css transitions and/or css animations, rather than javascript-powered animations.
... though javascript animations can be easier to express at times, unless you have a great need to synchronise ui animation state with game animation state, you’re unlikely to be able to do a better job than the b
rowser.
...because of this, the b
rowser can make some assumptions that it can’t easily make when you’re manually tweaking values in javascript.
...And 8 more matches
CSS values and units - Learn web development
you can use any available <color> values assuming they are supported by your b
rowser.
... the page on mdn for each value will give you information about b
rowser support.
... for example, if you look at the page for <color> you will see that the b
rowser compatibility section lists different types of color value and support for them.
...And 8 more matches
Web fonts - Learn web development
this takes one or more font family names, and the b
rowser travels down the list until it finds a font it has available on the system it is running on: p { font-family: helvetica, "trebuchet ms", verdana, sans-serif; } this system works well, but traditionally web developers' font choices were limited.
...web fonts are a css feature that allows you to specify font files to be downloaded along with your website as it is accessed, meaning that any b
rowser that supports web fonts can have exactly the fonts you specify available to it.
... there are two important things to bear in mind about web fonts: b
rowsers support different font formats, so you'll need multiple font formats for decent cross-b
rowser support.
...And 8 more matches
Getting started with HTML - Learn web development
it is a markup language that tells web b
rowsers how to structure the web pages you visit.
...with the kind of overlap in the example above, the b
rowser has to guess at your intent.
...(the spacing is due to default css styling that the b
rowser applies to paragraphs.) note: html5 redefined the element categories: see element content categories.
...And 8 more matches
Adding vector graphics to the Web - Learn web development
well, svg does have some disadvantages: svg can get complicated very quickly, meaning that file sizes can grow; complex svgs can also take significant processing time in the b
rowser.
... svg is not supported in older b
rowsers, so may not be suitable if you need to support older versions of internet explorer with your web site (svg started being supported as of ie9.) raster graphics are arguably better for complex precision images such as photos, for the reasons described above.
... the svg file can be cached by the b
rowser, resulting in faster loading times for any page that uses the image loaded in the future.
...And 8 more matches
Cooperative asynchronous JavaScript: Timeouts and intervals - Learn web development
executes a specified block of code before the b
rowser next repaints the display, allowing an animation to be run at a suitable framerate regardless of the environment it is being run in.
... in the following example, the b
rowser will wait two seconds before executing the anonymous function, then will display the alert message (see it running live, and see the source code): let mygreeting = settimeout(function() { alert('hello, mr.
...you'll probably want a way to stop such tasks, otherwise you may end up getting errors when the b
rowser can't complete any further versions of the task, or if the animation being handled by the task has finished.
...And 8 more matches
CSS performance optimization - Learn web development
for this reason, css is render blocking, unless the b
rowser knows the css is not currently needed.
... the b
rowser can paint the page once it has downloaded the css and built the css object model.
... b
rowsers follow a specific rendering path: paint only occurs after layout, which occurs after the render tree is created, which in turn requires both the dom and the cssom trees.
...And 8 more matches
Framework main features - Learn web development
previous overview: client-side javascript frameworks next each major javascript framework has a different approach to updating the dom, handling b
rowser events, and providing an enjoyable developer experience.
... dsls can't be read by the b
rowser directly; they must be transformed into javascript or html first.
... when used with react, the jsx from the previous snippet would be compiled into this: var subject = "world"; var header = react.createelement("header", null, react.createelement("h1", null, "hello, ", subject, "!") ); when ultimately rendered by the b
rowser, the above snippet will produce html that looks like this: <header> <h1>hello, world!</h1> </header> handlebars the handlebars templating language is not specific to ember applications, but it is heavily utilized in ember apps.
...And 8 more matches
Command line options
-override /path/to/override.ini load the specified override.ini file to override application.ini (b
rowser/app/application.ini).
... b
rowser -b
rowser start with the b
rowser component.
... -private opens firefox in permanent private b
rowsing mode.
...And 8 more matches
Creating reftest-based unit tests
the power of the tool comes from the fact that there is more than one way to achieve any given visual effect in a b
rowser.
...and a b
rowser may change the visual effect produced by a tag while still being compliant with relevant standards.
...if a b
rowser changes the depth of the indenting and the visual construct is tested against an invariant, the test would appear to fail.
...And 8 more matches
Listening to events on all tabs
adding a listener to listen to progress events on all tabs, call the b
rowser's addtabsprogresslistener() method: gb
rowser.addtabsprogresslistener(myprogresslistener); myprogresslistener is an object that implements the callbacks used to provide notifications of progress events.
... removing a listener to remove a previously installed progress listener, call removetabsprogresslistener(): gb
rowser.removetabsprogresslistener(myprogresslistener); implementing a listener the listener object itself has five methods it can implement to handle various events: onlocationchange called when the uri of the document displayed in the tab changes.
... void onlocationchange( nsidomxulelement ab
rowser, nsiwebprogress awebprogress, nsirequest arequest, nsiuri alocation [optional] in unsigned long aflags ); parameters ab
rowser the b
rowser representing the tab whose location changed.
...And 8 more matches
Bootstrapping a new locale
from now on may be needs some corrections, (see expected structure below $cd ab-cd/b
rowser/chrome/b
rowser) may be needs $cp -r mozilla-1.9.x/b
rowser/locales/ ab-cd and then $mv ab-cd/en-us ab-cd/b
rowser and the same for the others the commands seems symbolic and not real ...
... mkdir -p ab-cd/b
rowser/installer ab-cd/b
rowser/profile/chrome ab-cd/b
rowser/searchplugins ab-cd/b
rowser/updater ab-cd/toolkit cp -r mozilla-1.9.x/b
rowser/locales/ ab-cd/b
rowser cp -r mozilla-1.9.x/dom/locales/ ab-cd/dom cp -r mozilla-1.9.x/editor/locales/ ab-cd/editor cp -r mozilla-1.9.x/extensions/reporter/locales/chrome ab-cd/extensions cp -r mozilla-1.9.x/netwerk/locales/ ab-cd/netwerk cp -r mozilla-1.9.x/other-licenses/branding/firefox/locales/ ab-cd/other-licenses cp -r mozilla-1.9.x/security/manager/locales/ ab-cd/security cp -r mozilla-1.9.x/toolkit/locales/ ab-cd/toolkit getting started change your directory to the new working directory so you are in the ~/[your working directory]/[ab-cd]/ path and...
...we'll first navigate to the directory called "b
rowser" by running the following commands one after the other from your command line: $ cd [ab-cd]/b
rowser/chrome/b
rowser to see what is contained in "b
rowser" type $ ls and, you should see the following output from your terminal: aboutcerterror.dtd pageinfo.dtd aboutdialog.dtd pageinfo.properties aboutprivateb
rowsing.dtd pagereportfirsttime.dtd aboutrobots.dtd places aboutsessionrestore.dtd preferences aboutsupport.dtd quitdialog.properties basemenuoverlay.dtd safemode.dtd b
rowser.dtd safeb
rowsing b
rowser.properties sanitize.dtd credits.dtd search.properties enginemanager.dtd ...
...And 8 more matches
Localizing without a specialized tool
$ compare-locales mozilla-1.9.2/b
rowser/locales/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/b
rowser/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.
... you should see something like this: x-testing b
rowser chrome b
rowser aboutcerterror.dtd // add and localize this file aboutdialog.dtd +aboutlink +aboutlink.accesskey +aboutversion +closecmdgnome.accesskey +closecmdgnome.label +copyright +copyright.accesskey +copyrightgnome.accesskey +copyrightinfo1 +copyrightinfo2 +licenselink +licenselinktext aboutprivateb
rowsing.dtd // add and localize this file aboutrobots.dtd // add and localize this file ...
...And 8 more matches
MathML Accessibility in Mozilla
a base b root index root abcdef __________ table with 2
rows and 3 columns row 1 column 1 a column 2 b column 3 c row 2 column 1 d column 2 e column 3 f end table __________ table start, row 1, column 1, a, row 1, column 2, b, row 1, column 3, c, row 2, column 1, d, row 2, column 2, e, row 2, column 3, f, table end math table with 2
rows 3 columns.
... a column 1 row 1 b column 2 c column 3 d column 1 row 2 e column 2 f column 3 math table with 3 columns and 2
rows abcde __________ multi-scripts with base a and 1 prescript and 1 post-script pre-scripts lower d upper e post-scripts lower b upper c end multi-scripts __________ not supported yet.
... __________ f of x is equal to left brace table with 3
rows and 2 columns row 1 column 1 1 divided by 3 column 2 if 0 is less than or equal to x is less than or equal to 1 ; row 2 column 1 2 divided by 3 column 2 if 3 is less than or equal to x is less than or equal to 4 ; row 3 column 1 0 column 2 el...
...And 8 more matches
Mork
at its core, it can be viewed as a set of
rows, collections of name-value pairs, which can be organized into various tables.
...
rows need not be in a table, nor need they be in only one table.
...the file is a collection of top-level structures, of which there exists four: dictionaries, tables,
rows, and groups (changesets).
...And 8 more matches
nsIDOMWindowInternal
void stop() void print() void moveto(in long xpos, in long ypos) void moveby(in long xdif, in long ydif) void resizeto(in long width, in long height) void resizeby(in long widthdif, in long heightdif) void scroll(in long xscroll, in long yscroll) nsidomwindow window interface's open() method loads the specified resource into the b
rowsing 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 b
rowsing context.">open(in domstring url, in domstring name, in domstring options) nsidomwindow nsisupports aextraargument) void close() void updatecommands(in domstring action) boolean find([optional] in domstring str,[optional] in boolean casesensitive, [optional] in boolean backwards, [optional] in boolean wraparound, [optional] in boolean wholeword, [optional] in boolean searchinframes, [optional] in boolean showdialog) domstring atob(in domstring aasciistring) domstring btoa(in domstring abase64data) nsivariant showmodaldialog(in nsivariant aargs, [optional] in domstring aoptions) void postmessage(in domstring messag...
... history nsidomhistory readonly: returns a reference to the history object, which provides an interface for manipulating the b
rowser session history.
...And 8 more matches
nsINavBookmarksService
1.0 67 introduced gecko 1.8 inherits from: nsisupports last changed in gecko 14.0 (firefox 14.0 / thunderbird 14.0 / seamonkey 2.11) implemented by: @mozilla.org/b
rowser/nav-bookmarks-service;1.
... to use this service, use: var navbookmarksservice = components.classes["@mozilla.org/b
rowser/nav-bookmarks-service;1"] .getservice(components.interfaces.nsinavbookmarksservice); method overview void addobserver(in nsinavbookmarkobserver observer, in boolean ownsweak); void beginupdatebatch(); obsolete since gecko 1.9 void changebookmarkuri(in long long aitemid, in nsiuri anewuri); long long createdynamiccontainer(in long long aparentfolder, in autf8string aname, in astring acontractid, in long aindex); note: renamed from createcontainer in gecko 1.9 obsolete since gecko 13.0 long long createfolder(in long long aparentfolder, in autf8string name, in long index); void endupdatebatch(); obsolete since gecko 1.9 ...
...although it may still work in some b
rowsers, its use is discouraged since it could be removed at any time.
...And 8 more matches
Tutorial: Show Allocations Per Call Path - Firefox Developer Tools
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 "b
rowser" from the "environment" menu.
... (this menu will not be present unless you have changed the preference as explained above.) selecting the 'b
rowser' 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.
...this function is available in the b
rowser // console.
...And 8 more matches
Paint Flashing Tool - Firefox Developer Tools
the paint flashing tool, when activated, highlights the part of a page that the b
rowser needs to repaint in response to some input: for example, the user moving the mouse or scrolling.
... with the help of this tool you can figure out whether your website is causing the b
rowser to repaint more than it needs to.
... repaints and responsiveness when the b
rowser renders a web page it parses the html and css, determines how to lay it out, and then paints it to actually display the content on the screen.
...And 8 more matches
Animating CSS properties - Firefox Developer Tools
the performance cost of animating a css property can vary from one property to another, and animating expensive css properties can result in jank as the b
rowser struggles to hit a smooth frame rate.
... the frame rate and waterfall can give you insight into the work the b
rowser's doing in a css animation, to help diagnose performance problems.
...the b
rowser creates the animation as a transition from each keyframe to the next.
...And 8 more matches
Fullscreen API - Web APIs
this makes it possible to present desired content—such as an online game—using the user's entire screen, removing all b
rowser user interface elements and other applications from the screen until full-screen mode is shut off.
... note: support for this api varies somewhat across b
rowsers, with many requiring vendor prefixes and/or not implementing the latest specification.
... see the b
rowser compatibility section below for details on support for this api.
...And 8 more matches
HTML Drag and Drop API - Web APIs
html drag and drop interfaces enable applications to use drag-and-drop features in b
rowsers.
...(see performing a drop.) note: neither dragstart nor dragend events are fired when dragging a file into the b
rowser from the os.
... note: dragevent and datatransfer are broadly supported on desktop b
rowsers.
...And 8 more matches
Pointer events - Web APIs
hit test the process the b
rowser uses to determine a target element for a pointer event.
... pointercancel onpointercancel a b
rowser fires this event if it concludes the pointer will no longer be able to generate events (for example the related device is deactived).
...the b
rowser does this automatically when a pointerup or pointercancel event occurs.
...And 8 more matches
Web Authentication API - Web APIs
- the server is connected by https or is the localhost), and will not be available for use if the b
rowser is not operating in a secure context.
... in order to understand how the create() and get() methods fit into the bigger picture, it is important to understand that they sit between two components that are outside the b
rowser: server - the web authentication api is intended to register new credentials on a server (also referred to as a service or a relying party) and later use those same credentials on that same server to authenticate a user.
...note most javascript programmers that are creating an application will only really care about steps 1 and 5 where the create() function is called and subsequently returns; however, steps 2, 3, and 4 are essential to understanding the processing that takes place in the b
rowser and authenticator and what the resulting data means.
...And 8 more matches
Using the Web Storage API - Web APIs
the web storage api provides mechanisms by which b
rowsers can securely store key/value pairs.
... the two mechanisms within web storage are as follows: sessionstorage maintains a separate storage area for each given origin that's available for the duration of the page session (as long as the b
rowser is open, including page reloads and restores).
... localstorage does the same thing, but persists even when the b
rowser is closed and reopened.
...And 8 more matches
CSS Containment - CSS: Cascading Style Sheets
if the b
rowser knows that a part of the page is independent, rendering can be optimized and performance improved.
... article { contain: content; } each article is independent of the other articles on the page, and so they have been given contain: content in order to indicate to the b
rowser that this is the case.
... the b
rowser can then use this information to make decisions about how to render the content.
...And 8 more matches
Box alignment in CSS Grid Layout - CSS: Cascading Style Sheets
while the specification currently specifies alignment details for all layout methods, b
rowsers have not fully implemented all of the specification; however, the css grid layout method has been widely adopted.
...seline last baseline * {box-sizing: border-box;} .wrapper { border: 2px solid #f76707; border-radius: 5px; background-color: #fff4e6; } .wrapper > div { border: 2px solid #ffa94d; border-radius: 5px; background-color: #ffd8a8; padding: 1em; color: #d9480f; } .wrapper { display: grid; grid-template-columns: repeat(8, 1fr); grid-gap: 10px; grid-auto-
rows: 100px; grid-template-areas: "a a a a b b b b" "a a a a b b b b" "c c c c d d d d" "c c c c d d d d"; align-items: start; } .item1 { grid-area: a; } .item2 { grid-area: b; } .item3 { grid-area: c; } .item4 { grid-area: d; } <div class="wrapper"> <div class="item1">item 1</div> <div class="item2">item 2</div> <div class="item3">item 3</div> <div class="item4">...
... * {box-sizing: border-box;} .wrapper { border: 2px solid #f76707; border-radius: 5px; background-color: #fff4e6; } .wrapper > div { border: 2px solid #ffa94d; border-radius: 5px; background-color: #ffd8a8; padding: 1em; color: #d9480f; } .wrapper { display: grid; grid-template-columns: repeat(8, 1fr); grid-gap: 10px; grid-auto-
rows: 100px; grid-template-areas: "a a a a b b b b" "a a a a b b b b" "c c c c d d d d" "c c c c d d d d"; } .item1 { grid-area: a; } .item2 { grid-area: b; align-self: start; } .item3 { grid-area: c; align-self: end; } .item4 { grid-area: d; align-self: center; } <div class="wrapper"> <div class="item1">item 1</div> <div class="item2">item 2</div> <div class="i...
...And 8 more matches
grid - CSS: Cascading Style Sheets
constituent properties this property is a shorthand for the following css properties: grid-auto-columns grid-auto-flow grid-auto-
rows grid-template-areas grid-template-columns grid-template-
rows syntax /* <'grid-template'> values */ grid: none; grid: "a" 100px "b" 1fr; grid: [linename1] "a" 100px [linename2]; grid: "a" 200px "b" min-content; grid: "a" minmax(100px, max-content) "b" 20%; grid: 100px / 200px; grid: minmax(400px, min-content) / repeat(auto-fill, 50px); /* <'grid-template-
rows'> / [ auto-flow && dense?
...] <'grid-auto-
rows'>?
... / <'grid-template-columns'> values */ grid: auto-flow / 200px; grid: auto-flow dense / 30%; grid: auto-flow 300px / repeat(3, [line1 line2 line3] 200px); grid: auto-flow dense 40% / [line1] minmax(20em, max-content); /* global values */ grid: inherit; grid: initial; grid: unset; values <'grid-template'> defines the grid-template including grid-template-columns, grid-template-
rows and grid-template-areas.
...And 8 more matches
text-rendering - CSS: Cascading Style Sheets
the b
rowser makes trade-offs among speed, legibility, and geometric precision.
...however, gecko and webkit b
rowsers let you apply this property to html and xml content on windows, macos, and linux.
... syntax values auto the b
rowser makes educated guesses about when to optimize for speed, legibility, and geometric precision while drawing text.
...And 8 more matches
touch-action - CSS: Cascading Style Sheets
the touch-action css property sets how an element's region can be manipulated by a touchscreen user (for example, by zooming features built into the b
rowser).
...ction: auto; touch-action: none; touch-action: pan-x; touch-action: pan-left; touch-action: pan-right; touch-action: pan-y; touch-action: pan-up; touch-action: pan-down; touch-action: pinch-zoom; touch-action: manipulation; /* global values */ touch-action: inherit; touch-action: initial; touch-action: unset; by default, panning (scrolling) and pinching gestures are handled exclusively by the b
rowser.
... an application using pointer events will receive a pointercancel event when the b
rowser starts handling a touch gesture.
...And 8 more matches
will-change - CSS: Cascading Style Sheets
the will-change css property hints to b
rowsers how an element is expected to change.
... b
rowsers may set up optimizations before an element is actually changed.
...the b
rowser already tries as hard as it can to optimize everything.
...And 8 more matches
The HTML autocomplete attribute - HTML: Hypertext Markup Language
autocomplete lets web developers specify what if any permission the user agent has to provide automated assistance in filling out form field values, as well as guidance to the b
rowser as to the type of information expected in the field.
... the source of the suggested values is generally up to the b
rowser; typically values come from past values entered by the user, but they may also come from pre-configured values.
... for instance, a b
rowser might let the user save their name, address, phone number, and email addresses for autocomplete purposes.
...And 8 more matches
<a>: The Anchor element - HTML: Hypertext Markup Language
can be used with or without a value: without a value, the b
rowser will suggest a filename/extension, generated from various sources: the content-disposition http header the final segment in the url path the media type (from the (content-type header, the start of a data: url, or blob.type for a blob: url) defining a value suggests it as the filename.
...filesystems may forbid other characters in filenames, so b
rowsers will adjust the suggested name if necessary.
...links are not restricted to http-based urls — they can use any url scheme supported by b
rowsers: 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 b
rowsers may not support other url schemes, web sites can with registerprotocolhandler() hreflang hints at the human language of the linked url.
...And 8 more matches
<button>: The Button element - HTML: Hypertext Markup Language
unlike other b
rowsers, firefox persists the dynamic disabled state of a <button> across page loads.
... firefox, unlike other b
rowsers, persists the dynamic disabled state of a <button> across page loads.
...this is the name of, or keyword for, a b
rowsing context (a tab, window, or <iframe>).
...And 8 more matches
<script>: The Script element - HTML: Hypertext Markup Language
this attribute allows the elimination of parser-blocking javascript where the b
rowser would have to load and evaluate scripts before continuing to parse.
... see b
rowser compatibility for notes on b
rowser support.
... defer this boolean attribute is set to indicate to a b
rowser that the script is meant to be executed after the document has been parsed, but before firing domcontentloaded.
...And 8 more matches
<source>: The Media or Image Source element - HTML: Hypertext Markup Language
it is commonly used to offer the same media content in multiple file formats in order to provide compatibility with a broad range of b
rowsers given their differing support for image file formats and media file formats.
...this information is used by the b
rowser to determine, before laying the page out, which image defined in srcset to use.
... srcset a list of one or more strings separated by commas indicating a set of possible images represented by the source for the b
rowser to use.
...And 8 more matches
Preloading content with rel="preload" - HTML: Hypertext Markup Language
the preload value of the <link> element's rel attribute lets you declare fetch requests in the html's <head>, specifying resources that your page will need very soon, which you want to start loading early in the page lifecycle, before b
rowsers' main rendering machinery kicks in.
...this example is trivial, as the b
rowser probably discovers the <link rel="stylesheet"> and <script> elements in the same chunk of html as the preloads, but the benefits can be seen much more clearly the later resources are discovered and the larger they are.
...using as to specify the type of content to be preloaded allows the b
rowser to: prioritize resource loading more accurately.
...And 8 more matches
Content negotiation - HTTP
server-driven content negotiation in server-driven content negotiation, or proactive content negotiation, the b
rowser (or any other kind of user-agent) sends several http headers along with the url.
... even if server-driven content negotiation is the most common way to agree on a specific representation of a resource, it has several drawbacks: the server doesn't have total knowledge of the b
rowser.
... even with the client hints extension, it has not a complete knowledge of the capabilities of the b
rowser.
...And 8 more matches
Performance fundamentals - Web Performance
in the context of open web apps, this document explains in general what performance is, how the b
rowser platform helps improve it, and what tools and processes you can use to test and improve it.
...this works well because the b
rowser is designed to optimize these effects and use the gpu to handle them smoothly with minimal impact on processor performance.
...the b
rowser can do these tasks on your gpu, letting the cpu handle other things.
...And 8 more matches
Navigation and resource timings - Web Performance
navigation timings are metrics measuring a b
rowser's document navigation events.
...while deprecated, they are supported in all b
rowsers.
... performance timings the performancetiming api, a javascript api for measuring the loading performance of the requested page, is deprecated but supported in all b
rowsers.
...And 8 more matches
Add to Home screen - Progressive web apps (PWAs)
add to home screen (or a2hs for short) is a feature available in modern b
rowsers that allows a user to "install" a web app, ie.
... what b
rowsers support a2hs?
... a2hs is supported in all mobile b
rowsers, except ios webview.
...And 8 more matches
HTML to DOM - Archive of obsolete content
although you can now natively parse html using domparser and xmlhttprequest, this is a new feature that is not yet supported by all b
rowsers in use in the wild.
... var frame = document.getelementbyid("sample-frame"); if (!frame) { // create frame frame = document.createelement("iframe"); // iframe (or b
rowser on older firefox) frame.setattribute("id", "sample-frame"); frame.setattribute("name", "sample-frame"); frame.setattribute("type", "content"); frame.setattribute("collapsed", "true"); document.getelementbyid("main-window").appendchild(frame); // or // document.documentelement.appendchild(frame); // set restrictions as needed frame.webnavigation.allowauth = false; frame.webn...
... // skip blank page or frame if (doc.location.href == "about:blank" || doc.defaultview.frameelement) return; // do something with the dom of doc alert(doc.location.href); // when done remove frame or set location "about:blank" settimeout(function (){ var frame = document.getelementbyid("sample-frame"); // remove frame // frame.destroy(); // if using b
rowser element instead of iframe frame.parentnode.removechild(frame); // or set location "about:blank" // frame.contentdocument.location.href = "about:blank"; },10); }, true); } // load a page frame.contentdocument.location.href = "http://www.mozilla.org/"; // or // frame.webnavigation.loaduri("http://www.mozilla.org/",components.interfaces.nsiwebnavigation,null,null,null...
...And 7 more matches
Plug-n-Hack Phase1 - Archive of obsolete content
plug-n-hack (pnh) phase 1 allows easier integration and defines how security tools can advertise their capabilities to b
rowsers.
... security tool manifest to support pnh-1 security tools provide a manifest over http(s) which defines the capabilities that the b
rowser can make use of.
... the tool configures itself by serving an html document (we’ll call this the configuration document) to the b
rowser.
...And 7 more matches
Plug-n-Hack - Archive of obsolete content
overview plug-n-hack (pnh) is a proposed standard from the mozilla security team for defining how security tools can interact with b
rowsers in a more useful and usable way.
... security researchers commonly use security tools in conjunction with b
rowsers, but until now direct integration has required writing platform and b
rowser specific extensions.
... configuring a b
rowser to work with a security tool can be a non-trivial process, and this can discourage people with less experience from using such tools.
...And 7 more matches
Tree Box Objects - Archive of obsolete content
it is used to indicate that one or more
rows have been added to the tree or removed from the tree.
... other redrawing functions are invalidatecell() to redraw only a single cell invalidatecolumn() to redraw a column invalidaterange() to redraw a range of
rows invalidate() to redraw the entire tree.
... example 1 : source view <script> function doscroll(){ var value = document.getelementbyid("tbox").value; var tree = document.getelementbyid("thetree"); var boxobject = tree.boxobject; boxobject.queryinterface(components.interfaces.nsitreeboxobject); boxobject.scrolltorow(value); } </script> <tree id="thetree"
rows="4"> <treecols> <treecol id="row" label="row" primary="true" flex="1"/> </treecols> <treechildren> <treeitem label="row 0"/> <treeitem label="row 1"/> <treeitem label="row 2"/> <treeitem label="row 3"/> <treeitem label="row 4"/> <treeitem label="row 5"/> <treeitem label="row 6"/> <treeitem label="row 7"/> <treeitem label="row 8"/> <treeitem label=...
...And 7 more matches
Accessibility/XUL Accessibility Reference - Archive of obsolete content
label--> </label> </button> <button id='butwrap2'> <label control="butwrap2" value="<!--this-->" /> <label control="butwrap2" value="is" /> <label control="butwrap2" value="a" /> <label control="butwrap2" value="button" /> </button> <button image="images/img.xbm" tooltiptext="<!--button text-->"/> note that in the third example, only the first label is read b
rowser jaws 7.10 issues to use a b
rowser element with html, the type="content" attribute should be specified.
... however, this attribute causes any xul loaded in the b
rowser to have issues with jaws 7.10.
...therefore, with jaws 7.10, to use xul inside of a b
rowser, the type attribute cannot not be used.
...And 7 more matches
Debugging a XULRunner Application - Archive of obsolete content
/* debugging prefs */ pref("b
rowser.dom.window.dump.enabled", true); pref("javascript.options.showinconsole", true); pref("javascript.options.strict", true); pref("nglayout.debug.disable_xul_cache", true); pref("nglayout.debug.disable_xul_fastload", true); don't forget to change these preferences back to their defaults when you've finished debugging; leaving them as-is can significantly harm performance and usability.
...this will only work if the pref pref("b
rowser.dom.window.dump.enabled", true) is enabled.
... to output dump calls instead to a file, set b
rowser.dom.window.dump.file to the file destination where the log should be created and restart the application.
...And 7 more matches
The First Install Problem - Archive of obsolete content
problem definition the first install problem is the name given to the conditions arising when a plugin or embeddable software installs itself on a system first, before any other gecko-based b
rowser.
... if this happens, gecko-based b
rowsers often won't be able to discover the plugin, and will prompt the user to download the plugin again if the affiliated mime type is encountered on the web.
... unless gecko does a pre-emptive scan upon startup for desirable plugins that are not in the b
rowser's plugins directory first, the best way to solve this problem is to encourage plugin vendors to leave dlls (and xpt files, if applicable) in a location that gecko can discover at runtime.
...And 7 more matches
Using the W3C DOM - Archive of obsolete content
some b
rowsers have non-standard properties, such as internet explorer's document.all[], that are not part of the w3c document object model (dom) standards and may cause javascript errors in standards-compliant b
rowsers.
...w3c dom standards are well supported by modern b
rowsers, however the standards are moving target so support for newer features should be tested before use.
... using w3c standards means that code will run in compliant b
rowsers with minimal need for cross-b
rowser support, whereas code based on proprietary standards requires much more effort to be compatible with multiple user agents.
...And 7 more matches
Back to the Server: Server-Side JavaScript On The Rise - Archive of obsolete content
spidermonkey on the other hand is the javascript engine (written in c) in the highly popular mozilla firefox b
rowser.
...in addition, the jaxer “ajax server” (a project i work on at aptana) is an example of ssjs that uses not only spidermonkey, but also embeds the entire firefox b
rowser engine in the application server such that you can do server-side dom manipulation and other ajaxy things server-side that rhino was not built to do.
... as stated earlier, aptana jaxer is built using the mozilla b
rowser engine engine that powers mozilla firefox, which includes spidermonkey as its javascript interpreter, but lots more features beyond ssjs alone such as dom, db, file io, css, server sessions, e4x, etc...] this is a great advantage to the developer as it presents a consistent server-side and client-side development environment for both b
rowser and server contexts that is centered on open source a...
...And 7 more matches
What is a web server? - Learn web development
an http server is software that understands urls (web addresses) and http (the protocol your b
rowser uses to view webpages).
... at the most basic level, whenever a b
rowser needs a file that is hosted on a web server, the b
rowser requests the file via http.
... when the request reaches the correct (hardware) web server, the (software) http server accepts the request, finds the requested document, and sends it back to the b
rowser, also through http.
...And 7 more matches
How the Web works - Learn web development
previous overview: getting started with the web how the web works provides a simplified view of what happens when you view a webpage in a web b
rowser on your computer or phone.
...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 b
rowser like firefox or chrome).
...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 b
rowser.
...And 7 more matches
A first splash into JavaScript - Learn web development
open it in both your text editor and your web b
rowser.
...save your code and refresh the page in your b
rowser.
... if you haven't already done so, save your code, refresh the page in your b
rowser, and open the developer tools javascript console.
...And 7 more matches
Introduction to the server side - Learn web development
web b
rowsers communicate with web servers using the hypertext transfer protocol (http).
... when you click a link on a web page, submit a form, or run a search, an http request is sent from your b
rowser to the target server.
... web servers wait for client request messages, process them when they arrive, and reply to the web b
rowser with an http response message.
...And 7 more matches
Adding phishing protection data providers
to find an id number to use, you can build a loop that requests the value of b
rowser.safeb
rowsing.provider.0.name, then b
rowser.safeb
rowsing.provider.1.name, and so forth until no value is returned.
... required preferences b
rowser.safeb
rowsing.provider.idnum.name a human-readable name for the data provider.
... b
rowser.safeb
rowsing.provider.idnum.keyurl an url that returns a private key to be used for encrypting of other requests.
...And 7 more matches
Creating a Language Pack
pre-build steps in the .mozconfig, you want to have mk_add_options moz_objdir=@topsrcdir@/obj-firefox-build ac_add_options --disable-compile-environment ac_add_options --with-l10n-base=../l10n-central # path relative to moz_objdir ac_add_options --enable-application=[b
rowser or mail] the given path should have your localization directory as child (i.e., a subdirectory ab-cd where ab-cd is your locale code).
... you still need to specify which application you're localizing (e.g., for firefox, that's b
rowser, thunderbird would be mail).
... every time you want to create a langpack, you need to be in the directory obj-firefox-build/b
rowser/locales.
...And 7 more matches
Debugging JavaScript
b
rowser console the b
rowser console lets you see all javascript errors and logging in the b
rowser, including from firefox code.
...activate it through with the menu tools > web developer > b
rowser console.
... you can also start the b
rowser 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 b
rowser console using the standard console api after importing console.jsm: let console = (cu.import("resource://gre/modules/console.jsm", {})).console; console.log("hello from firefox code"); error console this is obsolete and is no longer enabled in firefox by default.
...And 7 more matches
Limitations of chrome scripts
for example: whenever extensions try to access web content from the chrome process, the b
rowser will return a cross process object wrapper that gives the chrome code synchronous access to the content.
... however, these shims are not a substitute for migrating extensions: they are only a temporary measure, and will be removed eventually they can have a bad effect on responsiveness there are likely to be edge cases in which they don't work properly you can see all the places where your add-on uses compatibility shims by setting the dom.ipc.shims.enabledwarnings preference and watching the b
rowser console as you use the add-on.
...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 gb
rowser.contentwindow, window.content...
...And 7 more matches
CustomizableUI.jsm
customizableui assumes that each area it is told about is present in every b
rowser window.
... onwindowopened(awindow) fired when a new customizable (ie b
rowser) window is opened.
... onwindowclosed(awindow) fired when a customizable (ie b
rowser) window is closed.
...And 7 more matches
PopupNotifications.jsm
method overview void locationchange(); notification getnotification(id, b
rowser); void remove(notification); notification show(b
rowser, id, message, anchorid, mainaction, secondaryactions, options); properties attribute type description ispanelopen boolean returns true if the notification panel is currently visible, false if it is not.
... methods locationchange() the consumer can call this method to let the popup notification module know that the current b
rowser's location has changed.
... getnotification() retrieve a notification object associated with the b
rowser/id pair.
...And 7 more matches
Embedded Dialog API
posing gecko dialogs in embedding applications problem statement an application embedding gecko cannot tightly control its own windows and still allow gecko to be a fully functional web b
rowser.
...these new windows can be entire new b
rowser windows opened in response to web page script, or dialogs or alerts which may arise from script or merely during normal operation of the b
rowser.
...its simplest requirements are that the app must allow gecko to create new b
rowser windows and new simple, empty windows.
...And 7 more matches
nsIHttpServer
* * @param port * the port upon which listening should happen, or -1 if no specific port is * desired * @th
rows ns_error_already_initialized * if this server is already started * @th
rows ns_error_not_available * if the server is not started and cannot be started on the desired port * (perhaps because the port is already in use or because the process does * not have privileges to do so) * @note * behavior is undefined if this method is called after stop() has been * calle...
... * * @param callback * an asynchronous callback used to notify the user when this server is * stopped and all pending requests have been fully served * @th
rows ns_error_null_pointer * if callback is null * @th
rows ns_error_unexpected * if this server is not running */ void stop(in nsihttpserverstoppedcallback callback); /** * associates the local file represented by the string file with all requests * which match request.
... * * @param path * the path on the server (beginning with a "/") which is to be handled by * handler; this path must not include a query string or hash component; it * also should usually be canonicalized, since most b
rowsers will do so * before sending otherwise-matching requests * @param handler * an object which will handle any requests for the given path, or null to * remove any existing handler; if while the server is running the handler * th
rows an exception while responding to a request, an http 500 response * will be returned * @th
rows ns_error_invalid_arg * if path does ...
...And 7 more matches
Firefox Developer Tools
this section contains detailed guides to all of the tools as well as information on how to debug firefox for android, how to extend devtools, and how to debug the b
rowser as a whole.
... note: if you are just getting started with web development and using developer tools, our learning docs will help you — see getting started with the web and what are b
rowser developer tools?
...but you can attach the tools to a variety of other targets, too, both within the current b
rowser and in different b
rowsers or even different devices.
...And 7 more matches
LocalFileSystem - Web APIs
persistent storage is storage that stays in the b
rowser 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 b
rowser at any time.
... //taking care of the b
rowser-specific prefix window.requestfilesystem = window.requestfilesystem || window.webkitrequestfilesystem; // the first parameter defines the type of storage: persistent or temporary // next, set the size of space needed (in bytes) // initfs is the success callback // and the last one is the error callback // for denial of access and other errors.
...And 7 more matches
Using the Notifications API - Web APIs
the system notification system will vary of course by platform and b
rowser, but this is ok, and the notifications api is written to be general enough for compatibility with most system notification systems.
... because of abuses of push notifications in the past, web b
rowsers and developers have begun to implement strategies to help mitigate this problem.
...this is not only best practice — you should not be spamming users with notifications they didn't agree to — but going forward b
rowsers will explicitly disallow notification permission requests not triggered in response to a user gesture.
...And 7 more matches
Performance API - Web APIs
however, if the b
rowser is unable to provide a time value accurate to 5 microseconds (because, for example, due to hardware or software constraints), the b
rowser can represent the value as a time in milliseconds accurate to a millisecond.
...if the scope is a window, the value is the time the b
rowser context was created and if the scope is a worker, the value is the time the worker was created.
... the navigation property returns a performancenavigation object representing the type of navigation that occurs in the given b
rowsing context, such as the page was navigated to from history, the page was navigated to by following a link, etc.
...And 7 more matches
ARIA: grid role - Accessibility
the grid role is for a widget that contains one or more
rows of cells.
...bindex="-1">1b</button> </td> <!-- more columns --> </tr> <tr> <th scope="row">aisle 2</th> <td tabindex="-1"> <button id="2a" tabindex="-1">2a</button> </td> <td tabindex="-1"> <button id="2b" tabindex="-1">2b</button> </td> <!-- more columns --> </tr> </tbody> </table> description a grid widget contains one or more
rows with one or more cells of thematically related interactive content.
...
rows can be grouped using rowgroups.
...And 7 more matches
ARIA: rowgroup role - Accessibility
an element with role="rowgroup" is a group of
rows within a tabular structure.
... a rowgroup contains one or more
rows of cells, grid cells, column headers, or row headers within a grid, table or treegrid.
...that rowgroup should be nested within a grid, table or treegrid, encompassing a group of one or more
rows.
...And 7 more matches
ARIA: table role - Accessibility
the table value of the aria role attribute identifies the element containing the role as having a non-interactive table structure containing data arranged in
rows and columns, similar to the native <table> html element.
...der</span> <span role="cell">h6</span> </div> <div role="row" aria-rowindex="18"> <span role="cell">rowgroup</span> <span role="cell">thead</span> </div> <div role="row" aria-rowindex="24"> <span role="cell">term</span> <span role="cell">dt</span> </div> </div> </div> description an element with role="table" is a static tabular structure with
rows containing cells.
...
rows can be children of the table or within a rowgroup.
...And 7 more matches
Variable fonts guide - CSS: Cascading Style Sheets
bold and italic and bold italic), rather than relying upon the b
rowser to synthesize them.
...in order to most accurately reflect the typeface design and avoid differences between b
rowsers and how they may or may not synthesize the different styles, it's more accurate to load the specific font files where needed when using a non-variable font.
...if a number value supplied is outside the range encoded in the font, the b
rowser should render the font at the closest value allowed.
...And 7 more matches
Relationship of grid layout to other layout methods - CSS: Cascading Style Sheets
grid was designed for two-dimensional layout -
rows, and columns at the same time.
...as you can see they stay in a strict grid, lining up in
rows and columns.
...us: 5px; background-color: #fff4e6; } .wrapper > div { border: 2px solid #ffa94d; border-radius: 5px; background-color: #ffd8a8; padding: 1em; color: #d9480f; } <div class="wrapper"> <div class="box1">one</div> <div class="box2">two</div> <div class="box3">three</div> </div> .wrapper { display: grid; grid-template-columns: repeat(3,1fr); align-items: end; grid-auto-
rows: 200px; } .box1 { align-self: stretch; } .box2 { align-self: start; } the fr unit and flex-basis we have already seen how the fr unit works to assign a proportion of available space in the grid container to our grid tracks.
...And 7 more matches
Consistent list indentation - CSS: Cascading Style Sheets
this often leads to frustration, because what works in one b
rowser often doesn't have the same effect in another.
... for example, if you declare that lists have no left margin, they move over in internet explorer, but sit stubbornly in place in gecko-based b
rowsers.this article will help you understand the problems that can occur and how to avoid them.
... this is why, in every b
rowser except internet explorer for windows, markers are placed outside any border set for an <li> element, assuming the value of list-style-position is outside.
...And 7 more matches
Using media queries - CSS: Cascading Style Sheets
screen) or specific characteristics and parameters (such as screen resolution or b
rowser viewport width).
... only the only operator is used to apply a style only if an entire query matches, and is useful for preventing older b
rowsers from applying selected styles.
... when not using only, older b
rowsers would interpret the query screen and (max-width: 500px) simply as screen, ignoring the remainder of the query, and applying its styles on all screens.
...And 7 more matches
Adding captions and subtitles to HTML5 video - Developer guides
in other articles we looked at how to build a cross b
rowser video player using the htmlmediaelement and window.fullscreen apis, and also at how to style the player.
... the default attribute is set on the english <track> element, indicating to the b
rowser that this is the default subtitle file definition to use when subtitles have been turned on and the user has not made a specific selection.
...similar to the video controls, if a b
rowser supports html5 video subtitles, there will be a button provided within the native control set to access them.
...And 7 more matches
Event developer guide - Developer guides
the overview page provides an introduction to the design pattern and a summary of the types of incidents which are defined and reacted to by modern web b
rowsers.
... the remaining pages describe how to use events of different kinds defined by web b
rowsers.
... unfortunately, these events have been defined piece by piece as web b
rowsers have evolved so that there is no satisfying systematic characterization of the events built-in or defined by modern web b
rowsers.
...And 7 more matches
Mobile Web Development - Developer guides
we've organized it into two sections, designing for mobile devices and cross-b
rowser compatibility.
...it includes techniques such as: fluid css layouts, to make the page adapt smoothly as the b
rowser window size changes the use of media queries to conditionally include css rules appropriate for the device screen width and height the viewport meta tag instructs the b
rowser to display your site at the appropriate scale for the user's device.
... cross-b
rowser development write cross-b
rowser code to create web sites that will work acceptably across different mobile b
rowsers: try to avoid using b
rowser-specific features, such as vendor-prefixed css properties.
...And 7 more matches
<input type="search"> - HTML: Hypertext Markup Language
tip: use the title attribute to specify text that most b
rowsers will display as a tooltip to explain what the requirements are to match the pattern.
...the b
rowser decides, using this hint, what label to put on the enter key.
...if not provided, or an invalid value is given, the b
rowser's default maximum number of entries is used.
...And 7 more matches
Standard metadata names - HTML: Hypertext Markup Language
note: b
rowsers may use this to identify the application.
...several b
rowsers, like firefox and opera, use this as the default description of bookmarked pages.
... the b
rowser will use this information in tandem with the user's b
rowser or device settings to determine what colors to use for everything from background and foregrounds to form controls and scrollbars.
...And 7 more matches
<tbody>: The Table Body element - HTML: Hypertext Markup Language
the html table body element (<tbody>) encapsulates a set of table
rows (<tr> elements), indicating that they comprise the body of the table (<table>).
... note: the equivalent text-align property for the align="char" is not implemented in any b
rowsers yet.
... see the text-align's b
rowser compatibility section for the <string> value.
...And 7 more matches
HTTP caching - HTTP
this page will mostly talk about b
rowser and proxy caches, but there are also gateway caches, cdn, reverse proxy caches and load balancers that are deployed on web servers for better reliability, performance and scaling of web sites and web applications.
... private b
rowser caches a private cache is dedicated to a single user.
... you might have seen "caching" in your b
rowser's settings already.
...And 7 more matches
Privacy, permissions, and information security
cooperation among web content, the web b
rowser, and the web server is needed to achieve as much privacy and information security as possible.
... personal and private information <what kind of information is private or personal?> privacy risks <what are ways personal information can be gotten by third parties?> fingerprinting fingerprinting is a technique used to gather a variety of information that's made available by a user's b
rowser and collating it until it becomes possible to uniquely identify that user's b
rowser.
... modern b
rowsers take steps to help prevent fingerprinting-based attacks by either not allowing information to be accessed or, where the information must be made available, by introducing variations that prevent it from being used for identification purposes.
...And 7 more matches
Same-origin policy - Web security
these exceptions are nonstandard and unsupported in any other b
rowser.
... the port number is checked separately by the b
rowser.
...restrictions vary by b
rowser: internet explorer, firefox, chrome, safari (scroll down to cve-2010-0051) and opera.
...And 7 more matches
tabs - Archive of obsolete content
tton } = require("sdk/ui/button/toggle"); var style = style({ uri: './style.css' }); var button = togglebutton({ id: "stylist", label: "stylist", icon: "./icon-16.png", onchange: function(state) { if (state.checked) { attach(style, tabs.activetab); } else { detach(style, tabs.activetab); } } }); private windows if your add-on has not opted into private b
rowsing, then you won't see any tabs that are hosted by private b
rowser windows.
... tabs hosted by private b
rowser windows won't be seen if you enumerate the tabs module itself, and you won't receive any events for them.
... to learn more about private windows, how to opt into private b
rowsing, and how to support private b
rowsing, refer to the documentation for the private-b
rowsing module.
...And 6 more matches
Downloading Files - Archive of obsolete content
downloading files to download a file, create an instance of nsiwebb
rowserpersist and call its nsiwebb
rowserpersist.saveuri() method, passing it a url to download and an nsifile instance representing the local file name/path.
... components.utils.import("resource://gre/modules/privateb
rowsingutils.jsm"); const webb
rowserpersist = components.constructor("@mozilla.org/embedding/b
rowser/nswebb
rowserpersist;1", "nsiwebb
rowserpersist"); var persist = webb
rowserpersist(); var targetfile = services.dirsvc.get("desk", ci.nsifile); targetfile.append("file.bin"); // obtain the privacy context of the b
rowser window that the url // we are downloading comes from.
...var privacy = privateb
rowsingutils.privacycontextfromwindow(urlsourcewindow); persist.persistflags = persist.persist_flags_from_cache | persist.persist_flags_replace_existing_files; persist.saveuri(uritosave, null, null, null, "", targetfile, privacy); if you don't need detailed progress information, you might be happier with nsidownloader.
...And 6 more matches
Miscellaneous - Archive of obsolete content
this event is mozilla-only; other b
rowsers may support window.onmousewheel.
...tps://developer.mozilla.org/samples/domref/dispatchevent.html also, new in firefox 3 / gecko 1.9: var utils = window.queryinterface(components.interfaces.nsiinterfacerequestor) .getinterface(components.interfaces.nsidomwindowutils); utils.sendmouseevent("mousedown", 10, 10, 0, 1, 0); utils.sendmouseevent("mouseup", 10, 10, 0, 1, 0); getting the currently selected text from b
rowser.xul overlay context: var selectedtext = document.commanddispatcher.focusedwindow.getselection().tostring(); or: content.getselection(); // |window| object is implied; i.e., window.content.getselection() or: getb
rowserselection(); // |window| object is implied; i.e., window.getb
rowserselection() this final option massages the selection to remove leading and trailing whitespace.
...it is defined at //github.com/realityripple/pale-moon/blob/master/palemoon/base/content/b
rowser.js#l5113.
...And 6 more matches
Progress Listeners - Archive of obsolete content
progress listeners progress listeners allow extensions to be notified of events associated with documents loading in the b
rowser and with tab switching events.
... in the examples below the progress listener is attached to the tabb
rowser, which means you don't get any notifications for inactive tabs.
... }, // for definitions of the remaining functions see related documentation onprogresschange: function(awebprogress, arequest, curself, maxself, curtot, maxtot) {}, onstatuschange: function(awebprogress, arequest, astatus, amessage) {}, onsecuritychange: function(awebprogress, arequest, astate) {} } attach the progress listener to a <b
rowser> or a <tabb
rowser> element using addprogresslistener, for example for firefox put the following code in a load listener of a main window: gb
rowser.addprogresslistener(mylistener); when used with a b
rowser, the second argument is a mask which determines the type of events that will be received.
...And 6 more matches
Source code directories overview - Archive of obsolete content
seamonkey seamonkey is the development name for the mozilla b
rowser suite.
... b
rowser contains the code for firefox.
...the [#seamonkey-embedding embedding] code wraps this code with higher level b
rowser functions like forward, back and history.
...And 6 more matches
Table Cellmap - Archive of obsolete content
<table> <tr><td>cell 1</td><td>cell 2</td></tr> <tr><td>cell 3</td><td>cell 4</td></tr> </table> this would create a cellmap with two
rows and in each row 2 entries.
... take the same table and adder a header <table> <thead> <tr><td>head cell 1</td><td>head cell 2</td></tr> </thead> <tbody> <tr><td>cell 1</td><td>cell 2</td></tr> <tr><td>cell 3</td><td>cell 4</td></tr> </tbody> </table> now we have two different rowgroups and and the
rowspans can not cross the borders between the different rowgroups.
...a typical code segment to come from the table level down to the rowgroup level nscellmap* map = mfirstmap; while (map) { if (map->getrowcount() > rowindex) { // add your action here } rowindex -= map->getrowcount(); map = map->getnextsibling(); } data entry the usual way to populate the cellmap is via nstableframe::insert
rows.
...And 6 more matches
Install script template - Archive of obsolete content
installs to the current b
rowser that is invoking the installation 2.
...writes registry keys exposing the above secondary install location for other b
rowsers to find.
...se will be used when the win32 registry keys are written var hkey_local_machine = "hkey_local_machine"; var hkey_current_user = "hkey_current_user"; var reg_moz_path = "software\\mozillaplugins"; // my own error code in case secondary installation fails var nosecondaryinstall = 1; // error return codes need some memory var err; // error return codes when we try and install to the current b
rowser var errblock1; // error return codes when we try and do a secondary installation var errblock2 = 0; // global variable containing our secondary install location var secondaryfolder; //special error values used by the cycore developers (www.cycore.com) who helped make this install script var exceptionoccurederror = -4711; var winregisnullerror = -4712; var invalidrootkeyer...
...And 6 more matches
Result Generation - Archive of obsolete content
that means that rdf is a graph of nodes and ar
rows between them where each node and arrow has some label.
... since it's a graph, ar
rows can point all over the place and nodes can have any number of ar
rows pointing out of them and pointing at them.
...to navigate around, you could start at node a and navigate around the graph following the ar
rows to b, c or d.
...And 6 more matches
Creating a Window - Archive of obsolete content
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 b
rowser window.
...the xul window will appear in the b
rowser 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 b
rowser as mentioned above only if |dom.allow_xul_xbl_for_file| preference in "about:config" has been set to |true| .
...And 6 more matches
List Controls - Archive of obsolete content
for example, this list box will have four
rows, one for each item.
...the list box will default to a suitable size, but you can control the size with the
rows attribute.
... set it to the number of
rows to display in the list box.
...And 6 more matches
XUL Questions and Answers - Archive of obsolete content
the following is the code they wrote: <?xml version="1.0"?> <?xml-stylesheet href="chrome://global/skin/" type="text/css"?> <window id="test-window" title="check list test" xmlns:html="http://www.w3.org/1999/xhtml" xmlns="http://www.mozilla.org/keymaster/gat...re.is.only.xul"> <listbox
rows="4"> <listhead> <listheader label="multi-column"/> </listhead> <listcols> <listcol flex="1"/> </listcols> <listitem> <listcell type="checkbox" value="1" label="vghkvghk"/> </listitem> <listitem> <listcell type="checkbox" value="2" label="vghjkvk" checked="true"/> </listitem> <listitem> <listcell type="checkbox" value="3" label="hukfzgjcfj" disabled="tru...
...e"/> </listitem> </listbox> <listbox
rows="4"> <listhead> <listheader label="single-column"/> </listhead> <listitem type="checkbox" value="1" label="vghkvghk"/> <listitem type="checkbox" value="2" label="vghjkvk" checked="true"/> <listitem type="checkbox" value="3" label="hukfzgjcfj" disabled="true"/> </listbox> </window> list box handlers can only check for listitems not listcells.
...an example of this is: var tree = document.getelementbyid('treeid'); selectedtreeitem = tree.view.getitematindex(tree.currentindex); selectedtreeitem.firstchild.setattribute('style', 'background: #ff0000'); what is an example of tab b
rowser in xul?
...And 6 more matches
XULRunner Hall of Fame - Archive of obsolete content
conkeror a highly programmable web b
rowser with a leopard-oriented design inspired by emacs.
... surebo b
rowselorer a new, simple yet highly functional and customizable web b
rowser, based on xulrunner 22.
...build instructions kirix strata a new specialty b
rowser for accessing and manipulating data from the web telekast an open source teleprompter and script editor.
...And 6 more matches
NPN_GetURL - Archive of obsolete content
« gecko plugin api reference « plug-in side plug-in api summary asks the b
rowser to create a stream for the specified url.
...safest target, even though, when used with a mailto or news url, this creates an extra blank the b
rowser instance.
... if the target is null, the b
rowser creates a new stream and delivers the data to the current instance regardless of the mime type of the url.
...And 6 more matches
NPN_SetValue - Archive of obsolete content
« gecko plugin api reference « b
rowser side plug-in api summary implemented by b
rowsers.
... this call is used to inform the b
rowser of variable information controlled by the plugin.
...indowed, false=windowless nppvplugintransparentbool: sets transparent mode for display of a plugin; true=transparent, false=opaque nppvjavaclass nppvpluginwindowsize nppvplugintimerinterval nppvpluginscriptableinstance nppvpluginscriptableiid nppvjavascriptpushcallerbool: specifies whether you are pushing or popping the jscontext off the stack nppvpluginkeeplibraryinmemory: tells b
rowser that the plugin dll should live longer than usual nppvpluginneedsxembed nppvpluginscriptablenpobject nppvformvalue nppvplugindrawingmodel value the value of the specified variable to be set.
...And 6 more matches
NPN_Version - Archive of obsolete content
« gecko plugin api reference « b
rowser side plug-in api summary lets plugins obtain version information, both of the plug-in api and of the b
rowser itself.
... netscape_major pointer to the b
rowser's major version; changes with major code release number.
... netscape_minor pointer to the b
rowser's version; changes with point release number.
...And 6 more matches
Plugins - Archive of obsolete content
plugins are shared libraries that users can install to display content that the b
rowser can't display natively.
... for example, the adobe reader plugin lets the user open pdf files directly inside the b
rowser, and the quicktime and realplayer plugins are used to play special format videos in a web page.
... plugins are written using npapi, the cross-b
rowser api for plugins.
...And 6 more matches
Create Your Own Firefox Background Theme - Archive of obsolete content
creating a theme header image the header image is displayed as the background of the top of the b
rowser window, nestling in behind the toolbars, address bar, search bar and the tab strip.
... it will be anchored to the top-right corner of the b
rowser window.
... image requirements dimensions should be 3000px wide × 200px high png or jpg file format image must be no larger than 300 kb in file size tips subtle, soft contrast images and gradients work best; highly detailed images will compete with the b
rowser ui.
...And 6 more matches
HTML: A good basis for accessibility - Learn web development
table layouts are a relic of the past — they made sense back when css support was not widespread in b
rowsers, but now they just create confusion for screen reader users.
... one key aspect of the accessibility of ui controls is that by default, b
rowsers allow them to be manipulated by the keyboard.
...the focused elements are given a highlighted default style in every b
rowser (it differs slightly between different b
rowsers) so that you can tell what element is focused.
...And 6 more matches
HTML: A good basis for accessibility - Learn web development
table layouts are a relic of the past — they made sense back when css support was not widespread in b
rowsers, but now they just create confusion for screen reader users.
... one key aspect of the accessibility of ui controls is that by default, b
rowsers allow them to be manipulated by the keyboard.
...the focused elements are given a highlighted default style in every b
rowser (it differs slightly between different b
rowsers) so that you can tell what element is focused.
...And 6 more matches
Styling tables - Learn web development
some
rows removed for brevity <tr> <th scope="row">the stranglers</th> <td>1974</td> <td>17</td> <td>no more heroes</td> </tr> </tbody> <tfoot> <tr> <th scope="row" colspan="2">total albums</th> <td colspan="2">77</td> </tr> </tfoot> </table> the table is nicely marked up, easily styleable, and accessible, thanks to features such as scope, <captio...
...unfortunately, it doesn't look good when rendered on the screen (see it live at punk-bands-unstyled.html): with only the default b
rowser styling it looks cramped, hard to read, and boring.
...yes, we could have put both the background image and the linear gradient on the <thead> and <tfoot> elements using multiple background images, but we decided to do it separately for the benefit of older b
rowsers that don't support multiple background images or linear gradients.
...And 6 more matches
Installing basic software - Learn web development
office document editors are not suitable for this use, as they rely on hidden elements that interfere with the rendering engines used by web b
rowsers.
... web b
rowsers, to test code in.
... currently, the most-used b
rowsers are firefox, chrome, opera, safari, internet explorer and microsoft edge.
...And 6 more matches
Images in HTML - Learn web development
you could embed the image using its absolute url, for example: <img src="https://www.example.com/images/dinosaur.jpg"> but this is pointless, as it just makes the b
rowser do more work, looking up the ip address from the dns server all over again, etc.
...if for example our image name was spelled dinosooooor.jpg, the b
rowser wouldn't display the image, and would display the alt text instead: so, why would you ever see or need alt text?
... the b
rowser doesn't support the image type.
...And 6 more matches
Multimedia: Images - Learn web development
many javascript libraries can implement this for you, such as lazysizes, and b
rowser vendors are working on a native lazyload attribute that is currently in the experimental phase.
... other formats improve on jpeg's capabilities in regards to compression, but are not available on every b
rowser: webp — created by google and nowadays supported by all major b
rowsers except safari.
...doesn't support progressive display and the image decoding is not hardware accellerated and therefore resource intensive on the b
rowser's main thread.
...And 6 more matches
Theme concepts
themes developed using the webextensions api in firefox enable you to change the look of the b
rowser by adding images to the header area of the firefox b
rowser; this is the area behind the menu bar, toolbars, address bar, search bar, and tab strip.
... these theme options can be implemented as static themes (although the theme images themselves may be animated) or as dynamic themes created in a b
rowser extension.
... static themes static themes are specified using the same resources as a b
rowser extension: a manifest.json file to define the theme components with those components stored in the same folder as the manifest.json file or a sub folder.
...And 6 more matches
Performance best practices for Firefox front-end engineers
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 b
rowser has a free moment to spare, and the user isn't doing anything.
...knowing the path they will take through the various layers of the b
rowser engine will help you optimize your code to avoid pitfalls.
... when css is applied to a document (html or xul, it doesn’t matter), the b
rowser does calculations to figure out which css styles will apply to each element.
...And 6 more matches
Gecko Profiler FAQ
it is quite reasonable to actually run the b
rowser for 40 minutes and once the said leaks have happened capture the profiles and study what went wrong.
... [ehsan] i have been profiling my real b
rowser usage for months now, and so can you.
... a better idea would be picking up a real b
rowser workload where through previous profiling we know that malloc overhead contributes a measurable percentage of overhead to the overall time and then study the change to that workload after replacing the allocator.
...And 6 more matches
Profiling with the Firefox Profiler
it can be used in a variety of situations where external profilers are not available, and can provide more information and insight into what the b
rowser is doing.
...timeline the timeline has several
rows of tracing markers (colored segments) which indicate interesting events.
...below the tracing markers are
rows corresponding with activity on a variety of threads.
...And 6 more matches
Hacking Tips
hacking tips benchmarking (shell) arewefastyet.com display the benchmark results of the javascript shell, and b
rowser for b2g.
... using the gecko profiler (b
rowser / xpcshell) see the section dedicated to profiling with the gecko profiler.
... using the jit inspector (b
rowser) install the jit inspector addon in your b
rowser.
...And 6 more matches
Accessibility Inspector - Firefox Developer Tools
here we are mainly talking about exposing information to people with visual disabilities — this is done via the accessibility apis available inside web b
rowsers, which expose information on what roles the different elements on your page play (e.g., are they just text, or are they buttons, links, form elements, etc.?).
... roles and other information exposed by b
rowser accessibility apis are presented in a hierarchical structure called the accessibility tree.
... accessing the accessibility inspector when you first open any of the other developer tools, the accessibility features are turned off (unless you've already got them turned on in another b
rowser tab, or got the firefox accessibility engine started already, e.g., you might be a screenreader user or tester).
...And 6 more matches
Introduction to DOM Inspector - Firefox Developer Tools
(note: this is now a dead link.) when you first start the dom inspector, you are presented with a two-pane application window that looks a little like the main mozilla b
rowser.
... like the b
rowser, the dom inspector includes an address bar, and some of the same menus.
...in firefox and seamonkey b
rowser, these will be the webpages you have opened in tabs.
...And 6 more matches
Debugger - Firefox Developer Tools
uncaughtexceptionhook either null or a function that spidermonkey calls when a call to a debug event handler, breakpoint handler, or similar function th
rows some exception, which we refer to asdebugger-exception here.
... if the uncaught exception hook itself th
rows an exception,uncaught-hook-exception, spidermonkey th
rows a new error object,confess-to-debuggee-exception, to the debuggee whose message blames the debugger, and includes textual descriptions ofuncaught-hook-exception and the originaldebugger-exception.
... if uncaughtexceptionhook’s value is null, spidermonkey th
rows an exception to the debuggee whose message blames the debugger, and includes a textual description ofdebugger-exception.
...And 6 more matches
Document.cookie - Web APIs
contrary to earlier specifications, leading dots in domain names are ignored, but b
rowsers may decline to set the cookie containing such dots.
... when user privacy is a concern, it's important that any web app implementation invalidate cookie data after a certain timeout instead of relying on the b
rowser to do it.
... many b
rowsers let users specify that cookies should never expire, which is not necessarily safe.
...And 6 more matches
Working with the History API - Web APIs
example of pushstate() method suppose http://mozilla.org/foo.html executes the following javascript: let stateobj = { foo: "bar", } history.pushstate(stateobj, "page 2", "bar.html") this will cause the url bar to display http://mozilla.org/bar.html, but won't cause the b
rowser to load bar.html or even check that bar.html exists.
...clicking the b
rowser's back button (still) does.
...because firefox saves state objects to the user's disk so they can be restored after the user restarts the b
rowser, we impose a size limit of 640k characters on the serialized representation of a state object.
...And 6 more matches
KeyboardEvent: code values - Web APIs
the reason is that some b
rowsers choose to interpret physical keys differently, there are some differences in which keys map to which codes.
...xe02c "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 "b
rowserhome" "b
rowserhome" 0xe033, 0xe034 "unidentified" "" 0xe035 "numpaddivide" "numpaddivide" 0xe036 "unidentified" "" 0xe037 "printscreen" "printscreen" 0xe038 "altright" "altright" 0xe039, 0xe03a "unidentified" "" 0xe03b "unidentified" "help" 0xe0...
... 0xe052 "insert" "insert" 0xe053 "delete" "delete" 0xe054 ~ 0xe05a "unidentified" "" 0xe05b "metaleft" "osleft" 0xe05c "metaright" "osright" 0xe05d "contextmenu" "contextmenu" 0xe05e "power" "" 0xe05f ~ 0xe064 "unidentified" "" 0xe065 "b
rowsersearch" "b
rowsersearch" 0xe066 "b
rowserfavorites" "b
rowserfavorites" 0xe067 "b
rowserrefresh" "b
rowserrefresh" 0xe068 "b
rowserstop" "b
rowserstop" 0xe069 "b
rowserforward" "b
rowserforward" 0xe06a "b
rowserback" "b
rowserback" 0xe06b "launchapp1" "" 0xe06c "launchmail" "" 0xe06d "lau...
...And 6 more matches
Payment Request API - Web APIs
advantages of using the payment request api with "basic-card" (card-based payments): fast purchase experience: users enter their details once into the b
rowser and are then ready to pay for goods and services on the web.
... consistent experience on every site (that supports the api): as the payment sheet is controlled by the b
rowser, it can tailor the experience to the user.
... accessibility: as the b
rowser controls the input elements of the payment sheet, it can assure consistent keyboard and screen reader accessibility on every website without developers needing to do anything.
...And 6 more matches
PerformanceResourceTiming - Web APIs
performanceresourcetiming.fetchstartread only a domhighrestimestamp immediately before the b
rowser starts to fetch the resource.
... performanceresourcetiming.domainlookupstartread only a domhighrestimestamp immediately before the b
rowser starts the domain name lookup for the resource.
... performanceresourcetiming.domainlookupendread only a domhighrestimestamp representing the time immediately after the b
rowser finishes the domain name lookup for the resource.
...And 6 more matches
Starting up and shutting down a WebXR session - Web APIs
webxr availability as a new and still in development api, webxr support is limited to specific devices and b
rowsers; and even on those, it may not be enabled by default.
... webxr polyfill the team designing the webxr specification has published a webxr polyfill which you can use to simulate webxr on b
rowsers which don't have support for the webxr apis.
... if the b
rowser supports the older webvr api, that is used.
...And 6 more matches
WindowOrWorkerGlobalScope.setTimeout() - Web APIs
if you want to enable this functionality on that b
rowser, you must use a polyfill (see the polyfill section).
... polyfill if you need to pass one or more arguments to your callback function, but need it to work in b
rowsers which don't support sending additional arguments using either settimeout() or setinterval() (e.g., internet explorer 9 and below), you can include this polyfill to enable the html5 standard arguments-passing functionality.
...function() { vcallback.apply(null, aargs); } : vcallback, ndelay); }; }, 0, 'test'); }()) ie-only fix if you want a completely unobtrusive fix for every other mobile or desktop b
rowser, including ie 9 and below, you can either use javascript conditional comments: /*@cc_on // conditional ie < 9 only fix @if (@_jscript_version <= 9) (function(f){ window.settimeout = f(window.settimeout); window.setinterval = f(window.setinterval); })(function(f){return function(c,t){var a=[].slice.call(arguments,2);return f(function(){c instanceof function?c.apply(this,a):eva...
...And 6 more matches
Using XMLHttpRequest - Web APIs
a little vanilla framework all these effects are done automatically by the web b
rowser whenever you submit a <form>.
...e="submit" value="submit" /> </p> </fieldset> </form> <h3>enctype: text/plain</h3> <form action="register.php" method="post" enctype="text/plain" onsubmit="ajaxsubmit(this); return false;"> <fieldset> <legend>registration example</legend> <p> your name: <input type="text" name="user" /> </p> <p> your message:<br /> <textarea name="message" cols="40"
rows="8"></textarea> </p> <p> <input type="submit" value="submit" /> </p> </fieldset> </form> <h3>enctype: multipart/form-data</h3> <form action="register.php" method="post" enctype="multipart/form-data" onsubmit="ajaxsubmit(this); return false;"> <fieldset> <legend>upload example</legend> <p> first name: <input type="text" name="firstname" /><br /> last...
...le name="photos[]"> </p> <p> <input id="vehicle_bike" type="checkbox" name="vehicle[]" value="bike" /> <label for="vehicle_bike">i have a bike</label><br /> <input id="vehicle_car" type="checkbox" name="vehicle[]" value="car" /> <label for="vehicle_car">i have a car</label> </p> <p> describe yourself:<br /> <textarea name="description" cols="50"
rows="8"></textarea> </p> <p> <input type="submit" value="submit" /> </p> </fieldset> </form> </body> </html> to test this, create a page named register.php (which is the action attribute of these sample forms), and put the following minimalistic content: <?php /* register.php */ header("content-type: text/plain"); /* note: you should never use `print_r()` in production scrip...
...And 6 more matches
@supports - CSS: Cascading Style Sheets
the @supports css at-rule lets you specify declarations that depend on a b
rowser's support for one or more specific css features.
...the following example returns true if the b
rowser's transform-origin property considers 5% 5% valid: @supports (transform-origin: 5% 5%) {} function syntax the second basic supports condition is a supports function, the syntax for these is supported by all b
rowsers, but the functions themselves are still being standardized.
... selector() tests if the b
rowser supports the tested selector syntax.
...And 6 more matches
<color> - CSS: Cascading Style Sheets
this is because most devices are not calibrated, and some b
rowsers do not support output devices' color profiles.
... although various colors not in the specification (mostly adapted from the x11 colors list) were supported by early b
rowsers, it wasn't until svg 1.0 and css colors level 3 that they were formally defined.
...however, be aware that older b
rowsers may treat it as black with an alpha value of 0.
...And 6 more matches
Introduction to HTML5 - Developer guides
some html5 features remain unsupported by some b
rowsers.
...for detailed information about multiple b
rowsers' support of html5 features, refer to the caniuse website.
...to indicate that your html content uses html5, simply use: <!doctype html> doing so will cause even b
rowsers that don't presently support html5 to enter into standards mode, which means that they'll interpret the long-established parts of html in an html5-compliant way while ignoring the new features of html5 they don't support.
...And 6 more matches
HTML5 - Developer guides
introduction to html5 this article introduces how to indicate to the b
rowser that you are using html5 in your web design or web application.
...this leads to far greater predictability and interoperability between html5-compliant b
rowsers.
... webrtc this technology, where rtc stands for real-time communication, allows connecting to other people and controlling videoconferencing directly in the b
rowser, without the need for a plugin or an external application.
...And 6 more matches
Applying color to HTML elements using CSS - HTML: Hypertext Markup Language
although historically it's been necessary to implement your own color picker, html now provides support for b
rowsers to provide one for your use through the <input> element, by using "color" as the value of its type attribute.
... b
rowse 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 b
rowser extensions that let you select colors from web content can be particularly handy.
...And 6 more matches
HTML attribute reference - HTML: Hypertext Markup Language
autocapitalize global attribute sets whether input is automatically capitalized when entered by user autocomplete <form>, <input>, <select>, <textarea> indicates whether controls in this form can by default have their values automatically completed by the b
rowser.
... note: although b
rowsers and email clients may still support this attribute, it is obsolete.
... controls <audio>, <video> indicates whether the b
rowser should show playback controls to the user.
...And 6 more matches
<form> - HTML: Hypertext Markup Language
the b
rowser uses them in the order in which they are listed.
... autocomplete indicates whether input elements can by default have their values automatically completed by the b
rowser.
...possible values: off: the b
rowser may not automatically complete entries.
...And 6 more matches
<input type="file"> - HTML: Hypertext Markup Language
non-standard attributes in addition to the attributes listed above, the following non-standard attributes are available on some b
rowsers.
... you should try to avoid using them when possible, since doing so will limit the ability of your code to function in b
rowsers that don't implement them.
... note: though originally implemented only for webkit-based b
rowsers, webkitdirectory is also usable in microsoft edge as well as firefox 50 and later.
...And 6 more matches
<input type="number"> - HTML: Hypertext Markup Language
the b
rowser may opt to provide stepper ar
rows to let the user increase and decrease the value using their mouse or by simply tapping with a fingertip.
... on b
rowsers that don't support inputs of type number, a number input falls back to type text.
...he optional pre-defined autocomplete options max the maximum value to accept for this input min the minimum value to accept for this input placeholder an example value to display inside the field when it's empty readonly a boolean attribute indicating whether the value is read-only step a stepping interval to use when using up and down ar
rows to adjust the value, as well as for validation list the values of the list attribute is the id of a <datalist> element located in the same document.
...And 6 more matches
<input type="password"> - HTML: Hypertext Markup Language
specifics of how the entry process works may vary from b
rowser to b
rowser; mobile devices, for example, often display the typed character for a moment before obscuring it, to allow the user to be sure they pressed the key they meant to press; this is helpful given the small size of keys and the ease with which the wrong one can be pressed, especially on virtual keyboards.
...login forms) should be served over https; many b
rowsers now implement mechanisms to warn against insecure login forms; see insecure passwords.
... tip: use the title attribute to specify text that most b
rowsers will display as a tooltip to explain what the requirements are to match the pattern.
...And 6 more matches
<input type="tel"> - HTML: Hypertext Markup Language
despite the fact that inputs of type tel are functionally identical to standard text inputs, they do serve useful purposes; the most quickly apparent of these is that mobile b
rowsers — especially on mobile phones — may opt to present a custom keypad optimized for entering phone numbers.
... note: b
rowsers that don't support type tel fall back to being a standard text input.
... tip: use the title attribute to specify text that most b
rowsers will display as a tooltip to explain what the requirements are to match the pattern.
...And 6 more matches
Quirks Mode and Standards Mode - HTML: Hypertext Markup Language
when the web standards were made at w3c, b
rowsers could not just start using them, as doing so would break most existing sites on the web.
... b
rowsers therefore introduced two modes to treat new standards compliant sites differently from old legacy sites.
... there are now three modes used by the layout engines in web b
rowsers: quirks mode, almost standards mode, and full standards mode.
...And 6 more matches
Content Security Policy (CSP) - HTTP
b
rowsers that don't support it still work with servers that implement it, and vice-versa: b
rowsers that don't support csp simply ignore it, functioning as usual, defaulting to the standard same-origin policy for web content.
... if the site doesn't offer the csp header, b
rowsers likewise use the standard same-origin policy.
...xss attacks exploit the b
rowser's trust of the content received from the server.
...And 6 more matches
Configuring servers for Ogg media - HTTP
if you don't know whether the ogg file contains audio or video, you can serve it with the mime type application/ogg, and the b
rowser will treat it as a video file.
...it must return 206: partial content to all byte range requests; otherwise, b
rowsers can't be sure you actually support byte range requests.
... include regular key frames when the b
rowser seeks through ogg media to a specified time, it has to seek to the nearest key frame before the seek target, then download and decode the video from there until the requested target time.
...And 6 more matches
Feature-Policy - HTTP
the http feature-policy header provides a mechanism to allow and deny the use of b
rowser features in its own frame, and in content within any <iframe> elements in the document.
... <allowlist> an allowlist is a list of origins that takes one or more of the following values, separated by spaces: *: the feature will be allowed in this document, and all nested b
rowsing contexts (iframes) regardless of their origin.
... 'self': the feature will be allowed in this document, and in all nested b
rowsing contexts (iframes) in the same origin.
...And 6 more matches
User-Agent - HTTP
please read b
rowser detection using the user agent for why serving different web pages or services to different b
rowsers is usually a bad idea.
... header type request header forbidden header name no syntax user-agent: <product> / <product-version> <comment> common format for web b
rowsers: user-agent: mozilla/5.0 (<system-information>) <platform> (<platform-details>) <extensions> directives <product> a product identifier — its name or development codename.
...the ua string of firefox is broken down into 4 components: mozilla/5.0 (platform; rv:geckoversion) gecko/geckotrail firefox/firefoxversion mozilla/5.0 is the general token that says the b
rowser is mozilla-compatible.
...And 6 more matches
HTTP headers - HTTP
clear-site-data clears b
rowsing data (e.g.
... downloads content-disposition indicates if the resource transmitted should be displayed inline (default behavior without the header), or if it should be handled like a download and the b
rowser should present a “save as” dialog.
... feature-policy provides a mechanism to allow and deny the use of b
rowser features in its own frame, and in iframes that it embeds.
...And 6 more matches
Media type and format guide: image, audio, and video content - Web media technologies
originally, these capabilities were limited, and were expanded organically, with different b
rowsers finding their own solutions to the problems around including still and video imagery on the web.
...generally, the media formats supported by a b
rowser are entirely up to the b
rowser's creators, which can complicate the work of a web developer.
...it also provides b
rowser support information for various combinations of these, and suggestions for prioritization of formats, as well as which formats excel at specific types of content.
...And 6 more matches
Installing and uninstalling web apps - Progressive web apps (PWAs)
web application installation is a feature available in modern b
rowsers that allows users to choose to easily and conveniently “install” a web application on their device so they can access it in the same way they would any other installed app.
... depending on the device and features of the operating system and b
rowser, this can result in what is essentially a fully featured application (for example, using webapk on android) or as a shortcut added to their device’s screen.
...the application itself may then manifest as in a chromeless view (without the full b
rowser chrome) but it nevertheless is executing effectively as a tab within the b
rowser.
...And 6 more matches
jpm - Archive of obsolete content
see selecting a b
rowser version.
... jpm run -b /path/to/firefox/nightly see selecting a b
rowser version.
... for example, to pass the -jsconsole argument to firefox and launch the b
rowser console, try the following: jpm run --binary-args -jsconsole to pass multiple arguments, or arguments containing spaces, quote them: jpm run --binary-args '-url mzl.la -jsconsole' --debug run the add-on debugger attached to the add-on.
...And 5 more matches
Chapter 6: Firefox extensions and XUL applications - Archive of obsolete content
when venkman first launches, it can only debug the file currently open in your web b
rowser.
... this is because a lot of javascript files can slow down the b
rowser down if they’re opened for debugging, but you’ll need to lift this restriction in order to develop extensions.
... uncheck the “exclude b
rowser files” menu item under the debug menu (figure 1).
...And 5 more matches
Chapter 4: Using XPCOM—Implementing advanced processes - Archive of obsolete content
listing 4 shows how to get the active b
rowser window and the number of open tabs.
... listing 4: get active b
rowser window netscape.security.privilegemanager .enableprivilege('universalxpconnect'); var windowmediator = components .classes['@mozilla.org/appshell/window-mediator;1'] .getservice(components.interfaces.nsiwindowmediator); var b
rowser = windowmediator.getmostrecentwindow('navigator:b
rowser'); alert(b
rowser.gb
rowser.mtabs.length); get overview of all windows with a certain type use the nsiwindowmediator.getenumerat...
...listing 5 shows how to get a summary of all b
rowser windows in firefox and then close them.
...And 5 more matches
XUL user interfaces - Archive of obsolete content
you create a simple demonstration that runs in your mozilla b
rowser.
...for example, xul provides specialized windows like dialogs and wizards, as well as status bars, menus, tool bars, and even b
rowsers.
....org/keymaster/gatekeeper/there.is.only.xul" title="css getting started - xul demonstration" onload="init();"> <script type="application/javascript" src="script7.js"/> <label class="head-1" value="xul demonstration"/> <vbox> <groupbox class="demo-group"> <caption label="day of week calculator"/> <grid> <columns> <column/> <column/> </columns> <
rows> <row> <label class="text-prompt" value="date:" accesskey="d" control="date-text"/> <textbox id="date-text" type="timed" timeout="750" oncommand="refresh();"/> </row> <row> <label value="day:"/> <hbox id="day-box"> <label class="day" value="sunday" disabled="true"/> <label class="day"...
...And 5 more matches
ContextMenus - Archive of obsolete content
<window id="main-window"> <popupset> <menupopup id="ins-del-menu"> <menuitem label="insert"/> <menuitem label="delete"/> </menupopup> </popupset> </window> <grid context="ins-del-menu"> <columns> <column/> <column flex="1"/> </columns> <
rows id="
rows"> <row align="center"> <label value="name:"/> <textbox/> </row> </
rows> </grid> the same context menu can be attached to multiple elements.
...for instance, the firefox b
rowser applies a single context menu to the b
rowser area which displays web pages.
... for example, the following will attach a context menu with the id 'contentareacontextmenu' to a b
rowser element: <b
rowser context="contentareacontextmenu"> indicating the default item on some platforms, one of the items in a context menu is marked as being a default operation.
...And 5 more matches
Building Hierarchical Trees - Archive of obsolete content
if the items are containers, the tree builder will mark the right
rows as containers, so that they can be opened and closed with the small icon twisties on the left of the column.
...since a photo isn't a container, the tree
rows will not become containers, so you will not be able to open them.
... as the
rows are not containers, the tree builder does not recurse to find additional data.
...And 5 more matches
Cross Package Overlays - Archive of obsolete content
for example, you could add menu items or toolbars to the mozilla b
rowser window.
... we'll use this feature to add a toolbar to the mozilla b
rowser window.
... the mozilla mail application uses overlays to add content to the b
rowser window.
...And 5 more matches
Custom Tree Views - Archive of obsolete content
for instance, 5000
rows of treeitems would load too slowly.
...since the view can store and retrieve the data in the most suitable manner for the kind of data used, the tree can be used even when there are hundreds of thousands of
rows to be displayed.
...the following example shows this: <tree id="my-tree" flex="1"> <treecols> <treecol id="namecol" label="name" flex="1"/> <treecol id="datecol" label="date" flex="1"/> </treecols> <treechildren/> </tree> to assign data to be displayed in the tree, the view object needs to be created which is used to indicate the value of each cell, the total number of
rows plus other optional information.
...And 5 more matches
grid - Archive of obsolete content
« xul reference home [ examples | attributes | properties | methods | related ] a grid is a layout type that arranges elements in
rows and columns.
... the grid is expected to contain both a columns element as a child which defines the structure of the columns and a
rows element as child to define the
rows.
... the size and attributes defined on columns and
rows will affect the size and placement of elements in each cell.
...And 5 more matches
NPP_NewStream - Archive of obsolete content
the b
rowser must copy data in the stream to the local cache to satisfy random access requests made through npn_requestread.
... this will cause the b
rowser to destroy the stream without calling npp_destroystream.
...the b
rowser calls npp_destroystream when the stream completes (either successfully or abnormally).
...And 5 more matches
NPStream - Archive of obsolete content
« gecko plugin api reference « plug-in side plug-in api summary represents a stream of data either produced by the b
rowser and consumed by the plug-in, or produced by the plug-in and consumed by the b
rowser.
... /* plug-in private data */ void* ndata; /* netscape private data */ const char* url; uint32 end; uint32 lastmodified; void* notifydata; const char *headers; } npstream; fields the data structure has the following fields: plug-in-private value that the plug-in can use to store a pointer to private data associated with the instance; not modified by the b
rowser.
... ndata b
rowser-private value that can store data associated with the instance; should not be modified by the plug-in.
...And 5 more matches
Archived JavaScript Reference - Archive of obsolete content
however, this api has been deprecated and removed from b
rowsers.
... you can use the more general proxy object instead.array.unobserve()the array.unobserve() method was used to remove observers set by array.observe(), but has been deprecated and removed from b
rowsers.
...do not use it!handler.enumerate()the handler.enumerate() method used to be a trap for for...in statements, but has been removed from the ecmascript standard in es2016 and is deprecated in b
rowsers.legacy generator functionthe legacy generator function statement declares legacy generator functions with the specified parameters.legacy generator function expressionthe function keyword can be used to define a legacy generator function inside an expression.
...And 5 more matches
LiveConnect Overview - Archive of obsolete content
for example, the following code also assigns the value "h" to the variable c: var c = new java.lang.character(72); handling java exceptions in javascript when java code fails at run time, it th
rows an exception.
...(although this functionality (along with some others) had been broken in gecko 1.9 (see bug 391642) as the mozilla-specific liveconnect code had not been maintained inside mozilla, with java 6 update 11 and 12 building support for reliance on mozilla's implementation of the generic (and cross-b
rowser) npapi plugin code, this has again been fixed.) for example, suppose you are using the java forname method to assign the name of a java class to a variable called theclass.
... the forname method th
rows an exception if the value you pass it does not evaluate to the name of a java class.
...And 5 more matches
Writing JavaScript for XHTML - Archive of obsolete content
the receiving b
rowser considers the content to be html, and does not utilise its xml parser.
...this was common practice in html, to hide the scripts from b
rowsers not capable of js.
...moreover, there's really no point to commenting out your scripts -- no b
rowser written in the last ten years will display your code on the page.
...And 5 more matches
Fixing Table Inheritance in Quirks Mode - Archive of obsolete content
summary: when in quirks mode, gecko-based b
rowsers will appear to ignore inheritance of font styles into tables from parent elements.
...in version 4 b
rowsers such as netscape navigator 4.x and internet explorer 4.x, tables generally "broke" the inheritance of font styling.
...this led to a number of workarounds which were designed to cater to these bugs, and also to gecko-based b
rowsers emulating the behavior in some cases.
...And 5 more matches
Polyfill - MDN Web Docs Glossary: Definitions of Web-related terms
a polyfill is a piece of code (usually javascript on the web) used to provide modern functionality on older b
rowsers that do not natively support it.
... other times, polyfills are used to address issues where b
rowsers implement the same features in different ways.
... the polyfill uses non-standard features in a certain b
rowser to give javascript a standards-compliant way to access the feature.
...And 5 more matches
CSS and JavaScript accessibility best practices - Learn web development
you could style form focus/hover states to make this behaviour more consistent across b
rowsers or fit in better with your page design, but don't get rid of it altogether — again, people rely on these clues to help them know what is going on.
...it is a good idea to make sure the table headers stand out (normally using bold), and use zebra striping to make different
rows easier to parse.
...but again, a large part of it is using built-in b
rowser functionality where possible.
...And 5 more matches
Advanced styling effects - Learn web development
prerequisites: html basics (study introduction to html) and an idea of how css works (study css first steps.) objective: to get an idea about how to use some of the advanced styling effects available in modern b
rowsers.
...like text shadows, box shadows are supported pretty well across b
rowsers, including ie9+ and edge.
...this is not an official standard, but has been implemented across multiple b
rowsers, as it is popular, and used fairly widely by developers.
...And 5 more matches
Images, media, and form elements - Learn web development
if the user enters something unexpected, or leaves a required field blank, the b
rowser can show an error message.
... different b
rowsers are inconsistent in how much styling and customization they allow for such items.
...the default styling of these elements will differ however based on the operating system and b
rowser that your user visits the site with.
...And 5 more matches
Basic native form controls - Learn web development
in this particular article we will look at the original set of form controls, available in all b
rowsers since the early days of the web.
... objective: to understand in detail the original set of native form widgets available in b
rowsers for collecting data, and how to implement them using html.
... note: the features discussed in this article are supported in all b
rowsers, which is not the case for all form controls.
...And 5 more matches
HTML table advanced features and accessibility - Learn web development
previous overview: tables next in the second article in this module, we look at some more advanced features of html tables — such as captions/summaries and grouping your
rows into table head, body and footer sections — as well as looking at the accessibility of tables for visually impaired users.
... save your code and open it in a b
rowser to see what it looks like.
... the <tfoot> element needs to wrap the part of the table that is the footer — this might be a final row with items in the previous
rows summed, for example.
...And 5 more matches
General asynchronous programming concepts - Learn web development
overview: asynchronous next in this article, we'll run through a number of important concepts relating to asynchronous programming, and how this looks in web b
rowsers and javascript.
... objective: to understand the basic concepts behind asynchronous programming, and how they manifest in web b
rowsers and javascript.
...it is up to the programming environment you are using (web b
rowsers, in the case of web development) to provide you with apis that allow you to run such tasks asynchronously.
...And 5 more matches
Video and Audio APIs - Learn web development
prerequisites: javascript basics (see first steps, building blocks, javascript objects), the basics of client-side apis objective: to learn how to use b
rowser apis to control video and audio playback.
...as we showed in video and audio content, a typical implementation looks like this: <video controls> <source src="rabbit320.mp4" type="video/mp4"> <source src="rabbit320.webm" type="video/webm"> <p>your b
rowser doesn't support html5 video.
... here is a <a href="rabbit320.mp4">link to the video</a> instead.</p> </video> this creates a video player inside the b
rowser like so: you can review what all the html features do in the article linked above; for our purposes here, the most interesting attribute is controls, which enables the default set of playback controls.
...And 5 more matches
Handling text — strings in JavaScript - Learn web development
let's start by entering some basic lines into the b
rowser developer console to familiarize ourselves.
...if the b
rowser can't find it, then an error is raised (e.g.
...if the b
rowser can see where a string starts, but can't find the end of the string, as indicated by the 2nd quote, it complains with an error (with "unterminated string literal").
...And 5 more matches
Inheritance in JavaScript - Learn web development
but mostly this has involved built-in b
rowser functions.
...try saving your code, loading the page in a b
rowser, and entering teacher.prototype.constructor into the console to verify.
...we didn't cover those here, as they are not yet supported very widely across b
rowsers.
...And 5 more matches
Accessibility in React - Learn web development
this outline is your visual indicator that the b
rowser is currently focused on this element.
...this shows you that the b
rowser's focus has moved.
... to improve the experience for keyboard and screen-reader users, we should manage the b
rowser’s focus ourselves.
...And 5 more matches
Client-side tooling overview - Learn web development
if you jump on your favourite search engine and look for "front-end developer tools" you're going to hit a huge spectrum of results ranging from text editors, to b
rowsers, to the type of pens you can use to take notes.
...turning an intermediate language into javascript that a b
rowser can understand.
... also well-worth looking at is webhint, a configurable, open-source linter for the web that surfaces best practices including approaches to accessibility, performance, cross-b
rowser compatibility via mdn's b
rowser compatibility data, security, testing for pwas, and more.
...And 5 more matches
HTTP logging
this saves a log of http-related information from your b
rowser run into a file that you can examine (or upload to bugzilla if a developer has asked you for a log).
... at any point during while your b
rowser is running, you can turn logging on and off.
... this allows you to capture only the "interesting" part of the b
rowser's behavior (i.e.
...And 5 more matches
HTTP Cache
//github.com/realityripple/uxp/blob/master/netwerk/base/public/nsiloadcontextinfo.idl it is a helper interface wrapping following four arguments into a single one: private-b
rowsing boolean flag anonymous load boolean flag app id number (0 for no app) is-in-b
rowser boolean flag helper functions to create nsiloadcontextinfo objects: c++ consumers: functions at loadcontextinfo.h exported header js consumers: resource://gre/modules/loadcontextinfo.jsm module methods two storage object...
... other parallel openers of the same cache entry are blocked (wait) for invocation of their oncacheentryavailable until one of the following occurs: the writer simply th
rows the entry away: other waiting opener in line gets the entry again as "new", the cycle repeats.
...the form is following (currently pending in bug 968593): a,b,i1009,p, regular expression: (.([^,]+)?,)* the first letter is an identifier, identifiers are to be alphabetically sorted and always terminate with ',' a - when present the scope is belonging to an anonymous load b - when present the scope is in b
rowser element load i - when present must have a decimal integer value that represents an app id the scope belongs to, otherwise there is no app (app id is considered 0) p - when present the scope is of a private b
rowsing load, this never persists cachestorageservice keeps a global hashtable mapped by the scope key.
...And 5 more matches
Sqlite.jsm
if the function th
rows, the transaction is automatically rolled back.
... it is possible to automatically close the connection when the b
rowser is closed with the shutdown hook: const conn = await sqlite.openconnection({ path: "mydatabase.sqlite", sharedmemorycache: false }); try { sqlite.shutdown.addblocker("my connection closing", async () => await conn.close()); } catch (e) { // it's too late to block shutdown, just close the connection.
...if your select statement could return lots of data, this buffering of returned
rows could result in excessive memory usage.
...And 5 more matches
Localizing with Mozilla Translator
the directory structure will look like this: (ab-cd jar root) locale |-- branding | |-- brand.dtd | `-- brand.properties |-- b
rowser | |-- aboutdialog.dtd .
... |-- b
rowser-region | `-- region.properties `-- ab-cd |-- alerts | `-- notificationnames.properties |-- autoconfig | `-- autoconfig.properties |-- cookie | |-- cookieacceptdialog.dtd | `-- cookieacceptdialog.properties |-- global | |-- about.dtd | |-- apppicker.dtd .
... b
rowser |-- locales | |-- en-us | | |-- readme.txt | | |-- chrome | | | |-- branding | | | | |-- brand.dtd | | | | `-- brand.properties | | | |-- b
rowser | | | | |-- aboutdialog.dtd as you see, there is ''link'' point, usually at chrome (in cvs & mozilla-central), sometimes in a deeper point.
...And 5 more matches
Scroll-linked effects
these effects work well in b
rowsers where the scrolling is done synchronously on the b
rowser's main thread.
... however, most b
rowsers now support some sort of asynchronous scrolling in order to provide a consistent 60 frames per second experience to the user.
...as the scroll event listener runs in the javascript on the b
rowser's main thread, it will be asynchronous relative to the user-visible scrolling.
...And 5 more matches
NSS tools : ssltab
you can use this option to upload the output into a b
rowser.
...in your b
rowser window, enter the url http://intercept:1924.
... the b
rowser retrieves the requested page from the server at www.netscape.com, but the page is intercepted and passed on to the b
rowser by the debugging tool on intercept.
...And 5 more matches
NSS tools : ssltap
you can use this option to upload the output into a b
rowser.
...in your b
rowser window, enter the url http://intercept:1924.
... the b
rowser retrieves the requested page from the server at www.netscape.com, but the page is intercepted and passed on to the b
rowser by the debugging tool on intercept.
...And 5 more matches
NSS Tools ssltap
you can use this option to upload the output into a b
rowser.
...in your b
rowser window, enter the url http://intercept:1924.
... the b
rowser retrieves the requested page from the server at www.netscape.com, but the page is intercepted and passed on to the b
rowser by the debugging tool on intercept.
...And 5 more matches
NSS tools : ssltap
you can use this option to upload the output into a b
rowser.
...in your b
rowser window, enter the url http://intercept:1924.
... the b
rowser retrieves the requested page from the server at www.netscape.com, but the page is intercepted and passed on to the b
rowser by the debugging tool on intercept.
...And 5 more matches
Web Replay
record/replay infrastructure broadly, reliable record/replay is achieved by controlling for non-determinism in the b
rowser.
... the chrome and middleman processes communicate using the standard b
rowser protocols (pcontent, pb
rowser, 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.
... shared array buffers can be used by web content to introduce data races to the b
rowser on the contents of those buffers, going against a fundamental assumption of the record/replay infrastructure.
...And 5 more matches
Places utilities for JavaScript
by default its only included in b
rowser.xul.
... warning : placesutils class since firefox 3 beta 5 has been split into: placesutils: can be used in any toolkit application placesuiutils: only in firefox placesutils this is a gigantic object full of usefulness if you need to do any bookmark work from within b
rowser.xul.
...for instance, normally in order to get access to the bookmarks service, you have to run something like: components.classes["@mozilla.org/b
rowser/nav-bookmarks-service;1"] .getservice(components.interfaces.nsinavbookmarksservice); with places utils all you need to write is: placesutils.bookmarks this should save on the number of references to the service that are needed, and can help clean up interfaces that are already fairly cluttered.
...And 5 more matches
nsIAppShellService
boolean createstartupstate(in long awindowwidth, in long awindowheight); obsolete since gecko 1.8 nsixulwindow createtoplevelwindow(in nsixulwindow aparent, in nsiuri aurl, in pruint32 achromemask, in long ainitialwidth, in long ainitialheight, in nsiappshell aappshell); nsiwebnav createwindowlessb
rowser (in bool aischrome) void destroyhiddenwindow(); void doprofilestartup(in nsicmdlineservice acmdlineservice, in boolean caninteract); obsolete since gecko 1.8 void ensure1window(in nsicmdlineservice acmdlineservice); obsolete since gecko 1.8 void enterlastwindowclosingsurvivalarea(); obsolete since gecko 1.8 void exitlastwindowclosingsurvivalarea(); ...
...(see nsib
rowserwindow for bit/flag definitions).
...if one has not been made, this will create a b
rowser window.
...And 5 more matches
nsIDOMWindowUtils
th
rows ns_error_not_available if the count can't be provided.
...th
rows an error if there is no widget associated with this window.
...although it may still work in some b
rowsers, its use is discouraged since it could be removed at any time.
...And 5 more matches
nsIWindowWatcher
method overview nsiwebb
rowserchrome getchromeforwindow(in nsidomwindow awindow); nsiauthprompt getnewauthprompter(in nsidomwindow aparent); nsiprompt getnewprompter(in nsidomwindow aparent); nsidomwindow getwindowbyname(in wstring atargetname, in nsidomwindow acurrentwindow); nsisimpleenumerator getwindowenumerator(); nsidomwindow openwindow(in nsidomwindow aparent, in string aur...
... nsiwebb
rowserchrome getchromeforwindow( in nsidomwindow awindow ); parameters awindow the nsidomwindow whose chrome window the caller needs.
... return value an nsiwebb
rowserchrome object for the corresponding chrome window getnewauthprompter() return a newly created nsiauthprompt implementation.
...And 5 more matches
Xray vision
the javascript code that along with the c++ core, implements the b
rowser itself is called chrome code and runs using system privileges.
...so when chrome code accesses content objects, it sees them with xray vision: // chrome code var transfer = gb
rowser.contentwindow.confirm("transfer all my money?"); // calls the native implementation note that using window.confirm() would be a terrible way to implement a security policy, and is only shown here to illustrate how xray vision works.
... to waive xray vision for an object you can use components.utils.waivexrays(object), or use the object's wrappedjsobject property: // chrome code var waivedwindow = components.utils.waivexrays(gb
rowser.contentwindow); var transfer = waivedwindow.confirm("transfer all my money?"); // calls the redefined implementation // chrome code var waivedwindow = gb
rowser.contentwindow.wrappedjsobject; var transfer = waivedwindow.confirm("transfer all my money?"); // calls the redefined implementation waivers are transitive: so if you waive xray vision for an object, then you automatically waive it fo...
...And 5 more matches
WebIDL bindings
otherinstance); [th
rows] myinterface dosomethingelse(optional long maybenumber); [th
rows] void dosomethingelse(myinterface otherinstance); void dotheother(any something); void doyetanotherthing(optional boolean actuallydoit = false); static void staticoperation(any arg); }; will require these method declarations: class myclass { void dosomething(int32_t anumber); double dosomething(myclass* aotheri...
... for example, this webidl: interface test { domstring myattr; [th
rows] domstring mymethod(sequence<domstring> arg1, domstring?
...callback interfaces are used to represent script objects that b
rowser code can call into.
...And 5 more matches
Scripting plugins - Plugins
« previousnext » xxx: dummy p element this document describes the new cross-b
rowser npapi extensions, commonly called npruntime, that have been developed by a group of b
rowser and plugin vendors, including the mozilla foundation, adobe, apple, opera, and sun microsystems (see press release).
... this document also explains how to make a plugin use these new extensions to be scriptable as well as how to access objects in a b
rowser.
... (a bit of history: npapi plugins that used to take advantage of being scriptable via liveconnect in 4.x netscape b
rowsers lost this possibility in mozilla (due to the jni making the netscape 4.x jri obsolete).
...And 5 more matches
Tutorial: Set a breakpoint - Firefox Developer Tools
since the debugger api is only available to privileged javascript code, you’ll need to use the b
rowser 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 b
rowser chrome and add-on debugging toolboxes” and “enable remote debugging” are checked.
... 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> function report(what) { console.log('clicked: ' + what); } </script> visit the html file in your b
rowser, and open the b
rowser content toolbox by opening the firefox menu, choosing “web developer”, and then “b
rowser content toolbox”.
...And 5 more matches
Intensive JavaScript - Firefox Developer Tools
by default the b
rowser uses a single thread to run all the javascript in your page as well as to perform layout, reflows, and garbage collection.
...this just gives the b
rowser some background tasks to perform.
...it gives us a compressed view of the waterfall, which tells us what kinds of operations the b
rowser is doing during the recording.
...And 5 more matches
Basic usage of canvas - Web APIs
at the end of this page, you will know how to set up a canvas 2d context and have drawn a first example in your b
rowser.
... fallback content the <canvas> element differs from an <img> tag in that, like for <video>, <audio>, or <picture> elements, it is easy to define some fallback content, to be displayed in older b
rowsers not supporting it, like versions of internet explorer earlier than version 9 or textual b
rowsers.
... you should always provide fallback content to be displayed by those b
rowsers.
...And 5 more matches
console - Web APIs
the console object provides access to the b
rowser's debugging console (e.g.
...the specifics of how it works varies from b
rowser to b
rowser, but there is a de facto set of features that are typically provided.
...window on b
rowsing scopes and workerglobalscope as specific variants in workers via the property console.
...And 5 more matches
Introduction to the DOM - Web APIs
this document can be either displayed in the b
rowser window or as the html source.
... the w3c dom and whatwg dom standards are implemented in most modern b
rowsers.
... many b
rowsers extend the standard, so care must be exercised when using them on the web where documents may be accessed by various b
rowsers with different doms.
...And 5 more matches
Using the Frame Timing API - Web APIs
the performanceframetiming interface provides frame timing data about the b
rowser's event loop.
... a frame represents the amount of work a b
rowser does in one event loop iteration such as processing dom events, resizing, scrolling, rendering, css animations, etc.
...this means the b
rowser should process a frame in about 16.7ms.
...And 5 more matches
HTMLImageElement.src - Web APIs
syntax htmlimageelement.src = newsource; let src = htmlimageelement.src; value when providing only a single image, rather than a set of images from which the b
rowser selects the best match for the viewport size and display pixel density, the src attribute is a usvstring specifying the url of the desired image.
... if you use the srcset content attribute to provide multiple image options for different display pixel densities, the url specified by the src attribute is used in one of two ways: as a fallback for b
rowsers that don't support srcset.
... additionally, if you use src along with both sizes (or the corresponding sizes content attribute) and srcset in order to choose an image based on the viewport size, the src attribute is only used as a fallback for b
rowsers that don't support sizes and srcset; otherwise, it's not used at all.
...And 5 more matches
Navigator.registerProtocolHandler() - Web APIs
syntax navigator.registerprotocolhandler(scheme, url, title); note: recently updated to navigator.registerprotocolhandler(scheme, url), but no b
rowsers currently support this version.
...older b
rowsers also supported http.
...this will be displayed to the user, such as prompting “allow this site to handle [scheme] links?” or listing registered handlers in the b
rowser’s settings.
...And 5 more matches
Navigator.onLine - Web APIs
returns the online status of the b
rowser.
...the property sends updates whenever the b
rowser's ability to connect to the network changes.
... b
rowsers implement this property differently.
...And 5 more matches
Page Visibility API - Web APIs
with tabbed b
rowsing, there is a reasonable chance that any given webpage is in the background and thus not visible to the user.
...pages only become hidden when the user switches tabs or minimizes the b
rowser window containing the tab.
...these may include: most b
rowsers stop sending requestanimationframe() callbacks to background tabs or hidden <iframe>s in order to improve performance and battery life.
...And 5 more matches
RTCPeerConnection - Web APIs
also included is a list of any ice candidates that may already have been generated by the ice agent since the offer or answer represented by the description was first instantiated.getdefaulticeservers() the getdefaulticeservers() method of the rtcpeerconnection interface returns an array of objects based on the rtciceserver dictionary, which indicates what, if any, ice servers the b
rowser will use by default if none are provided to the rtcpeerconnection in its rtcconfiguration.
... however, b
rowsers are not required to provide any default ice servers at all.iceconnectionstate read only the read-only property rtcpeerconnection.iceconnectionstate returns an enum of type rtciceconnectionstate which state of the ice agent associated with the rtcpeerconnection.icegatheringstate read only the read-only property rtcpeerconnection.icegatheringstate returns an enum of type rtcicegatheringstate that describes connection's ice gathering state.
...ty ontrack is an eventhandler which specifies a function to be called when the track event occurs, indicating that a track has been added to the rtcpeerconnection.methodsalso inherits methods from: eventtargetaddicecandidate()when a web site or app using rtcpeerconnection receives a new ice candidate from the remote peer over its signaling channel, it delivers the newly-received candidate to the b
rowser's ice agent by calling rtcpeerconnection.addicecandidate().addstream() the obsolete rtcpeerconnection method addstream() adds a mediastream as a local source of audio or video.
...And 5 more matches
Storage Access API - Web APIs
concepts and usage most b
rowsers implement a number of storage access policies that restrict access to cookies and site data for embedded, cross-origin resources.
... the semantics around third-party cookie blocking policies in particular differ from b
rowser to b
rowser, but the core functionality is similar: cross-origin resources embedded in a third-party context are not given access to the same cookies and site storage that they would have access to when loaded in a first-party context.
...this also prevents embedded content on the page from spamming the b
rowser or user with excessive access requests.
...And 5 more matches
Touch events - Web APIs
the touch interface, which represents a single touchpoint, includes information such as the position of the touch point relative to the b
rowser viewport.
...it will only work on a b
rowser that supports touch events.
... create a canvas <canvas id="canvas" width="600" height="600" style="border:solid black 1px;"> your b
rowser does not support canvas element.
...And 5 more matches
Using DTMF with WebRTC - Web APIs
webrtc currently ignores these payloads; this is because webrtc's dtmf support is primarily intended for use with legacy telephone services that rely on dtmf tones to perform tasks such as: teleconferencing systems menu systems voicemail systems entry of credit card or other payment information passcode entry note: while the dtmf is not sent to the remote peer as audio, b
rowsers may choose to play the corresponding tone to the local user as part of their user experience, since users are typically used to hearing their phone play the tones audibly.
... hasaddtrack because some b
rowsers have not yet implemented rtcpeerconnection.addtrack(), therefore requiring the use of the obsolete addstream() method, we use this boolean to determine whether or not the user agent supports addtrack(); if it doesn't, we'll fall back to addstream().
...this variable will let the example operate even on b
rowsers not yet implementing the newer addtrack() method; we'll do so by falling back to the older addstream() method.
...And 5 more matches
Improving compatibility using WebRTC adapter.js - Web APIs
while the webrtc specification is relatively stable, not all b
rowsers have fully implemented all of its features.
... in addition, some b
rowsers still have prefixes on some or all webrtc apis.
...the webrtc organization provides on github the webrtc adapter to work around compatibility issues in different b
rowsers' webrtc implementations.
...And 5 more matches
Movement, orientation, and motion: A WebXR example - Web APIs
by importing this polyfill, we allow the example to work on many b
rowsers that don't yet have webxr implementations in place, and we smooth out any transient deviations from the specification that occur during these still somewhat experimental days of the webxr specification.
... options this example has a number of options you can configure by adjusting the values of constants before you load it in the b
rowser.
... enableforcepolyfill if this boolean is true, the example will attempt to use the webxr polyfill even if the b
rowser actually has support for webxr.
...And 5 more matches
WorkerGlobalScope - Web APIs
workers have no b
rowsing context; this scope contains the information usually conveyed by window objects — in this case event handlers, the console or the associated workernavigator object.
...it is a specific navigator object, mostly a subset of the navigator for b
rowsing scopes, but adapted to workers.
...it is a specific location object, mostly a subset of the location for b
rowsing scopes, but adapted to workers.
...And 5 more matches
WorkerNavigator - Web APIs
inherited properties navigatorid.appcodename read only always returns 'mozilla', in any b
rowser.
... navigatorid.appname read only returns the official name of the b
rowser.
... navigatorid.appversion read only returns the version of the b
rowser as a string.
...And 5 more matches
ARIA: application role - Accessibility
any sort of special interpretation of html structures and widgets should be suspended, and control should be completely handed over to the b
rowser and web application to handle mouse, keyboard, or touch interaction.
... background for historic reasons, especially on windows, screen readers and some other assistive technologies (at) have traditionally grabbed the whole web content from the b
rowser at once after it had finished loading.
...this is often referred to as virtual document, b
rowse mode, or similar terms.
...And 5 more matches
:is() (:matches(), :any()) - CSS: Cascading Style Sheets
note that currently b
rowsers support this functionality as :matches(), or through an older, prefixed pseudo-class — :any(), including older versions of chrome, firefox, and safari.
...'='<attr-modifier> = i | s examples cross-b
rowser example <header> <p>this is my header paragraph</p> </header> <main> <ul> <li><p>this is my first</p><p>list item</p></li> <li><p>this is my second</p><p>list item</p></li> </ul> </main> <footer> <p>this is my footer paragraph</p> </footer> :-webkit-any(header, main, footer) p:hover { color: red; cursor: pointer; } :-moz-any(header, main, footer) p:hover { color: red;...
...r, main, footer) p'); } catch(e) { try { matcheditems = document.queryselectorall(':matches(header, main, footer) p'); } catch(e) { try { matcheditems = document.queryselectorall(':-webkit-any(header, main, footer) p'); } catch(e) { try { matcheditems = document.queryselectorall(':-moz-any(header, main, footer) p'); } catch(e) { console.log('your b
rowser doesn\'t support :is(), :matches(), or :any()'); } } } } matcheditems.foreach(applyhandler); function applyhandler(elem) { elem.addeventlistener('click', function(e) { alert('this paragraph is inside a ' + e.target.parentnode.nodename); }); } simplifying list selectors the :is() pseudo-class can greatly simplify your css selectors.
...And 5 more matches
Using CSS animations - CSS: Cascading Style Sheets
letting the b
rowser control the animation sequence lets the b
rowser optimize performance and efficiency by, for example, reducing the update frequency of animations running in tabs that aren't currently visible.
...if from/0% or to/100% is not specified, the b
rowser starts or finishes the animation using the computed values of all attributes.
... examples note: some older b
rowsers (pre-2017) may need prefixes; the live examples you can click to see in your b
rowser include the -webkit prefixed syntax.
...And 5 more matches
Controlling Ratios of Flex Items Along the Main Axis - CSS: Cascading Style Sheets
here we will explore them in depth in order that you can fully understand what the b
rowser is doing when you use them.
... flex item sizing in order to work out how much space there is available to lay out flex items, the b
rowser needs to know how big the item is to start with.
...in a b
rowser that supports this keyword you should be able to see that the text has taken all of the soft wrapping opportunities available to it, becoming as small as it can be without overflowing.
...And 5 more matches
Relationship of flexbox to other layout methods - CSS: Cascading Style Sheets
until b
rowsers implement the gap properties for flexbox, margins have to be used to create gaps between items.
...you can see more information on b
rowser support in the mdn documentation for writing-mode.
...you might however want to use flexbox as a fallback for grid layout, as there is better support for flexbox in older b
rowsers.
...And 5 more matches
CSS grids, logical values, and writing modes - CSS: Cascading Style Sheets
b
rowsers are pretty good at dealing with text direction, and you don’t even need to be working in a rtl language to take a look.
...they prevent the b
rowser being able to do the work to switch writing mode, as they make the assumption that the text is flowing left to right and top to bottom.
...ow track, and fills in more items: * {box-sizing: border-box;} .wrapper { border: 2px solid #f76707; border-radius: 5px; background-color: #fff4e6; } .wrapper > div { border: 2px solid #ffa94d; border-radius: 5px; background-color: #ffd8a8; padding: 1em; color: #d9480f; } .wrapper { display: grid; grid-template-columns: repeat(3, 100px); grid-template-
rows: repeat(2, 100px); grid-gap: 10px; } <div class="wrapper"> <div class="item1">item 1</div> <div class="item2">item 2</div> <div class="item3">item 3</div> <div class="item4">item 4</div> <div class="item5">item 5</div> </div> if we add writing-mode: vertical-lr to the grid container, we can see that the block and inline axis are now running in a different direction.
...And 5 more matches
Grid template areas - CSS: Cascading Style Sheets
.wrapper { display: grid; grid-template-columns: repeat(9, 1fr); grid-auto-
rows: minmax(100px, auto); grid-template-areas: "hd hd hd hd hd hd hd hd hd" "sd sd sd main main main main main main" "ft ft ft ft ft ft ft ft ft"; } * {box-sizing: border-box;} .wrapper { border: 2px solid #f76707; border-radius: 5px; background-color: #fff4e6; max-width: 940px; margin: 0 auto; } .wrapper > div { border: 2px solid...
...ox-sizing: border-box;} .wrapper { border: 2px solid #f76707; border-radius: 5px; background-color: #fff4e6; max-width: 940px; margin: 0 auto; } .wrapper > div { border: 2px solid #ffa94d; border-radius: 5px; background-color: #ffd8a8; padding: 1em; color: #d9480f; } .wrapper { display: grid; grid-template-columns: repeat(9, 1fr); grid-auto-
rows: minmax(100px, auto); grid-template-areas: "hd hd hd hd hd hd hd hd hd" "sd sd sd main main main main main main" ".
...for a complex layout there is a benefit to having the
rows and columns neatly aligned.
...And 5 more matches
Column layouts - CSS: Cascading Style Sheets
multiple
rows of columns lined up by row and column.
... there is currently no way to add a rule between flex items, and b
rowser support for the column-gap and row-gap properties is limited.
... download this example flexbox can also be used to create layouts where the flex items wrap onto new
rows, by setting the flex-wrap property on the container to wrap.
...And 5 more matches
appearance (-moz-appearance, -webkit-appearance) - CSS: Cascading Style Sheets
the -moz-appearance and -webkit-appearance properties are non-standard versions of this propery, used (respectively) by gecko (firefox) and by webkit-based (e.g., safari) and blink-based (e.g., chrome, opera) b
rowsers to achieve the same thing.
...although it is supported in most modern b
rowsers, its implementation varies widely.
... in older b
rowsers, even the keyword none does not have the same effect on all form elements across different b
rowsers, and some do not support it at all.
...And 5 more matches
grid-template - CSS: Cascading Style Sheets
the grid-template css property is a shorthand property for defining grid columns,
rows, and areas.
... constituent properties this property is a shorthand for the following css properties: grid-template-areas grid-template-columns grid-template-
rows syntax /* keyword value */ grid-template: none; /* grid-template-
rows / grid-template-columns values */ grid-template: 100px 1fr / 50px 1fr; grid-template: auto 1fr / auto 1fr auto; grid-template: [linename] 100px / [columnname1] 30% [columnname2] 70%; grid-template: fit-content(100px) / fit-content(40%); /* grid-template-areas grid-template-
rows / grid-template-column values */ grid-template: "a a a" ...
...
rows and columns will be implicitly generated; their size will be determined by the grid-auto-
rows and grid-auto-columns properties.
...And 5 more matches
quotes - CSS: Cascading Style Sheets
the quotes css property sets how the b
rowser should render quotation marks that are added using the open-quotes or close-quotes values of the css content property.
...that's the question!</q> css q { quotes: '"' '"' "'" "'"; } q::before { content: open-quote; } q::after { content: close-quote; } result auto quotes for most b
rowsers, the default value of quotes is auto (firefox 70+), or the b
rowser otherwise had this default behavior (chromiums, safari, edge), so this example works without it being explicitly being set.
... recommendation initial definition b
rowser compatibility the compatibility table on this page is generated from structured data.
...And 5 more matches
Localizations and character encodings - Developer guides
b
rowsers process text as unicode internally.
... however, a way of representing characters in terms of bytes (character encoding) is used for transferring text over the network to the b
rowser.
... to specify that a page is using, for example, the utf-8 character encoding (as per the recommendation), simply place the following line in the <head> block: <meta charset="utf-8"> details and b
rowser internals when the encoding is declared by web content like the html specification requires, firefox will use that encoding for turning the bytes into the internal representation.
...And 5 more matches
<input type="submit"> - HTML: Hypertext Markup Language
this label is likely to be something along the lines of "submit" or "submit query." here's an example of a submit button with a default label in your b
rowser: <input type="submit"> additional attributes in addition to the attributes shared by all <input> elements, submit button inputs support the following attributes: attribute description formaction the url to which to submit the form's data; overrides the form's action attribute, if any formenctype a string specifying the encoding type to use for the...
... formnovalidate a boolean which, if present, means the form's fields will not be subjected to constraint validation before submitting the data to the server formtarget the b
rowsing context into which to load the response returned by the server after submitting the form formaction a string indicating the url to which to submit the data.
...the string must be the name of a b
rowsing context (that is, a tab, window, or <iframe>.
...And 5 more matches
Evolution of HTTP - HTTP
a client to display (and accidentally edit) these documents, the first web b
rowser called worldwideweb.
... http/1.0 – building extensibility http/0.9 was very limited and both b
rowsers and servers quickly extended it to be more versatile: versioning information is now sent within each request (http/1.0 is appended to the get line) a status code line is also sent at the beginning of the response, allowing the b
rowser itself to understand the success or failure of the request and to adapt its behavior in consequence (like in updating or using its local cache in a specific ...
...nnection and request to fetch the image (followed by a response to that request): get /myimage.gif http/1.0 user-agent: ncsa_mosaic/2.0 (windows 3.1) 200 ok date: tue, 15 nov 1994 08:12:32 gmt server: cern/3.0 libwww/2.17 content-type: text/gif (image content) these novelties have not been introduced as concerted effort, but as a try-and-see approach over the 1991-1995 period: a server and a b
rowser added one feature and it saw if it got traction.
...And 5 more matches
Identifying resources on the Web - HTTP
https://developer.mozilla.org https://developer.mozilla.org/docs/learn/ https://developer.mozilla.org/search?q=url any of those urls can be typed into your b
rowser's address bar to tell it to load the associated page (resource).
...it indicates which protocol the b
rowser must use.
...the web requires one of these two, but b
rowsers also know how to handle other protocols such as mailto: (to open a mail client) or ftp: to handle file transfer, so don't be surprised if you see such protocols.
...And 5 more matches
Feature-Policy: fullscreen - HTTP
syntax feature-policy: fullscreen <allowlist>; <allowlist> an allowlist is a list of origins that takes one or more of the following values, separated by spaces: *: the feature will be allowed in this document, and all nested b
rowsing contexts (iframes) regardless of their origin.
... 'self': the feature will be allowed in this document, and in all nested b
rowsing contexts (iframes) in the same origin.
... 'none': the feature is disabled in top-level and nested b
rowsing contexts.
...And 5 more matches
Feature-Policy: geolocation - HTTP
syntax feature-policy: geolocation <allowlist>; <allowlist> an allowlist is a list of origins that takes one or more of the following values, separated by spaces: *: the feature will be allowed in this document, and all nested b
rowsing contexts (iframes) regardless of their origin.
... 'self': the feature will be allowed in this document, and in all nested b
rowsing contexts (iframes) in the same origin.
... 'none': the feature is disabled in top-level and nested b
rowsing contexts.
...And 5 more matches
Feature-Policy: screen-wake-lock - HTTP
note: this api is still actively being developed and available only behind a flag on select b
rowsers and platforms.
... syntax feature-policy: screen-wake-lock <allowlist>; <allowlist> an allowlist is a list of origins that takes one or more of the following values, separated by spaces: *: the feature will be allowed in this document, and all nested b
rowsing contexts (iframes) regardless of their origin.
... 'self': the feature will be allowed in this document, and in all nested b
rowsing contexts (iframes) in the same origin.
...And 5 more matches
Feature-Policy: wake-lock - HTTP
note: this api is still actively being developed and available only behind a flag on select b
rowsers and platforms.
... syntax feature-policy: wake-lock <allowlist>; <allowlist> an allowlist is a list of origins that takes one or more of the following values, separated by spaces: *: the feature will be allowed in this document, and all nested b
rowsing contexts (iframes) regardless of their origin.
... 'self': the feature will be allowed in this document, and in all nested b
rowsing contexts (iframes) in the same origin.
...And 5 more matches
JavaScript modules - JavaScript
fast forward a few years and we now have complete applications being run in b
rowsers with a lot of javascript, as well as javascript being used in other contexts (node.js, for example).
... the good news is that modern b
rowsers have started to support module functionality natively, and this is what this article is all about.
... this can only be a good thing — b
rowsers 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 5 more matches
Proxy - JavaScript
const target = {}; const p = new proxy(target, {}); p.a = 37; // operation forwarded to the target console.log(target.a); // 37 // (the operation has been properly forwarded!) note that while this "no-op" works for javascript objects, it does not work for native b
rowser objects like dom elements.
... throw new typeerror('the age is not an integer'); } if (value > 200) { throw new rangeerror('the age seems invalid'); } } // the default behavior to store the value obj[prop] = value; // indicate success return true; } }; const person = new proxy({}, validator); person.age = 100; console.log(person.age); // 100 person.age = 'young'; // th
rows an exception person.age = 300; // th
rows an exception extending constructor a function proxy could easily extend a constructor with a new constructor.
...the object also supports an extra property called latestb
rowser both as a getter and a setter.
...And 5 more matches
Authoring MathML - MathML
using mathml mathml in html pages you can use presentation mathml inside html5 documents: <!doctype html> <html> <head> <title>mathml in html5</title> </head> <body> <h1>mathml in html5</h1> <p> square root of two: <math> <msqrt> <mn>2</mn> </msqrt> </math> </p> </body> </html> content mathml is not supported by b
rowsers.
... fallback for b
rowsers without mathml support unfortunately, some b
rowsers are not able to render mathml equations or only have a limited support.
...n your document header: <script src="https://fred-wang.github.io/mathml.css/mspace.js"></script> if you need more complex constructions, you might instead consider using the heavier mathjax library as a mathml polyfill: <script src="https://fred-wang.github.io/mathjax.js/mpadded-min.js"></script> note that these two scripts perform feature detection of the mspace or mpadded elements (see the b
rowser compatibility table on these pages).
...And 5 more matches
Optimizing startup performance - Web Performance
does it seem to lock up the device or the user's b
rowser while the app loads?
...this will prevent the app, b
rowser, and/or device from appearing to have locked up.
...if the app is being run in a b
rowser, it's possible the user may get an "unresponsive app" or "slow script" notification.
...And 5 more matches
Media - Progressive web apps (PWAs)
like other features of css, printing depends on b
rowser choice and its settings.
... for example, the mozilla b
rowser supplies default margins, headers, and footers for printing.
...it is impossible to anticipate every user's b
rowser choice and settings at the time of printing.
...And 5 more matches
Subresource Integrity - Web security
subresource integrity (sri) is a security feature that enables b
rowsers to verify that resources they fetch (for example, from a cdn) are delivered without unexpected manipulation.
... note: for subresource-integrity verification of a resource served from an origin other than the document in which it’s embedded, b
rowsers additionally check the resource using cross-origin resource sharing (cors), to ensure the origin serving the resource allows it to be shared with the requesting origin.
... using subresource integrity you use the subresource integrity feature by specifying a base64-encoded cryptographic hash of a resource (file) you’re telling the b
rowser to fetch, in the value of the integrity attribute of any <script> or <link> element.
...And 5 more matches
On page load - Archive of obsolete content
this article is for xul/javascript developers who want to have custom code executed each time a new page is loaded in b
rowser/mail.
... progress listeners allow extensions to be notified of events associated with documents loading in the b
rowser and with tab switching events.
... creating an overlay first, you need to create an overlay to one (or more, depending on which applications you target) of the following xul documents: application uri to overlay firefox chrome://b
rowser/content/b
rowser.xul thunderbird chrome://messenger/content/messenger.xul navigator from seamonkey chrome://navigator/content/navigator.xul attaching a script attach a script to your overlay (see "attaching a script to an overlay") that adds a load event listener to appcontent element (b
rowsers) or messagepane (mail): window.addeventlistener("load", function load(event){ window.removeeventlistener("load", load, false); //remove listener, no longer needed myextens...
...And 4 more matches
Session store API - Archive of obsolete content
if your extension wants to be able to restore data when tabs are restored, you can install a listener like this: function myextensionhandlerestore(aevent) { var tab = event.originaltarget; /* the tab being restored */ var uri = tab.linkedb
rowser.contentdocument.location; /* the tab's uri */ components.classes["@mozilla.org/consoleservice;1"] .getservice(components.interfaces.nsiconsoleservice) .logstringmessage("restoring tab: " + uri); }; document.addeventlistener("sstabrestoring", myextensionhandlerestore, false); simply replace the contents of the function myextensionhandlerestore() with whatever you ne...
... firefox 3.6 knows how to save session store data when the last b
rowser window closes, even if there are still other windows open.
...in other words, it's now possible for sessions to be restored even without the b
rowser quitting and being relaunched.
...And 4 more matches
Signing an XPI - Archive of obsolete content
warning: performing this operation while the b
rowser is running could cause corruption of your security databases.
... if the b
rowser is currently running, you should exit the b
rowser before continuing this operation.
...ing: 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 b
rowser, and attempt to load the signed extension by following these steps: 1.
...And 4 more matches
Using content preferences - Archive of obsolete content
this permits code running within chrome (in other words: extensions and the b
rowser itself, not web sites) to locally save preferences on a per-site basis.
... var value = prefservice.getpref(uri, "devmo.somesetting"); built-in site-specific preferences preference name menu equivalent values notes b
rowser.content.full-zoom view / zoom example: "1.10000002384186" (rounding variant of "1.1") related about:config preferences: b
rowser.zoom.full boolean, set by the menu item view / zoom / zoom text only.
... b
rowser.zoom.sitespecific toolkit.zoommanager.zoomvalues zoom.maxpercent and zoom.minpercent b
rowser.download.lastdir path of a filesystem directory related about:config preferences: b
rowser.download.lastdir the last directory for any site use downloadlastdir.jsm for access to these preferences.
...And 4 more matches
Creating a Skin for Firefox/Getting Started - Archive of obsolete content
skin\classic\b
rowser b
rowser contains all the toolbar icons, as well as the icons for the bookmark manager and the preferences window.
... skin\classic\global global contains almost all of the important css files that define the appearance of the b
rowser.
... skin\classic\mozapps mozapps contains all the styles and icons for the b
rowser peripherals, such as the extension manager or update wizard.
...And 4 more matches
Editor Embedding Guide - Archive of obsolete content
in the beginning there is makeeditable given an nsiwebb
rowser instance, get an nsidomwindow from the getcontentdomwindow call.
... then simply call nsiwebb
rowser->do_getinterface on the nsiwebb
rowser to retrieve the nsieditingsession from it.
...nscomptr<nsieditingsession> editingsession; nsiwebb
rowser->do_getinterface(getter_addrefs(editingsession)); if (editingsession) editingsession->makewindoweditable(domwindow, "html", pr_true); the valid editor types are: "text" (similar to notepad or a textarea; does not allow for html) "textmail" (similar to "text" but html can be inserted; intended for plaintext mail usage and handling of citations) "html" (this is the default type if no type i...
...And 4 more matches
Introduction to XUL - Archive of obsolete content
window chrome is displayed and managed by the same layout engine that manages html content in the b
rowser.
... terms "xpfe" is the term mozilla-the-organization is using to describe mozilla-the-b
rowser's cross platform front end, because x and c look similar if you beat them long and hard with a hammer.
... the intention is to build cross-platform applications like b
rowsers and mail clients from a set of tools designed for that purpose.
...And 4 more matches
Building Trees - Archive of obsolete content
specifically, the action body should be a single treeitem with its
rows and cells.
...besides the attributes mentioned above, any other attributes specified on the tree
rows and cells are ignored.
... of course, we can’t really see the photos, since the tree’s
rows are too small!
...And 4 more matches
Introduction - Archive of obsolete content
xul (pronounced "zool" and rhyming with "cool") was created to make development of the mozilla b
rowser easier and faster.
... there are several ways you can use xul: firefox extension an extension adds functionality to the b
rowser itself, often in the form of extra toolbars, context menus, or customizations to the b
rowser's user interface.
... this is done using a feature of xul called an overlay, which allows the ui provided from one source, in this case, the firefox b
rowser, to be merged together with the ui from the extension.
...And 4 more matches
textbox - Archive of obsolete content
the multiline attribute can be specified to display a field with multiple
rows.
... attributes cols, decimalplaces, disabled, emptytext, hidespinbuttons, increment, label, max, maxlength, min, multiline, newlines, onblur, onchange, onfocus, oninput, placeholder, preference, readonly,
rows, searchbutton, size, spellcheck, tabindex, timeout, type, value, wrap, wraparound properties accessibletype, clickselectsall, decimalplaces, decimalsymbol, defaultvalue, disabled, editor, emptytext, increment, inputfield, label, max, maxlength, min, placeholder, readonly, searchbutton, selectionend, selectionstart, size, spinbuttons, tabindex, textlength, timeout, type, value, valuenumber, wraparound methods decrease, increase, reset, select, setselectionrange style classes plain examples <vbox> <label control="your...
... increment type: integer the amount by which the curpos (for scroll bars) or value (for number boxes and scale) attribute changes when the ar
rows are clicked(or scales are dragged).
...And 4 more matches
NPN_GetValue - Archive of obsolete content
« gecko plugin api reference « b
rowser side plug-in api summary allows the plug-in to query the b
rowser for information.
...values for npnvariable: npnvxdisplay =1: unix only: returns the current display npnvxtappcontext: unix only: returns the application's xtappcontext npnvnetscapewindow: ms windows and unix/x11 only: ms windows: gets the native window on which plug-in drawing occurs; returns hwnd unix/x11: gets the b
rowser toplevel window in which the plug-in is displayed; returns window npnvjavascriptenabledbool: tells whether javascript is enabled; true=javascript enabled, false=not enabled npnvasdenabledbool: tells whether smartupdate (former name: asd) is enabled; true=smartupdate enabled, false=not enabled npnvisofflinebool: tells whether offline mode is enabled; true=offline mode enabled, ...
...false=not enabled npnvtoolkit: npnvsupportsxembedbool: npnvwindownpobject: returns the npobject * pointer for the dom window object; see getting the page url in npapi plugin for a rough example npnvpluginelementnpobject: npnvsupportswindowless: tells whether the b
rowser supports windowless plugins.
...And 4 more matches
Theme changes in Firefox 3 - Archive of obsolete content
b
rowser changes requiring theme updates there are a number of changed and deleted files in the b
rowser that may require you to make changes to your theme.
... all file list all platforms file description of change b
rowser/themes/*/b
rowser/b
rowser.css the width of the drag and drop indicator is no longer calculated during the drag (tabb
rowser.xml).
...also, the visibility of the indicator is now controlled by setting collapsed in tabb
rowser.xml.
...And 4 more matches
Archived open Web documentation - Archive of obsolete content
talk:background-size should not the "b
rowser compatibility" table also list google chrome and konqueror?
... znerd 04 august 2009 b
rowser detection and cross b
rowser support improper b
rowser detection can lead to web maintenance nightmares.
... rethinking the basics of when and how to detect user agents is crucial to creating maintainable, cross b
rowser web content.
...And 4 more matches
Archive of obsolete content
here at mdn, we try to avoid outright deleting content that might be useful to people targeting legacy platforms, operating systems, and b
rowsers.
... perhaps your target audience is people that are using older hardware, for example, and can't upgrade to the latest and greatest b
rowsers.
...material in this archived content zone should not be used for building new web sites or apps for modern b
rowsers.
...And 4 more matches
Accessible multimedia - Learn web development
for example (see native-controls.html source code and live): <audio controls> <source src="viper.mp3" type="audio/mp3"> <source src="viper.ogg" type="audio/ogg"> <p>your b
rowser doesn't support html5 audio.
... here is a <a href="viper.mp3">link to the audio</a> instead.</p> </audio> <br> <video controls> <source src="rabbit320.mp4" type="video/mp4"> <source src="rabbit320.webm" type="video/webm"> <p>your b
rowser doesn't support html5 video.
...it looks like so in firefox and chrome: however, there are problems with these controls: they are not keyboard accessible in most b
rowsers, i.e.
...And 4 more matches
CSS layout - Learn web development
flexbox flexbox is a one-dimensional layout method for laying out items in
rows or columns.
...it lets you lay content out in
rows and columns, and has many features that make building complex layouts straightforward.
... positioning positioning allows you to take elements out of the normal document layout flow, and make them behave differently, for example sitting on top of one another, or always remaining in the same place inside the b
rowser viewport.
...And 4 more matches
How CSS is structured - Learn web development
each css rule starts with a selector—or a list of selectors—in order to tell the b
rowser which element or elements the rules should apply to.
...it is completely ignored by the b
rowser's css engine.
...however, a media query follows that defines a blue background if the b
rowser viewport is wider than 30em.
...And 4 more matches
How do you make sure your website works properly? - Learn web development
dig deeper test in your b
rowser if you want to know whether your website works correctly, the first thing to do is fire up your b
rowser and go to the page you want to test.
...you won't see this much in your b
rowser, but it's good to know about "301" since search engines use this information a lot to update their indexes.
... 304: not modified the file has not changed since the last time you asked for it, so your b
rowser can display the version from its cache, resulting in faster response times and more efficient use of bandwidth.
...And 4 more matches
What software do I need to build a website? - Learn web development
you'll need tools to: create and edit webpages upload files to your web server view your website nearly all operating systems by default include a text editor and a b
rowser, which you can use to view websites.
...s a short list of free basic (s)ftp clients: operating system ftp software windows winscp moba xterm filezilla (all os) linux nautilus/files (gnome) dolphin (kde) mac os cyberduck chrome os shiftedit (all os) b
rowsing websites as you already know, you need a web b
rowser to view websites.
... there are dozens of b
rowser options for your personal use, but when you're developing a website you should test it at least with the following major b
rowsers, to make sure your site works for most people: mozilla firefox google chrome microsoft internet explorer apple safari if you're targeting a specific group (e.g., technical platform or country), you may have to test the site with additional b
rowsers, like opera, konqueror, or uc b
rowser.
...And 4 more matches
UI pseudo-classes - Learn web development
in this article, we will explore in detail the different ui pseudo-classes available to us in modern b
rowsers for styling forms in different states.
...some of the others are aimed at solving very specific niche problems, or simply not very well supported in b
rowsers yet.
... the ones listed above all have pretty good b
rowser support, but of course, you should test your form implementations carefully to make sure they work for your target audience.
...And 4 more matches
Introducing asynchronous JavaScript - Learn web development
a lot of the functionality we have looked at in previous learning area modules is synchronous — you run some code, and the result is returned as soon as the b
rowser can do so.
...in essence, it's the b
rowser's way of saying "i promise to get back to you with the answer as soon as i can," hence the name "promise." this concept can take practice to get used to; it feels a little like schrödinger's cat in action.
... neither of the possible outcomes have happened yet, so the fetch operation is currently waiting on the result of the b
rowser trying to complete the operation at some point in the future.
...And 4 more matches
What went wrong? Troubleshooting JavaScript - Learn web development
to get started, open the local copy inside your favorite text editor, and your b
rowser.
... fixing syntax errors earlier on in the course we got you to type some simple javascript commands into the developer tools javascript console (if you can't remember how to open this in your b
rowser, follow the previous link to find out how).
... what's even more useful is that the console gives you error messages whenever a syntax error exists inside the javascript being fed into the b
rowser's javascript engine.
...And 4 more matches
Object prototypes - Learn web development
understanding prototype objects here we'll go back to the example in which we finished writing our person() constructor — load the example in your b
rowser.
...) { // property and method definitions this.name = { 'first': first, 'last' : last }; this.age = age; this.gender = gender; //...see link in summary above for full definition } we have then created an object instance like this: let person1 = new person('bob', 'smith', 32, 'male', ['music', 'skiing']); if you type "person1." into your javascript console, you should see the b
rowser try to auto-complete this with the member names available on this object: in this list, you will see the members defined on person1's constructor — person() — name, age, gender, interests, bio, and greeting.
...in this case, what happens is: the b
rowser initially checks to see if the person1 object has a valueof() method available on it, as defined on its constructor, person(), and it doesn't.
...And 4 more matches
Properly configuring server MIME types - Learn web development
this is a major source of problems for users of gecko-based b
rowsers, which respect the mime types as reported by web servers and web applications.
... mime types describe the media type of content either in email or served by web servers or web applications and are intended to help guide a web b
rowser in how the content is to be processed and displayed.
... if the web server or application reports an incorrect mime type for content, a web b
rowser has no way, according to the http specification, of knowing that the author actually intended the content to be processed and displayed in a way different from that implied by the reported mime type.
...And 4 more matches
Componentizing our React app - Learn web development
if at any point in the future you try to render a component that does not return anything, react will display an error in your b
rowser.
...your <ul> should read like this: <ul role="list" classname="todo-list stack-large stack-exception" aria-labelledby="list-heading" > <todo /> <todo /> <todo /> </ul> when you look back at your b
rowser, you'll notice something unfortunate: your list now repeats the first task three times!
...let’s use the names of our tasks that we had before: <todo name="eat" /> <todo name="sleep" /> <todo name="repeat" /> when your b
rowser refreshes, you will see… the exact same thing as before.
...And 4 more matches
React resources - Learn web development
react devtools we used console.log() to check on the state and props of our application in this tutorial, and you'll also have seen some of the useful warnings and error message that react gives you both in the cli and your b
rowser's javascript console.
... the react devtools utility allows you to inspect the internals of your react application directly in the b
rowser.
... it adds a new panel to your b
rowser's developer tools, and with it you can inspect the state and props of various components, and even edit state and props to make immediate changes to your application.
...And 4 more matches
Multiple Firefox profiles
for example, you might want to have some extensions installed for web development, but not for general-purpose web b
rowsing.
... available b
rowser development channels there are four available b
rowser channels, each at a different level of stability and development.
... mac os x multifirefox by dave martorana profile management determining the profile while firefox is running to determine the profile of a currently-running firefox instance in windows, macos or linux, type about:profiles into the b
rowser url search bar.
...And 4 more matches
HTMLIFrameElement.findAll()
the findall() method of the htmliframeelement searches for a string in a b
rowser <iframe>'s text content; if found, the first instance of the string relative to the caret position will be highlighted.
... invoking this method results in a mozb
rowserfindchange event firing, which carries details about the search results.
... note: use of the b
rowser api requires a privileged app, and b
rowser and/or embed-apps permissions, depending on what you want to do.
...And 4 more matches
HTMLIFrameElement.setVisible()
the setvisible() method of the htmliframeelement is used to change the visibility state of the b
rowser <iframe>.
... the visible state of a b
rowser <iframe> has nothing to do with its actual visibility (which is handled through css).
... the visible state is used to define the level of resources required by the b
rowser <iframe>.
...And 4 more matches
Localizing with Koala
appname: b
rowser.
...they can be found in two files, inside the b
rowser/chrome/b
rowser directory: searchbar.dtd, search.properties.
...b
rowser\chrome\b
rowser\search.properties ?
...And 4 more matches
MathML Demo: <mo> - operator, fence, separator, or accent
a ▹ b ≂ c a ⊎ b ⋖ c a ⌆ b ⋗ c a ⨿ b ∣ c a ⊴ b ∥ c a ⊵ b ∼ c a ▽ b ≈ c a △ b ≊ c a ⋄ b ⪸ c a † b ⪷ c a ‡ b ∋ c a ⊞ b \vartriangle c ar
rows the following table contains instances of all ar
rows found on the swp ar
rows panel.
...in general, the lspace and rspace around ar
rows should be similar to the spacing around relations.
... there is an issue with the markup of "long" latex ar
rows in mathml.
...And 4 more matches
about:memory
here is an example for a b
rowser session where tabs were open to cnn.com, techcrunch.com, and arstechnica.com.
...+ 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://b
rowser/content/b
rowser.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.1...
... the "window-objects" sub-tree represents all javascript window objects, which includes the b
rowser tabs and ui windows.
...And 4 more matches
Notes on TLS - SSL 3.0 Intolerant Servers
this is the main symptom of the problem when mozilla based b
rowsers encounter tls/ssl 3.0 intolerant servers.
... netscape 6.x/7.x and mozilla b
rowsers (0.9.1 and later versions) correctly implement the tls specification, and the users cannot utilize sites which have this problem.
... for up-to-date information, you can read a bugzilla bug report which keeps track of this problem with mozilla-based b
rowsers.
...And 4 more matches
Creating JavaScript jstest reftests
the js/src/tests directories test files are run by the jstest harness in the shell and the reftest harness in the b
rowser.
...for example, to test the decompilation of a simple function you could write: var f = (function () { return 1; }); expect = 'function () { return 1; }'; actual = f + ''; comparesource(expect, actual, 'decompile simple function'); handling shell or b
rowser specific features jstests run both in the b
rowser and in the javascript shell.
... if your test needs to use b
rowser-specific features, either: make the test silently pass if those features aren't present; or write a mochitest instead (preferred); or at the top of the test, add the comment // skip-if(xulruntime.shell), so that it only runs in the b
rowser.
...And 4 more matches
JSAPI User Guide
javascript is widely used for client-side scripts that run in the b
rowser.
... but mozilla's javascript engine is a library that can be linked into any c++ program, not just a b
rowser.
...b
rowsers expose dom objects.
...And 4 more matches
nsIDocShell
instead, retrieve an nsidocshell from a b
rowser or other document container element.
... note that out-of-process b
rowsers do not have an nsidocshell; instead you can access the nsidocshell object from a frame script.
... isoffscreenb
rowser boolean if true, this docshell is not visible in the traditional sense, but is being actively rendered to the screen (such as by being painted to a canvas), and should be treated accordingly.
...And 4 more matches
nsIEditorIMESupport
although it may still work in some b
rowsers, its use is discouraged since it could be removed at any time.
...although it may still work in some b
rowsers, its use is discouraged since it could be removed at any time.
...although it may still work in some b
rowsers, its use is discouraged since it could be removed at any time.
...And 4 more matches
nsIPrincipal
getting this attribute never th
rows.
...th
rows if there is no certificate associated with this principal.
...th
rows if there is no certificate associated with this principal.
...And 4 more matches
nsITreeBoxObject
long getlastvisiblerow(); getpagelength() gets the number of possible visible
rows.
... boolean iscellcropped(in long row, in nsitreecolumn col); parameters row the index of the row col the nsitreecolumn rowcountchanged() notify the tree that the number of
rows changed.
... the view is responsible for calling this notification method when
rows are added or removed.
...And 4 more matches
nsIWebProgressListener
another example: the loading of a pdf or flash file might not not send onlocationchange if the document is handed off to a third-party tool rather than being loaded into the b
rowser.
...the status message is intended to be displayed to the user (for example, in the status bar of the b
rowser).
... example the nsiwebprogresslistener for each tab: gb
rowser.mtabprogresslistener can be used in the parent to listen for most nsiwebprogresslistener events, but in b
rowser code, will not have access to the nsiwebprogress's domwindow property.
...And 4 more matches
Type conversion
e if src == 1: true var mystruct = ctypes.structtype("mystructtype", [ { "v": ctypes.bool } ])(); mystruct.v = true; console.log(mystruct.v.tostring()); // 'true' mystruct.v = false; console.log(mystruct.v.tostring()); // 'false' mystruct.v = 1; console.log(mystruct.v.tostring()); // 'true' mystruct.v = 0; console.log(mystruct.v.tostring()); // 'false' mystruct.v = 10; // th
rows error mystruct.v = "a"; // th
rows error integer types target type source converted value ctypes.char16_t js string (only if its length == 1) src.charcodeat(0) any integer types js number (only if fits to the size) src js boolean if src == true: 1 if src == false: 0 var mystruct = ctypes.structtype("mystructtype"...
..., [ { "v": ctypes.char16_t } ])(); mystruct.v = 0x41; console.log(mystruct.v.tostring()); // "a" mystruct.v = true; console.log(mystruct.v.tostring()); // "\x01" mystruct.v = "x"; console.log(mystruct.v.tostring()); // "x" mystruct.v = "xx"; // th
rows error var mystruct = ctypes.structtype("mystructtype", [ { "v": ctypes.int16_t } ])(); mystruct.v = 0x41; console.log(mystruct.v.tostring()); // 65 mystruct.v = true; console.log(mystruct.v.tostring()); // 1 mystruct.v = "x"; // th
rows error integer/float types are implicitly convertible if any data of source type could be representable in the target type.
... ctypes.signed_char ctypes.int8_t ctypes.unsigned_char ctypes.uint8_t ctypes.char16_t ctypes.uint8_t ctypes.uint16_t ctypes.unsigned_short var mystruct = ctypes.structtype("mystructtype", [ { "v": ctypes.int16_t } ])(); mystruct.v = ctypes.int8_t(10); console.log(mystruct.v.tostring()); // 10 mystruct.v = ctypes.int32_t(10); // th
rows error float types target type source converted value any float types js number (only if fits to the size) src pointer types target type source converted value any pointer types null nullptr ctypes.voidptr_t any pointer types src any array types src.addressofelement(0) ctypes.pointertype(...
...And 4 more matches
DevTools API - Firefox Developer Tools
a toolbox can be hosted within a b
rowser tab (at the bottom or on the side), or in its own window (we say that the toolbox is undocked).
... toolbox.hosttype.bottom host type for the default toolbox host at the bottom of the b
rowser window.
... toolbox.hosttype.side host type for the host at the side of the b
rowser window.
...And 4 more matches
Call Tree - Firefox Developer Tools
the call tree tells you which javascript functions the b
rowser spent the most time in.
... by analyzing its results, you can find bottlenecks in your code - places where the b
rowser is spending a disproportionately large amount of time.
...statistically, the number of samples taken in which we were executing a particular function corresponds to the amount of time the b
rowser spent executing it.
...And 4 more matches
Using the CSS properties and values API - Web APIs
registering a custom property registering a custom property allows you to tell the b
rowser how the custom property should behave; what are allowed types, whether the custom property inherits its value, and what the default value of the custom property is.
...the following will register a css custom properties, --my-prop, using @property, as a color, give it a default value, and have it not inherit its value: @property --my-prop { syntax: '<color>'; inherits: false; initial-value: #c0ffee; } using registered custom properties one of the advantages of registering a property is that the b
rowser now knows how it should handle your custom property through things like transitions!
... when a property isn't registered, the b
rowser doesn't know how to treat it, so it assumes that any value can be used and therefore can't animate it.
...And 4 more matches
DirectoryReaderSync - Web APIs
// taking care of the b
rowser-specific prefixes.
... // taking care of the b
rowser-specific prefixes.
... security_err the b
rowser determined that it was not safe to look up the metadata.
...And 4 more matches
Document.requestStorageAccess() - Web APIs
if the b
rowser is not processing a user gesture, reject.
... check any additional rules that the b
rowser has.
...after the requesting origin has exceeded the maximum allowable number of storage access grants, any future call to requeststorageaccess() during the same b
rowsing session will prompt the user.
...And 4 more matches
Document - Web APIs
the document interface represents any web page loaded in the b
rowser and serves as an entry point into the web page's content, which is the dom tree.
...note that this is currently only implemented by chrome; other b
rowsers still implement them directly on the document interface.
... extension for html documents the document interface for html documents inherit from the htmldocument interface or, since html5, is extended for such documents: document.clear() in majority of modern b
rowsers, including recent versions of firefox and internet explorer, this method does nothing.
...And 4 more matches
How whitespace is handled by HTML, CSS, and in the DOM - Web APIs
</h1> this source code contains a couple of line feeds after the doctype and a bunch of space characters before, after, and inside the <h1> element, but the b
rowser doesn’t seem to care at all and just shows the words "hello world!" as if these characters didn’t exist at all: this is so that whitespace characters don't impact the layout of your page.
...in the earlier example one of the spaces between "hello" and "world!" still exists when the page is rendered in a b
rowser.
... there are rules in the b
rowser engine that decide which whitespace characters are useful and which aren’t — these are specified at least in part in css text module level 3, and especially the parts about the css white-space property and whitespace processing details, but we also offer an easier explanation below.
...And 4 more matches
FileSystemEntry - Web APIs
because this is a non-standard api, whose specification is not currently on a standards track, it's important to keep in mind that not all b
rowsers implement it, and those that do may implement only small portions of it.
... check the b
rowser compatibility section for details.
... // taking care of the b
rowser-specific prefixes.
...And 4 more matches
HTMLMediaElement - Web APIs
keep in mind that b
rowsers may ignore autoplay requests, so you should ensure that your code isn't dependent on autoplay working.
... htmlmediaelement.buffered read only returns a timeranges object that indicates the ranges of the media source that the b
rowser has buffered (if any) at the moment the buffered property is accessed.
... htmlmediaelement.played read only returns a timeranges object that contains the ranges of the media source that the b
rowser has played, if any.
...And 4 more matches
HTMLTextAreaElement - Web APIs
rows unsigned long: returns / sets the element's
rows attribute, indicating the number of visible text lines for the control.
...etc. ]</p> <p><textarea name="mytxtarea"
rows="10" cols="50">lorem ipsum dolor sit amet, consectetur adipiscing elit.
... function check
rows(ofield, okeyevent) { var nkey = (okeyevent || /* old ie */ window.event || /* check is not supported!
...And 4 more matches
Intersection Observer API - Web APIs
historically, detecting visibility of an element, or the relative visibility of two elements in relation to each other, has been a difficult task for which solutions have been unreliable and prone to causing the b
rowser and the sites the user is accessing to become sluggish.
...as the user scrolls the page, these intersection detection routines are firing constantly during the scroll handling code, resulting in an experience that leaves the user frustrated with the b
rowser, the web site, and their computer.
...this way, sites no longer need to do anything on the main thread to watch for this kind of element intersection, and the b
rowser is free to optimize the management of intersections as it sees fit.
...And 4 more matches
NavigatorID - Web APIs
the navigatorid interface contains methods and properties related to the identity of the b
rowser.
... navigatorid.appcodename read only always returns "mozilla", in any b
rowser.
... navigatorid.appname read only always returns "netscape", in any b
rowser.
...And 4 more matches
Performance - Web APIs
performance.clearmarks() removes the given mark from the b
rowser's performance entry buffer.
... performance.clearmeasures() removes the given measure from the b
rowser's performance entry buffer.
... performance.clearresourcetimings() removes all performance entries with a entrytype of "resource" from the b
rowser's performance data buffer.
...And 4 more matches
RTCDataChannel - Web APIs
every data channel is associated with an rtcpeerconnection, and each peer connection can have up to a theoretical maximum of 65,534 data channels (the actual limit may vary from b
rowser to b
rowser).
...these labels are not required to be unique.maxpacketlifetime read only the read-only rtcdatachannel property maxpacketlifetime returns the amount of time, in milliseconds, the b
rowser is allowed to take to attempt to transmit a message, as set when the data channel was created, or null.maxretransmits read only the read-only rtcdatachannel property maxretransmits returns the maximum number of times the b
rowser should try to retransmit a message before giving up, as set when the data channel was created, or null, which indicates that there is no maximum.negotiated read only ...
...liable.stream read only the deprecated (and never part of the official specification) read-only rtcdatachannel property stream returns an id number (between 0 and 65,535) which uniquely identifies the rtcdatachannel.event handlersalso inherits event handlers from: eventtargetonbufferedamountlow the rtcdatachannel.onbufferedamountlow property is an eventhandler which specifies a function the b
rowser calls when the bufferedamountlow event is sent to the rtcdatachannel.
...And 4 more matches
Using the User Timing API - Web APIs
the user timing interface allows the developer to create application specific timestamps that are part of the b
rowser's performance timeline.
... this document shows how to create mark and measure performance entry types and how to use user timing methods (which are extensions of the performance interface) to retrieve and remove entries from the b
rowser's performance timeline.
...the mark is a timestamp in the b
rowser's performance timeline.
...And 4 more matches
WebRTC API - Web APIs
webrtc (web real-time communication) is a technology which enables web applications and sites to capture and optionally stream audio and/or video media, as well as to exchange arbitrary data between b
rowsers without requiring an intermediary.
... interoperability because implementations of webrtc are still evolving, and because each b
rowser has different levels of support for codecs and webrtc features, you should strongly consider making use of the adapter.js library provided by google before you begin to write your code.
... lifetime of a webrtc session webrtc lets you build peer-to-peer communication of arbitrary data, audio, or video—or any combination thereof—into a b
rowser application.
...And 4 more matches
Rendering and the WebXR frame animation callback - Web APIs
once that's in hand, you request that the b
rowser call your rendering function the next time it needs a framebuffer to render your scene.
... refresh rate and frame rate assuming you've called the xrsession method requestanimationframe() since the last time the screen refreshed, the b
rowser will call your frame renderer callback every time it's ready to repaint your app or site window.
... hardare vertical refresh rate when the b
rowser is ready to refresh the <canvas> within which your webxr content is displayed, it calls your frame rendering callback, which uses the specified timestamp and any other relevant data, such as models and textures, as well as application state, to render the scene—as it should appear at the specified time—into the webgl backbuffer.
...And 4 more matches
Using the Web Animations API - Web APIs
meet the web animations api the web animations api opens the b
rowser’s animation engine to developers and manipulation by javascript.
...it is one of the most performant ways to animate on the web, letting the b
rowser make its own internal optimizations without hacks, coercion, or window.requestanimationframe().
... b
rowser support the basic web animations api features discussed in this article are available by default in firefox 48+ and chrome 36+.
...And 4 more matches
Web Audio API best practices - Web APIs
the audio will start playing when the b
rowser determines it can load the rest of the file before playing finishes.
... cross b
rowser & legacy support the web audio api specification is constantly evolving and like most things on the web, there are some issues with it working consistently across b
rowsers.
... here we'll look at options for getting around cross-b
rowser problems.
...And 4 more matches
Window: beforeunload event - Web APIs
if the user confirms, the b
rowser navigates to the new page, otherwise it cancels the navigation.
... however note that not all b
rowsers support this method, and some instead require the event handler to implement one of two legacy methods: assigning a string to the event's returnvalue property returning a string from the event handler.
... some b
rowsers used to display the returned string in the confirmation dialog, enabling the event handler to display a custom message to the user.
...And 4 more matches
Window: popstate event - Web APIs
the popstate event will be triggered by doing a b
rowser action such as a click on the back or forward button (or calling history.back() or history.forward() in javascript).
... b
rowsers tend to handle the popstate event differently on page load.
...if the goal is to catch the moment when the new document state is already fully in place, a zero-delay settimeout() method call should be used to effectively put its inner callback function that does the processing at the end of the b
rowser event loop: window.onpopstate = () => settimeout(dosomething, 0); when popstate is sent when the transition occurs, either due to the user triggering the b
rowser's "back" button or otherwise, the popstate event is near the end of the process to transition to the new location.
...And 4 more matches
Window.requestFileSystem() - Web 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 b
rowser makers have decided that they will not implement it.
... syntax this method is prefixed with webkit in all b
rowsers that implement it (that is, google chrome).
...specify window.temporary if it's acceptable for the b
rowser to delete the files at its own discretion, such as if storage space runs low, or window.persistent if you need the files to remain in place unless the user or the web site or app explicitly permit it.
...And 4 more matches
ARIA: gridcell role - Accessibility
instead use the native html td element in conjunction with the and contenteditable attribute: <td>potato</td> <td>cabbage</td> <td>onion</td> description gridcells with dynamically added, hidden, or removed
rows and columns any element with a role="gridcell" applied to it should use aria to describe its order in the table-style grouping, provided the table, grid, or treegrid has the ability to have
rows and/or columns dynamically added, hidden, or removed.
... use aria-colindex to describe a gridcell's order in the list of columns, and aria-rowindex to describe a gridcell's order in the list of
rows.
... use aria-colcount and aria-rowcount on the parent element with role="grid" applied to it to set the total number of columns or
rows.
...And 4 more matches
ARIA - Accessibility
however, if you choose to use aria, you are responsible for mimicking (the equivalent) b
rowser behaviour in script.
...in this example, the role="progressbar" attribute informs the b
rowser that this element is actually a javascript-powered progress bar widget.
...support is based on the operating system and b
rowser being used, as well as the kind of assistive technology interfacing with it.
...And 4 more matches
Layout using named grid lines - CSS: Cascading Style Sheets
naming lines when defining a grid you can assign some or all of the lines in your grid a name when you define your grid with the grid-template-
rows and grid-template-columns properties.
...i have defined a name for the start and end of the container, both for
rows and columns.
... then defined the centre block of the grid as content-start and content-end again, both for columns and
rows although you do not need to name all of the lines on your grid.
...And 4 more matches
Using CSS custom properties (variables) - CSS: Cascading Style Sheets
fallback values aren't used to fix the b
rowser compatibility.
... if the b
rowser doesn't support css custom properties, the fallback value won't help.
... it's just a backup for the b
rowser which supports css custom properties to choose a different value if the given variable isn't defined or has an invalid value.
...And 4 more matches
WebKit CSS extensions - CSS: Cascading Style Sheets
old prefixed syntax is still supported in some b
rowsers.
...n-span -webkit-column-width -webkit-columns f -webkit-filter -webkit-flex -webkit-flex-basis -webkit-flex-direction -webkit-flex-flow -webkit-flex-grow -webkit-flex-shrink -webkit-flex-wrap -webkit-font-feature-settings -webkit-font-kerning -webkit-font-variant-ligatures g-j -webkit-grid -webkit-grid-area -webkit-grid-auto-columns -webkit-grid-auto-flow -webkit-grid-auto-
rows -webkit-grid-column -webkit-grid-column-end -webkit-grid-column-gap -webkit-grid-column-start -webkit-grid-gap -webkit-grid-row -webkit-grid-row-end -webkit-grid-row-gap -webkit-grid-row-start -webkit-grid-template -webkit-grid-template-areas -webkit-grid-template-columns -webkit-grid-template-
rows h-l -webkit-hyphens -webkit-justify-content -webkit-justify-items -webkit-just...
...t-justify -webkit-text-orientation -webkit-text-size-adjust -webkit-text-underline-position -webkit-transform -webkit-transform-origin -webkit-transform-style -webkit-transition -webkit-transition-delay -webkit-transition-duration -webkit-transition-property -webkit-transition-timing-function u-w -webkit-user-select -epub-word-break -epub-writing-mode supported in non-webkit b
rowsers without a prefix, but not standard the following properties are supported in at least one b
rowser without a prefix, but are not on the standards track.
...And 4 more matches
color-adjust - CSS: Cascading Style Sheets
by default, the b
rowser is allowed to make any adjustments to the element's appearance it determines to be necessary and prudent given the type and capabilities of the output device.
...for example, when printing, a b
rowser might opt to leave out all background images and to adjust text colors to be sure the contrast is optimized for reading on white paper.
... exact the element's content has been specifically and carefully crafted to use colors, images, and styles in a thoughtful and/or important way, such that being altered by the b
rowser might actually make things worse rather than better.
...And 4 more matches
display - CSS: Cascading Style Sheets
note: b
rowsers that support the two value syntax, on finding the outer value only, such as when display: block or display: inline is specified, will set the inner value to flow.
... note: b
rowsers that support the two value syntax, on finding the inner value only, such as when display: flex or display: grid is specified, will set their outer value to block.
... note: in b
rowsers that support the two-value syntax, if no inner value is specified it will default to flow.
...And 4 more matches
position - CSS: Cascading Style Sheets
(note that there are b
rowser inconsistencies with perspective and filter contributing to containing block formation.) its final position is determined by the values of top, right, bottom, and left.
...as a user scrolls, the b
rowser must repaint the sticky or fixed content in a new location.
... depending on the content needing to be repainted, the b
rowser performance, and the device's processing speed, the b
rowser may not be able to manage repaints at 60 fps, causing accessibility concerns for people with sensitivities and jank for everyone.
...And 4 more matches
text-size-adjust - CSS: Cascading Style Sheets
other b
rowsers will ignore this property.
... /* keyword values */ text-size-adjust: none; text-size-adjust: auto; /* <percentage> value */ text-size-adjust: 80%; /* global values */ text-size-adjust: inherit; text-size-adjust: initial; text-size-adjust: unset; because many websites have not been developed with small devices in mind, mobile b
rowsers differ from desktop b
rowsers in the way they render web pages.
... since text that has been scaled down to fit a mobile screen may be very small, many mobile b
rowsers apply a text inflation algorithm to enlarge the text to make it more readable.
...And 4 more matches
HTML5 Parser - Developer guides
the html parser is one of the most complicated and sensitive pieces of a b
rowser.
... parsing is now done in a separate thread from firefox’s main ui thread, improving overall b
rowser responsiveness.
...this will result in more consistent behavior across b
rowser implementations.
...And 4 more matches
Developer guides
most of what you see on screen in your b
rowser is described, fundamentally, using html.
...this article is intended as a starting point for exploring the various delivery mechanisms of web-based media and compatibility with popular b
rowsers.
...having native audio and video in the b
rowser means we can use these data streams with technologies such as <canvas>, webgl or web audio api to modify audio and video directly, for example adding reverb/compression effects to audio, or grayscale/sepia filters to video.
...And 4 more matches
HTML attribute: multiple - HTML: Hypertext Markup Language
for the file input type, the native messaging the b
rowser provides differs.
...most b
rowsers displaying a scrolling list box for a <select> control with the multiple attribute set versus a single line dropdown when the attribute is ommitted.
... <select multiple name="drawfs" id="drawfs"> <option>grumpy</option> <option>happy</option> <option>sleepy</option> <option>bashful</option> <option>sneezy</option> <option>dopey</option> <option>doc</option> </select> when multiple is specified, most b
rowsers will show a scrolling list box instead of a single line dropdown.
...And 4 more matches
<acronym> - HTML: Hypertext Markup Language
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 b
rowser to another: some b
rowsers, like internet explorer, do not style it differently than a <span> element.
... a few b
rowsers 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-b
rowser variation.
...And 4 more matches
<content>: The Shadow DOM Content Placeholder element (obsolete) - HTML: Hypertext Markup Language
note: though present in early draft of the specifications and implemented in several b
rowsers, this element has been removed in later versions of the spec, and should not be used.
... note: for this code to work, the b
rowser you display it in must support web components.
... shadowroot.innerhtml = '<h2>inserted heading</h2> <content select="p"></content>'; </script> </body> </html> if you display this in a web b
rowser it should look like the following.
...And 4 more matches
<input type="text"> - HTML: Hypertext Markup Language
tip: use the title attribute to specify text that most b
rowsers will display as a tooltip to explain what the requirements are to match the pattern.
... non-standard attributes the following non-standard attributes are also available on some b
rowsers.
...the b
rowser decides, using this hint, what label to put on the enter key.
...And 4 more matches
List of default Accept values - HTTP
this article documents the default values for the http accept header for specific inputs and b
rowser versions.
...note that all b
rowsers add the */* mime type to cover all cases.
... this is typically used for requests initiated via the address bar of a b
rowser, or via an html <a> element.
...And 4 more matches
Feature-Policy: accelerometer - HTTP
syntax feature-policy: accelerometer <allowlist>; <allowlist> an allowlist is a list of origins that takes one or more of the following values, separated by spaces: *: the feature will be allowed in this document, and all nested b
rowsing contexts (iframes) regardless of their origin.
... 'self': the feature will be allowed in this document, and in all nested b
rowsing contexts (iframes) in the same origin.
... 'none': the feature is disabled in top-level and nested b
rowsing contexts.
...And 4 more matches
Feature-Policy: ambient-light-sensor - HTTP
syntax feature-policy: ambient-light-sensor <allowlist>; <allowlist> an allowlist is a list of origins that takes one or more of the following values, separated by spaces: *: the feature will be allowed in this document, and all nested b
rowsing contexts (iframes) regardless of their origin.
... 'self': the feature will be allowed in this document, and in all nested b
rowsing contexts (iframes) in the same origin.
... 'none': the feature is disabled in top-level and nested b
rowsing contexts.
...And 4 more matches
Feature-Policy: autoplay - HTTP
syntax feature-policy: autoplay <allowlist>; <allowlist> an allowlist is a list of origins that takes one or more of the following values, separated by spaces: *: the feature will be allowed in this document, and all nested b
rowsing contexts (iframes) regardless of their origin.
... 'self': the feature will be allowed in this document, and in all nested b
rowsing contexts (iframes) in the same origin.
... 'none': the feature is disabled in top-level and nested b
rowsing contexts.
...And 4 more matches
Feature-Policy: battery - HTTP
syntax feature-policy: battery <allowlist>; <allowlist> an allowlist is a list of origins that takes one or more of the following values, separated by spaces: *: the feature will be allowed in this document, and all nested b
rowsing contexts (iframes) regardless of their origin.
... 'self': the feature will be allowed in this document, and in all nested b
rowsing contexts (iframes) in the same origin.
... 'none': the feature is disabled in top-level and nested b
rowsing contexts.
...And 4 more matches
Feature-Policy: camera - HTTP
syntax feature-policy: camera <allowlist>; <allowlist> an allowlist is a list of origins that takes one or more of the following values, separated by spaces: *: the feature will be allowed in this document, and all nested b
rowsing contexts (iframes) regardless of their origin.
... 'self': the feature will be allowed in this document, and in all nested b
rowsing contexts (iframes) in the same origin.
... 'none': the feature is disabled in top-level and nested b
rowsing contexts.
...And 4 more matches
Feature-Policy: display-capture - HTTP
syntax feature-policy: display-capture <allowlist>; <allowlist> an allowlist is a list of origins that takes one or more of the following values, separated by spaces: *: the feature will be allowed in this document, and all nested b
rowsing contexts (iframes) regardless of their origin.
... 'self': the feature will be allowed in this document, and in all nested b
rowsing contexts (iframes) in the same origin.
... 'none': the feature is disabled in top-level and nested b
rowsing contexts.
...And 4 more matches
Feature-Policy: document-domain - HTTP
syntax feature-policy: document-domain <allowlist>; <allowlist> an allowlist is a list of origins that takes one or more of the following values, separated by spaces: *: the feature will be allowed in this document, and all nested b
rowsing contexts (iframes) regardless of their origin.
... 'self': the feature will be allowed in this document, and in all nested b
rowsing contexts (iframes) in the same origin.
... 'none': the feature is disabled in top-level and nested b
rowsing contexts.
...And 4 more matches
Feature-Policy: encrypted-media - HTTP
syntax feature-policy: encrypted-media <allowlist>; <allowlist> an allowlist is a list of origins that takes one or more of the following values, separated by spaces: *: the feature will be allowed in this document, and all nested b
rowsing contexts (iframes) regardless of their origin.
... 'self': the feature will be allowed in this document, and in all nested b
rowsing contexts (iframes) in the same origin.
... 'none': the feature is disabled in top-level and nested b
rowsing contexts.
...And 4 more matches
Feature-Policy: gyroscope - HTTP
syntax feature-policy: gyroscope <allowlist>; <allowlist> an allowlist is a list of origins that takes one or more of the following values, separated by spaces: *: the feature will be allowed in this document, and all nested b
rowsing contexts (iframes) regardless of their origin.
... 'self': the feature will be allowed in this document, and in all nested b
rowsing contexts (iframes) in the same origin.
... 'none': the feature is disabled in top-level and nested b
rowsing contexts.
...And 4 more matches
Feature-Policy: layout-animations - HTTP
syntax feature-policy: layout-animations <allowlist>; <allowlist> an allowlist is a list of origins that takes one or more of the following values, separated by spaces: *: the feature will be allowed in this document, and all nested b
rowsing contexts (iframes) regardless of their origin.
... 'self': the feature will be allowed in this document, and in all nested b
rowsing contexts (iframes) in the same origin.
... 'none': the feature is disabled in top-level and nested b
rowsing contexts.
...And 4 more matches
Feature-Policy: legacy-image-formats - HTTP
syntax feature-policy: legacy-image-formats <allowlist>; <allowlist> an allowlist is a list of origins that takes one or more of the following values, separated by spaces: *: the feature will be allowed in this document, and all nested b
rowsing contexts (iframes) regardless of their origin.
... 'self': the feature will be allowed in this document, and in all nested b
rowsing contexts (iframes) in the same origin.
... 'none': the feature is disabled in top-level and nested b
rowsing contexts.
...And 4 more matches
Feature-Policy: magnetometer - HTTP
syntax feature-policy: magnetometer <allowlist>; <allowlist> an allowlist is a list of origins that takes one or more of the following values, separated by spaces: *: the feature will be allowed in this document, and all nested b
rowsing contexts (iframes) regardless of their origin.
... 'self': the feature will be allowed in this document, and in all nested b
rowsing contexts (iframes) in the same origin.
... 'none': the feature is disabled in top-level and nested b
rowsing contexts.
...And 4 more matches
Feature-Policy: microphone - HTTP
syntax feature-policy: microphone <allowlist>; <allowlist> an allowlist is a list of origins that takes one or more of the following values, separated by spaces: *: the feature will be allowed in this document, and all nested b
rowsing contexts (iframes) regardless of their origin.
... 'self': the feature will be allowed in this document, and in all nested b
rowsing contexts (iframes) in the same origin.
... 'none': the feature is disabled in top-level and nested b
rowsing contexts.
...And 4 more matches
Feature-Policy: midi - HTTP
syntax feature-policy: midi <allowlist>; <allowlist> an allowlist is a list of origins that takes one or more of the following values, separated by spaces: *: the feature will be allowed in this document, and all nested b
rowsing contexts (iframes) regardless of their origin.
... 'self': the feature will be allowed in this document, and in all nested b
rowsing contexts (iframes) in the same origin.
... 'none': the feature is disabled in top-level and nested b
rowsing contexts.
...And 4 more matches
Feature-Policy: oversized-images - HTTP
syntax feature-policy: oversized-images <allowlist>; <allowlist> an allowlist is a list of origins that takes one or more of the following values, separated by spaces: *: the feature will be allowed in this document, and all nested b
rowsing contexts (iframes) regardless of their origin.
... 'self': the feature will be allowed in this document, and in all nested b
rowsing contexts (iframes) in the same origin.
... 'none': the feature is disabled in top-level and nested b
rowsing contexts.
...And 4 more matches
Feature-Policy: payment - HTTP
syntax feature-policy: payment <allowlist>; <allowlist> an allowlist is a list of origins that takes one or more of the following values, separated by spaces: *: the feature will be allowed in this document, and all nested b
rowsing contexts (iframes) regardless of their origin.
... 'self': the feature will be allowed in this document, and in all nested b
rowsing contexts (iframes) in the same origin.
... 'none': the feature is disabled in top-level and nested b
rowsing contexts.
...And 4 more matches
Feature-Policy: picture-in-picture - HTTP
syntax feature-policy: picture-in-picture <allowlist>; <allowlist> an allowlist is a list of origins that takes one or more of the following values, separated by spaces: *: the feature will be allowed in this document, and all nested b
rowsing contexts (iframes) regardless of their origin.
... 'self': the feature will be allowed in this document, and in all nested b
rowsing contexts (iframes) in the same origin.
... 'none': the feature is disabled in top-level and nested b
rowsing contexts.
...And 4 more matches
Feature-Policy: publickey-credentials-get - HTTP
syntax feature-policy: publickey-credentials-get <allowlist>; <allowlist> an allowlist is a list of origins that takes one or more of the following values, separated by spaces: *: the feature will be allowed in this document, and all nested b
rowsing contexts (iframes) regardless of their origin.
... 'self': the feature will be allowed in this document, and in all nested b
rowsing contexts (iframes) in the same origin.
... 'none': the feature is disabled in top-level and nested b
rowsing contexts.
...And 4 more matches
Feature-Policy: sync-xhr - HTTP
syntax feature-policy: sync-xhr <allowlist>; <allowlist> an allowlist is a list of origins that takes one or more of the following values, separated by spaces: *: the feature will be allowed in this document, and all nested b
rowsing contexts (iframes) regardless of their origin.
... 'self': the feature will be allowed in this document, and in all nested b
rowsing contexts (iframes) in the same origin.
... 'none': the feature is disabled in top-level and nested b
rowsing contexts.
...And 4 more matches
Feature-Policy: unoptimized-images - HTTP
syntax feature-policy: unoptimized-images <allowlist>; <allowlist> an allowlist is a list of origins that takes one or more of the following values, separated by spaces: *: the feature will be allowed in this document, and all nested b
rowsing contexts (iframes) regardless of their origin.
... 'self': the feature will be allowed in this document, and in all nested b
rowsing contexts (iframes) in the same origin.
... 'none': the feature is disabled in top-level and nested b
rowsing contexts.
...And 4 more matches
Feature-Policy: unsized-media - HTTP
syntax feature-policy: unsized-media <allowlist>; <allowlist> an allowlist is a list of origins that takes one or more of the following values, separated by spaces: *: the feature will be allowed in this document, and all nested b
rowsing contexts (iframes) regardless of their origin.
... 'self': the feature will be allowed in this document, and in all nested b
rowsing contexts (iframes) in the same origin.
... 'none': the feature is disabled in top-level and nested b
rowsing contexts.
...And 4 more matches
Feature-Policy: usb - HTTP
syntax feature-policy: usb <allowlist>; <allowlist> an allowlist is a list of origins that takes one or more of the following values, separated by spaces: *: the feature will be allowed in this document, and all nested b
rowsing contexts (iframes) regardless of their origin.
... 'self': the feature will be allowed in this document, and in all nested b
rowsing contexts (iframes) in the same origin.
... 'none': the feature is disabled in top-level and nested b
rowsing contexts.
...And 4 more matches
Feature-Policy: vibrate - HTTP
syntax feature-policy: vibrate <allowlist>; <vibrate> an allowlist is a list of origins that takes one or more of the following values, separated by spaces: *: the feature will be allowed in this document, and all nested b
rowsing contexts (iframes) regardless of their origin.
... 'self': the feature will be allowed in this document, and in all nested b
rowsing contexts (iframes) in the same origin.
... 'none': the feature is disabled in top-level and nested b
rowsing contexts.
...And 4 more matches
web-share - HTTP
syntax feature-policy: web-share <allowlist>; <allowlist> an allowlist is a list of origins that takes one or more of the following values, separated by spaces: *: the feature will be allowed in this document, and all nested b
rowsing contexts (iframes) regardless of their origin.
... 'self': the feature will be allowed in this document, and in all nested b
rowsing contexts (iframes) in the same origin.
... 'none': the feature is disabled in top-level and nested b
rowsing contexts.
...And 4 more matches
Feature-Policy: xr-spatial-tracking - HTTP
syntax feature-policy: xr-spatial-tracking <allowlist>; <allowlist> an allowlist is a list of origins that takes one or more of the following values, separated by spaces: *: the feature will be allowed in this document, and all nested b
rowsing contexts (iframes) regardless of their origin.
... 'self': the feature will be allowed in this document, and in all nested b
rowsing contexts (iframes) in the same origin.
... 'none': the feature is disabled in top-level and nested b
rowsing contexts.
...And 4 more matches
Set-Cookie - HTTP
b
rowsers block frontend javascript code from accessing the set cookie header, as required by the fetch spec, which defines set-cookie as a forbidden response-header name that must be filtered out from any response exposed to frontend code.
... warning: many web b
rowsers have a session restore feature that will save all tabs and restore them next time the b
rowser is used.
... session cookies will also be restored, as if the b
rowser was never closed.
...And 4 more matches
X-Frame-Options - HTTP
the x-frame-options http response header can be used to indicate whether or not a b
rowser should be allowed to render a page in a <frame>, <iframe>, <embed> or <object>.
... the added security is provided only if the user accessing the document is using a b
rowser that supports x-frame-options.
... note: the content-security-policy http header has a frame-ancestors directive which obsoletes this header for supporting b
rowsers.
...And 4 more matches
Introduction - JavaScript
inside a host environment (for example, a web b
rowser), javascript can be connected to the objects of its environment to provide programmatic control over them.
...core javascript can be extended for a variety of purposes by supplementing it with additional objects; for example: client-side javascript extends the core language by supplying objects to control a b
rowser and its document object model (dom).
... this means that in the b
rowser, javascript can change the way the webpage (dom) looks.
...And 4 more matches
Progressive web app structure - Progressive web apps (PWAs)
it works great across b
rowsers, but it suffers in terms of time navigating between pages and therefore general perceived performance — loading a page requires a new round trip to the server.
... client-side rendering (csr) allows the website to be updated in the b
rowser almost instantly when navigating to different pages, but requires more of an initial download hit and extra rendering on the client at the beginning.
...in addition to the basic shell, you can add other features such as add to home screen or push notifications, safe in the knowledge that the app will still work ok if they are not supported by the user's b
rowser — this is the beauty of progressive enhancement.
...And 4 more matches
Structural overview of progressive web apps - Progressive web apps (PWAs)
it works great across b
rowsers, but it suffers in terms of time navigating between pages and therefore general perceived performance — loading a page requires a new round trip to the server.
... client-side rendering (csr) allows the website to be updated in the b
rowser almost instantly when navigating to different pages, but requires more of an initial download hit and extra rendering on the client at the beginning.
...in addition to the basic shell, you can add other features such as add to home screen or push notifications, safe in the knowledge that the app will still work ok if they are not supported by the user's b
rowser — this is the beauty of progressive enhancement.
...And 4 more matches
target - SVG: Scalable Vector Graphics
the target attribute should be used when there are multiple possible targets for the ending resource, such as when the parent document is embedded within an html or xhtml document, or is viewed with a tabbed b
rowser.
... this attribute specifies the name of the b
rowsing context (e.g., a b
rowser tab or an (x)html iframe or object element) into which a document is to be opened when the link is activated: only one element is using this attribute: <a> html, body, svg { height: 100%; } text { font: 20px arial, helvetica, sans-serif; fill: blue; text-decoration: underline; } <svg viewbox="0 0 300 120" xmlns="http://www.w3.org/2000/svg"> <a href="https://developer.mozilla.org" target="_self"> <text x="0" y="20">open link within iframe</text> </a> <a href="https://developer.mozilla.org" target="_blank"> <text x="0" y="60">open link in new tab or window</text> </a> <a href="https://developer.mozilla.org" target="_top"> <text x="0" y="100">open link in this tab or window</text> </...
... note: this value was never well implemented, and the distinction between _replace and _self has been made redundant by changes in the html definition of b
rowsing contexts.
...And 4 more matches
Tools for SVG - SVG: Scalable Vector Graphics
b
rowser support as of internet explorer 9, all major b
rowsers support svg: ie 9, mozilla firefox, safari, google chrome and opera.
... mobile devices with webkit-based b
rowsers also support svg.
...usage of headless b
rowsers such as slimerjs and phantomjs are also popular for this purpose, as the image produced is closer to what the svg will look like in the b
rowser.
...And 4 more matches
Web security
redirection with 301 and 302 response codes to be written data security using http cookies an http cookie (web cookie, b
rowser cookie) is a small piece of data that a server sends to the user's web b
rowser.
... the b
rowser may store it and send it back with later requests to the same server.
... typically, it's used to tell if two requests came from the same b
rowser — keeping a user logged-in, for example.
...And 4 more matches
WebAssembly Concepts - WebAssembly
this article explains the concepts behind how webassembly works including its goals, the problems it solves, and how it runs inside the web b
rowser's rendering engine.
... webassembly is a new type of code that can be run in modern web b
rowsers and provides new features and major gains in performance.
...like other web code, it will enforce the b
rowser's same-origin and permissions policies.
...And 4 more matches
Code snippets - Archive of obsolete content
miscellaneous miscellaneous useful code fragments html to dom using a hidden b
rowser element to parse html to a window's dom javascript libraries here are some javascript libraries that may come in handy.
...hence, if you are going to use another scripting language you might expect that most of the b
rowsers will not recognize it.
... nevertheless, the increasing computational power of modern b
rowsers together with the introduction of typed arrays in ecmascript allow us, in theory, to build full virtual machines in pure ecmascript.
...And 3 more matches
Appendix C: Avoiding using eval in Add-ons - Archive of obsolete content
overriding/extending/amending existing functions a common thing add-ons do during their initialization is overriding/extending existing b
rowser functions by using function.tostring/function.tosource and eval to "string-patch" the function body.
...var functionbody = gb
rowser.addtab.tosource(); var afterbracket = functionbody.indexof("{") + 1; functionbody = functionbody.substring(0, afterbracket) + "myaddon.onaddtab(auri);" + functionbody.substring(afterbracket); eval("gb
rowser.addtab = " + functionbody); of course, this not only looks messy, but can be quite error prone.
...in real life such code is often far more complex) the code might break in the future, as certain assumptions might not longer be true, for example the function signature may change (auri from above becomes aurl) or the function is replaced by a short-hand/arrow function: function addtab(auri) tabb
rowser.addtab(auri); var addtab = (auri) => tabb
rowser.addtab(auri); same as with "passing functions/code as strings" above, patching a function to with fragments of externally retrieved data will create security vulnerabilities.
...And 3 more matches
User Notifications and Alerts - Archive of obsolete content
notification boxes are very easy to create, and are very customizable: let nb = gb
rowser.getnotificationbox(); let acceptbutton = new object(); let declinebutton = new object(); let message = this._bundle.getstring("xulschoolhello.friendmessage.label"); let that = this; acceptbutton.label = this._bundle.getstring("xulschoolhello.acceptbutton.label"); acceptbutton.accesskey = this._bundle.getstring("xulschoolhello.acceptbutton.accesskey"); acceptbutton.popup = null; acceptbut...
...nb.appendnotification( message, "xulschoolhello-friend-notification", "chrome://xulschoolhello/skin/friend-notification.png", nb.priority_info_high, [ acceptbutton, declinebutton ]); all b
rowser tabs have a notification box by default, so you don't need to do any overlaying.
... the notificationbox elements can be obtained from the gb
rowser object.
...And 3 more matches
Extensions support in SeaMonkey 2 - Archive of obsolete content
some urls are listed below: url in firefox url in seamonkey overlays chrome://b
rowser/content/b
rowser.xul chrome://navigator/content/navigator.xul main b
rowser window chrome://b
rowser/content/pageinfo/pageinfo.xul chrome://navigator/content/pageinfo/pageinfo.xul page info window chrome://b
rowser/content/preferences/permissions.xul chrome://communicator/content/permis...onsmanager.xul permissions manager dialog ...
... urls added in 2.1 url in firefox url in seamonkey chrome://b
rowser/content/bookmarks/bookmarkspanel.xul chrome://communicator/content/bookmarks/bm-panel.xul chrome://b
rowser/content/places/places.xul chrome://communicator/content/bookma...rksmanager.xul thunderbird uses mostly the same chrome urls for overlaying as seamonkey.
... the statusbar in firefox 3 a new vbox has been added, called "b
rowser-bottombox", which encloses the find bar and status bar at the bottom of the b
rowser window.
...And 3 more matches
Creating a status bar extension - Archive of obsolete content
next » this is the first in a series of articles that will demonstrate how to create increasingly intricate extensions for the firefox b
rowser.
...this sample will add a static text string to the status bar at the bottom of firefox b
rowser windows.
... content status-bar-sample-1 chrome/content/ # firefox overlay chrome://b
rowser/content/b
rowser.xul chrome://status-bar-sample-1/content/status-bar-sample-1.xul the first line registers the location on disk of the contents of the extension whose id is "status-bar-sample-1".
...And 3 more matches
List of Former Mozilla-Based Applications - Archive of obsolete content
applications that switched to another technology name description additional information angelsoft tools for startups, vcs, and angel investors switched from xulrunner-based client to a web application autodesk maya 3d modeling tool switched off of gecko for help b
rowser in version 8.5 blam feed reader switched to webkit in version 1.8.6 boxee media center software switched to webkit in version 1.0 epiphany b
rowser switched from gecko to webkit flock social b
rowsing 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 b
rowser b
rowser 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 b
rowser b
rowser when moblin became meego it switched from a custom gecko-based b
rowser 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 b
rowser to a plugin architecture with a qtwebkit plugin applications that are no longer being developed name description additional information aphrodite b
rowser inactive aol client for mac internet software no longer available beonex communicator internet software last news item on site from 2004 chameleon theme builder inactive civil netizen p2p file delivery (email attachment replacement) site not updated since 2006 compuserve client internet software no longer available doczil...
...And 3 more matches
Creating a Firefox sidebar extension - Archive of obsolete content
see the references section for information on creating extension in earlier b
rowsers.
...chrome/content/emptysidebar.xul <?xml version="1.0"?> <?xml-stylesheet href="chrome://global/skin/" type="text/css" ?> <?xml-stylesheet href="chrome://b
rowser/skin/b
rowser.css" type="text/css" ?> <!doctype page system "chrome://emptysidebar/locale/emptysidebar.dtd"> <page id="sbemptysidebar" title="&emptysidebar.title;" xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" > <vbox flex="1"> <label id="atest" value="&emptysidebar.title;" /> </vbox> </page> new extensions can be registered in the menus or popups, fi...
...the manifest also tells firefox that the extension has an overlay that needs to be merged into the b
rowser.
...And 3 more matches
A XUL Bestiary - Archive of obsolete content
chrome some of the most powerful and frequently misunderstood features of xul and the mozilla b
rowser have to do with chrome.
...this special option allows you to create and access chromes independent of the mozilla b
rowser and begins to suggest some possibilities for xul-as-platform beyond the simple restyling of the b
rowser.
...though this is not yet in the b
rowser, very soon it will be possible to change the look of a whole application dynamically, but only to the extent that the skin is actually defined in the main global.css, or global skin.
...And 3 more matches
Building accessible custom components in XUL - Archive of obsolete content
firefox 1.5 is the first b
rowser to support dhtml accessibility; it maps the declarations within the html page to the underlying accessibility architecture so that assistive technologies can "read" a web page and know how to present these complex controls to the end user.
...a super-simple spreadsheet download stage-1.zip install stage-1.xpi to build our xul spreadsheet, we'll use three built-in xul controls: a single grid element to contain the other elements and position them in
rows and columns.
...<code> <grid class="spreadsheet" id="accjaxspreadsheet" flex="1"> <
rows flex="1"></
rows> <columns flex="1"> <column> <description value="entry #"/> <description value="1"/> <description value="2"/> <description value="3"/> <description value="4"/> <description value="5"/> <description value="6"/> <description value="7"/> </column> <column flex="1"> <description value="date"/> <label value="03/1...
...And 3 more matches
RDF Query Syntax - Archive of obsolete content
the content tag doesn't do anything else at this point, meaning it doesn't add anything else to the network of potential results, so processing continues on to the next statement, the triple, which looks like this: <triple subject="?start" predicate="http://www.xulplanet.com/rdf/relateditem" object="?relateditem"/> the triple statement is used to follow arcs or ar
rows in the rdf graph.
... the predicate attribute specifies the labels of the ar
rows to follow.
... in the triple used here, the predicate is 'http://www.xulplanet.com/rdf/relateditem', so we know that the builder will look for ar
rows with that label.
...And 3 more matches
Template and Tree Listeners - Archive of obsolete content
the tree builder will handle the adding or removing of
rows, but will call the observer so that it can perform some task.
...after the observers have finished, the tree builder opens the row and adds any child
rows inside.
...in other situations, you may wish to allow items to be dragged between (before or after)
rows.
...And 3 more matches
The Chrome URL - Archive of obsolete content
the following url will refer to the bookmarks window, listed for firefox: chrome://b
rowser/content/bookmarks/bookmarksmanager.xul you can enter chrome urls anywhere normal urls can be used.
... you can even enter them directly into the url bar in a firefox b
rowser window.
... if you enter the url mentioned above into the b
rowser's address bar, you should see that window appear like a web page might do and for the most part will function as if it was a separate window.
...And 3 more matches
prefwindow - Archive of obsolete content
important note for xulrunner-based applications: the preferences system - part of the toolkit - still relies on two b
rowser.* preferences.
... the first one is b
rowser.preferences.instantapply, a boolean preference.
... the second preference is b
rowser.preferences.animatefadein, again a boolean preference.
...And 3 more matches
External resources for plugin creation - Archive of obsolete content
framework: firebreath project home page project history description (from the project creators): firebreath is a cross-platform b
rowser plugin framework written in c++.
... plugins created with firebreath work on all major b
rowsers, including firefox 3.0 and later.
...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 b
rowsers such as google chrome or firefox), letting you easily expose c++ classes to javascript from a simple idl representation.
...And 3 more matches
NPN_MemAlloc - Archive of obsolete content
« gecko plugin api reference « plug-in side plug-in api summary allocates memory from the b
rowser's memory space.
... syntax #include <npapi.h> void *npn_memalloc (uint32 size); parameters the function has the following parameters: size size of memory, in bytes, to allocate in the b
rowser's memory space.
... description the plug-in calls npn_memalloc to allocate a specified amount of memory in the b
rowser's memory space.
...And 3 more matches
NPN_PluginThreadAsyncCall - Archive of obsolete content
« gecko plugin api reference « b
rowser side plug-in api summary thread safe way to request that the b
rowser calls a plug-in function on the b
rowser or plugin thread (the thread on which the plug-in was initiated).
...the "plug-in thread" is the thread hosting the plug-in, which may be either the b
rowser's main thread or the plug-in process if the plug-in is being executed out-of-process.
...in particular, the user must ensure that the function pointer remains callable and the user data is not deallocated until the b
rowser executes the call.
...And 3 more matches
NPP_WriteReady - Archive of obsolete content
description the b
rowser calls npp_writeready before each call to npp_write to determine whether a plug-in can receive data and how many bytes it can receive.
... this function allows the b
rowser to send only as much data to the instance as it can handle at one time, making resource use more efficient for both the b
rowser and plug-in.
...the b
rowser can write a smaller amount of data if desired or necessary; for example, if only 8k of data is available in a network buffer.
...And 3 more matches
Table Reflow Internals - Archive of obsolete content
style changes through the dom - javascript, b
rowser change font (ctrl+/-), a preference changes, etc.
... table reflow table reflows row groups (continued) the row group figures out the row heights given its style height constraints, its
rows and cells, and the actual heights of its
rows and cells from the pass 2 reflow.
... if the table has a style height, it allocates extra height to its row groups,
rows and cells.
...And 3 more matches
Theme changes in Firefox 3.5 - Archive of obsolete content
core, b
rowser and toolkit changes requiring theme updates there are a number of changes in the b
rowser that may require you to make changes to your theme.
... b
rowser.xul bug 463189 added a new attribute on the xul window element of b
rowser.xul named b
rowsingmode.
... the value of this attribute is normal when the private b
rowsing mode is inactive, and private when it's active.
...And 3 more matches
Theme changes in Firefox 4 - Archive of obsolete content
/chrome/b
rowser/skin contains application-specific skin resource files.
... controlling the actual icon size used by add-on toolbar buttons the iconsize attribute of the b
rowser's toolbar elements now has a different default value on each toolbar independently.
... the iconsize attribute of the toolbox element in the main b
rowser window (#navigator-toolbox) still reflects the user preference in the toolbar customization palette.
...And 3 more matches
background-size - Archive of obsolete content
should not the "b
rowser compatibility" table also list google chrome and konqueror?
...agreed; we should definitely encourage people to look stuff up by engine rather than b
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 b
rowsers are encompassed by each.
...And 3 more matches
Index - Game development
new technologies are constantly arriving to make it possible to develop better and more powerful games that can be run in any standards-compliant web b
rowser.
... 16 building up a basic demo with a-frame 3d, a-frame, vr, virtual reality, web, webgl the webxr and webgl apis already enable us to start creating virtual reality (vr) experiences inside web b
rowsers, but the community is still waiting for tools and libraries to appear, to make this easier.
... 25 async scripts for asm.js games, javascript, asm.js, async every medium or large game should compile asm.js code as part of an async script to give the b
rowser the maximum flexibility to optimize the compilation process.
...And 3 more matches
Vendor Prefix - MDN Web Docs Glossary: Definitions of Web-related terms
b
rowser vendors sometimes add prefixes to experimental or nonstandard css properties and javascript apis, so developers can experiment with new ideas while—in theory—preventing their experiments from being relied upon and then breaking web developers' code during the standardization process.
... developers should wait to include the unprefixed property until b
rowser behavior is standardized.
... b
rowser vendors are working to stop using vendor prefixes for experimental features.
...And 3 more matches
User agent - MDN Web Docs Glossary: Definitions of Web-related terms
a user agent is a computer program representing a person, for example, a b
rowser in a web context.
... besides a b
rowser, a user agent could be a bot scraping webpages, a download manager, or another app accessing the web.
... along with each request they make to the server, b
rowsers include a self-identifying user-agent http header called a user agent (ua) string.
...And 3 more matches
Mobile accessibility - Learn web development
long gone are the days when mobile devices ran completely different web technologies to desktop b
rowsers, forcing developers to use b
rowser sniffing and serve them completely separate sites (although quite a few companies still detect usage of mobile devices and serve them a separate mobile domain).
...modern mobile b
rowsers tend to have good support for wai-aria, too.
... b
rowsing web pages you can use the local context menu while in a web b
rowser to find options to navigate web pages using just the headings, form controls, or links, or navigate line by line, etc.
...And 3 more matches
Cascade and inheritance - Learn web development
specificity specificity is how the b
rowser decides which rule applies if multiple rules have different selectors, but could still apply to the same element.
... note: there is also a newer value, revert, which has limited b
rowser support.
...later ones overrule earlier ones: source order specificity importance we will look at these to see how b
rowsers figure out exactly what css should be applied.
...And 3 more matches
Getting started with CSS - Learn web development
to link styles.css to index.html add the following line somewhere inside the <head> of the html document: <link rel="stylesheet" href="styles.css"> this <link> element tells the b
rowser that we have a stylesheet, using the rel attribute, and the location of that stylesheet as the value of the href attribute.
...using your code editor add the following to your css file: h1 { color: red; } save your html and css files and reload the page in a web b
rowser.
... changing the default behavior of elements when we look at a well-marked up html document, even something as simple as our example, we can see how the b
rowser is making the html readable by adding some default styling.
...And 3 more matches
Styling links - Learn web development
visited: a link when it has already been visited (exists in the b
rowser's history), styled using the :visited pseudo class.
... be able to focus on the links on this page with the keyboard by pressing the tab key (on mac, you'll need to use option + tab, or enable the full keyboard access: all controls option by pressing ctrl + f7.) active links are red (try holding down the mouse button on the link as you click it.) interestingly enough, these default styles are nearly the same as they were back in the early days of b
rowsers in the mid-1990s.
...} a { outline: none; text-decoration: none; padding: 2px 1px 0; } a:link { color: #265301; } a:visited { color: #437a16; } a:focus { border-bottom: 1px solid; background: #bae498; } a:hover { border-bottom: 1px solid; background: #cdfeaa; } a:active { background: #265301; color: #cdfeaa; } we'll also provide some sample html to apply the css to: <p>there are several b
rowsers available, such as <a href="#">mozilla firefox</a>, <a href="#">google chrome</a>, and <a href="#">microsoft edge</a>.</p> putting the two together gives us this result: so what did we do here?
...And 3 more matches
Sending forms through JavaScript - Learn web development
gaining control of the global interface standard html form submission, as described in the previous article, loads the url where the data was sent, which means the b
rowser window navigates with a full page load.
... if you control the front-end (the code that's executed in the b
rowser) and the back-end (the code which is executed on the server), you can send json/xml and process them however you want.
... for( name in data ) { urlencodeddatapairs.push( encodeuricomponent( name ) + '=' + encodeuricomponent( data[name] ) ); } // combine the pairs into a single string and replace all %-encoded spaces to // the '+' character; matches the behaviour of b
rowser form submissions.
...And 3 more matches
Advanced text formatting - Learn web development
this is usually a feeling, thought, or piece of additional background information.</dd> </dl> the b
rowser default styles will display description lists with the descriptions indented somewhat from the terms.
... that the enclosed text is an extended quotation.</p> to turn this into a block quote, we would just do this: <p>here below is a blockquote...</p> <blockquote cite="/docs/web/html/element/blockquote"> <p>the <strong>html <code><blockquote></code> element</strong> (or <em>html block quotation element</em>) indicates that the enclosed text is an extended quotation.</p> </blockquote> b
rowser default styling will render this as an indented paragraph, as an indicator that it is a quote; the paragraph above the quotation is there to demonstrate that.
...for example, the below bit of markup contains a quotation from the mdn <q> page: <p>the quote element — <code><q></code> — is <q cite="/docs/web/html/element/q">intended for short quotations that don't require paragraph breaks.</q></p> b
rowser default styling will render this as normal text put in quotes to indicate a quotation, like so: citations the content of the cite attribute sounds useful, but unfortunately b
rowsers, screenreaders, etc.
...And 3 more matches
Creating hyperlinks - Learn web development
almost any web content can be converted to a link so that when clicked or otherwise activated the web b
rowser goes to another web address (url).
...if the web b
rowser doesn't know how to display or handle the file, it will ask you if you want to open the file (in which case the duty of opening or handling the file is passed to a suitable native app on the device) or download the file (in which case you can try to deal with it later on).
...when you use an absolute url, the b
rowser starts by looking up the real location of the server on the domain name system (dns), see how the web works for more information).
...And 3 more matches
HTML text fundamentals - Learn web development
previous overview: introduction to html next one of html's main jobs is to give text structure and meaning (also known as semantics) so that a b
rowser can display it correctly.
... however, when you open the document in your b
rowser, you'll see that the text appears as a big chunk!
... this is because there are no elements to give the content structure, so the b
rowser does not know what is a heading and what is a paragraph.
...And 3 more matches
Making asynchronous programming easier with async and await - Learn web development
try typing the following lines into your b
rowser's js console: function hello() { return "hello" }; hello(); the function returns "hello" — nothing special, right?
...bye for now!`); }; } let han = new person('han', 'solo', 25, 'male', ['smuggling']); the first class method could now be used something like this: han.greeting().then(console.log); b
rowser support one consideration when deciding whether to use async/await is support for older b
rowsers.
... they are available in modern versions of most b
rowsers, the same as promises; the main support problems come with internet explorer and opera mini.
...And 3 more matches
Graceful asynchronous programming with Promises - Learn web development
since the call to getusermedia() is made from the b
rowser's main thread, the entire b
rowser is blocked until getusermedia() returns!
... obviously, that's not an acceptable option; without promises, everything in the b
rowser becomes unusable until the user decides what to do about the camera and microphone.
... if you save the html file you've just created and load it in your b
rowser, you'll see that the image is displayed in the page as expected.
...And 3 more matches
Build your own function - Learn web development
it will display a custom message box on a web page and will act as a customized replacement for a b
rowser's built-in alert() function.
...type the following in your b
rowser's javascript console, on any page you like: alert('this is a message'); the alert function takes a single argument — the string that is displayed in the alert box.
... note: this example should work in all modern b
rowsers fine, but the styling might look a bit funny in slightly older b
rowsers.
...And 3 more matches
Looping code - Learn web development
width and height are the width and height of the inner b
rowser window.
... when i becomes equal to cats.length (in this case, 5), the loop will stop, and the b
rowser will move on to the next bit of code below the loop.
...if not, the loop will go on forever, and either the b
rowser will force it to stop, or it will crash.
...And 3 more matches
Third-party APIs - Learn web development
previous overview: client-side web apis next the apis we've covered so far are built into the b
rowser, but not all apis are.
...this article looks at the difference between b
rowser apis and 3rd party apis and shows some typical uses of the latter.
... let's look at a simple mapquest api example, and use it to illustrate how third-party apis differ from b
rowser apis.
...And 3 more matches
Object-oriented JavaScript for beginners - Learn web development
i\'m ' + obj.name + '.'); }; return obj; } you can now create a new person by calling this function — try the following lines in your b
rowser's javascript console: const salva = createnewperson('salva'); salva.name; salva.greeting(); this works well enough, but it is a bit long-winded; if we know we want to create an object, why do we need to explicitly create a new empty object and return it?
... add the following lines below your previous code addition: let person1 = new person('bob'); let person2 = new person('sarah'); save your code and reload it in the b
rowser, and try entering the following lines into your js console: person1.name person1.greeting() person2.name person2.greeting() cool!
... let's look at the constructor calls again: let person1 = new person('bob'); let person2 = new person('sarah'); in each case, the new keyword is used to tell the b
rowser we want to create a new object instance, followed by the function name with its required parameters contained in parentheses, and the result is stored in a variable — very similar to how a standard function is called.
...And 3 more matches
What is web performance? - Learn web development
how content is rendered to effectively understand web performance, the issues behind it, and the major topic areas we mentioned above, you really should understand some specifics about how b
rowsers work.
... this includes: how the b
rowser works.
... when you request a url and hit enter / return, the b
rowser finds out where the server is that holds that website's files, establishes a connection to it, and requests the files.
...And 3 more matches
Multimedia: video - Learn web development
objective: to learn about the various video formats, their impact on performance, and how to reduce video impact on overall page load time while serving the smallest video file size based on each b
rowsers file type support.
...ssions in three different formats at 10mb, 12mb, and 13mb, declare the smallest first and the largest last: <video width="400" height="300" controls="controls"> <!-- webm: 10 mb --> <source src="video.webm" type="video/webm" /> <!-- mpeg-4/h.264: 12 mb --> <source src="video.mp4" type="video/mp4" /> <!-- ogg/theora: 13 mb --> <source src="video.ogv" type="video/ogv" /> </video> the b
rowser downloads the first format it understands.
... see caniuse.com for current b
rowser support of video and other media types.
...And 3 more matches
Gecko info for Windows accessibility vendors
windows applications based on the gecko layout engine gecko is a rendering engine that mozilla, netscape and other new b
rowsers use.
... k-meleon: a light, ultra-fast and more advanced (fully configurable) gecko-based web b
rowser available on the windows platform xul-based clients (support msaa) xul-based clients make full use of the gecko architecture, not only for html content, as well as for menus, dialogs and the entire user interface via an xml language called xul (extensible user-interface language).
...it is not obvious where the role_system_row should exist in the tree when the html
rowspan attribute is used to combine to cells in different
rows.
...And 3 more matches
Mozilla’s UAAG evaluation report
this uaag evaluation report covers nightly builds of the mozilla web b
rowser itself, running on windows 2000, as of february 20, 2002.
... most b
rowsers do not allow the user to select text with the keyboard alone.
... we intend to do this with a caret b
rowsing feature.
...And 3 more matches
Experimental features in Firefox
in order to test new features, mozilla publishes a test version of the firefox b
rowser, firefox nightly, every day.
... nightly 33 no developer edition 33 no beta 33 no release 33 no preference name media.track.enabled dom document property: autoplaypolicy the document property autoplaypolicy returns a string indicating how the b
rowser handles requests to automatically play media (either using the autoplay property on a media element or by attempting to trigger playback from javascript code.
...the value changes over time depending on what the user is doing, their preferences, and the state of the b
rowser in general.
...And 3 more matches
Communicating with frame scripts
target the xul <b
rowser> element from which this message was sent.
...ssage) { console.log(message.name); console.log(message.sync); console.log(message.data); console.log(message.target); console.log(message.objects); } so combining this message listener with the message above will give console output somewhat like this, when the user clicks a <div>: "my-addon@me.org:my-e10s-extension-message" false object { details: "they clicked", tag: "div" } <xul:b
rowser anonid="initialb
rowser" ...
...an xpcom component), you can access the window of the b
rowser that sent the message with message.target.ownerdocument.defaultview.
...And 3 more matches
Assert.jsm
undefined ok(value, message); undefined equal(actual, expected, message); undefined notequal(actual, expected, message); undefined deepequal(actual, expected, message); undefined notdeepequal(actual, expected, message); undefined strictequal(actual, expected, message); undefined notstrictequal(actual, expected, message); undefined th
rows(block, expected, message); promise rejects(promise, expected, message); undefined greater(lhs, rhs, message); undefined greaterorequal(lhs, rhs, message); undefined less(lhs, rhs, message); undefined lessorequal(lhs, rhs, message); undefined setreporter(reporterfunc); undefined report(failed, actual, expected, message, operator); ...
... let assert = new assert(reporterfunc); the new assert instance, assert, uses reporterfunc to report assertion results or th
rows an assertionerror when an assertion fails, as default behavior.
... ok, equal, notequal, deepequal, notdeepequal, strictequal, notstrictequal, th
rows, setreporter, report methods ok() pure assertion tests whether a value is truthy, as determined by !!guard.
...And 3 more matches
MathML Demo: <mfrac> - fractions
inline up ar
rows, display style, no line ↑ sin θ m ↑ the end.
... inline down ar
rows, text style, no line ↓ sin θ m ↓ the end.
... inline updown ar
rows, text style, normal line ↕ sin θ m ↕ the end.
...And 3 more matches
Mozilla Quirks Mode Behavior
prior to gecko 36, it also applied to images, and form controls but the quirk has been adapted to match the behavior of other b
rowser (bug 783213).
... in quirks mode colspan="0" and
rowspan="0" are intentionally not handled as described in html4 (bug 9879).
... in quirks mode, tables with no
rows/rowgroups have zero height even when a height is specified (bug 241161).
...And 3 more matches
Localization Use Cases
declensions in gaia's b
rowser app, there's an about-b
rowser string defined as follows in apps/b
rowser/locales/b
rowser: about-b
rowser=about {{b
rowserbrandshortname}} problem definition in many inflected languages (e.g.
... in slovenian, the ideal string would inflect the noun, like so: o firefoxu however, since we want the name of the b
rowser to be stored in the b
rowserbrandshortname entity, we can't modify it.
...b
rowser, to give about the firefox b
rowser.
...And 3 more matches
Avoiding leaks in JavaScript XPCOM components
the worst example of this problem is tabb
rowser.
... tabb
rowser is an xbl binding that wraps b
rowsers in tabs, creating and destroying them as needed.
... but the b
rowsers are themselves xbl bindings, and much of the memory associated with the page displayed in the tab is reachable from the javascript properties of the b
rowser element.
...And 3 more matches
nsIDownloadManager
the path is dependent on two user configurable prefs set in preferences: b
rowser.download.folderlist defines the default download location for files: 0: files are downloaded to the desktop by default.
... 2: files are downloaded to the local path specified by the b
rowser.download.dir preference.
...if you want to both add and start a download, you need to create an nsiwebb
rowserpersist object, call this method, set the progresslistener to the returned nsidownload object, and then call the nsiwebb
rowserpersist.saveuri() method.
...And 3 more matches
nsIFaviconService
1.0 66 introduced gecko 1.8 inherits from: nsisupports last changed in gecko 22.0 (firefox 22.0 / thunderbird 22.0 / seamonkey 2.19) implemented by: @mozilla.org/b
rowser/favicon-service;1.
... to use this service, use: var faviconservice = components.classes["@mozilla.org/b
rowser/favicon-service;1"] .getservice(components.interfaces.nsifaviconservice); method overview void addfailedfavicon(in nsiuri afaviconuri); void expireallfavicons(); void getfavicondata(in nsiuri afaviconuri, out autf8string amimetype, [optional] out unsigned long adatalen, [array,retval,size_is(adatalen)] out octet adata); obsolete since gecko 22.0 astring getfavicondataasdataurl(in nsiuri afaviconuri); obsolete since gecko 22.0 nsiuri getfaviconforpage(in nsiuri apageuri); obsolete since gecko 22.0 nsiuri getfaviconimageforpage(in nsiuri apageuri); obsolete since gecko 22.0 nsiuri getfaviconlinkforicon(in nsiuri afaviconur...
...th
rows an exception if we don't have data.
...And 3 more matches
nsIIOService
for loads that are not related to any document, such as loads coming from addons or internal b
rowser features, use null here.
...for loads from an addon or from internal b
rowser features, pass the system principal.
... for loads that are not related to any document, such as loads coming from addons or internal b
rowser features, use null here.
...And 3 more matches
nsIXPConnect
although it may still work in some b
rowsers, its use is discouraged since it could be removed at any time.
...although it may still work in some b
rowsers, its use is discouraged since it could be removed at any time.
...although it may still work in some b
rowsers, its use is discouraged since it could be removed at any time.
...And 3 more matches
nsIXULWindow
olean ascreen, in boolean aalert); nsixulwindow createnewwindow(in print32 achromeflags, in nsiappshell aappshell); nsidocshelltreeitem getcontentshellbyid(in wstring id); void removechildwindow(in nsixulwindow achild); void showmodal(); attributes attribute type description chromeflags pruint32 chromeflags are from nsiwebb
rowserchrome.
...it could be an editor, a docshell, or a b
rowser object.
... xulb
rowserwindow nsixulb
rowserwindow provides access to the xulb
rowserwindow object offering a way for the b
rowser to update the user interface of the enclosing xul window.
...And 3 more matches
Working with data
// lets create an array of long's var my = ctypes.long.array()([1, 2, 3, 4]); my.tostring(); // this outputs to b
rowser console: `"ctypes.long.array(4)([ctypes.int64("1"), ctypes.int64("2"), ctypes.int64("3"), ctypes.int64("4")])"` my.addressofelement(1).contents; // this outputs `int64 { }` my.addressofelement(1).contents.tostring(); // outputs: `"2"` // now this is how to get the array of long's cast to array of int's var mycasted = ctypes.cast(my.address(), ctypes.int.array(my.length).ptr).contents; mycaste...
...d.tostring(); // this outputs to b
rowser console: `"ctypes.int.array(4)([1, 2, 3, 4])"` mycasted.addressofelement(1).contents; // this outputs `2` mycasted.addressofelement(1).contents.tostring(); // outputs: `"2"` source of this, and to see wrong ways of casting, and explanation on why this is the right way to cast an array (explained by matching constructor's) see here: githubgist :: _ff-addon-tutorial-jsctypes_castingarrays data and pointers a cdata object represents a c value in memory.
... as review, making a null-terminated string happens like this: var cstr_nullterminated = ctypes.jschar.array()('rawr'); console.log(cstr_nullterminated); // outputs to b
rowserconsole: `cdata { length: 5 }` console.log(cstr_nullterminated.tostring()); // outputs to b
rowser console: `"ctypes.char16_t.array(5)(["r", "a", "w", "r", "\x00"])"` the console.log shows that the length is greater then the length of "rawr" which is 4, doing a .tostring on it shows there is a null terminator of \x00 on the end.
...And 3 more matches
DOM Inspector internals - Firefox Developer Tools
this comparison turns out to be quite apt, since each panel actually contains an anonymous b
rowser, and individual viewers exist in separate documents loaded in the b
rowser.
...its contents should resemble the following: extensions/ … jsutil/ … prefs/ … res/ … tests/ … viewers/ … b
rowseroverlay.xul commandoverlay.xul editingoverlay.xul flasher.js hooks.js inspector.css inspector.js inspectoroverlay.xul inspector.xml inspector.xul keysetoverlay.xul object.js object.xul popupoverlay.xul sidebar.js sidebar.xul statusbaroverlay.xul tasksoverlay-cz.xul tasksoverlay-ff.xul tasksoverlay-mobile.xul tasksoverlay-sb.xul tasksoverlay-tb.xul tasksoverlay.xul toolboxo...
...these overlays are: b
rowseroverlay.xul tasksoverlay-cz.xul tasksoverlay-ff.xul tasksoverlay-mobile.xul tasksoverlay-sb.xul tasksoverlay-tb.xul tasksoverlay.xul venkmanoverlay.xul prefs/prefsoverlay.xul further examination of the chrome manifest will reveal that dom inspector also uses conditional overlays on its primary window: overlay chrome://inspector/content/inspector.xul chrome://communicator/content/utili...
...And 3 more matches
about:debugging (before Firefox 68) - Firefox Developer Tools
you can also modify the preferences directly in about:config, or by checking "enable b
rowser chrome and add-on debugging toolboxes" and "enable remote debugging" in the developer tools settings.
...this does what it says: reloading any persistent scripts, such as background scripts parsing the manifest.json file again, so changes to permissions, content_scripts, b
rowser_action or any other keys will take effect.
... note that this feature isn't that immediately useful to debugging desktop tabs — you can open up a toolbox to debug a tab easily enough already — but this 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 b
rowsers, simulators, etc.
...And 3 more matches
DOMHighResTimeStamp - Web APIs
however, if the b
rowser is unable to provide a time value accurate to 5 µs (due, for example, to hardware or software constraints), the b
rowser can represent the value as a time in milliseconds accurate to a millisecond.
... also note the section below on reduced time precision controlled by b
rowser preferences to avoid timing attacks and fingerprinting.
... reduced time precision to offer protection against timing attacks and fingerprinting, the precision of time stamps might get rounded depending on b
rowser settings.
...And 3 more matches
Document.registerElement() - Web APIs
the document.registerelement() method registers a new custom element in the b
rowser and returns a constructor for the new element.
...the b
rowser you use it in must support web components.
... example here is a very simple example: var mytag = document.registerelement('my-tag'); now the new tag is registered in the b
rowser.
...And 3 more matches
Element - Web APIs
element.requestfullscreen() asynchronously asks the b
rowser to make the element full-screen.
... cancel fires on a <dialog> when the user instructs the b
rowser that they wish to dismiss the current open dialog.
... for example, the b
rowser might fire this event when the user presses the esc key or clicks a "close dialog" button which is part of the b
rowser's ui.
...And 3 more matches
FetchEvent - Web APIs
the b
rowser creates these objects itself and provides them to fetch event callbacks.
... fetchevent.request read only the request the b
rowser intends to make.
... fetchevent.respondwith() prevent the b
rowser's default fetch handling, and provide (a promise for) a response yourself.
...And 3 more matches
FileSystemDirectoryReader - Web APIs
because this is a non-standard api, whose specification is not currently on a standards track, it's important to keep in mind that not all b
rowsers implement it, and those that do may implement only small portions of it.
... check the b
rowser compatibility section for details.
... b
rowser compatibility the compatibility table on this page is generated from structured data.
...And 3 more matches
FontFace.display - Web APIs
(see below.) block period the b
rowser invisibly prepares a fallback font.
...the spec recommends 3 seconds for the block period, though this may vary from b
rowser to b
rowser.
...the spec recommends 100 ms or less for the block period and 3 seconds for the swap period, though these values may vary from b
rowser to b
rowser.
...And 3 more matches
Frame Timing API - Web APIs
the performanceframetiming interface provides frame timing data about the b
rowser's event loop.
... a frame represents the amount of work a b
rowser does in one event loop iteration such as processing dom events, resizing, scrolling, rendering, css animations, etc.
...this means the b
rowser should process a frame in about 16.7 ms.
...And 3 more matches
HTMLInputElement - Web APIs
formmethod string: returns / sets the element's formmethod attribute, containing the http method that the b
rowser uses to submit the form.
... properties that apply only to text/number-containing or elements autocomplete string: returns / sets the element's autocomplete attribute, indicating whether the value of the control can be automatically completed by the b
rowser.
...possible values are: on: the b
rowser can autocomplete the value using previously stored value off: the user must explicity enter a value max string: returns / sets the element's max attribute, containing the maximum (numeric or date-time) value for this item, which must not be less than its minimum (min attribute) value.
...And 3 more matches
HTMLMediaElement.srcObject - Web APIs
until other b
rowsers catch up, for mediasource, blob and file, consider falling back to creating a url with url.createobjecturl() and assign it to htmlmediaelement.src.
... const mediasource = new mediasource(); const video = document.createelement('video'); video.srcobject = mediasource; supporting fallback to the src property the examples below support older b
rowser versions that require you to create an object url and assign it to src if srcobject isn't supported.
... first, a mediastream from a camera is assigned to a newly-created <video> element, with fallback for older b
rowsers.
...And 3 more matches
HTMLTableElement - Web APIs
htmltableelement.
rowsread only returns a live htmlcollection containing all the
rows of the element, that is all <tr> that are a child of the element, or a child of one of its <thead>, <tbody> and <tfoot> children.
... the
rows members of a <thead> appear first, in tree order, and those members of a <tbody> last, also in tree order.
...it reflects the obsolete rules attribute and can take one of the following values: "none", "groups", "
rows", "cols", or "all".
...And 3 more matches
IDBVersionChangeEvent.version - Web APIs
warning: while this property is still implemented in older b
rowsers, the latest specification replaces it with the oldversion and newversion attributes.
... see the compatibility table to know what b
rowsers support them.
... b
rowser compatibility the compatibility table on this page is generated from structured data.
...And 3 more matches
IDBVersionChangeRequest.setVersion() - Web APIs
for older webkit b
rowsers, call this method before creating or deleting an object store.
...some not up-to-date b
rowsers still implement this method.
... b
rowser compatibility the compatibility table on this page is generated from structured data.
...And 3 more matches
Timing element visibility with the Intersection Observer API - Web APIs
using this api lets everything get streamlined by the b
rowser to reduce the impact on performance substantially.
... body { font-family: "open sans", "arial", "helvetica", sans-serif; background-color: aliceblue; } .wrapper { display: grid; grid-template-columns: auto minmax(min-content, 1fr); grid-template-
rows: auto minmax(min-content, 1fr); max-width: 700px; margin: 0 auto; background-color: aliceblue; } the site's <body> is configured here to use one of a number of common sans-serif fonts, and to use "aliceblue" as the background color.
... the wrapper establishes a css grid with two columns and two
rows.
...And 3 more matches
Using the Media Capabilities API - Web APIs
these features include: the ability to query the b
rowser to determine its ability to encode or decode media given a specified set of encoding parameters.
...with the media capabilities api, you can determine not just if the b
rowser can support a given format, but whether or not it can do so efficiently and smoothly.
... note: the display capabilities functionality mentioned in the third point above have not yet appeared in any b
rowser.
...And 3 more matches
Web-based protocol handlers - Web APIs
when the link is activated, the b
rowser should launch the default desktop application for handling email.
...basically, the web application uses registerprotocolhandler() to register itself with the b
rowser as a potential handler for a given protocol.
... when a b
rowser executes this code, it should display a prompt to the user, asking permission to allow the web application to register as a handler for the protocol.
...And 3 more matches
NavigatorID.appVersion - Web APIs
returns either "4.0" or a string representing version information about the b
rowser.
... note: do not rely on this property to return the correct b
rowser version.
... syntax window.navigator.appversion value either "4.0" or a string representing version information about the b
rowser.
...And 3 more matches
PerformanceTiming - Web APIs
some correspond to dom events; others describe the time at which internal b
rowser operations of interest took place.
... performancetiming.navigationstart read only when the prompt for unload terminates on the previous document in the same b
rowsing context.
... performancetiming.fetchstart read only when the b
rowser is ready to fetch the document using an http request.
...And 3 more matches
Permissions - Web APIs
this is not currently supported in any b
rowser.
...this is not currently supported in any b
rowser.
... b
rowser support the compatibility table on this page is generated from structured data.
...And 3 more matches
Pointer Lock API - Web APIs
pointer lock lets you access mouse events even when the cursor goes past the boundary of the b
rowser or screen.
...without pointer lock, the rotation or manipulation stops the moment the pointer reaches the edge of the b
rowser or screen.
... it is not limited by b
rowser or screen boundaries.
...And 3 more matches
RTCRtpReceiver.getCapabilities() static function - Web APIs
all b
rowsers support the primary media kinds: audio and video.
... return value an rtcrtpcapabilities object stating what capabilities the b
rowser has for receiving the specified media kind over an rtcpeerconnection.
... if the b
rowser doesn't have any support for the given media kind, the returned value is null.
...And 3 more matches
RTCRtpSender.getCapabilities() static function - Web APIs
all b
rowsers support the primary media kinds: audio and video.
... return value an rtcrtpcapabilities object stating what capabilities the b
rowser has for sending the specified media kind over an rtcpeerconnection.
... if the b
rowser doesn't have any support for the given media kind, the returned value is null.
...And 3 more matches
Resource Timing API - Web APIs
however, if the b
rowser is unable to provide a time value accurate to 5 µs (because, for example, due to hardware or software constraints), the b
rowser can represent a the value as a time in milliseconds accurate to a millisecond.
...the last three timestamps are, in order: requeststart - the timestamp before the b
rowser starts requesting the resource from the server; responsestart - the timestamp after the b
rowser receives the first byte of the response from the server; and responseend - the timestamp after the b
rowser receives the last byte of the resource.
...the clearresourcetimings() method removes all "resource" type performance entries from the b
rowser's resource performance entry buffer.
...And 3 more matches
Service Worker API - Web APIs
service workers essentially act as proxy servers that sit between web applications, the b
rowser, and the network (when available).
...in firefox, service worker apis are also hidden and cannot be used when the user is in private b
rowsing mode.
...a service worker client is either a document in a b
rowser context or a sharedworker, which is controlled by an active worker.
...And 3 more matches
TextRange - Web APIs
although it is well supported by ie, most other b
rowsers no longer support this property.
... this property should only be used as one of the solutions when you need to be compatible with lower versions of ie, rather than relying on it completely in cross b
rowser scripts.
... note that this interface is not supported in non ie b
rowsers.
...And 3 more matches
Signaling and video calling - Web APIs
the exact process will vary, of course, but in general there are a few key points at which signaling messages get handled: the signaling process involves this exchange of messages among a number of points: each user's client running within a web b
rowser each user's web b
rowser the signaling server the web server hosting the chat service imagine that naomi and priya are engaged in a discussion using the chat software, and naomi decides to open a video call between the two.
...you can learn more about the codecs which webrtc requires b
rowsers to support, which additional codecs are supported by which b
rowsers, and how to choose the best codecs to use in the guide codecs used by webrtc.
... starting negotiation once the caller has created its rtcpeerconnection, created a media stream, and added its tracks to the connection as shown in starting a call, the b
rowser will deliver a negotiationneeded event to the rtcpeerconnection to indicate that it's ready to begin negotiation with the other peer.
...And 3 more matches
Lighting a WebXR setting - Web APIs
but b
rowsers are required to take a number of steps to make it difficult to physically locate the user without their consent.
... how b
rowsers mitigate these issues in order to help mitigate these risks, b
rowsers are required by the webxr lighting estimation api specification to report lighting information that is fudged somewhat from the true value.
... spherical harmonics precision b
rowsers can mitigate the risk of fingerprinting by reducing the precision of spherical harmonics.
...And 3 more matches
Web Animations API Concepts - Web APIs
the web animations api (waapi) provides javascript developers access to the b
rowser’s animation engine and describes how animations should be implemented across b
rowsers.
...back then it was the only animation engine b
rowsers had to worry about.
... while four out of five b
rowsers supported smil, it only animated svg elements, could not be used from css, and was very complex — often leading to inconsistent implementations.
...And 3 more matches
Web Storage API - Web APIs
the web storage api provides mechanisms by which b
rowsers can store key/value pairs, in a much more intuitive fashion than using cookies.
... web storage concepts and usage the two mechanisms within web storage are as follows: sessionstorage maintains a separate storage area for each given origin that's available for the duration of the page session (as long as the b
rowser is open, including page reloads and restores) stores data only for a session, meaning that the data is stored until the b
rowser (or tab) is closed.
... localstorage does the same thing, but persists even when the b
rowser is closed and reopened.
...And 3 more matches
XSLTProcessor - Web APIs
new xsltprocessor() methods [th
rows] void xsltprocessor.importstylesheet(node stylesheet) imports the xslt stylesheet.
... [th
rows] documentfragment xsltprocessor.transformtofragment(node source, document owner) transforms the node source by applying the stylesheet imported using the xsltprocessor.importstylesheet() function.
... [th
rows] document xsltprocessor.transformtodocument(node source) transforms the node source applying the stylesheet given importing using the xsltprocessor.importstylesheet() function.
...And 3 more matches
WAI-ARIA Roles - Accessibility
dialogs can be either non-modal (it's still possible to interact with content outside of the dialog) or modal (only the content in the dialog can be interacted with).aria: document rolegenerally used in complex composite widgets or applications, the document role can inform assistive technologies to switch context to a reading mode: the document role tells assistive technologies with reading or b
rowse modes to use the document mode to read the content contained within this element.aria: feed rolea feed is a dynamic scrollable list of articles in which articles are added to or removed from either end of the list as the user scrolls.
... a feed enables screen readers to use the b
rowse mode reading cursor to both read and scroll through a stream of rich content that may continue scrolling infinitely by loading more content as the user reads.aria: figure rolethe aria figure role can be used to identify a figure inside page content where appropriate semantics do not already exist.
... a figure is generally considered to be one or more images, code snippets, or other content that puts across information in a different way to a regular flow of text.aria: form rolethe form landmark role can be used to identify a group of elements on a page that provide equivalent functionality to an html form.aria: grid rolethe grid role is for a widget that contains one or more
rows of cells.
...And 3 more matches
cursor - CSS: Cascading Style Sheets
the b
rowser will try to load the first image specified, falling back to the next if it can't, and falling back to the keyword value if no images could be loaded (or if none were specified).
... keyword values move your mouse over values to see their live appearance in your b
rowser: category css value example description general auto the ua will determine the cursor to display based on the current context.
...often rendered as ar
rows pointing left and right with a vertical bar separating them.
...And 3 more matches
font-size - CSS: Cascading Style Sheets
this is an os-independent and cross-b
rowser way of literally telling the b
rowsers to render the letters at exactly the number of pixels in height that you specified.
... the results may vary slightly across b
rowsers, as they may use different algorithms to achieve a similar effect.
... note: defining font sizes in px is not accessible, because the user cannot change the font size in some b
rowsers.
...And 3 more matches
Making content editable - Developer guides
note: in firefox 63 beta/dev edition, some of the rich-text editing features have been disabled by default, for better cross-b
rowser compatibility.
... these are object resizing on <img>, <table>, and absolutely-positioned elements; inline table editing to add or remove
rows and columns; and the grabber that allows moving of absolutely-positioned elements.
... differences in markup generation use of contenteditable across different b
rowsers has been painful for a long time because of the differences in generated markup between b
rowsers.
...And 3 more matches
Data URLs - HTTP
note: data urls are treated as unique opaque origins by modern b
rowsers, rather than inheriting the origin of the settings object responsible for the navigation.
...also, for csv data (mime type "text/csv"), percent-encoding is needed to preserve the line endings that delimit
rows of the spreadsheet.
... length limitations although firefox supports data urls of essentially unlimited length, b
rowsers are not required to support any particular maximum length of data.
...And 3 more matches
Large-Allocation - HTTP
the non-standard large-allocation response header tells the b
rowser that the page being loaded is going to want to perform a large allocation.
... it is currently only implemented in firefox, but is harmless to send to every b
rowser.
...the large-allocation tells the b
rowser that the web content in the to-be-loaded page is going to want to perform a large contiguous memory allocation and the b
rowser can react to this header by starting a dedicated process for the to-be-loaded document, for example.
...And 3 more matches
SameSite cookies - HTTP
this is the default value in modern b
rowsers.
... none used to be the default value, but recent b
rowser versions made lax the default value to have reasonably robust defense against some classes of cross-site request forgery (csrf) attacks.
... none requires the secure attribute in latest b
rowser versions.
...And 3 more matches
X-XSS-Protection - HTTP
although these protections are largely unnecessary in modern b
rowsers 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 b
rowsers 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 b
rowsers, it is recommended that you use content-security-policy without allowing unsafe-inline scripts instead.
... 1 enables xss filtering (usually default in b
rowsers).
...And 3 more matches
JavaScript technologies overview - JavaScript
however, the umbrella term "javascript" as understood in a web b
rowser context contains several very different elements.
... this core language is also used in non-b
rowser environments, for example in node.js.
...in a b
rowser, this global object is the window object, but ecmascript only defines the apis not specific to b
rowsers, e.g.
...And 3 more matches
OpenSearch description format
the opensearch description format lets a website describe a search engine for itself, so that a b
rowser or other client application can use that search engine.
...(see reference material for links to other b
rowsers' documentation.) firefox also supports additional features not in the opensearch standard, such as search suggestions and the <searchform> element.
... <opensearchdescription xmlns="http://a9.com/-/spec/opensearch/1.1/" xmlns:moz="http://www.mozilla.org/2006/b
rowser/search/"> <shortname>[snk]</shortname> <description>[search engine full name and summary]</description> <inputencoding>[utf-8]</inputencoding> <image width="16" height="16" type="image/x-icon">[https://example.com/favicon.ico]</image> <url type="text/html" template="[searchurl]"> <param name="[key name]" value="{searchterms}"/> <!-- other params if you need them… --> <pa...
...And 3 more matches
SVG Presentation Attributes - SVG: Scalable Vector Graphics
value: auto|srgb|linearrgb|<name>|<iri>|inherit; animatable: yes color-rendering it provides a hint to the b
rowser about how to optimize its color interpolation and compositing operations.
... value: auto|text-bottom|alphabetic|ideographic|middle|central| mathematical|hanging|text-top; animatable: yes enable-background deprecated since svg 2 it tells the b
rowser how to manage the accumulation of the background image.
... value: auto|<angle>|inherit; animatable: no image-rendering it provides a hint to the b
rowser about how to make speed vs.
...And 3 more matches
Tutorials
mdn html element reference a comprehensive reference for html elements, and how the different b
rowsers support them.
... css reference complete reference to css, with details on support by firefox and other b
rowsers.
... fluid grids design layouts that fluidly resize with the b
rowser window, while still using a typographic grid.
...And 3 more matches
Compiling a New C/C++ Module to WebAssembly - WebAssembly
creating html and javascript this is the simplest case we'll look at, whereby you get emscripten to generate everything you need to run your code, as webassembly, in the b
rowser.
... at this point in your source directory you should have: the binary wasm module code (hello.wasm) a javascript file containing glue code to translate between the native c functions, and javascript/wasm (hello.js) an html file to load, compile, and instantiate your wasm code, and display its output in the b
rowser (hello.html) running your example now all that remains is for you to load the resulting hello.html in a b
rowser that supports webassembly.
... if everything has worked as planned, you should see "hello world" output in the emscripten console appearing on the web page, and your b
rowser’s javascript console.
...And 3 more matches
WebAssembly
webassembly is a new type of code that can be run in modern web b
rowsers — it is a low-level assembly-like language with a compact binary format that runs with near-native performance and provides languages such as c/c++, c# and rust with a compilation target so that they can run on the web.
... and what's even better is that it is being developed as a web standard via the w3c webassembly working group and community group with active participation from all major b
rowser vendors.
...this is the low-level textual representation of a .wasm module shown in b
rowser developer tools when debugging.
...And 3 more matches
Porting the Library Detector - Archive of obsolete content
you can b
rowse and run the ported version in the sdk's examples directory.
... how the library detector works all the work is done inside a single file, librarydetector.xul this contains: a xul overlay a script the xul overlay adds a box element to the b
rowser's status bar: the script does everything else.
... the script listens to gb
rowser's domcontentloaded event.
...And 2 more matches
context-menu - Archive of obsolete content
like other apis in the sdk, the context-menu api uses content scripts to let your add-on interact with pages in the b
rowser.
... var selection = require("sdk/selection"); and within the contentscript, reference the selected text as selection.text private windows if your add-on has not opted into private b
rowsing, then any menus or menu items that you add will not appear in context menus belonging to private b
rowser windows.
... to learn more about private windows, how to opt into private b
rowsing, and how to support private b
rowsing, refer to the documentation for the private-b
rowsing module.
...And 2 more matches
panel - Archive of obsolete content
so you can rewrite the above code like this: var mypanel = require("sdk/panel").panel({ contenturl: "./myfile.html" }); mypanel.show(); panel positioning by default the panel appears in the center of the currently active b
rowser window.
...self.port.on("show", function onshow() { textarea.focus(); }); finally, the "text-entry.html" file defines the <textarea> element: <html> <head> <style type="text/css" media="all"> textarea { margin: 10px; } body { background-color: gray; } </style> </head> <body> <textarea
rows="13" cols="33" id="edit-box"></textarea> </body> </html> finally, save these three icon files to the "data" directory: icon-16.png icon-32.png icon-64.png to learn much more about content scripts, see the working with content scripts guide.
...addon.port.on("show", function onshow() { textarea.focus(); }); finally, the html file now references "get-text.js" inside a <script> tag: <html> <head> <style type="text/css" media="all"> textarea { margin: 10px; } body { background-color: gray; } </style> </head> <body> <textarea
rows="13" cols="33" id="edit-box"></textarea> <script src="get-text.js"></script> </body> </html> styling panel content the panel's default style is different for each operating system: this helps to ensure that the panel's style is consistent with the dialogs displayed by firefox and other applications, but means you need to take care when applying your own styles.
...And 2 more matches
Sidebar - Archive of obsolete content
opening and closing the sidebar firefox provides a built-in sidebarui object function defined in b
rowser-sidebar.js.
... this means that the function is available in all b
rowser windows.
...to open a page in the "viewwebpanelssidebar" from chrome code (b
rowser/addon/extension) such as from menuitem, it can call: openwebpanel(atitle, auri); accessing the sidebar from a b
rowser.xul script the sidebar content is always in a document separate from the main b
rowser document (the sidebar is actually implemented as a xul b
rowser element).
...And 2 more matches
Displaying web content in an extension without security issues - Archive of obsolete content
the issue that is commonly overlooked here is that the rss feed could contain some malicious javascript code and it would then execute with the privileges of the extension — meaning that it would get full access to the b
rowser (cookies, history etc) and to user’s files.
...however, if the document is loaded into <iframe type="content"> or <b
rowser 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).
...if you open "chrome://foo/content/foo.xul" in the b
rowser, it will open as a content document despite having extended privileges.
...And 2 more matches
Chapter 1: Introduction to Extensions - Archive of obsolete content
perhaps the first time you looked at firefox, you may have been surprised to see that it has a much simpler structure than other full-featured b
rowsers, such as opera or safari.
... what features are considered standard for web b
rowsers these days?
...but we didn't set out to create an all-in-one b
rowser that can satisfy everyone.
...And 2 more matches
Adding Events and Commands - Archive of obsolete content
window.addeventlistener( "load", function() { xulschoolchrome.b
rowseroverlay.init(); }, false); you can do something similar with the onunload event, to do any cleanup you may need.
... another way to attach event handlers, just like html, is to place the handler in the xul code: <overlay id="xulschoolhello-b
rowser-overlay" onload="xulschoolchrome.b
rowseroverlay.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.
...for example: <button label="&xulschoolhello.defaultgreeting.label;" oncommand="xulschoolchrome.b
rowseroverlay.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.
...And 2 more matches
JavaScript Object Management - Archive of obsolete content
/** * controls the b
rowser overlay for the hello world extension.
... */ 〈namespace〉.b
rowseroverlay = { /** * initializes this object.
... } // more stuff }; window.addeventlistener( "load", function() { 〈namespace〉.b
rowseroverlay.init(); }, false); there are some things you can't (or shouldn't) do inside load handlers, such as closing the window being loaded, or opening new windows, alerts or dialogs.
...And 2 more matches
Observer Notifications - Archive of obsolete content
in a chrome b
rowser overlay file, we register an observer to listen to the notification topic "xulschoolhello-test-topic" when the window loads.
...therefore, the registered observer is unregistered when the b
rowser window is unloaded.
... /** * controls the b
rowser overlay for the hello world extension.
...And 2 more matches
Security best practices in extensions - Archive of obsolete content
web content handling in general the best way to ensure that the b
rowser is not compromised when you load content is to make sure it does not have those privileges.
...for pages coming from the server, you need to take steps to ensure that the content can not call back into the web b
rowser and run malicious code.
... the main way to do this is by creating an iframe or b
rowser element in the sidebar, and loading your content there.
...And 2 more matches
Search Extension Tutorial (Draft) - Archive of obsolete content
pref("b
rowser.search.defaultenginename", "data:text/plain,b
rowser.search.defaultenginename=example engine"); in the case or restartless extensions, the preferences need to be changed manually, and reverted when the extension is disabled if they have not been changed in the meantime.
... setpref("b
rowser.search.defaultenginename", "example engine", true); } function shutdown(data, reason) { // no need to do this if this is app shutdown.
...search.xml <?xml version="1.0" encoding="utf-8"?> <searchplugin xmlns="http://www.mozilla.org/2006/b
rowser/search/"> <shortname>example engine</shortname> <description>example search engine</description> <inputencoding>utf-8</inputencoding> <image width="16" height="16" type="image/png">data:image/png;base64, ...
...And 2 more matches
Underscores in class and ID Names - Archive of obsolete content
note: b
rowser support for underscores in css has greatly improved since this article was originally published in 2001 and the following recommendation is no longer accurate for most circumstances.
... summary: the use of the underscore character in css can lead to major display problems in multiple b
rowsers.
... the css1 specification, published in its final form in 1996, did not allow for the use of underscores in class and id names unless they were "escaped." an escaped underscore would look something like this: p.urgent\_note {color: maroon;} this was not well supported by b
rowsers at the time, however, and the practice has never caught on.
...And 2 more matches
Getting Started - Archive of obsolete content
you can use the same version as the one you use to b
rowse the web, but if you mess it up, it is possible that you will be unable to access your b
rowser without uninstalling and reinstalling mozilla.
...they contain the images/styles for the b
rowser, email client, or html editor.
... css files the css files in these directories tell the b
rowser how to display the buttons and other controls, where to put the images, what border and padding it should put around them, etc.
...And 2 more matches
Remotely debugging Firefox for Metro - Archive of obsolete content
if you're using a version of firefox older than 27, you'll need to restart the b
rowser for the setting to take effect.
... if you are connecting to firefox for metro on a different computer or a different port, enter the appropriate hostname and port number and then press "connect." in the windows 8 (metro) b
rowser next you'll see a dialog in firefox for metro asking you to confirm the connection.
... on the desktop next, the desktop shows you a dialog that looks something like this: this is asking whether you want to debug web content running in a b
rowser tab, or to debug the b
rowser code itself.
...And 2 more matches
Creating toolbar buttons (Customize Toolbar Window) - Archive of obsolete content
just add code like this to your overlay: <toolbarpalette id="b
rowsertoolbarpalette"> <toolbarbutton id="myextension-button" class="toolbarbutton-1" label="&toolbarbutton.label;" tooltiptext="&toolbarbutton.tooltip;" oncommand="myextension.ontoolbarbuttoncommand(event);"/> </toolbarpalette> notes: the id of the palette (b
rowsertoolbarpalette in the example) depends on the window (the parent window of the toolbar you wish to insert a button).
... onclick="checkformiddleclick(this, event)" you can also handle middle-click and right-click using onclick handler and check event.button in it like this: <toolbarpalette id="b
rowsertoolbarpalette"> <toolbarbutton id="myextension-button" class="toolbarbutton-1" label="&toolbarbutton.label;" tooltiptext="&toolbarbutton.tooltip;" onclick="myextension.onclick(event);"/> </toolbarpalette> onclick: function(event) { switch(event.button) { case 0: // left click break; case 1: // middle click break; case 2: // right click break; } } to add more buttons, put more <tool...
... adding the button bootstrap style adding a button to the b
rowserpalette on runtime in a bootstrap addon is a bit different because the b
rowserpalette is indirectly reached.
...And 2 more matches
Commands - Archive of obsolete content
this works well for a b
rowser, since editing commands invoked from the main menu will work inside the content area.
... note that html also has a commands and controller system although you can't use it on unprivileged web pages, but you may use it from, for example, a b
rowser extension.
... try opening the example below (source view) in a b
rowser window and selecting items from the list.
...And 2 more matches
Features of a Window - Archive of obsolete content
as in html, you can use the window interface's open() method loads the specified resource into the b
rowsing 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 b
rowsing context.">window.open() function to open the second window.
...if you do not add the 'chrome' flag, the file will open up as the content in a b
rowser window.
...And 2 more matches
Scroll Bars - Archive of obsolete content
increment the value here specifies how much the value of curpos changes by when the user clicks on one of the scroll bar ar
rows.
... pageincrement the value here specifies how much the value of curpos changes by when the user clicks pages through the scroll bar, which can be done by clicking on the tray between the box and the ar
rows.
...when clicking on one of the scroll bar ar
rows, the value would change by 1 either up or down.
...And 2 more matches
Skinning XUL Files by Hand - Archive of obsolete content
when this day comes, skins defined in a global skin file will be applied to a whole application -- like the mozilla b
rowser -- so that all the various windows and parts will look consistent.
... finally, mozilla provides some special extensions to the cascading style sheets specification that allow even more control over the way that xul is skinned within the b
rowser.
... b
rowse through the global skin to familiarize yourself with what's there.
...And 2 more matches
richlistbox - Archive of obsolete content
roperties accessibletype, currentindex, currentitem, disabled, disablekeynavigation, itemcount, scrollboxobject, selectedcount, selectedindex, selecteditem, selecteditems, seltype, suppressonselect, tabindex, value methods additemtoselection, appenditem, clearselection, ensureelementisvisible, ensureindexisvisible, getindexoffirstvisiblerow, getindexofitem, getitematindex, getnumberofvisible
rows, getrowcount, getselecteditem, insertitemat, invertselection, movebyoffset, removeitemat, removeitemfromselection, scrolltoindex, selectall, selectitem, selectitemrange, timedselect, toggleitemselection examples <richlistbox> <richlistitem> <description>a xul description!</description> </richlistitem> <richlistitem> <button label="a xul button"/> </richlistitem> </richlistbox> ...
...(default 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.
...And 2 more matches
XULRunner tips - Archive of obsolete content
roperties"); if your application is based on gecko 2.0, you need to register a component through the new component registration because the extension manager uses fuel, namely application.restart(), to restart your xulrunner-based application after any change (installation, removal, enabling, disabling) in the extensions' list: copy files fuelapplication.js and fuelapplication.manifest from b
rowser/fuel/src for instance into your components/ directory tweak the line #include ../../../toolkit/components/exthelper/extapplication.js in your copy of fuelapplication.js as needed make sure to declare the fuel module and the two files in your components/makefile.in as in b
rowser/fuel/src/makefile.in rebuild...
...illa.org) containing one line of text -- the exact path to the root directory of dom inspector (where the install.rdf is) like this one: /home/username/.mozilla/firefox/numbersandletters/extensions/inspector@mozilla.org/ now create a javascript file with the following code and include it in the main window of your application: function startdomi() { // load the window datasource so that b
rowser windows opened subsequent to dom // inspector show up in the dom inspector's window list.
... preferences needed for file download dialogs to use the unknown-content-type and file-downloads dialogs from a <b
rowser> element, you need to add the following prefs: pref("b
rowser.download.usedownloaddir", true); pref("b
rowser.download.folderlist", 0); pref("b
rowser.download.manager.showalertoncomplete", true); pref("b
rowser.download.manager.showalertinterval", 2000); pref("b
rowser.download.manager.retention", 2); pref("b
rowser.download.manager.showwhenstarting", true); pref("b
rowser.download.manager.usewindow...
...And 2 more matches
NPN_GetAuthenticationInfo - Archive of obsolete content
« gecko plugin api reference « b
rowser side plug-in api summary the function is called by plugins to get http authentication information from the b
rowser.
...the b
rowser passes back the http username.
...the b
rowser passes back the http password.
...And 2 more matches
NPN_MemFlush - Archive of obsolete content
requests that the b
rowser free a specified amount of memory.
... syntax #include <npapi.h> uint32 npn_memflush(uint32 size); parameters the function has the following parameters: size size of memory, in bytes, to free in the b
rowser's memory space.
... if no memory can be freed, the b
rowser returns 0.
...And 2 more matches
NPN_UserAgent - Archive of obsolete content
« gecko plugin api reference « b
rowser side plug-in api summary returns the b
rowser's user agent field.
... this can be used to handle variations in different b
rowsers (or versions thereof) when implementing your plug-in.
... returns a pointer to a buffer that contains the user agent field of the b
rowser.
...And 2 more matches
NPN_Write - Archive of obsolete content
« gecko plugin api reference « b
rowser side plug-in api summary pushes data into a stream produced by the plug-in and consumed by the b
rowser.
... returns if successful, the function returns a positive integer representing the number of bytes written (consumed by the b
rowser).
... this number depends on the size of the b
rowser's memory buffers, the number of active streams, and other factors.
...And 2 more matches
NPP_Write - Archive of obsolete content
the buffer is allocated by the b
rowser and is deleted after returning from the function, so the plug-in should make a copy of the data it needs to keep.
...if the return value is smaller than the size of the buffer, the b
rowser sends the remaining data to the plug-in through subsequent calls to npp_writeready and npp_write.
...the b
rowser will destroy the stream by calling npp_destroystream.
...And 2 more matches
XEmbed Extension for Mozilla Plugins - Archive of obsolete content
however, before you do so you should make sure that the b
rowser also supports xembed when the plugin is first initialized.
...it's good practice to do this in case people try to install your plugin for older versions of the b
rowser that don't support xembed functionality.
...nperror np_initialize(npnetscapefuncs* nstable, nppluginfuncs* pluginfuncs) { nperror err = nperr_no_error; prbool supportsxembed = pr_false; npntoolkittype toolkit = 0; [ code that copies all of the function tables and does ] [ other standard checks ] /* * make sure that the b
rowser supports functionality we care * about.
...And 2 more matches
Properly Using CSS and JavaScript in XHTML Documents - Archive of obsolete content
when an xhtml page is served with mime type text/html it is treated by all b
rowsers as if it were nothing more than html.
... use of comments inside inline style and script authors who are familiar with html commonly enclose the contents of inline style and script tags in comments in order to hide the contents of the tags from b
rowsers which do not understand them.
... <style type="text/css"> <!-- body {background-color: blue; color: yellow;} --> </style> <script type="text/javascript"> <!-- var i = 0; var sum = 0; for (i = 0; i < 10; ++i) { sum += i; } alert('sum = ' + sum); // --> </script> this example illustrates that a conformant b
rowser can ignore content inside of comments.
...And 2 more matches
Building up a basic demo with A-Frame - Game development
the webxr and webgl apis already enable us to start creating virtual reality (vr) experiences inside web b
rowsers, but the community is still waiting for tools and libraries to appear, to make this easier.
... high level overview the current version of a-frame is 0.3.2, which means it's highly experimental, but it already works and you can test it right away in the b
rowser.
...you should start off by: making sure you are using a modern b
rowser 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).
...And 2 more matches
Building up a basic demo with Three.js - Game development
you should: make sure you are using a modern b
rowser with good webgl support, such as the latest firefox or chrome.
... renderer a renderer is a tool which displays scenes right in your b
rowser.
...thanks to this approach, a fallback can be used, if a desired technology is not supported by the b
rowser.
...And 2 more matches
Square tilemaps implementation: Static maps - Game development
d dimensions of the tile inside the atlas, and the target coordinates and size (a different tile size in here would scale the tile.) so, for instance, to draw the tree tile, which is the third in the atlas, at the screen coordinates (128, 320), we would call drawimage() with these values: context.drawimage(atlasimage, 192, 0, 64, 64, 128, 320, 64, 64); in order to support atlases with multiple
rows and columns, you would need to know how many
rows and columns there are to be able to compute the source x and y.
...
rows: the height of the map, in
rows.
...this features an 8 x 8 map with tiles 64 x 64 pixels in size: var map = { cols: 8,
rows: 8, tsize: 64, tiles: [ 1, 3, 3, 3, 1, 1, 3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 0, 0, 1, 1, 1 ], gettile: function(col, row) { return this.tiles[row * map.cols + col] } }; rendering the map we can render the map by iterating over ...
...And 2 more matches
Build the brick field - Game development
first however we need to set up some variables to define information about the bricks such as their width and height,
rows and columns, etc.
... var brickrowcount = 3; var brickcolumncount = 5; var brickwidth = 75; var brickheight = 20; var brickpadding = 10; var brickoffsettop = 30; var brickoffsetleft = 30; here we've defined the number of
rows and columns of bricks , their width and height, the padding between the bricks so they won't touch each other and a top and left offset so they won't start being drawn right from the edge of the canvas.
...it will contain the brick columns (c), which in turn will contain the brick
rows (r), which in turn will each contain an object containing the x and y position to paint each brick on the screen.
...And 2 more matches
Visual typescript game engine - Game development
multiplatform video chat (for all b
rowsers) implemented.
... npm install npm run build navigate in b
rowser /build/app.html to see client app in action -the client part is a b
rowser web application.
... main dependency file // symbolic for now const plarformergameinfo = { name: "crypto-runner", title: "play platformer crypto runner!", }; // symbolic for now const gameslist: any[] = [ plarformergameinfo, ]; const master = new ioc(gameslist); const appicon: appicon = new appicon(master.get.b
rowser); master.singlton(platformer, master.get.starter); console.log("platformer: ", master.get.platformer); master.get.platformer.attachappevents(); project structure builds/ is autogenerated.
...And 2 more matches
Grid Row - MDN Web Docs Glossary: Definitions of Web-related terms
it is defined by the grid-template-
rows property or in the shorthand grid or grid-template properties.
... in addition,
rows may be created in the implicit grid when items are placed outside of
rows created in the explicit grid.
... these
rows will be auto sized by default, or can have a size specified with the grid-auto-
rows property.
...And 2 more matches
Parse - MDN Web Docs Glossary: Definitions of Web-related terms
parsing means analyzing and converting a program into an internal format that a runtime environment can actually run, for example the javascript engine inside b
rowsers.
... the b
rowser parses html into a dom tree.
... when the html parser finds non-blocking resources, such as an image, the b
rowser will request those resources and continue parsing.
...And 2 more matches
What is accessibility? - Learn web development
most b
rowsers and operating systems these days have zoom capabilities.
...see our cross-b
rowser testing screen readers guide for more details on using them.
...you can find more details about keyboard controls in our cross b
rowser testing using native keyboard accessibility section.
...And 2 more matches
Normal Flow - Learn web development
prerequisites: the basics of html (study introduction to html), and an idea of how css works (study introduction to css.) objective: to explain how b
rowsers layout web pages by default, before we begin to make changes.
...it ensures that your content is readable, even if the user is using a very limited b
rowser or a device such as a screen reader that reads out the content of the page.
...the normal layout flow (mentioned in the layout introduction article) is the system by which elements are placed inside the b
rowser's viewport.
...And 2 more matches
What is a Domain Name? - Learn web development
as we already saw, when you want to display a webpage in your b
rowser it's easier to type a domain name than an ip address.
... let's take a look at the process: type mozilla.org in your b
rowser's location bar.
... your b
rowser asks your computer if it already recognizes the ip address identified by this domain name (using a local dns cache).
...And 2 more matches
HTML Cheatsheet - Learn web development
a line break line 1<br>line 2 line 1 line 2 suggesting a line break it is used to suggest the b
rowser to cut the text on this site if </wbr>there is not enough space to display it on the same line it is used to suggest the b
rowser to cut the text on this site if there is not enough space to display it on the same line date in readable form it is used to format the date legibly for the user, such as: <time datetime="2020-05-24" pubdate>published on 23-05-2020</time> it is used ...
... embedded audio <audio controls="controls" src="https://udn.realityripple.com/samples/b7/193cb038d0.mp3">your b
rowser does not support the html5 audio element.</audio> your b
rowser does not support the html5 audio element.
... embedded audio with alternative sources <audio controls="controls"><source src="https://udn.realityripple.com/samples/b7/193cb038d0.mp3" type="audio/mpeg"><source src="https://udn.realityripple.com/samples/f7/14a4179ee6.ogg" type="audio/ogg"> your b
rowser does not support audio.
...And 2 more matches
Client-side web APIs - Learn web development
apis are programming features for manipulating different aspects of the b
rowser and operating system the site is running on, or manipulating data from other web sites or services.
... third party apis the apis we've covered so far are built into the b
rowser, but not all apis are.
...this article looks at the difference between b
rowser apis and 3rd party apis and shows some typical uses of the latter.
...And 2 more matches
Basic math in JavaScript — numbers and operators - Learn web development
type the following lines into your b
rowser's console: let lotsofdecimal = 1.766584958675746364; lotsofdecimal; let twodecimalplaces = lotsofdecimal.tofixed(2); twodecimalplaces; converting to number data types sometimes you might end up with a number that is stored as a string type, which makes it difficult to perform calculations with it.
... but the b
rowser does "10 divided by 8 equals 1.25", then "50 plus 1.25 plus 2 equals 53.25".
...when you do this, you'll see a value of 4 returned — this is because the b
rowser returns the current value, then increments the variable.
...And 2 more matches
Storing the information you need — Variables - Learn web development
if you are using a desktop b
rowser, the best place to type your sample code is your b
rowser's javascript console (see what are b
rowser developer tools for more information on how to access this tool).
...try typing these lines into your web b
rowser's console.
...there is no reason to use var, unless you need to support old versions of internet explorer with your code (it doesn't support let until version 11; the modern windows edge b
rowser supports let just fine).
...And 2 more matches
Solve common problems in your JavaScript code - Learn web development
common beginner's mistakes correct spelling and casing if your code doesn't work and/or the b
rowser complains that something is undefined, check that you've spelt all your variable names, function names, etc.
... some common built-in b
rowser functions that cause problems are: correct wrong getelementsbytagname() getelementbytagname() getelementsbyname() getelementbyname() getelementsbyclassname() getelementbyclassname() getelementbyid() getelementsbyid() semi-colon position you need to make sure you don't place any semi-colons incorrectly.
... in fact, some b
rowsers (like firefox) will give you an error message in the developer console if you have code after a return statement.
...And 2 more matches
Object building practice - Learn web development
next, we set constants called width and height, and the width and height of the canvas element (represented by the canvas.width and canvas.height properties) to equal the width and height of the b
rowser viewport (the area that the webpage appears on — this can be gotten from the window.innerwidth and window.innerheight properties).
...this can range between 0 (top left hand corner) to the width and height of the b
rowser viewport (bottom right hand corner).
... save the code so far, and load the html file in a b
rowser.
...And 2 more matches
React interactivity: Editing, filtering, conditional rendering - Learn web development
conditional rendering in jsx, we can use a condition to change what is rendered by the b
rowser.
...editingtemplate : viewtemplate}</li>; your b
rowser should render all your tasks just like before.
... bind this function to the form’s submit event by adding the following onsubmit handler to the editingtemplate's <form>: <form classname="stack-small" onsubmit={handlesubmit}> you should now be able to edit a task in your b
rowser!
...And 2 more matches
Frequently Asked Questions for Lightweight themes
lightweight themes are easy-to-install, easy-to-use skins that change the look of your firefox web b
rowser.
... lightweight themes change the header area of your b
rowser, including the tab text color and the background tab colors.
... in just a few seconds, you can install a theme and transform the look of your firefox web b
rowser.
...And 2 more matches
Lightweight themes
creating a theme header image the header image is displayed as the background of the top of the b
rowser window, nestling in behind the toolbars, address bar, search bar and the tab strip.
... it will be anchored to the top-right corner of the b
rowser window.
... image requirements dimensions should be 3000px wide × 200px high png or jpg file format image must be no larger than 300 kb in file size tips subtle, soft contrast images and gradients work best; highly detailed images will compete with the b
rowser ui.
...And 2 more matches
Creating a Firefox sidebar
such kind of sidebar can be a simple web panel or a full-featured extension that is completely integrated with the b
rowser.
...a sample extension to add a web panel is available as a starter.obsolete since gecko 57 if you'd like to have a deeper integration with the b
rowser to offer more complex features, a traditional overlay extension can be an option.
...although it may still work in some b
rowsers, its use is discouraged since it could be removed at any time.
...And 2 more matches
Frame script loading and lifetime
the script just writes "foo" to the command line: // chrome script var mm = gb
rowser.selectedb
rowser.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.
... if the message manager is a b
rowser message manager, you should always pass true here.
... because a b
rowser message manager only corresponds to a single b
rowser tab, its loadframescript() function will only ever load the frame script into that one tab.
...And 2 more matches
HTMLIFrameElement.clearMatch()
invoking this method results in a mozb
rowserfindchange event firing, which carries details about the search results.
... note: use of the b
rowser api requires a privileged app, and b
rowser and/or embed-apps permissions, depending on what you want to do.
... see using the b
rowser api for more details.
...And 2 more matches
HTMLIFrameElement.findNext()
invoking this method results in a mozb
rowserfindchange event firing, which carries details about the search results.
... note: use of the b
rowser api requires a privileged app, and b
rowser and/or embed-apps permissions, depending on what you want to do.
... see using the b
rowser api for more details.
...And 2 more matches
L10n Checks
if you want to test the localization for de, run: check-l10n-completeness b
rowser/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.
...ab-cd b
rowser chrome/b
rowser b
rowser.dtd +backforwardmenu.tooltip +fullzoomenlargecmd.commandkey3 +fullzoomreducecmd.commandkey2 +fullzoomresetcmd.commandkey2 +organizebookmarks.label -showallbookmarkscmd2.label migration/migration.dtd -importfromfile.accesskey -importfromfile.label +importfromhtmlfile.a...
...the file names will be shown in a hierarchical form, so in the example above, your files are b
rowser.dtd in ab-cd/b
rowser/chrome/b
rowser and migration.dtd in another directory level deeper.
...And 2 more matches
QA phase
urce code: $ cd mozilla-aurora $ hg pull -u enter the following command to create the .mozconfig file: $ nano -w .mozconfig enter the following lines in your .mozconfig file: mk_add_options moz_objdir=@topsrcdir@/../firefox-build ac_add_options --disable-compile-environment ac_add_options --with-l10n-base=../l10n-central # path relative to moz_objdir ac_add_options --enable-application=[b
rowser or mail] you will need to specify which application you're localizing in the fourth line (e.g., for firefox, that's b
rowser, thunderbird would be mail).
... enter the following command to perform the configuration: $ ./mach configure once your command-line finishes spitting out the config command's output, navigate to the newly created directory: $ cd ../firefox-build/b
rowser/locales now you're ready to build!
... restart your b
rowser and start testing!
...And 2 more matches
Preference reference
accessibility.tabfocusthe preference accessibility.tabfocus controls what elements receive focus when the user presses the tab key.b
rowser.altclicksavethe preference b
rowser.altclicksave controls whether clicking a link while holding the alt key starts the download of that link.b
rowser.dom.window.dump.enabledthis setting enables the dump function, which sends messages to the system console.
... set it to true to enable it, or false to disable it.b
rowser.dom.window.dump.fileb
rowser.dom.window.dump.file redirects the ouput of window.dump() calls to a file whose address is specified in this preference if b
rowser.dom.window.dump.enabled is set to true.
... changes require an application restart.b
rowser.download.lastdir.savepersiteb
rowser.download.lastdir.savepersite controls whether the directory preselected in the file picker for saving a file download is being remembered on a per-website (host) base.
...And 2 more matches
NSS Certificate Download Specification
for mozilla b
rowsers, this handling will depend upon the mime content-type that is used on the object being downloaded.
... importing certificates into mozilla b
rowsers mozilla b
rowsers import certificates found in http protocol responses.
... there are several mime content types that are used to indicate to the b
rowser what type of certificate is being imported.
...And 2 more matches
Shell global objects
similar to the dumpjsstack() function in the b
rowser.
... callfunctionwithasyncstack(function, stack, asynccause) call function, using the provided stack as the async stack responsible for the call, and propagate its return value or the exception it th
rows.
...this function th
rows an error if fn is not a validated asm.js module.
...And 2 more matches
Secure Development Guidelines
ng it examples: if it doesn’t have to be negative, store it in an unsigned int if the input doesn’t have to be > 512, cut it off there if the input should only be [a-za-z0-9], enforce it cross site scripting (xss) xss is a type of code injection attack typically occurs in web applications injection of arbitrary data into an html document from another site victim’s b
rowser executes those html instructions could be used to steal user credentials think: webmail, online auction, cms, online banking...
...is exploitable (in some b
rowsers) with a simple request such as: http://www.victim.com?something=<script>alert('oops')</script> xss: prevention escape all dynamic input that will be sent back to the user html encoding & → & < → < > → > " → " ' → ' url encoding % encoding java/vbscript escaping depends on the context; in a single-quoted string, escaping ' would suffice sql injection occurs when un-trusted input is mixed with a sql string sql is a language used to interact with databases code injection attack that is similar to xss but targeted at sql rather than html and javascript if input ...
... do_something(); delete ptr1; do_something_else(); ptr2 = new char[-1] // oom } catch (...) { delete ptr1; delete ptr2; } new will throw an exception — ptr1 is already freed in the try block then freed again in the catch block freeing un-initialized data free data in the catch block assumption is that it’s initialized in the try block if the try block th
rows before the variable is initialized, the catch block will operate on un-intialized data freeing un-initialized data example: int main(){ char *ptr; try { ptr = new char[-1]; // oom } catch(...) { delete ptr; } } freeing un-initialized data: prevention be careful when freeing data in catch blocks make sure the try block can’t throw before data is...
...And 2 more matches
Starting WebLock
the weblock user interface the weblock component in this tutorial uses xul to define the additional b
rowser ui in a cross-platform way, and xul uses javascript to access and control xpcom components, but gecko's pluggable ui allows any user interface to call into gecko and the components you create as easily as you can from xul.
... in general, the weblock service interface needs to include the following functionality: lock - enable web locking so that any b
rowser in the gecko application is restricted to the white list of website domains.
...this should allow any b
rowser in the gecko application to b
rowse any website regardless of the white list.
...And 2 more matches
nsINavHistoryService
1.0 66 introduced gecko 1.8 inherits from: nsisupports last changed in gecko 22 (firefox 22 / thunderbird 22 / seamonkey 2.19) implemented by: "@mozilla.org/b
rowser/nav-history-service;1".
... to use this service, use: var historyservice = components.classes["@mozilla.org/b
rowser/nav-history-service;1"] .getservice(components.interfaces.nsinavhistoryservice); method overview astring getpagetitle(in nsiuri auri); void markpageasfollowedbookmark(in nsiuri auri); void markpageasfollowedlink(in nsiuri auri); void markpageastyped(in nsiuri auri); boolean canadduri(in nsiuri auri); long long addvisit(in nsiuri auri, in prtime atime, in nsiuri areferringuri, in long atransitiontype, in boolean aisredirect, in long long asessionid); obsolete since gecko 22.0 nsinavhistoryquery getnewquery(); nsinavhistoryqueryoptions getnewqueryoptions(); nsinavhistoryresult executequery(in...
...this is much better than using b
rowserhistory.count since that can be very slow if there is a lot of history (it must enumerate each item).
...And 2 more matches
nsIPrintingPrompt
embedding/b
rowser/webb
rowser/nsiprintingprompt.idlscriptable this is the printing prompt interface which can be used without knowlege of a parent window.
...you can then fly you own dialog and then properly fill in the printsettings object before calling nsiwebb
rowserprint's print method.
... defaults for platform service: showprintdialog - displays a native dialog showpagesetup() - displays a native dialog showprogress() - displays a xul dialog method overview void showpagesetup(in nsiprintsettings printsettings, in nsiobserver aobs); void showprintdialog(in nsiwebb
rowserprint webb
rowserprint, in nsiprintsettings printsettings); void showprogress(in nsiwebb
rowserprint webb
rowserprint, in nsiprintsettings printsettings, in nsiobserver opendialogobserver, in boolean isforprinting, out nsiwebprogresslistener webprogresslistener, out nsiprintprogressparams printprogressparams, out boolean notifyonopen); methods showpagesetup() shows the print progr...
...And 2 more matches
nsITextInputProcessor
if you call this when there is no composition, this th
rows an exception.
...if you call this when there is no composition, this th
rows an exception.
... if appendclausetopendingcomposition() and/or setcaretinpendingcomposition() are not called properly, e.g., sum of alength of calls of appendclausetopendingcomposition() is not same as composition string set by setpendingcompositionstring(), this th
rows an exception.
...And 2 more matches
nsITreeSelection
ion(); boolean isselected(in long index); void rangedselect(in long startindex, in long endindex, in boolean augment); void select(in long index); void selectall(); void timedselect(in long index, in long delay); void toggleselect(in long index); attributes attribute type description count long the number of
rows currently selected in this tree.
...this is not a reliable method of determining the selected row, as the selection may include multiple
rows, or the focused row may not even be selected.
... count number of
rows changed.
...And 2 more matches
nsIWindowCreator
embedding/base/nsiwindowcreator.idlscriptable a callback interface used by gecko to create new b
rowser windows.
... inherits from: nsisupports last changed in gecko 0.9.6 method overview nsiwebb
rowserchrome createchromewindow(in nsiwebb
rowserchrome parent, in pruint32 chromeflags); methods createchromewindow() create a new window.
...nsiwebb
rowserchrome createchromewindow( in nsiwebb
rowserchrome parent, in pruint32 chromeflags ); parameters parent the nsiwebb
rowserchrome of the parent window, if any.
...And 2 more matches
nsIXULTemplateBuilder
for a tree builder, for example, the content within the action body is used to create the tree
rows instead.
... errors th
rows ns_error_null_pointer if aresult or aquerynode is null.
...void removeresult( in nsixultemplateresult aresult ); parameters aresult the result to remove errors th
rows ns_error_null_pointer if aresult is null replaceresult() inform the template builder that one result should be replaced with another.
...And 2 more matches
XPCOM Interface Reference by grouping
(i'm fully aware that this will be a great point of discussion and probably will end in tears, but since i'm the first person to apparently take a swing at this, i get first dibs.) the primary sections consist of: b
rowser this section contains elements associated with the view pane or the content of the "b
rowser window" proper.
... b
rowser autocomplete nsiautocompletecontroller nsiautocompleteinput nsiautocompletesearch console nsiconsolelistener nsiconsolemessage nsiconsoleservice document nsidocshell dom device nsidomgeogeolocation nsidomgeoposition nsidomgeopositionaddress nsidomgeopositioncallback nsidomgeopositioncoords nsidomgeopositionerror ...
... nsixulappinfo nsixulruntime nsixultemplatebuilder nsixultemplatequeryprocessor nsixultemplateresult bookmark livemark nsilivemarkservice nsinavbookmarkobserver nsinavbookmarksservice nsinavhistoryservice b
rowser dom nsiwebb
rowser nsiwebb
rowserpersist cache nsicache nsicachedeviceinfo nsicacheentrydescriptor nsicacheentryinfo nsicachelistener nsicachemetadatavisitor nsicacheservice nsicachesession nsicachevisitor nsicachingch...
...And 2 more matches
Debugger.Environment - Firefox Developer Tools
this allows the code using each debugger instance to place whatever properties it likes on its own debugger.object instances, without worrying about interfering with other debuggers.) if a debugger.environment instance’s referent is not a debuggee environment, then attempting to access its properties (other than inspectable) or call any its methods th
rows an instance of error.
...if this is a declarative environment record, this accessor th
rows a typeerror (since declarative environment records have no such object).
...when true, getvariable returns an ordinary javascript object whose optimizedout property is true on all bindings, and setvariable th
rows a referenceerror.
...And 2 more matches
Debugger.Frame - Firefox Developer Tools
er properties it likes on its debugger.frame instances, without worrying about interfering with other debuggers.) when the debuggee pops a stack frame (say, because a function call has returned or an exception has been thrown from it), the debugger.frame instance referring to that frame becomes inactive: its live property becomes false, and accessing its other properties or calling its methods th
rows an exception.
...for a wasmcall frame, this property th
rows a typeerror.
...for a wasmcall frame, this property th
rows a typeerror.
...And 2 more matches
UI Tour - Firefox Developer Tools
it shows icons for the b
rowsers that do support the properties, and notes properties that are experimental or deprecated.
...the "b
rowser compatibility" section of the article gives details of b
rowser support for the property.
... to configure the set of b
rowsers you want the compatibility view to check for, click settings at the bottom of the panel.
...And 2 more matches
Responsive Design Mode - Firefox Developer Tools
on the right end of the screen, three buttons allow you to: camera button - take a screenshot settings button - opens the rdm settings menu close button - closes rdm mode and returns to regular b
rowsing the settings menu includes the following commands: left-align viewport - when checked moves the rdm viewport to the left side of the b
rowser window show user agent - when checked displays the user agent string the final two options define when the page is reloaded: reload when touch simulation is toggled: when this option is enabled, the page is reloaded whenever you toggle touc...
...for example, many pages check for touch support on load and only add event handlers if it is supported, or only enable certain features on certain b
rowsers.
...for example: developer toolbox with rdm you can show or hide the developer tools toolbox independently of toggling responsive design mode itself: while responsive design mode is enabled, you can continue b
rowsing as you normally would in the resized content area.
...And 2 more matches
about:debugging - Firefox Developer Tools
starting in firefox 78, the url bar is editable, so that you can change the url used by the b
rowser on the remote device, by typing in firefox for desktop.
... you can also reload the page by clicking the reload button next to the url bar, and (starting 79), navigate backward or forward in the b
rowsing history with the back and forward buttons.
...this does what it says: reloads any persistent scripts, such as background scripts parses the manifest.json file again, so changes to permissions, content_scripts, b
rowser_action or any other keys take effect installed extensions the permanently installed extensions are listed in the next section, extensions.
...And 2 more matches
Element: mousewheel event - Web APIs
the mousewheel event was never part of any standard, and while it was implemented by several b
rowsers, it was never implemented by firefox.
...however, the meaning of the amount of these values is not the same between b
rowsers.
...this is really different from other b
rowsers except chrome with continuous scroll supported device.
...And 2 more matches
FederatedCredential - Web APIs
in supporting b
rowsers, an instance of this class may be passed the credential received from the init object for global fetch.
... b
rowser 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/b
rowser-compat-data and send us a pull request.
...And 2 more matches
FederatedCredential - Web APIs
in b
rowsers that support it, an instance of this interface may be passed in the credential member of the init object for global fetch.
... b
rowser 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/b
rowser-compat-data and send us a pull request.
...And 2 more matches
FileEntrySync - Web APIs
this specification is more or less abandoned as it didn't get significant traction among b
rowser makers.
... b
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/b
rowser-compat-data and send us a pull request.
...And 2 more matches
FileSystemDirectoryEntry - Web APIs
example in the following code snippet, we create a directory called "documents." // taking care of the b
rowser-specific prefixes.
... draft b
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/b
rowser-compat-data and send us a pull request.
...And 2 more matches
FileSystemDirectoryReader.readEntries() - Web APIs
in chromium-based b
rowsers, the following example will only return a max of 100 entries.
... b
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/b
rowser-compat-data and send us a pull request.
...And 2 more matches
FileSystemEntry.toURL() - Web APIs
if your site is located at http://my-awesome-website.woot, and you have a temporary file system that contains an image file named awesomesauce.jpg, the url returned by tourl() might be (depending on the b
rowser's implementation) something like "filesystem:http://my-awesome-website.woot/temporary/awesomesauce.jpg".
... code that makes use of this might look like this: let img = document.createelement("img"); img.src = imagefileentry.tourl(); document.body.appendchild(img); assuming the scenario mentioned before the code, the result 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"> b
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/b
rowser-compat-data and send us a pull request.
...And 2 more matches
File and Directory Entries API - Web APIs
because this is a non-standard api, whose specification is not currently on a standards track, it's important to keep in mind that not all b
rowsers implement it, and those that do may implement only small portions of it.
... check the b
rowser compatibility section for details.
...check the b
rowser compatibility for any part of the api you use carefully, and see file and directory entries api support in firefox for more details.
...And 2 more matches
Guide to the Fullscreen API - Web APIs
this article demonstrates how to use the fullscreen api to place a given element into full-screen mode, as well as how to detect when the b
rowser enters or exits full-screen mode.
... for the moment not all b
rowsers are implementing the unprefixed version of the api (for vendor agnostic access to the fullscreen api you can use fscreen).
... b
rowser compatibility document.fullscreen the compatibility table on this page is generated from structured data.
...And 2 more matches
GlobalEventHandlers.onerror - Web APIs
<img src="imagenotfound.gif" onerror="this.onerror=null;this.src='imagefound.gif';" /> the reason we have the this.onerror=null in the function is that the b
rowser will be stuck in an endless loop if the onerror image itself generates an error.
...instead the error reported is simply "script error." this behavior can be overriden in some b
rowsers using the crossorigin attribute on <script> and having the server send the appropriate cors http response headers.
... a workaround is to isolate "script error." and handle it knowing that the error detail is only viewable in the b
rowser console and not accessible via javascript.
...And 2 more matches
HTMLImageElement.decoding - Web APIs
the decoding property of the htmlimageelement interface represents a hint given to the b
rowser on how it should decode the image.
...the b
rowser decides what is best for the user.
... usage notes the decoding property allows you to control whether or not the b
rowser is allowed to try to parallelize loading your image.
...And 2 more matches
HTMLMediaElement.play() - Web APIs
note: older b
rowsers may not return a value from play().
...possible errors include: notallowederror the user agent (b
rowser) or operating system doesn't allow playback of media in the current context or situation.
... this may happen, for example, if the b
rowser requires the user to explicitly start media playback by clicking a "play" button.
...And 2 more matches
The HTML DOM API - Web APIs
access to the b
rowser navigation history supporting and connective interfaces for other apis such as web components, web storage, web workers, websocket, and server-sent events.
... for example, consider a document with two elements, one of which has two more elements nested inside it: while the document interface is defined as part of the dom specification, the html specification significantly enhances it to add information specific to using the dom in the context of a web b
rowser, as well as to using it to represent html documents specifically.
... htmltemplateelement htmltextareaelement htmltimeelement htmltitleelement htmltrackelement htmlulistelement htmlunknownelement htmlvideoelement deprecated html element interfaces htmlmarqueeelement obsolete html element interfaces htmlbasefontelement htmlfontelement htmlframeelement htmlframesetelement htmlisindexelement htmlmenuitemelement web app and b
rowser integration interfaces these interfaces offer access to the b
rowser window and document that contain the html, as well as to the b
rowser's state, available plugins (if any), and various configuration options.
...And 2 more matches
History.pushState() - Web APIs
in an html document, the history.pushstate() method adds a state to the b
rowser's session history stack.
...because firefox saves state objects to the user's disk so they can be restored after the user restarts the b
rowser, we impose a size limit of 640k characters on the serialized representation of a state object.
... title most b
rowsers currently ignore this parameter, although they may use it in the future.
...And 2 more matches
History - Web APIs
the history interface allows manipulation of the b
rowser session history, that is the pages visited in the tab or frame that the current page is loaded in.
... back() this asynchronous method goes to the previous page in session history, the same action as when the user clicks the b
rowser's back button.
... forward() this asynchronous method goes to the next page in session history, the same action as when the user clicks the b
rowser's forward button; this is equivalent to history.go(1).
...And 2 more matches
LocalFileSystemSync - Web APIs
example //taking care of the b
rowser-specific prefix window.requestfilesystemsync = window.requestfilesystemsync || window.webkitrequestfilesystemsync; // the first parameter defines the type of storage: persistent or temporary // next, set the size of space needed (in bytes) // initfs is the success callback // and the last one is the error callback // for denial of access and other errors.
... method overview filesystemsync requestfilesystemsync (in unsigned short type, in long long size) raises fileexception; entrysync resolvelocalfilesystemsyncurl (in domstring url) raises fileexception; constants constant value description temporary 0 transient storage that can be be removed by the b
rowser at its discretion.
... persistent 1 storage that stays in the b
rowser unless the user or the app expunges it.
...And 2 more matches
MediaDevices.getDisplayMedia() - Web APIs
note: b
rowser support for audio tracks varies, both in terms of whether or not they're supported at all by the media recorder and in terms of the which audio source or sourcoes are supported.
... check the compatibility table for details for each b
rowser.
... notallowederror permission to access a screen area was denied by the user, or the current b
rowsing instance is not permitted access to screen sharing.
...And 2 more matches
MediaSession.playbackState - Web APIs
the value may be one of the following: none the b
rowsing context doesn't currently know the current playback state, or the playback state is not available at this time.
... paused the b
rowser's media session is currently paused.
... playing the b
rowser's media session is currently playing media, which can be paused.
...And 2 more matches
MediaTrackSettings.groupId - Web APIs
the mediatracksettings dictionary's groupid property is a b
rowsing-session unique domstring which identifies the group of devices which includes the source for the mediastreamtrack.
...however, typically this is unnecessary since b
rowsers will simply ignore any constraints they're unfamiliar with.
... syntax var groupid = mediatracksettings.groupid; value a domstring whose value is a b
rowsing-session unique identifier for a group of devices which includes the source of the track's contents.
...And 2 more matches
MouseEvent.pageX - Web APIs
see the b
rowser compatibility section for details.
...even though numeric types both are represented by number in javascript, they may be handled differently internally in the b
rowser's code, resulting in potential behavior differences.
... see b
rowser compatibility to learn which b
rowsers have been updated to use the revised data type.
...And 2 more matches
NavigatorID.platform - Web APIs
returns a string representing the platform of the b
rowser.
... the specification allows b
rowsers to always return the empty string, so don't rely on this property to get a reliable answer.
... syntax platform = navigator.platform value a domstring identifying the platform on which the b
rowser is running, or an empty string if the b
rowser declines to (or is unable to) identify the platform.
...And 2 more matches
Online and offline events - Web APIs
some b
rowsers implement online/offline events from the whatwg web applications 1.0 specification.
... additionally, this property should update whenever a b
rowser is no longer capable of connecting to the network.
... firefox 2 updates this property when switching to/from the b
rowser's offline mode.
...And 2 more matches
PasswordCredential - Web APIs
in supporting b
rowsers an instance of this class may be passed in the credential member of the init object for global fetch.
... b
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/b
rowser-compat-data and send us a pull request.
...And 2 more matches
PaymentRequest.canMakePayment() - Web APIs
you can call this before calling show() to provide a streamlined user experience when the user's b
rowser can't handle any of the payment methods you accept.
... for instance, you might call canmakepayment() to determine if the b
rowser will let the user pay using payment request api, and if it won't, you could fall back to another payment method, or offer a list of methods that aren't handled by payment request api (or even provide instructions for paying by mail or by phone).
... note: if you call this too often, the b
rowser may reject the returned promise with a domexception.
...And 2 more matches
Performance Timeline - Web APIs
the standard also includes interfaces that allow an application to define performance observer callbacks that are notified when specific performance events are added to the b
rowser's performance timeline.
... performance interface extensions: as shown in the performance interface's b
rowser compatibility table, most of these interfaces are broadly implemented by desktop b
rowsers and have less support on mobile devices.
... performanceentry: as shown in the performanceentry interface's b
rowser compatibility table, most of these interfaces are broadly implemented by desktop b
rowsers and have less support on mobile devices.
...And 2 more matches
Using Pointer Events - Web APIs
this application will only work on a b
rowser that supports pointer events.
... create a canvas the touch-action property is set to none to prevent the b
rowser from applying its default touch behavior to the application.
... <canvas id="canvas" width="600" height="600" style="border:solid black 1px; touch-action:none"> your b
rowser does not support canvas element.
...And 2 more matches
Reporting API - Web APIs
deprecated feature usage (when you are using something that will stop working soon in b
rowsers).
... occurrence of user-agent interventions (when the b
rowser blocks something your code is trying to do because it is deemed a security risk for example, or just plain annoying, like auto-playing audio).
... available report types the spec defines the following report types: deprecation report indicates that a webapi or other b
rowser feature being used in the website is expected to stop working in a future release.
...And 2 more matches
Using the Screen Capture API - Web APIs
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 b
rowsers that support it but do not implement the current standard api.
...sharing surfaces include the contents of a b
rowser tab, a complete window, all of the applications of a window combined into a single surface, and a monitor (or group of monitors combined together into one surface).
...generally, the b
rowser will provide an image which obscures the hidden portion of the logical display surface in some way, such as by blurring or replacing with a color or pattern.
...And 2 more matches
Using readable streams - Web APIs
b
rowser 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 b
rowsers).
...it has a number of advantages, and what is really nice about it is that b
rowsers have recently added the ability to consume a fetch response as a readable stream.
... the readablestream() constructor it is easy to read from a stream when the b
rowser provides it for you as in the case of fetch, but sometimes you need to create a custom stream and populate it with your own chunks.
...And 2 more matches
Using WebGL extensions - Web APIs
canonical extension names, vendor prefixes and preferences extensions may be supported by b
rowser vendors before being officially ratified (but only when they are in draft stage).
... in that case, their name can be prefixed by the vendor prefix (moz_, webkit_, etc.) or the extension is only available once a b
rowser preference has been toggled.
...for instance: var 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 b
rowser implement experimental extensions behind a feature flag rather than vendor prefix.
...And 2 more matches
Using WebRTC data channels - Web APIs
concerns with large messages currently, it's not practical to use rtcdatachannel for messages larger than 64kib (16kib if you want to support cross-b
rowser exchange of data).
... this will become an issue when b
rowsers 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.
...he goes into a bit more detail there, but as b
rowsers have been updated since then some of it may be out-of-date.
...And 2 more matches
Using the Web Audio API - Web APIs
b
rowser support modern b
rowsers have good support for most features of the web audio api.
... there are a lot of features of the api, so for more exact information, you'll have to check the b
rowser compatibility tables at the bottom of each reference page.
... // for legacy b
rowsers const audiocontext = window.audiocontext || window.webkitaudiocontext; const audiocontext = new audiocontext(); so what's going on when we do this?
...And 2 more matches
Using the Web Speech API - Web APIs
note: on some b
rowsers, like chrome, using speech recognition on a web page involves a server-based recognition engine.
... 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 b
rowser, or navigate to the live demo url in a supporting mobile b
rowser like chrome.
... b
rowser 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.
...And 2 more matches
Functions and classes available to Web Workers - Web APIs
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 b
rowsing contexts (that is windows, tabs, frames, or iframes) with the same origin (usually pages from the same site).
... channel messaging api allows two separate scripts running in different b
rowsing contexts attached to the same document (e.g., two iframes, or the main document and an iframe, two documents via a sharedworker, or two workers) to communicate directly via two ports.
... 41 (41) (yes) (yes) (yes) console api provides access to the b
rowser's debugging console (e.g., the web console in firefox).
...And 2 more matches
Using Web Workers - Web APIs
accepts zero or more uris as parameters to resources to import; all of the following examples are valid: importscripts(); /* imports nothing */ importscripts('foo.js'); /* imports just "foo.js" */ importscripts('foo.js', 'bar.js'); /* imports two scripts */ importscripts('//example.com/hello.js'); /* you can import scripts from other origins */ the b
rowser loads each listed script and executes it.
... note: if sharedworker can be accessed from several b
rowsing contexts, all those b
rowsing contexts must share the exact same origin (same protocol, host, and port).
...most b
rowsers implement this feature as structured cloning.
...And 2 more matches
Window.routeEvent() - Web APIs
although it may still work in some b
rowsers, its use is discouraged since it could be removed at any time.
... b
rowser 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/b
rowser-compat-data and send us a pull request.
...And 2 more matches
WindowOrWorkerGlobalScope.queueMicrotask() - Web APIs
the queuemicrotask() method, which is exposed on the window or worker interface, queues a microtask to be executed at a safe time prior to control returning to the b
rowser's event loop.
... the microtask is a short function which will run after the current task has completed its work and when there is no other code waiting to be run before control of the execution context is returned to the b
rowser's event loop.
... this lets your code run without interfering with any other, potentially higher priority, code that is pending, but before the b
rowser regains control over the execution context, potentially depending on work you need to complete.
...And 2 more matches
Keyboard-navigable JavaScript widgets - Accessibility
using tabindex by default, when people use the tab key to b
rowse a webpage, only interactive elements (like links, form controls) get focused.
... the following table describes tabindex behavior in modern b
rowsers: tabindex attribute focusable with mouse or javascript via element.focus() tab navigable not present follows the platform convention of the element (yes for form controls, links, etc.).
... prevent used key events from performing b
rowser functions if your widget handles a key event, prevent the b
rowser from also handling it (for example, scrolling in response to the arrow keys) by using your event handler's return code.
...And 2 more matches
:has() - CSS: Cascading Style Sheets
/* selects any <a>, as long as it has an <img> element directly inside it */ /* note that this is not supported in any b
rowser yet */ let test = document.queryselector('a:has(> img)'); syntax :has( <relative-selector-list> )where <relative-selector-list> = <relative-selector>#where <relative-selector> = <combinator>?
...this limitation has been removed because no b
rowser implemented it that way.
... instead, b
rowsers currently only support the use of :has() within stylesheets.
...And 2 more matches
:visited - CSS: Cascading Style Sheets
styling restrictions for privacy reasons, b
rowsers strictly limit which styles you can apply using this pseudo-class, and how they can be used: allowable css properties are color, background-color, border-color, border-bottom-color, border-left-color, border-right-color, border-top-color, column-rule-color, outline-color, text-decoration-color, and text-emphasis-color.
...of the properties that can be set with this pseudo-class, your b
rowser probably has a default value for color and column-rule-color only.
...lets b
rowsers restrict its behavior for privacy reasons.
...And 2 more matches
system - CSS: Cascading Style Sheets
if one more more counter styles defenitions form a cycle with their extends values, the b
rowser will treat all the participating counter styles as extending from the decimal style.
...] | [ extends <counter-style-name> ]where <counter-style-name> = <custom-ident> examples cyclic counter if your b
rowser supports it, this example will render a list like this: ◉ one ◉ two ◉ three css <ul> <li>one</li> <li>two</li> <li>three</li> </ul> @counter-style fisheye { system: cyclic; symbols: ◉; suffix: " "; } ul { list-style: fisheye; } result fixed counter if your b
rowser supports it, this example will render a list like this: ➀ one ➁ two ➂ three 4 four 5 five css <ul> <li>one</li> <li>two</li> <li>three</li> <li>four</li> <li>five</li...
...> </ul> @counter-style circled-digits { system: fixed; symbols: ➀ ➁ ➂; suffix: ' '; } ul { list-style: circled-digits; } result symbolic counter if your b
rowser supports it, this example will render a list like this: a.
...And 2 more matches
@viewport - CSS: Cascading Style Sheets
it's primarily used for mobile devices, but is also used by desktop b
rowsers that support features like "snap to edge" (such as microsoft edge).
...this is typically based on the size of the window on desktop b
rowsers that aren't in full screen mode.
... descriptors b
rowser support for @viewport is weak at this time, with support being largely available in internet explorer and edge.
...And 2 more matches
Detecting CSS animation support - CSS: Cascading Style Sheets
we create an array of b
rowser prefixes to loop over and we set pfx to an empty string.
...this means the b
rowser supports css animation without any prefix, which, to date, none of them do.
... if the b
rowser does not support non-prefixed animation and animation is still false, we iterate over all the possible prefixes, since all the major b
rowsers are currently prefixing this property and changing its name to animationname instead.
...And 2 more matches
Border-image generator - CSS: Cascading Style Sheets
=============== */ .group:before, .group:after { content: ""; display: table; } .group:after { clear:both; } .group { zoom: 1; /* for ie 6/7 (trigger haslayout) */ } /* grid column setup * ========================================================================== */ .col { display: block; float:left; margin: 1% 0 1% 1.6%; } .col:first-child { margin-left: 0; } /* all b
rowsers except ie6 and lower */ /* * ui component */ .ui-input-slider { height: 20px; font-family: "segoe ui", arial, helvetica, sans-serif; -moz-user-select: none; user-select: none; } .ui-input-slider * { float: left; height: 100%; line-height: 100%; } /* input slider */ .ui-input-slider > input { margin: 0; padding: 0; width: 50px; text-align: center; -moz-box-sizing: border-b...
...ox; -webkit-box-sizing: border-box; box-sizing: border-box; } .ui-input-slider-info { width: 90px; padding: 0px 10px 0px 0px; text-align: right; text-transform: lowercase; } .ui-input-slider-left, .ui-input-slider-right { width: 16px; cursor: pointer; background: url("https://mdn.mozillademos.org/files/5679/ar
rows.png") center left no-repeat; } .ui-input-slider-right { background: url("https://mdn.mozillademos.org/files/5679/ar
rows.png") center right no-repeat; } .ui-input-slider-name { width: 90px; padding: 0 10px 0 0; text-align: right; text-transform: lowercase; } .ui-input-slider-btn-set { width: 25px; background-color: #2c9fc9; border-radius: 5px; color: #fff; font-weight: bold; line-height: 14px; text-align: center; } .ui-input-slider-btn-set:hover { backgroun...
...aggable(preview); makedraggable(subject); var handle = document.createelement('div'); handle.classname = 'resize-handle'; handle.addeventlistener('mousedown', dragstart); document.addeventlistener('mouseup', dragend); preview.appendchild(handle); }; return { init: init }; }(); var imagereader = (function imagereader() { var freader = new filereader(); var b
rowse = document.createelement('input'); var loadimage = function loadimage(e) { if (b
rowse.files.length === 0) return; var file = b
rowse.files[0]; if (file.type.slice(0, 5) !== 'image') return; freader.readasdataurl(file); return false; }; freader.onload = function(e) { imagecontrol.loadremoteimage(e.target.result); }; var load = function load() { b
rowse.
...And 2 more matches
Using multi-column layouts - CSS: Cascading Style Sheets
</p> </div> css #col { column-count: 2; } result will display the content in two columns (if you're using a multi-column compliant b
rowser): the column-width property sets the minimum desired column width.
... if column-count is not also set, then the b
rowser will automatically make as many columns as fit in the available width.
...excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum </div> css #columns_12 { columns: 12 8em; } result height balancing the css3 column specification requires that the column heights must be balanced: that is, the b
rowser automatically sets the maximum column height so that the heights of the content in each column are approximately equal.
...And 2 more matches
Aligning Items in a Flex Container - CSS: Cascading Style Sheets
if you have a wrapped multiple-line flex container then you might also want to use the align-content property to control the distribution of space between the
rows.
...b
rowser support for this value is not as good as that of the values defined in the flexbox spec.
... see the documentation for justify-content on mdn for more details on all of these values and b
rowser support.
...And 2 more matches
Basic concepts of CSS Scroll Snap - CSS: Cascading Style Sheets
the mandatory keyword tells the b
rowser whether the content has to snap to a certain point, no matter where the scroll is.
... using mandatory gives a very consistent experience — you know that the b
rowser will always snap to each defined point.
... the proximity value will only snap to a position when it is close by, the exact distance being left to the b
rowser to decide.
...And 2 more matches
Introducing the CSS Cascade - CSS: Cascading Style Sheets
user-agent stylesheets the b
rowser has a basic style sheet that gives a default style to any document.
...some b
rowsers use actual style sheets for this purpose, while others simulate them in code, but the end result is the same.
... some b
rowsers let users modify the user-agent stylesheet.
...And 2 more matches
font-size-adjust - CSS: Cascading Style Sheets
to use this property in a way that is compatible with b
rowsers that do not support font-size-adjust, it is specified as a number that the font-size property is multiplied by.
... this will still produce reasonable results in b
rowsers that do not support font-size-adjust, where a 14px font will be used.
...this means that the first-choice font, when available, will appear the same size in b
rowsers, whether or not they support font-size-adjust.
...And 2 more matches
hyphens - CSS: Cascading Style Sheets
it can prevent hyphenation entirely, hyphenate at manually-specified points within the text, or let the b
rowser automatically insert hyphens where appropriate.
...in html, the language is determined by the lang attribute, and b
rowsers will hyphenate only if this attribute is present and the appropriate hyphenation dictionary is available.
... note: the rules defining how hyphenation is performed are not explicitly defined by the specification, so the exact hyphenation may vary from b
rowser to b
rowser.
...And 2 more matches
image-set() - CSS: Cascading Style Sheets
the image-set() css function notation is a method of letting the b
rowser pick the most appropriate css image from a given set, primarily for high pixel density screens.
...the image-set() function delivers the most appropriate image resolution for a user’s device, providing a set of image options — each with an associated resolution declaration — from which the b
rowser picks the most appropriate for the device and settings.
... accessibility concerns b
rowsers do not provide any special information on background images to assistive technology.
...And 2 more matches
<image> - CSS: Cascading Style Sheets
d-size; and (3) its default size, determined by the kind of property the image is used with: kind of object (css property) default object size background-image the size of the element's background positioning area list-style-image the size of a 1em character border-image-source the size of the element's border image area cursor the b
rowser-defined size matching the usual cursor size on the client's system mask-image ?
...if supported, the b
rowser-defined size matching the usual cursor size on the client's system content for a pseudo-element (::after/::before) a 300px × 150px rectangle the concrete object size is calculated using the following algorithm: if the specified size defines both the width and the height, these values are used as the concrete object size.
... note: not all b
rowsers support every type of image on every property.
...And 2 more matches
visibility - CSS: Cascading Style Sheets
the property can also hide
rows or columns in a <table>.
... collapse for <table>
rows, columns, column groups, and row groups, the row(s) or column(s) are hidden and the space they would have occupied is removed (as if display: none were applied to the column/row of the table).
... however, the size of other
rows and columns is still calculated as though the cells in the collapsed row(s) or column(s) are present.
...And 2 more matches
Setting up adaptive streaming media sources - Developer guides
this article explains how, looking at two of the most common formats: mpeg-dash and hls (http live streaming.) choosing formats in terms of adaptive streaming formats, there are many to choose from; we decided to choose the following two as between them we can support most modern b
rowsers.
... the mpd file tells the b
rowser where the various pieces of media are located, it also includes meta data such as mimetype and codecs and there are other details such as byte-ranges in there too - it is an xml document and in many cases will be generated for you.
... <video src="my.mpd" type="application/dash+xml"></video> it might be wise to provide a fallback for b
rowsers that don't yet support mpeg-dash: <video> <source src="my.mpd" type="application/dash+xml"> <!-- fallback --> <source src="my.mp4" type="video/mp4"> <source src="my.webm" type="video/webm"> </video> live profile a useful piece of software when dealing with mpeg-dash is dash encoder.
...And 2 more matches
Video player styling basics - Developer guides
in the previous cross b
rowser video player article we described how to build a cross-b
rowser html5 video player using the media and fullscreen apis.
... as mentioned in the previous article, there is a fallback provided for b
rowsers that do not support the <progress> element; this also needs to be styled appropriately: .controls progress[data-state="fake"] { background:#e6e6e6; height:65%; } .controls progress span { width:0%; height:100%; display:inline-block; background-color:#2a84cd; } a .data-state class is also used here when a <progress> element is being "faked"; when it's in this state the back...
... there are some b
rowser-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.
...And 2 more matches
<base>: The Document Base URL element - HTML: Hypertext Markup Language
target a keyword or author-defined name of the default b
rowsing context to show the results of navigation from <a>, <area>, or <form> elements without explicit target attributes.
... the following keywords have special meanings: _self (default): show the result in the current b
rowsing context.
... _blank: show the result in a new, unnamed b
rowsing context.
...And 2 more matches
<canvas>: The Graphics Canvas element - HTML: Hypertext Markup Language
this is only supported by mozilla-based b
rowsers; use the standardized canvas.getcontext('2d', { alpha: false }) instead.
...that content will be rendered both on older b
rowsers that don't support canvas and in b
rowsers with javascript disabled.
... maximum canvas size the maximum size of a <canvas> element is very large, but the exact size depends on the b
rowser.
...And 2 more matches
<details>: The Details disclosure element - HTML: Hypertext Markup Language
it is sent after the state is changed, although if the state changes multiple times before the b
rowser can dispatch the event, the events are coalesced so that only one is sent.
... an input device as well as some form of output device is recommended.</p> </details> in this situation, the b
rowser will use a default summary string (usually "details").
... here's what your b
rowser does with it: providing a summary this example adds a summary to the above example by using the <summary> element inside <details>, like this: <details> <summary>system requirements</summary> <p>requires a computer running an operating system.
...And 2 more matches
<input type="checkbox"> - HTML: Hypertext Markup Language
the exact appearance depends upon the operating system configuration under which the b
rowser is running.
... unlike other b
rowsers, firefox by default persists the dynamic checked state of an <input> across page loads.
... essentially, then, the indeterminate attribute adds a third possible state to the checkbox: "i don't know." in this state, the b
rowser may draw the checkbox in grey or with a different mark inside the checkbox.
...And 2 more matches
<input type="color"> - HTML: Hypertext Markup Language
the element's presentation may vary substantially from one b
rowser and/or platform to another—it might be a simple textual input that automatically validates to ensure that the color information is entered in the proper format, or a platform-standard color picker, or some kind of custom color picker window.
... note: any web b
rowser that doesn't support an input of type color will naturally fall back to the type text.
...s changes over time to the color value: colorpicker.addeventlistener("input", updatefirst, false); colorpicker.addeventlistener("change", watchcolorpicker, false); function watchcolorpicker(event) { document.queryselectorall("p").foreach(function(p) { p.style.color = event.target.value; }); } selecting the value if the <input> element's implementation of the color type on the user's b
rowser doesn't support a color well, but is instead a text field for entering the color string directly, you can use the select() method to select the text currently in the edit field.
...And 2 more matches
<input type="radio"> - HTML: Hypertext Markup Language
unlike other b
rowsers, firefox by default persists the dynamic checked state of an <input> across page loads.
...order: 6px solid black; } button, legend { color: white; background-color: black; padding: 5px 10px; border-radius: 0; border: 0; font-size: 14px; } button:hover, button:focus { color: #999; } button:active { background-color: white; color: black; outline: 1px solid black; } most notable here is the use of the -moz-appearance property (with prefixes needed to support some b
rowsers).
...although it is supported in most modern b
rowsers, its implementation varies widely.
...And 2 more matches
<select>: The HTML Select element - HTML: Hypertext Markup Language
when multiple is specified, most b
rowsers will show a scrolling list box instead of a single line dropdown.
...when multiple is specified), this attribute represents the number of
rows in the list that should be visible at one time.
... b
rowsers are not required to present a select element as a scrolled list box.
...And 2 more matches
<table>: The Table element - HTML: Hypertext Markup Language
the html <table> element represents tabular data — that is, information presented in a two-dimensional table comprised of
rows and columns of cells containing data.
...it can have the following values: none, which indicates that no rules will be displayed; it is the default value; groups, which will cause the rules to be displayed between row groups (defined by the <thead>, <tbody> and <tfoot> elements) and between column groups (defined by the <col> and <colgroup> elements) only;
rows, which will cause the rules to be displayed between
rows; columns, which will cause the rules to be displayed between columns; all, which will cause the rules to be displayed between
rows and columns.
... mdn adding a caption to your table with <caption> caption & summary • tables • w3c wai web accessibility tutorials scoping
rows and columns the scope attribute on header elements is redundant in simple contexts, because scope is inferred.
...And 2 more matches
accesskey - HTML: Hypertext Markup Language
note: in the whatwg spec, it says you can specify multiple space-separated characters, and the b
rowser will use the first one it supports.
... however, this does not work in most b
rowsers.
... the way to activate the accesskey depends on the b
rowser and its platform: windows 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, ...
...And 2 more matches
Global attributes - HTML: Hypertext Markup Language
for example, html5-compliant b
rowsers hide content marked as <foo hidden>...</foo>, even though <foo> is not a valid html element.
...the b
rowser should use the first one that exists on the computer keyboard layout.
...if so, the b
rowser modifies its widget to allow editing.
...And 2 more matches
Clear-Site-Data - HTTP
the clear-site-data header clears b
rowsing data (cookies, storage, cache) associated with the requesting website.
... it allows web developers to have more control over the data stored locally by a b
rowser for their origins.
...the b
rowser cache, see http caching) for the origin of the response url.
...And 2 more matches
Content-Security-Policy - HTTP
child-src defines the valid sources for web workers and nested b
rowsing contexts loaded using elements such as <frame> and <iframe>.
... instead of child-src, if you want to regulate nested b
rowsing contexts and workers, you should use the frame-src and worker-src directives, respectively.
... frame-src specifies valid sources for nested b
rowsing contexts loading using elements such as <frame> and <iframe>.
...And 2 more matches
HTTP Public Key Pinning (HPKP) - HTTP
it has been removed in modern b
rowsers and is no longer supported.
...web clients such as b
rowsers trust a lot of these cas, which can all create certificates for arbitrary domain names.
...some b
rowsers might allow other hashing algorithms than sha-256 in the future.
...And 2 more matches
Redirections in HTTP - HTTP
when b
rowsers receive a redirect, they immediately load the new url provided in the location header.
... special redirections 304 (not modified) redirects a page to the locally cached copy (that was stale), and 300 (multiple choice) is a manual redirection: the body, presented by the b
rowser as a web page, lists the possible redirections and the user clicks on one to select it.
...when displaying the page, the b
rowser will go to the indicated url.
...And 2 more matches
A re-introduction to JavaScript (JS tutorial) - JavaScript
the most common host environment is the b
rowser, but javascript interpreters can also be found in a huge list of other places, including adobe acrobat, adobe photoshop, svg images, yahoo's widget engine, server-side environments such as node.js, nosql databases like the open source apache couchdb, embedded computers, complete desktop environments like gnome (one of the most popular guis for gnu/linux operating systems), and others.
...this takes the base for the conversion as an optional second argument, which you should always provide: parseint('123', 10); // 123 parseint('010', 10); // 10 in older b
rowsers, strings beginning with a "0" are assumed to be in octal (radix 8), but this hasn't been the case since 2013 or so.
... unless you're certain of your string format, you can get surprising results on those older b
rowsers: parseint('010'); // 8 parseint('0x10'); // 16 here, we see the parseint() function treat the first string as octal due to the leading 0, and the second string as hexadecimal due to the leading "0x".
...And 2 more matches
About JavaScript - JavaScript
javascript® (often shortened to js) is a lightweight, interpreted, object-oriented language with first-class functions, and is best known as the scripting language for web pages, but it's used in many non-b
rowser environments as well.
... besides the above implementations, there are other popular javascript engines such as:- google's v8, which is used in the google chrome b
rowser and recent versions of opera b
rowser.
... the javascriptcore (squirrelfish/nitro) used in some webkit b
rowsers such as apple safari.
...And 2 more matches
eval() - JavaScript
function test() { var x = 2, y = 4; console.log(eval('x + y')); // direct call, uses local scope, result is 6 var geval = eval; // equivalent to calling eval in the global scope console.log(geval('x + y')); // indirect call, uses global scope, th
rows referenceerror because `x` is undefined (0, eval)('x + y'); // another example of indirect call } never use eval()!
...thus, any use of eval() will force the b
rowser to do long expensive variable name lookups to figure out where the variable exists in the machine code and set its value.
... additonally, new things can be introduced to that variable through eval() such as changing the type of that variable, forcing the b
rowser to re-evaluate all of the generated machine code to compensate.
...And 2 more matches
this - JavaScript
// in web b
rowsers, the window object is also the global object: console.log(this === window); // true a = 37; console.log(window.a); // 37 this.b = "mdn"; console.log(window.b) // "mdn" console.log(b) // "mdn" note: you can always easily get the global object using the global globalthis property, regardless of the current context in which your code is running.
... since the following code is not in strict mode, and because the value of this is not set by the call, this will default to the global object, which is window in a b
rowser.
... function f1() { return this; } // in a b
rowser: f1() === window; // true // in node: f1() === globalthis; // true in strict mode, however, if the value of this is not set when entering an execution context, it remains as undefined, as shown in the following example: function f2() { 'use strict'; // see strict mode return this; } f2() === undefined; // true in the second example, this should be undefined, because f2 was called directly and not as a method or property of an object (e.g.
...And 2 more matches
throw - JavaScript
the throw statement th
rows a user-defined exception.
...each of the following th
rows an exception: throw 'error2'; // generates an exception with a string value throw 42; // generates an exception with the value 42 throw true; // generates an exception with the value true throw new error('required'); // generates an error object with the message of required also note that the throw statement is affected by automatic semicolon insertion (asi) as no line terminator be...
...if the zip code uses an invalid format, the throw statement th
rows an exception by creating an object of type zipcodeformatexception.
...And 2 more matches
Transitioning to strict mode - JavaScript
ecmascript 5 introduced strict mode which is now implemented in all major b
rowsers (including ie10).
... while making web b
rowsers interpret code as strict is easy (just add 'use strict'; at the top of your source code), transitioning an existing code base to strict mode requires a bit more work.
...strict mode th
rows in such cases.
...And 2 more matches
JavaScript
while it is most well-known as the scripting language for web pages, many non-b
rowser environments also use it, such as node.js, apache couchdb and adobe acrobat.
...as of 2012, all modern b
rowsers fully support ecmascript 5.1.
... older b
rowsers support at least ecmascript 3.
...And 2 more matches
<mtable> - MathML
a negative integer value counts
rows from the bottom of the table.
... unimplemented equal
rows a boolean value indicating whether to force all
rows to have the same total height.
...multiple values separated by space are allowed and apply to the corresponding
rows (e.g.
...And 2 more matches
Mapping the width and height attributes of media container elements to their aspect-ratio - Web media technologies
this change means that the aspect ratio of the image is calculated by the b
rowser early on and can then be used to correct the size needed to display the image before it has loaded, if css has been applied that causes problems with its display size.
... jank problems when loading images in the olden days of web development, it was always seen as a good practice to add width and height attributes to your html <img> elements, so that when b
rowsers first loaded the page, they could put a correctly-sized placeholder box in the layout for each image to appear in when it finally loads.
... due to this work, b
rowsers are working on adding a new mechanism for sizing images before the actual image is loaded.
...And 2 more matches
Using dns-prefetch - Web Performance
when a b
rowser requests a resource from a (third party) server, that cross-origin’s domain name must be resolved to an ip address before the b
rowser can issue the request.
...this is because the ip behind your site’s domain will have already been resolved by the time the b
rowser sees the hint.
...b
rowsers that don’t support preconnect will still get some added benefit by falling back to dns-prefetch.
...And 2 more matches
Mobile first - Progressive web apps (PWAs)
this article offers some related ideas, looking at the concept of mobile first — the practice of designing a website so that the default layout/configuration is for mobile devices, and layouts and features for desktop b
rowsers are then layered on top of that default.
... if you are using mechanisms like feature detection and matchmedia to conditionally load scripting functionality depending on viewport size, feature support, etc., you should just load the very basics that pretty much all b
rowsers will need first, then progressively enhance b
rowsers higher up the food chain.
... feature detection feature detection involves doing tests (usually in javascript) to determine whether a b
rowser supports a certain feature, and then serving css or javascript to suit that situation.
...And 2 more matches
dominant-baseline - SVG: Scalable Vector Graphics
if there is no baseline table in the nominal font, or if the baseline table lacks an entry for the desired baseline, then the b
rowser may use heuristics to determine the position of the desired baseline.
...the choice of which font baseline-table to use from the baseline-tables in the font is b
rowser dependent.
...the choice of which baseline-table to use from the baseline-tables in the font is b
rowser dependent.
...And 2 more matches
SVG and CSS - SVG: Scalable Vector Graphics
below you'll create a simple demonstration that runs in your svg-enabled b
rowser.
...: azure; --segment-fill-stroke: lightsteelblue; --segment-fill-stroke-width: 1; --segment-edge-fill: none; --segment-edge-stroke: deepskyblue; --segment-edge-stroke-width: 3; --segment-fill-fill-hover: plum; --segment-fill-stroke-hover: none; --segment-edge-stroke-hover: slateblue; } /* non-standard way of styling elements referenced via <use> elements, supported by some older b
rowsers */ #outer-petals .segment-fill { fill: azure; stroke: lightsteelblue; stroke-width: 1; } #outer-petals .segment-edge { fill: none; stroke: deepskyblue; stroke-width: 3; } #outer-petals .segment:hover > .segment-fill { fill: plum; stroke: none; } #outer-petals .segment:hover > .segment-edge { stroke: slateblue; } /* inner petals */ #inner-petals { --segment-fill-fill: ye...
...llow; --segment-fill-stroke: yellow; --segment-fill-stroke-width: 1; --segment-edge-fill: none; --segment-edge-stroke: yellowgreen; --segment-edge-stroke-width: 9; --segment-fill-fill-hover: darkseagreen; --segment-fill-stroke-hover: none; --segment-edge-stroke-hover: green; } /* non-standard way of styling elements referenced via <use> elements, supported by some older b
rowsers */ #inner-petals .segment-fill { fill: yellow; stroke: yellow; stroke-width: 1; } #inner-petals .segment-edge { fill: none; stroke: yellowgreen; stroke-width: 9; } #inner-petals .segment:hover > .segment-fill { fill: darkseagreen; stroke: none; } #inner-petals .segment:hover > .segment-edge { stroke: green; } open the document in your svg-enabled b
rowser.
...And 2 more matches
Features restricted to secure contexts - Web security
current features available only in secure contexts this section lists all the apis available only in secure contexts, along with b
rowser versions the limitation was introduced in, as appropriate.
... note: only the b
rowsers that actually support secure contexts are listed in this document.
...d not supported 51 web authentication api 65 in preview (17) in development 60 web bluetooth 56 not supported not supported not supported web midi (see midiaccess, for example) 43 not supported not supported not supported web crypto api 60 79 not supported 75 secure context restrictions that vary by b
rowser some b
rowsers may decide to disable certain apis in non-secure contexts or apply other restrictions/security measures, despite the spec not requiring them.
...And 2 more matches
Transport Layer Security - Web security
it was updated to ssl 3.0 not long after, and as its usage expanded, it became clear that a common, standard encryption technology needed to be specified to ensure interoperability among all web b
rowsers and servers.
...in general, you should try to limit cipher support to the newest ciphers possible which are compatible with the b
rowsers you want to be able to connect to your site.
...tls 1.3 is enabled in some b
rowsers, including the 0-rtt mode.
...And 2 more matches
selection - Archive of obsolete content
private windows if your add-on has not opted into private b
rowsing, then you won't see any selections made in tabs that are hosted by private b
rowser windows.
... to learn more about private windows, how to opt into private b
rowsing, and how to support private b
rowsing, refer to the documentation for the private-b
rowsing module.
...setting the selection when there is no current selection th
rows an exception.
...setting the selection when there is no current selection th
rows an exception.
frame/utils - Archive of obsolete content
experimental provides helper functions for working with platform internals like frames and b
rowsers.
... usage module exports create function that takes the nsidomdocument of a privileged document and creates a b
rowser element in its documentelement: let { open } = require('sdk/window/utils'); let { create } = require('sdk/frame/utils'); let window = open('data:text/html,foo'); let frame = create(window.document); optionally create can be passed set of options to configure created frame even further.
... execution of scripts may easily be enabled: let { open } = require('sdk/window/utils'); let { create } = require('sdk/frame/utils'); let window = open('data:text/html,top'); let frame = create(window.document, { uri: 'data:text/html,<script>console.log("running");</script>', allowjavascript: true }); } globals functions create(document, options) creates a xul b
rowser element in a privileged document.
... returns frame : the new b
rowser element.
platform/xpcom - Archive of obsolete content
if the factory or service is already registered, this function th
rows components.results.ns_error_factory_exists.
...if the factory or service isn't registered, this function th
rows components.results.ns_error_factory_not_registered.
... if it finds a match, it returns this, otherwise it th
rows components.results.ns_error_no_interface.
... parameters outer : null this argument must be null, or the function th
rows cr.ns_error_no_aggregation.
ui/sidebar - Archive of obsolete content
a sidebar is a vertical strip of user interface real estate for your add-on that's attached to the left-hand side of the b
rowser window.
...from firefox 33 onwards you can pass a b
rowserwindow into these methods, and they will then operate on the specified window.
... parameters window : b
rowserwindow the window in which to show the sidebar, specified as a b
rowserwindow.
... parameters window : b
rowserwindow the window for which to hide the sidebar, specified as a b
rowserwindow.
Low-Level APIs - Archive of obsolete content
frame/utils provides helper functions for working with platform internals like frames and b
rowsers.
... places/history access the user's b
rowsing history.
... tabs/utils functions for working with xul tabs and the xul tabb
rowser object.
... window/utils functions for working with b
rowser windows.
Release notes - Archive of obsolete content
removed isprivateb
rowsing from b
rowserwindow.
... added a b
rowserwindow parameter to sidebar.show() and sidebar.hide(), to control the window for which the sidebar will be shown or hidden.
... firefox 31 highlights add-on debugger added the ability to convert between high-level b
rowserwindow objects and dom windows, and between high-level tab objects and xul tabs.
... removed tab-b
rowser, app-strings and api-utils.publicconstructor details github commits made between firefox 28 and firefox 29.
Storing annotations - Archive of obsolete content
in this chapter we will cover three topics relating to persistent storage: using simple-storage to persist objects handling exhaustion of the storage quota allocated to you respecting private b
rowsing storing new annotations in this section we are only touching the main.js file.
... the user will be able to click links in the panel, but we want to open them in the main b
rowser window rather than the panel.
...a real add-on should give the user a chance to choose which data to keep, and prevent the user from adding any more data until the add-on is back under quota.) respecting private b
rowsing since annotations record the user's b
rowsing history we should avoid recording annotations in private windows.
...by omitting the "private-b
rowsing" key from the annotator's "package.json" file, the annotator opts out of private b
rowsing altogether.
Creating Event Targets - Archive of obsolete content
in this tutorial we'll create part of a module to access the b
rowser's places api.
...then open "index.js" and add the following code: var {cc, ci} = require("chrome"); var { xpcomutils } = require("resource://gre/modules/xpcomutils.jsm"); var bookmarkservice = cc["@mozilla.org/b
rowser/nav-bookmarks-service;1"] .getservice(ci.nsinavbookmarksservice); var bookmarkobserver = { onitemadded: function(aitemid, afolder, aindex) { console.log("added ", bookmarkservice.getbookmarkuri(aitemid).spec); }, onitemvisited: function(aitemid, avisitid, time) { console.log("visited ", bookmarkservice.getbookmarkuri(aitemid).spec); }, queryinterface...
... create a new file in "lib" called "bookmarks.js", and add the following code: var { emit, on, once, off } = require("sdk/event/core"); var {cc, ci} = require("chrome"); var { xpcomutils }= require("resource://gre/modules/xpcomutils.jsm"); var bookmarkservice = cc["@mozilla.org/b
rowser/nav-bookmarks-service;1"] .getservice(ci.nsinavbookmarksservice); var bookmarkobserver = { onitemadded: function(aitemid, afolder, aindex) { emit(exports, "added", bookmarkservice.getbookmarkuri(aitemid).spec); }, onitemvisited: function(aitemid, avisitid, time) { emit(exports, "visited", bookmarkservice.getbookmarkuri(aitemid).spec); }, queryinterfa...
... open "bookmarks.js" and replace its contents with this code: var { emit } = require("sdk/event/core"); var { eventtarget } = require("sdk/event/target"); var { class } = require("sdk/core/heritage"); var { merge } = require("sdk/util/object"); var {cc, ci} = require("chrome"); var { xpcomutils } = require("resource://gre/modules/xpcomutils.jsm"); var bookmarkservice = cc["@mozilla.org/b
rowser/nav-bookmarks-service;1"] .getservice(ci.nsinavbookmarksservice); function createobserver(target) { var bookmarkobserver = { onitemadded: function(aitemid, afolder, aindex) { emit(target, "added", bookmarkservice.getbookmarkuri(aitemid).spec); }, onitemvisited: function(aitemid, avisitid, time) { emit(target, "visited", bookmarkservice.
Getting started (cfx) - Archive of obsolete content
when firefox launches, in the top-right corner of the b
rowser you'll see an icon with the firefox logo.
...it uses two sdk modules: the action button module, which enables you to add buttons to the b
rowser, and the tabs module, which enables you to perform basic operations with tabs.
... developing without cfx run because cfx run restarts the b
rowser each time you invoke it, it can be a little cumbersome if you are making frequent changes to an add-on.
...that way you can test new changes without needing to restart the b
rowser: make a change to your add-on run cfx xpi post the add-on to the port specified you could even automate this workflow with a simple script.
LookupNamespaceURI - Archive of obsolete content
here is an implementation of node.lookupnamespaceuri which should work cross-b
rowser.
... note that all gecko-based b
rowsers (including firefox) support node.lookupnamespaceuri.
... this function is not necessary for gecko-based b
rowsers (though the function will quickly return the standard value for mozilla b
rowsers) when used to reflect on static documents.
...per (node, prefix) { // adapted directly from http://www.w3.org/tr/dom-level-3-core/namespaces-algorithms.html#lookupnamespaceurialgo var i, att, htmlmode = document.contenttype, // mozilla only xmlnspattern = /^xmlns:(.*)$/; switch (node.nodetype) { case 1: // element_node (could also just test for node.element_node, etc., if supported in all b
rowsers) if (node.namespaceuri != null && node.prefix === prefix) { // note: prefix could be "null" in the case we are looking for default namespace return node.namespaceuri; } if (node.attributes.length) { for (i = 0; i < node.attributes.length; i++) { att = node.attrib...
Extension Etiquette - Archive of obsolete content
theming if you have xul buttons in your extension that do functions similar to ones that already exist in a b
rowser — for example, a feed reader that reloads and stops — use icons from the b
rowser's theme.
... coding practices namespace conflicts there are many namespaces which extensions often must share with other consumers, be they other add-ons, web code, or the b
rowser itself.
... ids and class names in html and xul documents, when extensions add elements to web pages or b
rowser windows.
...for example, "does an action in the b
rowser." documentation assume that the vast majority of your users don't have inner working knowledge of mozilla.
Interaction between privileged and non-privileged pages - Archive of obsolete content
in your extension's b
rowser.xul overlay, write code which listens for a custom dom event.
...espaceuri property, or as per the dom specification, use initevent() with an event name that is itself namespaced (xml name characters only): "it is also strongly recommended that third parties adding their own events use their own prefix to avoid confusion and lessen the probability of conflicts with other new events.") in the case where your extension's overlay does not interact directly with b
rowser.xul, such as in a sidebar, it might be easier to add the event listener to the top-level document directly as shown below (also see: accessing the elements of the top-level document from a child window).
...ck</button> <button onclick="return something.send_request({baz: 3}, something.callback)">send {baz: 3} with callback</button> <button onclick="return something.send_request({mozilla: 3})">send {mozilla: 3} without callback</button> <button onclick="return something.send_request({firefox: 4}, something.callback)">send {firefox: 4} with callback</button> </body> </html> overlay on b
rowser.xul in your extension: var something = { listen_request: function(callback) { // analogue of chrome.extension.onrequest.addlistener document.addeventlistener("something-query", function(event) { var node = event.target; if (!node || node.nodetype != node.text_node) return; var doc = node.ownerdocument; callback(json.parse(node.nodevalue), doc, function(re...
...curity_notes> */ function geteventdata(event) { if (event.target.ownerdocument != targetdoc) throw "event from unexpected source"; return new xml(event.target.getattribute("eventdatafrompage")); } security notes never invoke the web page's javascript functions from your extension - doing this increases the chance of creating a security hole, where a malicious web page can trick the b
rowser to run its code with extended privileges (just like your extension) with, for example, the ability to delete local files.
Appendix: What you should know about open-source software licenses - Archive of obsolete content
netscape created it for its open-source web b
rowser.
... the firefox web b
rowser, developed by the mozilla foundation, does not permit modifications of its name or trademarked icon.
... for this reason, the debian project, which distributes free software as a volunteer effort, has a b
rowser based on firefox, but with a different name and logo.
... document licenses as open-source software g
rows in popularity, people have begun thinking about applying its principles to content other than software, to allow anyone to duplicate, distribute, and modify it freely.
Adding Toolbars and Toolbar Buttons - Archive of obsolete content
to add your buttons, all you need to do is overlay the palette in your main b
rowser overlay.
... <overlay id="xulschoolhello-b
rowser-overlay" xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"> <toolbarpalette id="b
rowsertoolbarpalette"> <toolbarbutton id="xulschoolhello-hello-world-button" class="toolbarbutton-1 chromeclass-toolbar-additional" label="&xulschoolhello.helloworld.label;" tooltiptext="&xulschoolhello.helloworld.tooltip;" oncommand="xulschoolchrome.b
rowseroverlay.dosomething(event);" /> <!-- more buttons here.
...me.label;" accesskey="&xulschoolhello.toolbar.accesskey;" customizable="true" mode="icons" context="toolbar-context-menu" defaultset="xulschoolhello-hello-world-button" insertbefore="personaltoolbar" /> </toolbox> </window> (note for mac os x: <window id="main-window"> and </window> are not required) our toolbar is added as a child of the toolbox element in the main b
rowser window.
... only a few icons have different states (
rows).
Setting Up a Development Environment - Archive of obsolete content
adding: install.rdf (deflated 50%) adding: chrome.manifest (deflated 50%) adding: content/b
rowseroverlay.js (deflated 42%) adding: content/b
rowseroverlay.xul (deflated 69%) adding: skin/b
rowseroverlay.css (stored 0%) adding: locale/b
rowseroverlay.dtd (deflated 52%) adding: locale/b
rowseroverlay.properties (stored 0%) creating xpi file.
... to debug extension and b
rowser code, right-click on the loaded scripts panel and uncheck exclude b
rowser files.
...make sure you can open and close your xul school firefox without having to close the instance of firefox you use to b
rowse normally.
...b
rowse around the rest of the firefox dom, and try to figure out what the nodes correspond to in the firefox ui.
Add-ons - Archive of obsolete content
bootstrapped extensions b
rowser.bookmarks.export( function() {...} // optional function ) code snippets … creating custom firefox extensions with the mozilla build system there is a wealth of material on creating extensions for firefox.
...in your extension's b
rowser.xul overlay, write code which listens for a custom dom event.
...there is a down side to this: poorly written extensions can have a severe impact on the b
rowsing experience, including on the overall performance of firefox itself.
... tabbed b
rowser here you should find a set of useful code snippets to help you work with firefox's tabbed b
rowser.
Case Sensitivity in class and id Names - Archive of obsolete content
we have discovered, however, that many authors are running into trouble with class and id names because they're used to the bugs of b
rowsers that don't fully support open standards.
...for example, you would not want to do something like: .urgent {color: purple;} .urgent {color: yellow;} even though these are technically two distinct class names, b
rowsers other than netscape 6 will treat them as though they are the same thing.
... therefore, authors should not rely on case-sensitivity as a way of creating distinct identifiers, unless they are designing solely for a truly standards-compliant b
rowser such as netscape 6.
...as of this writing, netscape 6 is the only b
rowser to honor this defined behavior; other b
rowsers treat both class and id names as case-insensitive.
Creating a dynamic status bar extension - Archive of obsolete content
we use the window.addeventlistener() dom function to tell firefox to call the stockwatcher.startup() function when a new b
rowser window is opened: window.addeventlistener("load", function(e) { stockwatcher.startup(); }, false); our new extension has two primary functions: startup() and refreshinformation().
...startup() the startup() function is called when a new b
rowser window is opened.
...after doing that, we install an interval routine on the b
rowser window by calling window.setinterval().
...it's called whenever the user clicks on the status bar panel, when our extension is first added to a b
rowser window, and by the interval handler to periodically update the display.
Getting the page URL in NPAPI plugin - Archive of obsolete content
there's unfortunately no trivial way to do that, but you can still do it, by asking the b
rowser for the page url during plugin initialization.
...tradeoffs: uses npapi only works in most b
rowsers does not work in mozillas older than firefox 1.0 via npp_newstream from braden mcdaniel: if you want the uri of the resource for which the plug-in is invoked, the most npapi-friendly way to do that is to get it from the npstream that is passed to npp_newstream.
... tradeoffs: npapi only probably works in all b
rowsers, all versions is sort of backwards (?) advantages / disadvantages ?
...tradeoffs: is inherently incompatible with other non-mozilla b
rowsers (i.e.
Finding the file to modify - Archive of obsolete content
it contains elements for all common ui widgets (menus, buttons, toolbars, etc.) and many sophisticated ones (trees, b
rowsers, color pickers).
...to add a tinderbox status icon to mozilla, we need to find the xul file that defines the structure of the b
rowser window.
... in the dom inspector window, go to the file menu, select the inspect a window submenu, then select the mozilla b
rowser window item (named after the page currently loaded in the b
rowser).
... the dom inspector will display the url of the xul file that defines the mozilla b
rowser window, which is chrome://navigator/content/navigator.xul.
In-Depth - Archive of obsolete content
normal in english web b
rowsers items are displayed top to bottom and left to right.
...load mozilla and one b
rowser window.
...click file->inspect and select the b
rowser window.
... click on the inspect icon and then click on the back button in the b
rowser window.
Using Breakpoints in Venkman - Archive of obsolete content
hard breakpoints can only exist in the context of a function currently "live" in the b
rowser.
...(note: by default, venkman hides files file that appear to be part of the b
rowser core; this includes extensions.
... to debug an extension, uncheck "exclude b
rowser files" on the debug menu and your installed extension files should appear in the loaded scripts list.) venkman also indicates that one or more breakpoints have been set in the loaded scripts view, where red dots appear next to the files in which breakpoints have been set, along with the line number where the function begins whose code is being stopped.
...when you set a breakpoint at line 81, you can start animation on the web page in the b
rowser window and see venkman stop execution as it enters the onflipx function.
Installer Script - Archive of obsolete content
var err = initinstall("netscape seamonkey", "b
rowser", "6.0.0.2000110807"); 21.
... registerchrome(content | delayed_chrome, getfolder(cf,"b
rowser.xpi"),"content/communicator/"); 45.
... registerchrome(content | delayed_chrome, getfolder(cf,"b
rowser.xpi"),"content/editor/"); 46.
... registerchrome(content | delayed_chrome, getfolder(cf,"b
rowser.xpi"),"content/navigator/"); 47.
findbar - Archive of obsolete content
for example, the standard findbar in firefox 3.5 looks like this on the mac: you may attach a findbar to a particular b
rowser element by either setting the findbar's b
rowserid attribute to the id of the b
rowser element before the findbar element is bound, or by setting the findbar's b
rowser property to the b
rowser element itself.
... attributes b
rowserid, findnextaccesskey, findpreviousaccesskey, highlightaccesskey, matchcaseaccesskey properties b
rowser, findmode methods close, onfindagaincommand, open, startfind, togglehighlight example <b
rowser type="content-primary" flex="1" id="content" src="about:blank"/> <findbar id="findtoolbar" b
rowserid="content"/> attributes b
rowserid type: string the id of the b
rowser element to which the findbar is attached.
... you should use the b
rowser property to get and set this value from a script.
... inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, tooltip, tooltiptext, top, width b
rowser type: b
rowser element lets you set and get the b
rowser in which the findbar is located.
swapDocShells - Archive of obsolete content
« xul reference home swapdocshells( otherb
rowser ) return type: no return value swaps the content, history and current state of this b
rowser with another b
rowser.
... during the swap, pagehide and pageshow events are fired on both b
rowsers.
... this method can be used to move b
rowser between windows or tear off a b
rowser into a new window.
... note: both b
rowsers must be either standalone b
rowsers or embedded in a tabb
rowser.
Property - Archive of obsolete content
« xul reference accessible accessibletype accesskey align allnotifications allowevents alwaysopenpopup amindicator applocale autocheck autofill autofillaftermatch boxobject b
rowsers builder builderview buttons canadvance cangoback cangoforward canrewind checked checkstate child children classname clickselectsall clientheight clientwidth collapsed color columns command commandmanager completedefaultindex container contentdocument contentprincipal contenttitle contentview contentvieweredit contentviewerfile contentwindow contextmenu control controller controllers crop current currentindex currentitem currentnotification currentpage currentpane currentset currenturi custom...
...servalue height hidden hideseconds highlightnonmatches homepage hour hourleadingzero id ignoreblurwhilesearching image increment inputfield inverted is24hourclock ispm issearching iswaiting itemcount label labelelement lastpermanentchild lastselected left linkedpanel listboxobject locked markupdocumentviewer max maxheight maxlength max
rows maxwidth menu menuboxobject menupopup min minheight minresultsforpopup minwidth minute minuteleadingzero mode month monthleadingzero name next nomatch notificationshidden object observes onfirstpage onlastpage open ordinal orient pack pagecount pageid pageincrement pageindex pagestep parentcontainer palette persist persistence ...
...tor popup popupboxobject popupopen position predicate preferenceelements preferencepanes preferences priority radiogroup readonly readonly ref resource resultspopup scrollboxobject scrollincrement scrollheight scrollwidth searchbutton searchcount searchlabel searchparam searchsessions second secondleadingzero securityui selected selectedb
rowser selectedcount selectedindex selecteditem selecteditems selectedpanel selectedtab selectionend selectionstart selstyle seltype sessioncount sessionhistory showcommentcolumn showpopup size smoothscroll spinbuttons src state statusbar statustext stringbundle strings style subject suppressonselect tabcontainer tabindex tabs tabscrolling ...
...tabpanels tag textlength textvalue timeout title toolbarname toolbarset tooltip tooltiptext top treeboxobject type uri useraction value valuenumber view webb
rowserefind webnavigation webprogress width wizardpages wraparound year yearleadingzero related dom element properties dom:element.attributes dom:element.baseuri dom:element.childelementcount dom:element.childnodes dom:element.children dom:element.clientheight dom:element.clientleft dom:element.clienttop dom:element.clientwidth dom:element.clonenode dom:element.firstchild dom:element.firstelementchild dom:element.lastchild dom:element.lastelementchild dom:element.localname dom:element.namespaceuri dom:element.nextelementsibling dom:element.nextsibling ...
textbox (Toolkit autocomplete) - Archive of obsolete content
attributes accesskey, autocompletepopup, autocompletesearch, autocompletesearchparam, completedefaultindex, completeselectedindex,crop, disableautocomplete, disabled, disablekeynavigation, enablehistory, focused, forcecomplete, highlightnonmatches, ignoreblurwhilesearching, inputtooltiptext, label, maxlength, max
rows, minresultsforpopup, nomatch, onchange, oninput, onsearchcomplete, ontextentered, ontextreverted, open, readonly,showcommentcolumn, showimagecolumn, size, tabindex, tabscrolling, timeout, type, value properties accessibletype, completedefaultindex, controller, crop, disableautocomplete, disablekeynavigation, disabled, editable, focused, forcecomplete, highlightnonmatches, ignoreblurwhil...
...esearching, inputfield, label, maxlength, max
rows, minresultsforpopup, open, popup, popupopen, searchcount, searchparam, selectionend, selectionstart, showcommentcolumn, showimagecolumn,size, tabindex, tabscrolling, textlength, textvalue, timeout, type, value methods getsearchat, onsearchcomplete, ontextentered, ontextreverted, select, setselectionrange examples <textbox type="autocomplete" autocompletesearch="history"/> attributes accesskey type: character this should be set to a character that is used as a shortcut key.
... max
rows type: integer the number of
rows to show in the results list at a time.
... max
rows type: integer gets and sets the value of the max
rows attribute.
Textbox (XPFE autocomplete) - Archive of obsolete content
attributes accesskey, alwaysopenpopup, autocompletesearch, autocompletesearchparam, autofill, autofillaftermatch, autofill, completedefaultindex, crop, disableautocomplete, disableautocomplete, disabled, disablehistory, enablehistory, focused, forcecomplete, forcecomplete, highlightnonmatches, ignoreblurwhilesearching, ignoreblurwhilesearching, inputtooltiptext, label, maxlength, max
rows, minresultsforpopup, minresultsforpopup, nomatch, onchange, onerrorcommand, oninput, onsearchcomplete, ontextcommand, ontextentered, ontextrevert, ontextreverted, open, readonly, searchsessions, showcommentcolumn, showcommentcolumn, showpopup, size, tabindex, tabscrolling, tabscrolling, timeout, type, useraction, value properties accessible, alwaysopenpopup, autofill, autofillafte...
...rmatch, completedefaultindex, crop, disableautocomplete, disabled, editable, focused, forcecomplete, highlightnonmatches, ignoreblurwhilesearching, inputfield, issearching, iswaiting, label, maxlength, max
rows, minresultsforpopup, nomatch, open, popup, popupopen, resultspopup, searchcount, searchparam, searchsessions, selectionend, selectionstart, sessioncount, showcommentcolumn, showpopup, size, tabindex, tabscrolling, textlength, textvalue, timeout, type, useraction, value methods addsession, clearresults, getdefaultsession, getresultat, getresultcount, getresultvalueat, getsession, getsessionbyname, getsessionresultat, getsessionstatusat, getsessionvalueat, removesession, select, setselectionrange, syncsessions examples (example needed) attributes accesskey type: c...
... max
rows type: integer the number of
rows to show in the results list at a time.
... max
rows type: integer gets and sets the value of the max
rows attribute.
The Joy of XUL - Archive of obsolete content
the user interface for all of mozilla's core applications (b
rowser, messenger, address book, etc.) is written in xul with one single code base supporting all mozilla platforms.
...designers who are experienced in building web applications using w3c standard technologies can leverage this experience from the b
rowser directly to the desktop.
... xul blurs the distinction between desktop application and internet b
rowser apps because it is firmly entrenched in both worlds.
... whether you need to migrate an existing web application to the desktop, are looking for a technology that will enable you to easily port your applications to multiple platforms, or want to integrate your own cool features into the b
rowser, xul warrants serious consideration.
Templates - Archive of obsolete content
you can then enter the chrome url into the b
rowser url field.
... try adding a bookmark in the b
rowser while you have the example window open.
... tree builder the tree builder, on the other hand, doesn't generate the dom elements for the
rows.
...since trees are often expected to display thousands of
rows of data, this is much more efficient.
XUL Reference - Archive of obsolete content
« xul reference « alphabetical list of all xul elements action ar
rowscrollbox assign bbox binding bindings box broadcaster broadcasterset button b
rowser checkbox caption clicktoscroll colorpicker column columns commandset command conditions content datepicker deck description dialog dialogheader dropmarker editor grid grippy groupbox hbox iframe image key keyset label listbox listcell listcol listcols listhead listheader listitem member menu menubar menuitem menulist menupopup menuseparator notification notificationbox observes overlay page panel param popupset preference preferences prefpane prefwindow progressmeter query queryset radio radiogroup resizer richlistbox richlistitem row
rows rule scale scri...
...pt scrollbar scrollbox scrollcorner separator spacer spinbuttons splitter stack statusbar statusbarpanel stringbundle stringbundleset tab tabb
rowser (firefox-only starting with firefox 3/gecko 1.9) tabbox tabpanel tabpanels tabs template textnode textbox textbox (firefox autocomplete) textbox (mozilla autocomplete) timepicker titlebar toolbar toolbarbutton toolbargrippy toolbaritem toolbarpalette toolbarseparator toolbarset toolbarspacer toolbarspring toolbox tooltip tree treecell treechildren treecol treecols treeitem treerow treeseparator triple vbox where window wizard wizardpage categorical list of all xul elements « xul reference « windows window wizard wizardpage titlebar window structure --- menus and popups -...
...te toolbarseperator toolbarspring tabs and grouping tab tabbox tabpanel tabpanels tabs controls --- text and images label caption image lists --- trees --- layout --- templates --- scripting --- helper elements other xul lists dialog overlay page window wizard wizardpage preference preferences prefpane prefwindow b
rowser tabb
rowser editor iframe titlebar resizer statusbar statusbarpanel dialogheader notification notificationbox menubar menu menuitem menuseparator menupopup panel tooltip popupset toolbar toolbarbutton toolbargrippy toolbaritem toolbarpalette toolbarseparator toolbarset toolbarspacer toolbarspring toolbox tabbox tabs tab tabpanels tabpanel groupbox caption sepa...
...ogressmeter radio radiogroup scale splitter textbox textbox (firefox autocomplete) textbox (mozilla autocomplete) timepicker description label image listbox listitem listcell listcol listcols listhead listheader richlistbox richlistitem tree treecell treechildren treecol treecols treeitem treerow treeseparator box hbox vbox bbox deck stack grid columns column
rows row scrollbox action assign binding bindings conditions content member param query queryset rule template textnode triple where script commandset command broadcaster broadcasterset observes key keyset stringbundle stringbundleset ar
rowscrollbox dropmarker grippy scrollbar scrollcorner spinbuttons all attributes all properties all methods attributes defined for...
The Implementation of the Application Object Model - Archive of obsolete content
what content developers want from the next release of mozilla is a standards-compliant b
rowser.
... if we ship a b
rowser that does not have 100% support for css2, for example, but we've extended html by adding 20-30 new tags, people are going to put down their blinders and see only the fact that we were off adding a whole slew of new stuff to html when we could have been firming up our standards story.
...yes, you'd probably ship a b
rowser slightly faster than with the xul-based approach, but the features that would be lost are too compelling to ignore.
...the additional cost up front to implement xul is worth it for the amount of time it will save in future versions of the b
rowser.
promptBox - Archive of obsolete content
it's returned by the tabb
rowser method gettabmodalpromptbox method.
... a tab may have multiple prompts on it; the tabmodalpromptshowing attribute on the tabb
rowser will tell you how many prompts a given tab has.
... listprompts() returns a list of all the prompts on the tabb
rowser.
... return value a nodelist containing all of the prompt elements on the tabb
rowser.
window - Archive of obsolete content
this is used to hide chrome when showing in-b
rowser 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.
...this might be used, for example, to distinguish between a b
rowser window and an editor window.
... values for window type as found on mxr: http://mxr.mozilla.org/mozilla-release/search?string=windowtype navigator:b
rowser - looks like if window has gb
rowser it has this window type devtools:scratchpad - scratchpad windows navigator:view-source - the view source windows properties inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, tooltip, tooltiptext, top, width metho...
... to add a favicon to the address bar and b
rowser tab (ie dialog is not a popup) then use the following code snippet to use the html namespace and link.
Extentsions FAQ - Archive of obsolete content
var tab = gb
rowser.addtab( url ); // and if you want it to load in the foreground: gb
rowser.selectedtab = tab; is it possible to read the html-code of the current url/site?
... in the debug menu, uncheck exclude b
rowser files.
... http://lxr.mozilla.org/mozilla1.8/so...ents/nsb
rowser...
...there's a bug in bugzilla about stacking other widgets on top of b
rowser/iframe, which hopefully will be fixed for gecko 1.9.
NPN_GetURLNotify - Archive of obsolete content
« gecko plugin api reference « b
rowser side plug-in api summary requests creation of a new stream with the contents of the specified url; gets notification of the result.
... for requests that complete unsuccessfully, the b
rowser calls npp_urlnotify() as soon as possible.
... for requests that complete successfully: if the target is non-null, the b
rowser calls npp_urlnotify() after it has finished loading the url.
... if the target is null, the b
rowser calls npp_urlnotify() after closing the stream by calling npn_destroystream().
NPN_RequestRead - Archive of obsolete content
description for a seekable stream, the b
rowser sends data only in response to requests by the plug-in.
...if the plug-in requests multiple ranges (either through a list of npbyterange objects in a single call to npn_requestread(), or multiple calls to npn_requestread()), the b
rowser can write individual ranges in any order, and with any number of npp_writeready() and npp_write() calls.
... the plug-in must allocate npbyterange objects, which the b
rowser copies if necessary.
... if the stream is not inherently seekable, the stream must have been put in np_seek mode initially (since the b
rowser must cache all the stream data on disk in order to access it randomly).
NPP_Destroy - Archive of obsolete content
the b
rowser calls this function when a plug-in instance is deleted, typically because the user has left the page containing the instance, closed the window, or quit the b
rowser.
...ownership of the buf field of the npsaveddata structure passes from the plug-in to the b
rowser when npp_destroy returns.
... the b
rowser can and will discard this data based on arbitrary criteria such as its size and the user's page history.
... to ensure that the b
rowser does not crash or leak memory when the saved data is discarded, npsaveddata's buf field should be a flat structure (a simple structure with no allocated substructures) allocated with npn_memalloc.
NPP_HandleEvent - Archive of obsolete content
description the b
rowser calls npp_handleevent to tell the plug-in when events take place in the plug-in's window or drawable area.
... ms windows the b
rowser gives each windowed plug-in its own native window, often a child window of the b
rowser window, to draw into.
... mac os the b
rowser does not give a windowed plug-in a native window, because the mac os platform does not support child windows.
... instead, the windowed plug-in draws into the graphics port associated with the the b
rowser window, at the offset that the b
rowser specifies.
NPP_New - Archive of obsolete content
instance contains instance-specific private data for the plug-in and the b
rowser.
...values: np_embed: (1) instance was created by an embed tag and shares the b
rowser window with other content.
...if non-null, the b
rowser passes ownership of the npsaveddata object back to the plug-in.
...the b
rowser ignores any non-standard attributes within an embed tag.
NPSavedData - Archive of obsolete content
can be any reasonable size; its contents are private to the plug-in and are not modified by the b
rowser.
... description the npsaveddata object contains a block of per-instance information that the b
rowser saves after the instance is deleted.
...you can use the plug-in's npp_destroy() function to allocate an npsaveddata object using the npn_memalloc() function, fill in the fields, and return it to the b
rowser as an output parameter.
...if the user revisits a web page that contains a plug-in, the b
rowser returns the npsaveddata to the new instance of the plug-in in a call to npp_new().
NP_Initialize - Archive of obsolete content
description the b
rowser calls this function only once: when a plug-in is loaded, before the first instance is created.
... this is the first function that the b
rowser calls.
... np_initialize tells the plug-in that the b
rowser has loaded it and provides global initialization.
... after the last instance of a plug-in has been deleted, the b
rowser calls np_shutdown, where you can release allocated memory or resources.
Using Web Standards in your Web Pages - Archive of obsolete content
"b
rowser makers are no longer the problem.
... the problem lies with designers and developers chained to the b
rowser-quirk-oriented markup of the 1990s-often because they don't realize it is possible to support current standards while accommodating old b
rowsers." -web standards project this article provides an overview of the process for upgrading the content of your web pages to conform to the world wide web consortium (w3c) web standards.
...every proposed w3c web standards replacement in this article is working without a problem in modern b
rowsers like msie 7, firefox 2, opera 9, safari 3, konqueror 3.5+, icab 4, etc.
... contents benefits of using web standards making your page using web standards - how to using the w3c dom developing cross b
rowser and cross platform pages using xmlhttprequest summary of changes references original document information author(s): mike cowperthwaite, marcio galli, jim ley, ian oeschger, simon paquet, gérard talbot last updated date: may 29, 2008 copyright information: portions of this content are © 1998–2008 by individual mozilla.org contributors; content available under a creative commons l...
Issues Arising From Arbitrary-Element hover - Archive of obsolete content
this innovation, first introduced by microsoft® internet explorer and later adopted into the css specification, is very popular for the styling of text links, particularly those that are supposed to look and act like javascript-driven "rollovers." however, advancing css support in b
rowsers has caused some unexpectedly aggressive hovering behavior on some pages.
... gecko behavior in b
rowsers based on netscape gecko builds later than 20020410 (netscape 6.1+), :hover styles can be applied to any element in a document.
...the most reliable fix is to add the anchor element to the selectors, like this: a:hover {color: red;} a.nav:hover {color: red;} in an attempt to avoid causing problems for legacy documents, b
rowsers based on mozilla 1.0 and later (netscape 7+) include code that causes bare pseudo-classes to be restricted only to links if the document is rendered in "quirks" mode.
... in b
rowsers based on the engine found in mozilla 1.3b and later, this quirk is extended to cover selectors that combine a bare class selector with the :hover pseudo-class (see bug 169078 for details).
asm.js - Game development
emscripten, a c/c++ to javascript compiler, emits asm.js code to make it run with near native performance on several b
rowsers.
...firefox is the only b
rowser to do this right now.
... using a subset of javascript asm.js is already supported by major web b
rowsers.
... since asm.js runs in a b
rowser it depends heavily on the b
rowser and the hardware.
Domain sharding - MDN Web Docs Glossary: Definitions of Web-related terms
b
rowsers limit the number of active connections for each domain.
...when multiple domains are used to serve multiple assets, b
rowsers are able to download more resources simultaneously, resulting in a faster page load time and improved user experience.
...as b
rowsers limit the number of active connections per domain, serving all the required resources from a single domain could be slow as assets need to be downloaded sequentially.
... with domain sharding, the required downloads are served from more than one domain, enabling the b
rowser to simultaneously download needed resources.
Grid Lines - MDN Web Docs Glossary: Definitions of Web-related terms
* {box-sizing: border-box;} .wrapper { border: 2px solid #f76707; border-radius: 5px; background-color: #fff4e6; display: grid; grid-template-columns: repeat(3, 1fr); grid-template-
rows: repeat(3, 100px); } .wrapper > div { border: 2px solid #ffa94d; border-radius: 5px; background-color: #ffd8a8; padding: 1em; color: #d9480f; } <div class="wrapper"> <div>one</div> <div>two</div> <div>three</div> <div>four</div> <div>five</div> </div> .wrapper { display: grid; grid-template-columns: repeat(3, 1fr); grid-template-
rows: 100px 100px; } ...
... * {box-sizing: border-box;} .wrapper { border: 2px solid #f76707; border-radius: 5px; background-color: #fff4e6; display: grid; grid-template-columns: repeat(3, 1fr); grid-template-
rows: repeat(3, 100px); } .wrapper > div { border: 2px solid #ffa94d; border-radius: 5px; background-color: #ffd8a8; padding: 1em; color: #d9480f; } <div class="wrapper"> <div class="item">item</div> </div> .wrapper { display: grid; grid-template-columns: repeat(3, 1fr); grid-template-
rows: 100px 100px; } .item { grid-column-start: 1; grid-column-end: 3; grid-r...
... * {box-sizing: border-box;} .wrapper { border: 2px solid #f76707; border-radius: 5px; background-color: #fff4e6; display: grid; grid-template-columns: repeat(3, 1fr); grid-template-
rows: repeat(3, 100px); } .wrapper > div { border: 2px solid #ffa94d; border-radius: 5px; background-color: #ffd8a8; padding: 1em; color: #d9480f; } <div class="wrapper"> <div class="item">item</div> </div> .wrapper { display: grid; grid-template-columns: [col1-start] 1fr [col2-start] 1fr [col3-start] 1fr [cols-end]; grid-template-
rows: [row1-start] 100px [row2-start...
...] 100px [
rows-end]; } .item { grid-column-start: col1-start; grid-column-end: col3-start; grid-row-start: row1-start; grid-row-end:
rows-end; } learn more property reference grid-template-columns grid-template-
rows grid-column-start grid-column-end grid-column grid-row-start grid-row-end grid-row further reading css grid layout guide: basic concepts of grid layout css grid layout guide: line-based placement with css grid css grid layout guide: layout using named grid lines css grid layout guide: css grids, logical values and writing modes definition of grid lines in the css grid layout specification ...
Houdini - MDN Web Docs Glossary: Definitions of Web-related terms
houdini is a set of low level apis that give developers the power to extend css, providing the ability to hook into the styling and layout process of a b
rowser’s rendering engine.
... houdini gives developers access to the css object model (cssom), enabling developers to write code the b
rowser can parse as css.
... the benefit of houdini is that developers can create css features without waiting for web standards specifications to define them and without waiting for every b
rowser to fully implement the features.
...b
rowsers create the cssom — including layout, paint, and composite processes — before applying any style updates found in scripts: layout, paint, and composite processes are repeated for updated javascript styles to be implemented.
Microsoft Internet Explorer - MDN Web Docs Glossary: Definitions of Web-related terms
internet explorer (or ie) is a free graphical b
rowser maintained by microsoft for legacy enterprise uses.
... microsoft edge is currently the default windows b
rowser.
...by around 2002, internet explorer had become the most used b
rowser in the world, but has since lost ground to chrome, firefox, edge, and safari.
...explorer on wikipedia internet explorer versions on wikipedia learning about internet explorer http://windows.microsoft.com/en-us/internet-explorer/download-ie http://windows.microsoft.com/en-us/windows7/getting-started-with-internet-explorer-9 http://windows.microsoft.com/en-us/internet-explorer/internet-explorer-help http://windows.microsoft.com/en-us/internet-explorer/make-ie-default-b
rowser#ie=ie-11 technical reference http://windows.microsoft.com/en-us/internet-explorer/products/ie-8/system-requirements http://windows.microsoft.com/en-us/internet-explorer/products/ie-9/system-requirements http://support.microsoft.com/kb/969393 ...
Page prediction - MDN Web Docs Glossary: Definitions of Web-related terms
page prediction is a b
rowser feature or script which, when enabled, tells the b
rowser to download resources the user is likely to visit before the user requests the content.
... some web applications include a prediction feature completing search text and address bar urls based on b
rowsing history and related searches.
... for example, as the user types in the address bar, the b
rowser might send the current text in the address bar to the search engine before the user submits the request.
... although b
rowser page prediction and prediction services enable faster page loads, they consume additional bandwidth.
Creating fancy letterheaded paper - Learn web development
add another background declaration that just adds the top image to the top of the letter, as a fallback for b
rowsers that don't support the previous declaration.
... now comment out the filter and implement the drop shadow in a different (slightly more cross-b
rowser compatible) way, which still follows the shape of the round image.
... hints and tips remember that you can create a fallback for older b
rowsers by putting the fallback version of a declaration first, followed by the version that works across newer b
rowsers only.
... older b
rowsers will apply the first declaration and ignore the second one, whereas newer b
rowsers will apply the first one, then override it with the second one.
Pseudo-classes and pseudo-elements - Learn web development
once again the relevant mdn page for each selector is helpful in explaining b
rowser support.
...modern b
rowsers support the early pseudo-elements with single- or double-colon syntax for backwards compatibility.
... ::grammar-error matches a portion of the document containing a grammar error as flagged by the b
rowser.
... ::spelling-error matches a portion of the document containing a spelling error as flagged by the b
rowser.
CSS selectors - Learn web development
it is a pattern of elements and other terms that tell the b
rowser which html elements should be selected to have the css property values inside the rule applied to them.
... in css, selectors are defined in the css selectors specification; like any other part of css they need to have support in b
rowsers for them to work.
... the majority of selectors that you will come across are defined in the level 3 selectors specification, which is a mature specification, therefore you will find excellent b
rowser support for these selectors.
...i have also included a link to the mdn page for each selector where you can check b
rowser support information.
Sizing items in CSS - Learn web development
you should, however, not use this technique to load really large images and then scale them down in the b
rowser.
... viewport units the viewport — which is the visible area of your page in the b
rowser you are using to view a site — also has a size.
...to see the example change when you change the viewport size you will need to load the example in a new b
rowser window that you can resize (as the embedded <iframe> that contains the example shown above is its viewport).
... open the example, resize the b
rowser window, and observe what happens to the size of the box and text.
The box model - Learn web development
the b
rowser renders this as a block box, so the paragraph begins on a new line, and expands to the full width available to it.
... by default, b
rowsers use the standard box model.
...by doing this you are telling the b
rowser to take the border box as the area defined by any size you set.
... use b
rowser devtools to view the box model your b
rowser developer tools can make understanding the box model far easier.
Test Your Skills: Fundamental layout comprehension - Learn web development
opening the index.html file in a b
rowser should give you a page with basic styling but no layout, which should look something like the image seen below.
... this starting point has all of the content of your layout as displayed by the b
rowser in normal flow.
...the columns should be a flexible size so that if the b
rowser window shrinks smaller the columns become narrower.
... in this module introduction to css layout normal flow flexbox grid floats positioning multiple-column layout responsive design beginner's guide to media queries legacy layout methods supporting older b
rowsers fundamental layout comprehension assessment ...
Practical positioning examples - Learn web development
but not only that — we'll give it fixed position so that it stays in the same position in the b
rowser window.
...change your .info-box rule to get rid of margin: 0 auto; (we no longer want the info-box centered), add position: fixed;, and stick it to the top of the b
rowser viewport.
... next, we set a fixed width on the panel, and make its height the entire height of the b
rowser viewport.
... in this module introduction to css layout normal flow flexbox grid floats positioning multiple-column layout responsive design beginner's guide to media queries legacy layout methods supporting older b
rowsers fundamental layout comprehension assessment ...
How do you set up a local testing server? - Learn web development
remote files throughout most of the learning area, we tell you to just open your examples directly in a b
rowser — this can be done by double clicking the html file, dragging and dropping it into the b
rowser window, or choosing file > open...
...some b
rowsers (including chrome) will not run async requests (see fetching data from the server) if you just run the example from a local file.
...you can go to this server by going to the url localhost:8000 in your web b
rowser.
...at this point you should be able to run the python flask examples using for example python3 python-example.py, then navigating to localhost:5000 in your b
rowser.
Common questions - Learn web development
it is the mechanism used by b
rowsers to retrieve any published resource on the web.
... what are b
rowser developer tools?
... every b
rowser features a set of devtools for debugging html, css, and other web code.
... this article explains how to use the basic functions of your b
rowser's devtools.
Test your skills: Advanced styling - Learn web development
advanced form styling 1 in our first advanced styling tasks, we want you to handle making a search input as consistent as possible across b
rowsers — a trickier task than with standard text inputs, even on modern b
rowsers.
... first of all, try giving the search box a consistent width, height, padding, and border color across b
rowsers.
... you'll find that some b
rowsers will not behave in terms of the form element's height.
... one thing that is inconsistent across b
rowsers (particularly looking at safari here) is the position of the standard blue focus outline.
CSS basics - Learn web development
paste the following line in the head (between the <head> and </head> tags): <link href="styles/style.css" rel="stylesheet"> save index.html and load it in your b
rowser.
...the b
rowser ignores comments as it renders the code.
...that happens because b
rowsers apply default styling to the <h1> element (among others).
...to eliminate the gap, we overwrite the b
rowser's default styling with the setting margin: 0;.
Define terms with HTML - Learn web development
i'm feeling blue but we're constantly defining keywords informally, as here: firefox is the web b
rowser created by the mozilla foundation.
...note that <dfn> tags go around the word to be defined, not the definition (the definition consists of the entire paragraph): <p><dfn>firefox</dfn> is the web b
rowser created by the mozilla foundation.</p> another use for bold is to emphasize content.
...if you want a more formal relationship, or your definition consists of only one sentence rather than the whole paragraph, you can use the aria-describedby attribute to associate a term more formally with its definition: <p> <span id="ff"> <dfn aria-describedby="ff">firefox</dfn> is the web b
rowser created by the mozilla foundation.
... improving the visual output here's how a graphical b
rowser displays the foregoing list: if you want the keywords to stand out better, you could try bolding them.
Assessment: Structuring planet data - Learn web development
create all the content
rows inside the table body, remembering to make all the row headings into headings semantically.
... add attributes to make the row and column headers unambiguously associated with the
rows, columns, or rowgroups that they act as headings for.
...saturn) are a little tricky to sort out — you need to make sure each one spans the correct number of
rows and columns.
... one way of associating headers with their
rows/columns is a lot easier than the other way.
JavaScript object basics - Learn web development
try entering the following line below the javascript code that's already in your file, then saving and refreshing: const person = {}; now open your b
rowser's javascript console, enter person into it, and press enter/return.
...i\'m ' + this.name[0] + '.'); } }; after saving and refreshing, try entering some of the following into the javascript console on your b
rowser devtools: person.name person.name[0] person.age person.interests[1] person.bio() person.greeting() you have now got some data and functionality inside your object, and are now able to access them with some nice simple syntax!
...every time we've been working through an example that uses a built-in b
rowser api or javascript object, we've been using objects, because such features are built using exactly the same kind of object structures that we've been looking at here, albeit more complex ones than in our own basic custom examples.
...as an example, the notifications api — which allows modern b
rowsers to fire system notifications — requires you to instantiate a new object instance using the constructor for each notification you want to fire.
Aprender y obtener ayuda - Learn web development
run code after several promises are fulfilled play a video stream from a webcam in the b
rowser create a linear gradient in the background of your element error messages if you are having a problem with some code and a specific error message is coming up, it is often a good idea to just copy the error message into your search engine and use it as the search term.
... b
rowser testing it is often a good idea to see if your problem is affecting all b
rowsers, or whether it only occurs in one or a small number of b
rowsers.
... if it is only affecting one b
rowser, for example, you can use that b
rowser to narrow down the search.
... example searches might look like: <video> playback doesn't work in the ios b
rowser.
Server-side web frameworks - Learn web development
previous overview: first steps next the previous article showed you what the communication between web clients and servers looks like, the nature of http requests and responses, and what a server-side web application needs to do in order to respond to requests from a web b
rowser.
... work directly with http requests and responses as we saw in the last article, web servers and b
rowsers communicate via the http protocol — servers wait for http requests from the b
rowser and then return information in http responses.
...running a web server on a raspberry pi, drone controllers, etc.) express (node.js/javascript) express is a fast, unopinionated, flexible and minimalist web framework for node.js (node is a b
rowserless environment for running javascript).
... built-in testing facility and code formatter (deno fmt) (javascript) b
rowser compatibility: deno programs that are written completely in javascript excluding the deno namespace (or feature test for it), should work directly in any modern b
rowser.
Getting started with Svelte - Learn web development
while frameworks like react and vue do the bulk of their work in the user's b
rowser while the app is running, svelte shifts that work into a compile step that happens only when you build your app, producing highly-optimized vanilla javascript.
...your b
rowser will display something like this: application structure the starter template comes with the following structure: moz-todo-svelte ├── readme.md ├── package.json ├── package-lock.json ├── rollup.config.js ├── .gitignore ├── node_modules ├── public │ ├── favicon.ico │ ├── index.html │ ├── global.css │ └── build ...
... you can see this in action by opening localhost:5000 in a new b
rowser tab, right/ctrl-clicking on the hello world!
...it looks like so: to start a repl, open your b
rowser and navigate to https://svelte.dev/repl.
Getting started with Vue - Learn web development
babel.config.js: this is the config file for babel, which transforms modern javascript features being used in development code into older syntax that is more cross-b
rowser compatible in production code.
... .b
rowserslistrc: this is a config for b
rowserslist.
... you can use this to control which b
rowsers your tooling optimizes for.
... if you navigate to the “local” address in a new b
rowser tab (this should be something like http://localhost:8080 as stated above, but may vary based on your setup), you should see your app.
Package management basics - Learn web development
moreover, a reliable third-party dependency will likely have been tested in a lot of different situations, making it more robust and cross-b
rowser compatible than your own solution.
...a bundle is the term that’s generally used to refer to a single file on your web server that contains all the javascript for your software — typically compressed as much as possible to help reduce the time it takes to get your software downloaded and displayed in your visitors’ b
rowser.
... if we had avoided any development tools and pointed a <script src=””> element to a hosted version of date-fns, roughly the same thing would have happened — all of the library would be downloaded when our example page is loaded in a b
rowser.
... although the list g
rows by the month, there are three main offerings for tools that generate bundles from our source code: webpack, rollup, and parcel.
Accessibility API cross-reference
aria role denotes interactive (not b
rowsable) content operable in ways that differ from any of the other interactive aria roles, and may be only a part of the main document.
...in aria, used to nest b
rowsable rich text content inside interactive content document n/a n/a document document a drop down list, different from combobox droplist n/a n/a listbox for math & chemistry equation n/a n/a math a scrollable list of articles where scrolling may cause articles to be added to or removed from...
... grid a composite widget containing a collection of one or more
rows with one or more cells where some or all cells in the grid are focusable by using methods of two-dimensional navigation, such as directional arrow keys, e.g.
...n't provide separate indicator of checked state n/a toggle_button toggle_button button with aria-pressed attribute a toolbar toolbar tool_bar tool_bar toolbar the little piece of help text that comes up when you put your mouse over something tooltip tool_tip tool_tip tooltip a grid whose
rows can be expanded and collapsed in the same manner as for a tree.
Add-ons
extensions written using webextensions apis for firefox are designed to be cross-b
rowser compatible.
...you can see the apis currently supported in firefox and other b
rowsers.
... extension workshop the firefox extension workshop can help you develop extensions for firefox and give your users simple, yet powerful ways to customize their b
rowsing experience.
...this new, high-performance b
rowser for android has been rebuilt from the ground up using geckoview, mozilla’s mobile b
rowser engine.
Configuring Build Options
choose one of the following options to add to your mozconfig file: b
rowser (firefox) ac_add_options --enable-application=b
rowser note: this is the default mail (thunderbird) ac_add_options --enable-application=comm/mail mozilla suite (seamonkey) ac_add_options --enable-application=suite calendar (lightning extension, uses thunderbird) ac_add_options --enable-application=comm/mail ac_add_options --enable-calendar selecting build op...
...many of these extensions are now considered an integral part of the b
rowsing experience.
... for example: ac_add_options --disable-optimize --enable-debug mk_add_options moz_objdir=/mozilla/src/obj-@config_guess@ mk_add_options moz_build_projects="b
rowser mail" ac_add_app_options b
rowser --enable-application=b
rowser ac_add_app_options mail --enable-application=comm/mail if you want to build only one project using this mozconfig, use the following command line: moz_current_project=b
rowser ./mach build this will build only the b
rowser.
..../mozconfig-common # build firefox mk_add_options moz_objdir=@topsrcdir@/obj-firefox ac_add_options --enable-application=b
rowser mozconfig-thunderbird: # include the common mozconfig .
The Firefox codebase: CSS Guidelines
writing cross-platform css firefox supports many different platforms and each of those platforms can contain many different configurations: windows 7, 8 and 10 default theme aero basic (windows 7, 8) windows classic (windows 7) high contrast (all versions) linux macos file structure the b
rowser/ directory contains styles specific to firefox the toolkit/ directory contains styles that are shared across all toolkit applications (thunderbird and seamonkey) under each of those two directories, there is a themes directory containing 4 sub-directories: shared linux osx windows the shared directories contain styles shared across all 3 platforms, while the other 3 directories conta...
...theme css the following directories also contain css: b
rowser/base/content/ toolkit/content/ these directories contain content css, that applies on all platforms, which is styling deemed to be essential for the b
rowser to behave correctly.
... 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://b
rowser/content/path/module.css" type="text/css"?> <?xml-stylesheet href="chrome://b
rowser/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 b
rowser preconceptions - i want a blank sheet', so that's more visual.
ESLint
setting up eslint ./mach eslint --setup running eslint eslint can be run via: ./mach lint -l eslint you can limit running it to a specific directory with: ./mach lint -l eslint b
rowser/components or work directory changes: ./mach lint -l eslint -w or outgoing commits only: ./mach lint -l eslint -o see ./mach eslint --help for more options when running eslint.
...here are some common issues: my script is imported into the global b
rowser.xul scope.
... add a line like: /* eslint-env mozilla/b
rowser-window */ or enable the rule in a .eslintrc.js if it will apply to the whole directory.
... ensure there is a .eslintrc.js file that extends one of: "plugin:mozilla/b
rowser-test" "plugin:mozilla/chrome-test" "plugin:mozilla/mochitest-test" "plugin:mozilla/xpcshell-test" see other test directories for how to do this.
Inner and outer windows
consider that when the user is looking at a document in a b
rowser window, not only can the document the user is currently viewing change, but the document's contents can change.
...windows and the bfcache an outer window is a b
rowsing context; that is, the actual environment in which a document is presented to the user.
...consider this view of a window and the b
rowser history: as the user navigates, documents are added to the backward-forward cache (often referred to as the bfcache).
...they get displayed in the outer window, which is contained in the "physical" b
rowser window.
Obsolete Build Caveats and Tips
although it may still work in some b
rowsers, its use is discouraged since it could be removed at any time.
...although it may still work in some b
rowsers, its use is discouraged since it could be removed at any time.
... if you are building from an older project branch that still uses cvs, you will need to set moz_co_project to the appropriate value or values, using a comma-separated list, such as "mk_add_options moz_co_project=b
rowser,mail,calendar,suite,xulrunner".
... note: starting in gecko 5.0, if you don't specify an application, --enable-application=b
rowser is assumed, thereby building firefox.
HTMLIFrameElement.executeScript()
the executescript() method of the htmliframeelement interface allows a specified script to be executed against a page loaded in the b
rowser <iframe>.
... note: use of the b
rowser api requires a privileged app, and b
rowser and/or embed-apps permissions, depending on what you want to do.
... see using the b
rowser api for more details.
... examples var request1 = b
rowser.executescript( var a = 3; a + 3 , {url: 'http://example.com/index.html'}); request1.onsuccess = function() { console.log(request1.result); // 6 } var request2 = b
rowser.executescript( new promise((resolve, reject) => { settimeout(function() { resolve(6); }, 1000}) ) , {origin: 'http://example.com'}); request2.onsuccess = function() { console.log(request2.result); //...
HTMLIFrameElement.sendMouseEvent()
the sendmouseevent() method of the htmliframeelement interface allows you to fake a mouse event and send it to the b
rowser <iframe>'s content.
... x a number representing the x position of the cursor relative to the b
rowser <iframe>'s visible area in css pixels.
... y a number representing the y position of the cursor relative to the b
rowser <iframe>'s visible area in css pixels.
... examples var b
rowser = document.queryselector('iframe'); b
rowser.sendmouseevent("mousemove", x, y, 0, 0, 0); b
rowser.sendmouseevent("mousedown", x, y, 0, 1, 0); b
rowser.sendmouseevent("mouseup", x, y, 0, 1, 0); specification not part of any specification.
HTMLIFrameElement.sendTouchEvent()
the sendtouchevent() method of the htmliframeelement allows you to fake a touch event and send it to the b
rowser <iframe>'s content.
... x an array of numbers representing the x position of each touch point relative to the b
rowser <iframe>'s visible area in css pixels.
... y an array of numbers representing the y position of each touch point relative to the b
rowser <iframe>'s visible area in css pixels.
... examples var b
rowser = document.queryselector('iframe'); b
rowser.sendtouchevent("touchstart", [1], [x], [y], [2], [2], [20], [0.5], 1, 0); specification not part of any specification.
Script security
like any web b
rowser, gecko can load javascript from untrusted and potentially hostile web pages and run it on the user's computer.
...the rules for determining whether an object is same-origin with another, and what access is allowed cross-origin, are now mostly standardized across b
rowsers.
... having the b
rowser 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++.
... this also enables the script security model to treat compartments that have expanded principals more like part of the b
rowser than like web content.
DownloadLastDir.jsm
is an nsifile downloadlastdir.setfile(uri, file); to retrieve the path in firefox 26 or later, use getfileasync: downloadlastdir.getfileasync(uri, function (file) { // file is an nsifile console.log(file); }); deprecated since gecko 26.0 to retrieve the path in firefox 25 or earlier, use getfile: // file is an nsifile var file = gdownloadlastdir.getfile(uri); console.log(file); private b
rowsing mode when b
rowsing normally, the b
rowser uses the b
rowser.download.lastdir preference to store the last download directory path.
... however, when private b
rowsing mode is enabled, the last download directory path is instead maintained in memory, and the preference is not changed.
... when the user exits private b
rowsing mode, the last download directory value is reverted to the preference's value.
... when history is cleared when the user's b
rowsing history is cleared, the value of the last download directory path is restored to the platform's default download directory path.
Localization and Plurals
chrome://mozapps/locale/downloads/do...tes,hours,days chrome://mozapps/locale/downloads/do...dstitlepercent chrome://b
rowser/locale/b
rowser.prop...auseddownloads version history 0.1: initial version with pluralrule check, properties input loading, table generation, sample output display 0.2: use pluralform.numforms() to get the number of forms instead of figuring out locally to better support future rules - requires build from 2007/01/27 or later 0.3: generate a list of what numbers fall into which plural form t...
...this module provides a couple methods for localizing to the b
rowser's current locale as well as getting methods to localize to a desired plural rule.
... the latter ability of specifying a plural rule is useful for extensions because the extension doesn't necessarily have to be localized to the b
rowser's locale.
... components.utils.import("resource://gre/modules/pluralform.jsm"); methods: get these methods make use of the b
rowser's current locale specified by chrome://global/locale/intl.properties's pluralrule value.
MathML Torture Test
lue="texgyrebonum">tex gyre bonum</option> <option value="texgyrepagella">tex gyre pagella</option> <option value="texgyreschola">tex gyre schola</option> <option value="texgyretermes">tex gyre termes</option> <option value="xits">xits</option> </select> <br/> </p> <table> <tr> <td></td> <th scope="col">as rendered by tex</th> <th scope="col">as rendered by your b
rowser</th></tr> <tr> <td>1</td> <td><img src="https://udn.realityripple.com/samples/45/d5a0dbbca3.png" width="38" height="22" alt="texbook, 16.2-16.3" /></td> <td> <math display="block"> <mrow> <msup> <mi>x</mi> <mn>2</mn> </msup> <msup> <mi>y</mi> <mn>2</mn> </msup> ...
...it compares the rendering by the xetex engine using the default latin modern math font against the mathml rendering by your b
rowser using the default math font, or an alternative opentype math fonts.
... to get the best rendering, be sure to have appropriate mathematical fonts installed on your system and to use a b
rowser with opentype math support such as gecko 31.0 (firefox 31.0 / thunderbird 31.0 / seamonkey 2.28) or higher.
...finally, you may want to check this table comparing how the tests are read by various screen readers for mozilla b
rowsers.
TimerFirings logging
-991946880[7f46c365ba00]: [6775] fn timer (slack 100 ms): layeractivitytracker -991946880[7f46c365ba00]: [6775] fn timer (one_shot 250 ms): presshell::spaintsuppressioncallback -991946880[7f46c365ba00]: [6775] fn timer (one_shot 160 ms): nsb
rowserstatusfilter::timeouthandler -991946880[7f46c365ba00]: [6775] iface timer (one_shot 200 ms): 7f46964d7f80 -1340643584[7f46c365ec00]: [6775] obs timer (slack 1000 ms): 7f46a95a0200 each line has the following information.
... -991946880[7f46c365ba00]: [6775] fn timer (one_shot 0 ms): [content] chrome://b
rowser/content/tabb
rowser.xml:1816:0 711637568[7f3219c48000]: [6835] fn timer (one_shot 100 ms): [content] http://edition.cnn.com/:5:7231 711637568[7f3219c48000]: [6835] fn timer (one_shot 100 ms): [content] http://a.visualrevenue.com/vrs.js:6:9423 these js timers are annotated with [content] and show the javascript source location where they were created.
...00x600;click=http://pixel.mathtag.com/click/img?mt_aid=2744535504761193354&mt_id=1895890&mt_adid=148611&mt_sid=973379&mt_exid=9&mt_inapp=0&mt_uuid=353d5460-19f6-4400-9bbd-d0fcc3bcf595&mt_3pck=http%3a//beacon-apac-hkg1.rubiconproject.com/beacon/t/d1f9921d-4e47-448f-b6ba-36cae1c31b65/&redirect=;ord=2744535504761193354?:83:0 94 801266240[7f7c1f248000]: [7163] fn timer (one_shot 160 ms): nsb
rowserstatusfilter::timeouthandler 92 -495057024[7f74e105ba00]: [7108] fn timer (one_shot 160 ms): nsb
rowserstatusfilter::timeouthandler the first column shows how many times the particular line appeared.
... 204 fn timer (one_shot): [content] http://widgets.outbrain.com/outbrain.js:20:330 186 fn timer (one_shot): nsb
rowserstatusfilter::timeouthandler 138 fn timer (one_shot): [content] https://self-repair.mozilla.org/repair/:7:13669 118 fn timer (one_shot): [content] http://a.visualrevenue.com/vrs.js:6:9423 108 fn timer (slack): layeractivitytracker 104 fn timer (slack): nsidocument::selectorcache 104 fn timer (slack): cctimerfired ...
Phishing: a short definition
this too, includes missing https or ev certificate indicators in a b
rowser’s navigation bar.
... web b
rowser vendors too, are interested in protecting their users from phishing.
... after all, the b
rowser plays an essential role in the scheme: a fake website is loaded in a b
rowser and here is the maker’s last chance to preventing fraud.
... since version 2.0, firefox has used google’s safeb
rowsing service, to detect known web forgeries, and display an alert instead of the fraudulent website.
A brief guide to Mozilla preferences
preferences files to protect privacy by preventing inadvertent loading of a preferences file in the b
rowser, the first line of the file is made un-parseable and skipped on loading.
...refox ships default preferences in several files, all in the application directory: greprefs.js - preferences shared by all applications using the mozilla platform services/common/services-common.js - preferences for some shared services code, this should arguably be included in some other file defaults/pref/services-sync.js - default preferences for firefox sync, also oddly misplaced b
rowser/app/profile/channel-prefs.js - a file indicating the user's update channel.
... b
rowser/app/profile/firefox.js - defaults specific to firefox b
rowser/app/profile/firefox-branding.js - defaults specific to the specific kind of firefox being installed (nightly, aurora, beta, release) b
rowser/defaults/preferences/firefox-l10n.js - defaults specific to the installed language of firefox.
... changing defaults a systems administrator can modify the default preferences in two ways: the administrator may add an all-companyname.js preference file (install_directory/b
rowser/defaults/preferences/all-companyname.js).
An overview of NSS Internals
instead of simply verifying that the requester of a certificate is in control of an administrative email address at the desired web site's domain, it's required that the ca performs a verification of real world identity documents (such as a company registration document with the country's authority), and it's also required that a b
rowser software performs a revocation check with the ca, prior to granting validity to the certificate.
... in order to distinguish an ev certificate, cas will embed a policy oid in the certificate, and the b
rowser is expected to verify that a trust chain permits the end entity (ee) certificate to make use of the policy.
...(tls is a newer version of ssl with enhanced features.) when establishing an ssl connection to a server, (at least) a server certificate (and its trust chain) is exchanged from the server to the client (e.g., the b
rowser), and the client verifies that the certificate can be verified (including matching the name of the expected destination server).
...in other words, if your b
rowser or your server operates on an older nss database format, don't use the nss tools to operate on it while the other software is executing.
Running Automated JavaScript Tests
sometimes jstests are called js reftests because of how they are run in the b
rowser.
...(some js reftests will be skipped when run in the b
rowser, as it lacks some shell-specific testing functionality.) running jstests running jstests on a js shell the jstests shell harness is js/src/tests/jstests.py.
... running jstest in a b
rowser jstests also runs on b
rowser, with the following command: ./mach jstestb
rowser to run specific test, you can use --filter=pattern command-line argument, where pattern is a regexp pattern that is tested against file:///{path_to_obj_dir}/dist/test-stage/jsreftest/tests/jsreftest.html?test={relative_path_to_test_from_js/src/tests} string: ./mach jstestb
rowser --filter=pattern running jstest...
...s on treeherder when viewing treeherder after a push to the mozilla repositories, jstests run in the b
rowser are shown as r(j) meaning "javascript reftests".
TPS Tests
asset lists a test file will contain one or more asset lists, which are lists of bookmarks, passwords, or other types of b
rowser data that are relevant to sync.
... // phase declarations var phases = { "phase1": "profile1", "phase2": "profile2", "phase3": "profile1" }; // asset list // the initial list of bookmarks to be added to the b
rowser var bookmarks_initial = { "menu": [ { uri: "http://www.google.com", title "google.com", changes: { // these properties are ignored by calls other than bookmarks.modify title: "google" } }, { folder: "foldera" }, { folder: "folderb" } ], "menu/foldera": [ { uri: "http://www.yahoo.com", title: "testing yahoo", changes: { ...
... you will have to manually quit the b
rowser at each phase, but you will be able to inspect the b
rowser state manually.
...(note that the python testrunner will generally still kill firefox after a tps test runs for 5 or so minutes, so it's often helpful to kill the python testrunner outright, and then use aboutsync in a different instance of the b
rowser).
compare-locales
if you want to test the localization for de, run $ compare-locales b
rowser/locales/l10n.toml ./l10n/ de to check mobile, replace the previous line with: $ compare-locales mobile/android/locales/l10n.toml ./l10n/ zh-tw to check mail, suite, calendar that lives on comm-central, you can either rely on the check-out of mozilla within comm-central repository that the regular comm-central build instructions generate: $ compare-locales ./comm-central/mail/locales/l10n...
...to get a single result across the projects, specify the --unified flag: $ compare-locales --unified b
rowser/locales/l10n.toml mobile/android/locales/l10n.toml ./l10n/ de cross-channel and compare-locales if you're working against the gecko-strings cross-channel repository, the toml configuration files are in the _configs subdirectory, b
rowser.toml, mobile_android.toml, mail.toml and calendar.toml, and suite.toml.
... ab-cd b
rowser chrome/b
rowser b
rowser.dtd +backforwardmenu.tooltip +fullzoomenlargecmd.commandkey3 +fullzoomreducecmd.commandkey2 +fullzoomresetcmd.commandkey2 +organizebookmarks.label -showallbookmarkscmd2.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 b
rowser.dtd in ab-cd/b
rowser/chrome/b
rowser and migration.dtd in another directory level deeper.
AT APIs Support
k-meleon - light, ultra-fast and more advanced (fully configurable) gecko-based web b
rowser available on the windows platform on linux/unix platform yelp help viewer - the help viewer in gnome evolution email - provides integrated mail, addressbook and calendaring functionality to users of the gnome desktop.
... on mac platform camino - web b
rowser for os x xul applications xul applications make full use of the gecko architecture, not only for html content, but also for the entire user interface.
... examples of xul applications: firefox - web-b
rowser thunderbird - email client seamonkey - web-b
rowser, advanced e-mail and newsgroup client, irc chat client, and html editing made simple sunbird - cross-platform calendar application kompozer - a complete web authoring system for linux desktop, microsoft windows and macintosh users to rival programs like frontpage and dreamweaver.
...the mozilla keyboard shortcuts for content are similar to what is used in other b
rowsers.
Retrieving part of the bookmarks tree
first, you need to get an empty query and options objects from the history service: var historyservice = components.classes["@mozilla.org/b
rowser/nav-history-service;1"] .getservice(components.interfaces.nsinavhistoryservice); var options = historyservice.getnewqueryoptions(); var query = historyservice.getnewquery(); find the folder you want to get known folder ids are retrieved from the bookmarks service.
...this example will get the id of the bookmarks toolbar: var bookmarksservice = components.classes["@mozilla.org/b
rowser/nav-bookmarks-service;1"] .getservice(components.interfaces.nsinavbookmarksservice); var toolbarfolder = bookmarksservice.toolbarfolder; the placesroot is the root folder in the whole places hierarchy.
...otherwise, it will continue to get observer notifications and update itself, slowing down the whole b
rowser.
...complete code listing var historyservice = components.classes["@mozilla.org/b
rowser/nav-history-service;1"] .getservice(components.interfaces.nsinavhistoryservice); var options = historyservice.getnewqueryoptions(); var query = historyservice.getnewquery(); var bookmarksservice = components.classes["@mozilla.org/b
rowser/nav-bookmarks-service;1"] .getservice(components.interfaces.nsinavbookmarksservice); var toolb...
Using the Places favicon service
creating the favicon service the favicon service's contract id is @mozilla.org/b
rowser/favicon-service;1, so to gain access to the favicon service, you should do something like this: var faviconservice = components.classes["@mozilla.org/b
rowser/favicon-service;1"] .getservice(components.interfaces.nsifaviconservice); caching the favicon service stores an expiration time for each favicon.
...most of the time, the favicon will be served from the b
rowser's cache and will have minimal performance impact.
...expiration is handled by b
rowser/components/places/src/nsnavhistoryexpire.cpp as described in places design.
... getting favicon images you can use favicons in the b
rowser ui using special annotation uris.
Using the Places livemark service
initiating the livemark service before using the livemark service, you need to obtain an instance: var livemarkservice = components.classes["@mozilla.org/b
rowser/livemark-service;2"] .getservice(components.interfaces.nsilivemarkservice); creating a new livemark the nsilivemarkservice.createlivemark() method creates a new livemark.
... var bmsvc = components.classes["@mozilla.org/b
rowser/nav-bookmarks-service;1"].
... update behavior five seconds after the b
rowser starts up, the livemark service's update timer is started.
...users can modify the default expiration time via the <tt>b
rowser.bookmarks.livemark_refresh_seconds</tt> preference, which indicates the expiration time in seconds.
XML Extras
the xml extras module is built by default on all platforms, and is included in the b
rowser installers so it is available in the nightly builds.
...bugs should be filed against the xml component in the b
rowser product.
...edmond woychowsky has also written articles on xml data islands in mozilla: "make xml data islands work in mozilla", "build cross-b
rowser xml paging code" and "implement a flexible shopping cart with xml and asp".
... xmlhttprequest.open("ahost") ok file:// documents can access http:// documents but you need to enable universalb
rowserread privilege in your scripts - see the javascript security: signed scripts document for more details.
Creating the Component Code
what we'll be working on the component we'll be working on in this book controls a special mode in your b
rowser that prevents users from leaving the current domain or a set of safe domains.
...it can be used to implement parental controlled b
rowsing for children, or for targeted "kiosk b
rowsing," where the content is restricted to a particular server.
... web lock user interface most of the actual work in the weblock component is preparing the component itself, finding the xpcom interfaces the component needs to use, and hooking into existing functionality within the gecko b
rowser.
...xpinstall, the cross-platform installation technology that mozilla uses to install the b
rowser and other components, is one such alternative.
Packaging WebLock
the installation script for the weblock component can also be used to register the component with the b
rowser into which it is installed (see registration methods in xpcom for more information on registration).
... the chrome registry lives in a series of rdf/xml files in the application directory of mozilla and other gecko-based b
rowsers, where new installs, user configurable data, skins, and other information are related to one another and the application itself.
... archiving resources once you have compiled all the resources that make up the weblock component and the files that make up the user interface that will be added to the b
rowser, you can place these within a subdirectory called weblock.
... in mozilla and netscape b
rowsers, xpinstall makes this process especially easy by providing the file format (xpi) and the necessary installation scripts for doing a web-based installation.
Preface
this book provides a tutorial about building an xpcom component that controls b
rowsing behavior.
... although, xpcom can be used in many environments which are unrelated to web b
rowsing, xpcom's main client is gecko, an open source, standards compliant, embeddable web b
rowser, where it's easiest and most practical to illustrate xpcom's functionality.
... organization of the tutorial the following list provides an overview of the steps that we will take to build an xpcom component called weblock, which provides site blocking functionality to gecko-based b
rowsers.
...the weblock component we describe in this tutorial is a practical (and, we hope, genuinely useful) addition to the b
rowser.
IAccessibleTableCell
size_is(, ncolumnheadercells,)] iunknown cellaccessibles, [out] long ncolumnheadercells ); [propget] hresult columnindex([out] long columnindex ); [propget] hresult isselected([out] boolean isselected ); [propget] hresult rowcolumnextents([out] long row, [out] long column, [out] long rowextents, [out] long columnextents, [out] boolean isselected ); [propget] hresult rowextent([out] long n
rowsspanned ); [propget] hresult rowheadercells([out, size_is(, nrowheadercells,)] iunknown cellaccessibles, [out] long nrowheadercells ); [propget] hresult rowindex([out] long rowindex ); [propget] hresult table([out] iunknown table ); methods columnextent() returns the number of columns occupied by this cell accessible.
...rowextent() returns the number of
rows occupied by this cell accessible.
... [propget] hresult rowextent( [out] long n
rowsspanned ); parameters n
rowsspanned returns the row extent of the specified cell.
...[propget] hresult rowindex( [out] long rowindex ); parameters rowindex returns the 0 based row index of the specified cell or the index of the first row if the cell spans multiple
rows.
nsIAccessibleRole
the role is used by xul:b
rowsermessage, role="alert", xforms:message.
... role_table 24 represents a table that contains
rows and columns of cells, and optionally, row headers and column headers.
...a specialized dialog that displays the files in the directory and lets the user select a file, b
rowse a different directory, or specify a filename.
... role_tree_table 94 representas a control that is capable of expanding and collapsing
rows as well as showing multiple columns of data.
nsIAlertsService
method overview void showalertnotification(in astring imageurl, in astring title, in astring text, [optional] in boolean textclickable, [optional] in astring cookie, [optional] in nsiobserver alertlistener, [optional] in astring name, [optional] in astring dir, [optional] in astring lang, [optional] in astring data, [optional] in nsiprincipal principal,[optional] in boolean inprivateb
rowsing); void closealert([optional] in astring name, [optional] in nsiprincipal principal); methods showalertnotification() displays a notification window.
... void showalertnotification( in astring imageurl, in astring title, in astring text, in boolean textclickable, optional in astring cookie, optional in nsiobserver alertlistener, optional in astring name, optional in astring dir, optional in astring lang, optional in astring data, optional in nsiprincipal principal, optional in boolean inprivateb
rowsing, optional ); parameters imageurl a url identifying the image to display in the notification alert.
... inprivateb
rowsing optional controls the image loading behavior.
... if true, the image url will be loaded in private b
rowsing mode.
nsIContentViewManager
content/base/public/nsiframeloader.idlscriptable manages the content views contained in a b
rowser 1.0 66 introduced gecko 2.0 inherits from: nsisupports last changed in gecko 2.0 (firefox 4 / thunderbird 3.3 / seamonkey 2.1) to obtain a reference to the view manager for a document, you can queryinterface() the nsiframeloader object to nsicontentviewmanager.
...once you have the view manager, you can call getcontentviewsin() to get a list of the content views for a given portion of the b
rowser display, then use those nsicontentview objects to manipulate the content views.
... methods getcontentviewsin() returns an array of nsicontentview objects representing all of the content views that intersect with the specified rectangle in the b
rowser.
... pixels are in chrome device pixels and are relative to the b
rowser element.
nsIDBFolderInfo
although it may still work in some b
rowsers, its use is discouraged since it could be removed at any time.
...although it may still work in some b
rowsers, its use is discouraged since it could be removed at any time.
...although it may still work in some b
rowsers, its use is discouraged since it could be removed at any time.
...although it may still work in some b
rowsers, its use is discouraged since it could be removed at any time.
nsIDOMStorageWindow
localstorage nsidomstorage local storage for the current b
rowsing context.
... moz_indexeddb nsiidbfactory indexed databases for the current b
rowsing context.
... sessionstorage nsidomstorage session storage for the current b
rowsing context.
... data stored in session storage may be accessed by any site in the b
rowsing context.
nsIMacDockSupport
if permanent private b
rowsing mode is enabled then the "new private window" menu item is hidden.
... this is created by using the dockmenu attribute of nsimacdocksupport here: http://mxr.mozilla.org/mozilla-release/source/b
rowser/base/content/b
rowser.js#1562 this is seen here: if you were to copy and follow that example you would replace the default native menu.
... this can be done like this: var docksupport = cc['@mozilla.org/widget/macdocksupport;1'].getservice(ci.nsimacdocksupport); console.log('docksupport:', docksupport); var win = services.wm.getmostrecentwindow('navigator:b
rowser'); var macmenu = win.document.createelementns('http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul', 'menupopup'); macmenu.setattribute('id', 'mymacmenu'); var macmenuitem = win.document.createelementns('http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul', 'menuitem'); macmenuitem.setattribute('label', 'show most recent window'); macmenuitem.setattribute('id', 'mymacmenuitem'); macmenuitem.addeventlistener('command', function(){ var docksupport = cc['@mozilla.org/widget/macdocksupport;1'].getservice(ci.nsimacdocksupport); docksupport.activateapp...
...note: the hidden window of firefox (services.appshel.hiddendomwindow) loads on b
rowser startup, so if you would like to access it on startup of the b
rowser make sure to check and wait for the window to be loaded.
nsIPluginHost
although it may still work in some b
rowsers, its use is discouraged since it could be removed at any time.
...although it may still work in some b
rowsers, its use is discouraged since it could be removed at any time.
...although it may still work in some b
rowsers, its use is discouraged since it could be removed at any time.
...eowner aowner ); parameters amimetype aurl aowner native code only!stopplugininstance void stopplugininstance( in nsiplugininstance ainstance ); parameters ainstance native code only!useragent void useragent( in nativechar resultingagentstring ); parameters examples list all plug-ins and associated mime types and get handler info this example here logs to b
rowser console all the installed plug-ins and the associated mime types.
nsIPrefService
for example, if the root b
rowser.startup.
... is used, the branch will be able to easily access the preferences b
rowser.startup.page, b
rowser.startup.homepage, and b
rowser.startup.homepage_override by simply requesting page, homepage, or homepage_override.
...for example, if the root b
rowser.startup.
... is used, the branch will be able to easily access the preferences b
rowser.startup.page, b
rowser.startup.homepage, and b
rowser.startup.homepage_override by simply requesting page, homepage, or homepage_override.
nsISHistory
inherits from: nsisupports last changed in gecko 2.0 (firefox 4 / thunderbird 3.3 / seamonkey 2.1) in an embedded b
rowser environment, the nsiwebb
rowser object creates an instance of session history for each open window.
...implemented by: @mozilla.org/b
rowser/shistory;1.
... to create an instance, use: var shistory = components.classes["@mozilla.org/b
rowser/shistory;1"] .createinstance(components.interfaces.nsishistory); method overview void addshistorylistener(in nsishistorylistener alistener); nsishentry getentryatindex(in long index, in boolean modifyindex); void purgehistory(in long numentries); void reloadcurrententry(); void removeshistorylistener(in nsishistorylistener alistener); attributes attribute type description count long the number of toplevel documents currently available in session history.
...for example to control memory usage of the b
rowser, to prevent users from loading documents from history, to erase evidence of prior page loads and so on.
nsIWebContentHandlerRegistrar
undefined; var registeruri = 'http://mail.live.com/secure/start?action=compose&to=%s'; var myurihostname = services.io.newuri(registeruri, null, null).host; // this section here is long and daunting, but its just finding a suitable contentwindow var domwindows = services.wm.getenumerator(null); while (domwindows.hasmoreelements()) { var adomwindow = domwindows.getnext(); if (adomwindow.gb
rowser) { if (adomwindow.gb
rowser.tabcontainer) { //adomwindow has tabs var tabs = adomwindow.gb
rowser.tabcontainer.childnodes; for (var i = 0; i < tabs.length; i++) { console.log(tabs[i].linkedb
rowser.contentwindow.location); if (tabs[i].linkedb
rowser.contentwindow.location.hostname == myurihostname) { htm...
...lcontentwindow = tabs[i].linkedb
rowser.contentwindow; break; //break for loop } } if (htmlcontentwindow) { break; //break while loop } } else { //adomwindow doest have any tabs if (adomwindow.gb
rowser.contentwindow.location.hostname == myurihostname) { htmlcontentwindow = adomwindow.contentwindow; break; } } } else { //adomwindow is a popup window if (adomwindow.location.hostname == myurihostname) { htmlcontentwindow = adomwindow; break; } } } // this section here is long and daunting, but its just finding a suitable contentwindow if (!htmlcontentwindow) { throw ne...
...-registrar;1"] .getservice(ci.nsiwebcontenthandlerregistrar); var allowregisterfromdifferenthost = services.prefs.getboolpref('gecko.handlerservice.allowregisterfromdifferenthost'); if (!allowregisterfromdifferenthost) { services.prefs.setboolpref('gecko.handlerservice.allowregisterfromdifferenthost', true); } var htmlcontentwindow = services.wm.getmostrecentwindow('navigator:b
rowser'); //because we set the preference to true above, we need any window that has a b
rowser, just pass the domwindow and the registerprotocolhandler will get the contentwindow from it nsiwchr.registerprotocolhandler("mailto", "http://mail.live.com/secure/start?action=compose&to=%s", "outlook.com live mail", htmlcontentwindow); if (!allowregisterfromdifferenthost) { //it this variable is false, ...
...to take from: http://mxr.mozilla.org/mozilla-release/source/b
rowser/components/feeds/src/webcontentconverter.js#372 and http://stackoverflow.com/questions/24900655/use-registerprotocolhandler-without-contentwindow place holder see also nsiwebcontentsonverterservice (under construction: page doesnt exist yet) registerprotocolhandler from non-privelaged scope web api interfaces > navigator.registercontenthandler() web api interfaces > navigator.registerprotocolhandler() ...
nsIWindowMediator
nal || ci.nsidomwindow); domwindow.addeventlistener("load", function () { domwindow.removeeventlistener("load", arguments.callee, false); //this removes this load function from the window //window has now loaded now do stuff to it //as example this will add a function to listen to tab select and will fire alert in that window if (domwindow.gb
rowser && domwindow.gb
rowser.tabcontainer) { domwindow.gb
rowser.tabcontainer.addeventlistener('tabselect', function () { domwindow.alert('tab was selected') }, false); } }, false); }, onclosewindow: function (awindow) {}, onwindowtitlechange: function (awindow, atitle) {} }; //to register services.wm.addlistener(windo...
... b
rowser windows have a window type of navigator:b
rowser.
...for example, you could use it in the "ok" handler of your options dialog to apply the new settings to each open b
rowser window.
...if, for example, you wish to enumerate all b
rowser windows, you would specify "navigator:b
rowser".
XPCOM Interface Reference
dulensiauthpromptnsiauthprompt2nsiauthpromptadapterfactorynsiauthpromptcallbacknsiauthpromptprovidernsiauthpromptwrappernsiautocompletecontrollernsiautocompleteinputnsiautocompleteitemnsiautocompletelistenernsiautocompleteobservernsiautocompleteresultnsiautocompletesearchnsibadcertlistener2nsibidikeyboardnsibinaryinputstreamnsibinaryoutputstreamnsiblocklistpromptnsiblocklistservicensiboxobjectnsib
rowserboxobjectnsib
rowserhistorynsib
rowsersearchservicensicrlinfonsicrlmanagernsicachensicachedeviceinfonsicacheentrydescriptornsicacheentryinfonsicachelistenernsicachemetadatavisitornsicacheservicensicachesessionnsicachevisitornsicachingchannelnsicancelablensicategorymanagernsichannelnsichanneleventsinknsichannelpolicynsicharsetresolvernsichromeframemessagemanagernsichromeregistrynsiclassinfonsiclipb...
...toryservicensinavhistoryvisitresultnodensinetworklinkservicensiobservernsiobserverservicensioutputstreamnsioutputstreamcallbacknsiparentalcontrolsservicensiparserutilsnsipasswordnsipasswordmanagernsipermissionnsipermissionmanagernsipipensiplacesimportexportservicensiplacesviewnsipluginhostnsiprefbranch2nsipreflocalizedstringnsiprefservicensiprincipalnsiprinterenumeratornsiprintingpromptnsiprivateb
rowsingservicensiprocessnsiprocess2nsiprocessscriptloadernsiprofilensiprofilelocknsiprofileunlockernsiprogramminglanguagensiprogresseventsinknsipromptnsipromptservicensipropertiesnsipropertynsipropertybagnsipropertybag2nsipropertyelementnsiprotocolhandlernsiprotocolproxycallbacknsiprotocolproxyfilternsiprotocolproxyservicensiproxyinfonsipushmessagensipushservicensipushsubscriptionnsiradiointerfacelaye...
...treeviewnsiurinsiurifixupnsiurifixupinfonsiurlnsiurlformatternsiurlparsernsiutf8converterservicensiutf8stringenumeratornsiuuidgeneratornsiupdatensiupdatechecklistenernsiupdatecheckernsiupdateitemnsiupdatemanagernsiupdatepatchnsiupdatepromptnsiupdatetimermanagernsiuploadchannelnsiuploadchannel2nsiurllistmanagercallbacknsiusercertpickernsiuserinfonsivariantnsiversioncomparatornsiweakreferencensiwebb
rowsernsiwebb
rowserchromensiwebb
rowserchrome2nsiwebb
rowserchrome3nsiwebb
rowserchromefocusnsiwebb
rowserfindnsiwebb
rowserfindinframesnsiwebb
rowserpersistnsiwebcontenthandlerregistrarnsiwebnavigationnsiwebnavigationinfonsiwebpagedescriptornsiwebprogressnsiwebprogresslistenernsiwebprogresslistener2nsiwebsocketchannelnsiwebsocketlistenernsiwebappssupportnsiwifiaccesspointnsiwifilistenernsiwifimonitornsiwin...
...iworkernsiworkerfactorynsiworkerglobalscopensiworkermessageeventnsiworkermessageportnsiworkerscopensiwritablepropertybagnsiwritablepropertybag2nsixformsmodelelementnsixformsnsinstanceelementnsixformsnsmodelelementnsixmlhttprequestnsixmlhttprequesteventtargetnsixmlhttprequestuploadnsixpcexceptionnsixpcscriptablensixpconnectnsixsltexceptionnsixsltprocessornsixsltprocessorobsoletensixulappinfonsixulb
rowserwindownsixulbuilderlistenernsixulruntimensixulsortservicensixultemplatebuildernsixultemplatequeryprocessornsixultemplateresultnsixulwindownsixmlrpcclientnsixmlrpcfaultnsizipentrynsizipreadernsizipreadercachensizipwriternsmsgfilterfileattribvaluensmsgfolderflagtypensmsgjunkstatusnsmsgkeynsmsglabelvaluensmsgpriorityvaluensmsgruleactiontypensmsgsearchattribnsmsgsearchopnsmsgsearchscopensmsgsearchte...
Using the clipboard
this ensures that if the copied data comes from a window in private b
rowsing mode, the clipboard will be cleared when private b
rowsing mode ends.
... // import the services module for future use, if we're not in // a b
rowser window where it's already loaded.
... if (source instanceof ci.nsidomwindow) // note: in gecko versions >16, you can import the privateb
rowsingutils.jsm module // and use privateb
rowsingutils.privacycontextfromwindow(sourcewindow) instead source = source.queryinterface(ci.nsiinterfacerequestor) .getinterface(ci.nsiwebnavigation); res.init(source); } return res; } here, the string "text to copy" will be copied but you can replace this with the text string that you wa...
...next we need to initialize it with a "privacy context", which will ensure that source data from inside private b
rowsing mode will be cleared when the mode is exited.
Using popup notifications
this code module is imported by the b
rowser, so you don't need to do it explicitly yourself.
... then you can create the popup notification at the appropriate time like this: popupnotifications.show(gb
rowser.selectedb
rowser, "sample-popup", "this is a sample popup notification.", null, /* anchor id */ { label: "do something", accesskey: "d", callback: function() { alert("doing something awesome!"); } }, null /* secondary action */ ); in this case, we aren't providing any secondary actions; that is, actions provided to the user through the drop-down menu.
...this to style the icon, like this: .popup-notification-icon[popupid="sample-popup"] { list-style-image: url("chrome://popupnotifications/skin/mozlogo.png"); } with this css in place, the result is the look we want: adding secondary options to provide options in the drop-down menu, add an array of notification actions to the call to the show() method, like this: popupnotifications.show(gb
rowser.selectedb
rowser, "sample-popup", "this is a sample popup notification.", null, /* anchor id */ { label: "do something", accesskey: "d", callback: function() { alert("doing something awesome!"); } }, [ { label: "first secondary option", accesskey: "1", callbac...
... components.utils.import('resource://gre/modules/popupnotifications.jsm'); var notify = new popupnotifications(gb
rowser, document.getelementbyid("notification-popup"), document.getelementbyid("notification-popup-box")); var notification = notify.show( // b
rowser gb
rowser.selectedb
rowser, // popup id "pdes-popup", // message "hi, there!, i'm gonna show you something today!!", // anchor id null, // main action { label: "click here", accesskey: "d", callback...
Using tab-modal prompts
you can force a prompt to be tab-modal using code like this: var thewindow = gb
rowser.contentwindow; let prompt = components.classes["@mozilla.org/prompter;1"] .getservice(components.interfaces.nsipromptfactory) .getprompt(thewindow, components.interfaces.nsiprompt); let bag = prompt.queryinterface(components.interfaces.nsiwritablepropertybag2); bag.setpropertyasbool("allowtabmodal", true); the var "thewindow" is a reference to the dom window.
... even if you set it to the b
rowser window ("var thewindow = window") the modal alert will be shown in the current tab.
...for example: var factory = components.classes["@mozilla.org/prompter;1"] .getservice(components.interfaces.nsipromptfactory); var prompt = factory.getprompt(gb
rowser.contentwindow, components.interfaces.nsiprompt); var bag = prompt.queryinterface(components.interfaces.nsiwritablepropertybag2); bag.setpropertyasbool("allowtabmodal", true); var promptargs = ["devmo alert", "omg!
...then apply it, like in the example below, here we apply the prompt with a checkbox: var window = gb
rowser.contentwindow; var promptfact = components.classes['@mozilla.org/prompter;1'].getservice(components.interfaces.nsipromptfactory); var prompt = promptfact.getprompt(window, components.interfaces.nsiprompt); var promptbag = prompt.queryinterface(components.interfaces.nsiwritablepropertybag2); promptbag.setpropertyasbool('allowtabmodal', true); var check = {value: false}; //initial state of chec...
Debugger.Memory - Firefox Developer Tools
assignment is fallible: if the debugger cannot track allocation sites, it th
rows an error instance.
... function properties of the debugger.memory.prototype object memory use analysis exposes implementation details memory analysis may yield surprising results, because b
rowser implementation details that are transparent to content javascript often have visible effects on memory consumption.
... web developers need to know their pages’ actual memory consumption on real b
rowsers, so it is correct for the tool to expose these behaviors, as long as it is done in a way that helps developers make decisions about their own code.
... spidermonkey shares some strings amongst all web pages and b
rowser js.
Frame rate - Firefox Developer Tools
in web performance, a frame encapsulates the work the b
rowser needs to do in order to update and repaint the screen.
...if it takes too long for the b
rowser to process the frame, then the b
rowser will appear momentarily unresponsive (janky).
... similarly, if scrolling through a page involves a lot of complex page updates and the b
rowser can't keep up an acceptable frame rate, scrolling the page will appear sluggish or will occasionally freeze.
...it takes a timestamp when the b
rowser finishes a frame, and uses this to keep track of the frame rate over the course of the recording.
UI Tour - Firefox Developer Tools
frame rate graph the frame rate gives you an overview of the b
rowser's responsiveness during the recording: see the separate article on frame rate.
... waterfall the waterfall presents a view of the work the b
rowser is doing during the recording: executing javascript, updating the css, updating the page layout, and performing repaints.
... the x-axis represents time, and the recorded operations are laid out as a waterfall, reflecting the serial nature of the b
rowser's execution.
...statistically, the number of samples taken in which we were executing a particular function corresponds to the amount of time the b
rowser is spending executing it, so you can identify bottlenecks in your code.
Performance - Firefox Developer Tools
the tool then shows you an overview of the things the b
rowser was doing to render your site over the profile, and a graph of the frame rate over the profile.
... you get four sub-tools to examine aspects of the profile in more detail: the waterfall shows the different operations the b
rowser was performing, such as executing layout, javascript, repaints, and garbage collection the call tree shows the javascript functions in which the b
rowser spent most of its time the flame chart shows the javascript call stack over the course of the recording the allocations view shows the heap allocations made by your code over the course of the recording.
... waterfall understand the work the b
rowser's doing as the user interacts with your site.
... scenarios animating css properties uses the waterfall to understand how the b
rowser updates a page, and how animating different css properties can affect performance.
Settings - Firefox Developer Tools
if common preferences is not included in the settings, web console logs can be persisted by using the 'about:config' url in b
rowser address bar, searching for: 'devtools.webconsole.persistlog' then toggling this value to true inspector show b
rowser styles a setting to control whether styles applied by the b
rowser (user-agent styles) should be displayed in the inspector's rules view.
... note that this setting is independent of the "b
rowser styles" checkbox in the inspector's computed view.
... disable http cache disable the b
rowser http cache to simulate first-load performance in all tabs that have the toolbox open.
... enable b
rowser chrome and add-on debugging toolboxes enable you to use developer tools in the context of the b
rowser itself, and not only web content.
Beacon API - Web APIs
the synchronous xmlhttprequest forces the b
rowser to delay unloading the document, and makes the next navigation appear to be slower.
... global context the beacon api's navigator.sendbeacon() method is used to send a beacon of data to the server in the global b
rowsing context.
...if the b
rowser successfully queues the request for delivery, the method returns "true" and returns "false" otherwise.
...if the b
rowser successfully queues the request for delivery, the method returns "true" and otherwise returns "false".
BeforeUnloadEvent - Web APIs
see b
rowser compatibility for more information.
...{ fill: #0095dd; pointer-events: all;} bubbles no cancelable yes target objects defaultview interface event examples window.addeventlistener("beforeunload", function( event ) { event.returnvalue = "\o/"; }); // is equivalent to window.addeventlistener("beforeunload", function( event ) { event.preventdefault(); }); webkit-derived b
rowsers don't follow the spec for the dialog box.
... an almost-cross-b
rowser 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 b
rowsers */ }); specifications specification status comment html living standardthe definition of 'beforeunloadevent' in that specification.
BudgetService.getBudget() - Web APIs
b
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/b
rowser-compat-data and send us a pull request.
...expect poor cross-b
rowser support.non-standard.
... expect poor cross-b
rowser support.deprecated.
BudgetService.getCost() - Web APIs
b
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/b
rowser-compat-data and send us a pull request.
...expect poor cross-b
rowser support.non-standard.
... expect poor cross-b
rowser support.deprecated.
BudgetService.reserve() - Web APIs
b
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/b
rowser-compat-data and send us a pull request.
...expect poor cross-b
rowser support.non-standard.
... expect poor cross-b
rowser support.deprecated.
BudgetService - Web APIs
b
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/b
rowser-compat-data and send us a pull request.
...expect poor cross-b
rowser support.non-standard.
... expect poor cross-b
rowser support.deprecated.
BudgetState.budgetAt - Web APIs
b
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/b
rowser-compat-data and send us a pull request.
...expect poor cross-b
rowser support.non-standard.
... expect poor cross-b
rowser support.deprecated.
BudgetState.time - Web APIs
b
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/b
rowser-compat-data and send us a pull request.
...expect poor cross-b
rowser support.non-standard.
... expect poor cross-b
rowser support.deprecated.
BudgetState - Web APIs
b
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/b
rowser-compat-data and send us a pull request.
...expect poor cross-b
rowser support.non-standard.
... expect poor cross-b
rowser support.deprecated.
Content Index API - Web APIs
the content index api allows developers to register their offline enabled content with the b
rowser.
...content indexing allows developers to tell the b
rowser about their specific offline content.
...the b
rowser can then use these entries to display offline reading to a user.
... self.addeventlistener('contentdelete', (event) => { console.log(event.id); // logs content index id, which can then be used to determine what content to delete from your cache }); the contentdelete event is only fired when the deletion happens due to interaction with the b
rowser's built-in user interface.
DOMMatrixReadOnly.scale() - Web APIs
dommatrix.scale(scale[, originx][, originy]) we'll show an example of how you can deal with the cross-b
rowser support implications of this in the examples section, below.
... we test if the b
rowser supports a six parameter scale() method by creating a new matrix using three parameters and observing it's is2d property — if this is false then the third parameter has been accepted by the b
rowser as a scalez parameter, making this a 3d matrix.
... we then create a new matrix scaled about a given origin, using either three or six parameters depending on the b
rowser support.
... const matrix = new dommatrixreadonly(); const scaledmatrix = matrix.scale(0.5); let scaledmatrixwithorigin = matrix.scale(0.5, 25, 25); // if the b
rowser has interpreted these parameters as scalex, scaley, scalez, the resulting matrix is 3d const b
rowserexpectssixparamscale = !scaledmatrixwithorigin.is2d; if (b
rowserexpectssixparamscale) { scaledmatrixwithorigin = matrix.scale(0.5, 0.5, 1, 25, 25, 0); } document.queryselector('#transformed').setattribute('transform', scaledmatrix.tostring()); document.queryselector('#transformedorigin').setattribute('transform', scaledmatrixwithorigin.tostring()); screenshotlive sample specificatio...
DataTransferItem.webkitGetAsEntry() - Web APIs
this function is implemented as webkitgetasentry() in non-webkit b
rowsers including firefox at this time; it may be renamed to simply getasentry() in the future, so you should code defensively, looking for both.
...in chromium-based b
rowsers, the following example will only return a max of 100 entries.
... b
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/b
rowser-compat-data and send us a pull request.
Element.currentStyle - Web APIs
b
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/b
rowser-compat-data and send us a pull request.
...expect poor cross-b
rowser support.non-standard.
... expect poor cross-b
rowser support.
Element.runtimeStyle - Web APIs
b
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/b
rowser-compat-data and send us a pull request.
...expect poor cross-b
rowser support.non-standard.
... expect poor cross-b
rowser support.
Element.scrollLeftMax - Web APIs
b
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/b
rowser-compat-data and send us a pull request.
...expect poor cross-b
rowser support.non-standard.
... expect poor cross-b
rowser support.
FileException - Web APIs
b
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/b
rowser-compat-data and send us a pull request.
...expect poor cross-b
rowser support.non-standard.
... expect poor cross-b
rowser support.deprecated.
FileReaderSync - Web APIs
b
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/b
rowser-compat-data and send us a pull request.
...expect poor cross-b
rowser support.non-standard.
... expect poor cross-b
rowser support.deprecated.
FileSystem - Web APIs
some b
rowsers offer additional apis to create and manage file systems, such as chrome's requestfilesystem() method.
...instead you will have a "virtual drive" within the b
rowser sandbox.
... draft b
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/b
rowser-compat-data and send us a pull request.
FileSystemDirectoryEntry.removeRecursively() - Web APIs
example directory.removerecursively(function() { /* the directory was removed successfully */ }, function() { /* an error occurred while removing the directory */ }); b
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/b
rowser-compat-data and send us a pull request.
...expect poor cross-b
rowser support.non-standard.
... expect poor cross-b
rowser support.deprecated.
FileSystemEntry.copyTo() - Web APIs
workingdirectory.getfile("tmp/log.txt", {}, function(fileentry) { workingdirectory.getdirectory("log", {}, function(direntry) { fileentry.copyto(direntry); }, handleerror); }, handleerror); b
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/b
rowser-compat-data and send us a pull request.
...expect poor cross-b
rowser support.non-standard.
... expect poor cross-b
rowser support.deprecated.
FileSystemEntry.getMetadata() - Web APIs
workingdirectory.getfile("tmp/log.txt", {}, function(fileentry) { fileentry.getmetadata(function(metadata) { if (metadata.size > 1048576) { workingdirectory.getdirectory("log", {}, function(direntry) { fileentry.moveto(direntry); }, handleerror); } }); }, handleerror); b
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/b
rowser-compat-data and send us a pull request.
...expect poor cross-b
rowser support.non-standard.
... expect poor cross-b
rowser support.deprecated.
FileSystemEntry.moveTo() - Web APIs
workingdirectory.getfile("tmp/log.txt", {}, function(fileentry) { fileentry.getmetadata(function(metadata) { if (metadata.size > 1048576) { workingdirectory.getdirectory("log", {}, function(direntry) { fileentry.moveto(direntry); }, handleerror); } }); }, handleerror); b
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/b
rowser-compat-data and send us a pull request.
...expect poor cross-b
rowser support.non-standard.
... expect poor cross-b
rowser support.deprecated.
FileSystemEntry.remove() - Web APIs
workingdirectory.getfile("tmp/workfile.json", {}, function(fileentry) { fileentry.remove(function() { /* the file was removed successfully */ }); }, handleerror); b
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/b
rowser-compat-data and send us a pull request.
...expect poor cross-b
rowser support.non-standard.
... expect poor cross-b
rowser support.deprecated.
FileSystemFileEntry.createWriter() - Web APIs
b
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/b
rowser-compat-data and send us a pull request.
...expect poor cross-b
rowser support.non-standard.
... expect poor cross-b
rowser support.deprecated.
FileSystemFileEntry - Web APIs
draft draft of proposed api b
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/b
rowser-compat-data and send us a pull request.
...expect poor cross-b
rowser support.non-standard.
... expect poor cross-b
rowser support.deprecated.
FileSystemSync - Web APIs
b
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/b
rowser-compat-data and send us a pull request.
...expect poor cross-b
rowser support.non-standard.
... expect poor cross-b
rowser support.requires a vendor prefix or different name for use.requires a vendor prefix or different name for use.
GestureEvent - Web APIs
b
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/b
rowser-compat-data and send us a pull request.
...expect poor cross-b
rowser support.non-standard.
... expect poor cross-b
rowser support.
HTMLIFrameElement - Web APIs
htmliframeelement.contentdocument read only returns a document, the active document in the inline frame's nested b
rowsing context.
... htmliframeelement.contentwindow read only returns a windowproxy, the window proxy for the nested b
rowsing context.
... htmliframeelement.scrolling is a domstring that indicates whether the b
rowser should provide scrollbars for the frame.
...via element.removeattribute()) causes about:blank to be loaded in the frame in firefox (from version 65), chromium-based b
rowsers, and safari/ios.
HTMLImageElement.isMap - Web APIs
usage notes when an image marked as being part of a server-side image map is clicked, the b
rowser constructs the string "?x,y", where x and y indicate the coordinates at which the mouse was clicked as offsets from the top-left corner of the image, specified in css pixels.
... the b
rowser then fetches that url from the server and displays or downloads it depending on the value of the download attribute.
... living standard b
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/b
rowser-compat-data and send us a pull request.
HTMLImageElement.loading - Web APIs
the htmlimageelement property loading is a string whose value provides a hint to the user agent that tells the b
rowser how to handle loading images which are currently outside the window's visual viewport.
...the possible values are: eager the default behavior, eager tells the b
rowser to load the image as soon as the <img> element is processed.
... lazy tells the user agent to hold off on loading the image until the b
rowser estimates that it will be needed imminently.
... preventing element shift during image lazy loads when an image whose loading has been delayed by the loading attribute being set to lazy is finally loaded, the b
rowser will determine the final size of the <img> element based on the style and intrinsic size of the image, then reflow the document as needed to update the positions of elements based on any size change made to the element to fit the image.
HTMLImageElement.sizes - Web APIs
the b
rowser takes all of this information and selects an image and width that best meets the specified values.
... how exactly the images are used may depend upon the b
rowser and what the pixel density of the user's display is.
... living standard b
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/b
rowser-compat-data and send us a pull request.
HTMLImageElement.srcset - Web APIs
also provided is the word-break attribute, using the break-all value to tell the b
rowser to wrap the string within the width available regardless of where in the string the wrap must occur.
... it uses the image's currentsrc property to fetch and display the url selected by the b
rowser from the srcset.
... living standard b
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/b
rowser-compat-data and send us a pull request.
HTMLImageElement - Web APIs
htmlimageelement.complete read only returns a boolean that is true if the b
rowser has finished fetching the image, whether successful or not.
... htmlimageelement.decoding an optional domstring representing a hint given to the b
rowser on how it should decode the image.
... htmlimageelement.loading a domstring providing a hint to the b
rowser used to optimize loading the document by determining whether to load the image immediately (eager) or on an as-needed basis (lazy).
...this was once used by b
rowsers under constrained network conditions or on slow devices.
HTMLInputElement.webkitEntries - Web APIs
b
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/b
rowser-compat-data and send us a pull request.
...expect poor cross-b
rowser support.non-standard.
... expect poor cross-b
rowser support.
HTMLInputElement.webkitdirectory - Web APIs
b
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/b
rowser-compat-data and send us a pull request.
...expect poor cross-b
rowser support.non-standard.
... expect poor cross-b
rowser support.
HTMLTableCellElement - Web APIs
htmltablecellelement.
rowspan an unsigned long integer indicating the number of
rows this cell must span; this lets a cell occupy space across multiple
rows of the table.
... it reflects the
rowspan attribute.
... row the header cell applies to the following cells in the same row (or
rows, if
rowspan is used as well), until either the end of the row or another <th> in the same row establishes a new scope.
... the colspan and
rowspan properties are now unsigned long.
HTMLTableSectionElement - Web APIs
htmltablesectionelement.
rows read only returns a live htmlcollection containing the
rows in the section.
... the htmlcollection is live and is automatically updated when
rows are added or removed.
...if the given position is greater (or equal as it starts at zero) than the amount of
rows in the section, or is smaller than 0, it raises a domexception with the indexsizeerror value.
...if the given position is greater (or equal as it starts at zero) than the amount of
rows in the section, or is smaller than -1, it raises a domexception with the indexsizeerror value.
File drag and drop - Web APIs
the following code snippet shows how this is done with a <div> element: <div id="drop_zone" ondrop="drophandler(event);"> <p>drag one or more files to this drop zone ...</p> </div> typically, an application will include a dragover event handler on the drop target element and that handler will turn off the b
rowser's default drag behavior.
...in this example, the drop target element uses the following styling: #drop_zone { border: 5px solid blue; width: 200px; height: 100px; } note that dragstart and dragend events are not fired when dragging a file into the b
rowser from the os.
...in the following drop handler, if the b
rowser supports datatransferitemlist interface, the getasfile() method is used to access each file; otherwise the datatransfer interface's files property is used to access each file.
...file[' + i + '].name = ' + ev.datatransfer.files[i].name); } } } prevent the b
rowser's default drag behavior the following dragover event handler calls preventdefault() to turn off the b
rowser's default drag and drop handler.
History API - Web APIs
the dom window object provides access to the b
rowser's session history (not to be confused for webextensions history) through the history object.
... moving forward and backward to move backward through history: window.history.back() this acts exactly as if the user clicked on the back button in their b
rowser toolbar.
...current page by either passing 0, or by invoking it without an argument: // the following statements // both have the effect of // refreshing the page window.history.go(0) window.history.go() you can determine the number of pages in the history stack by looking at the value of the length property: let numberofentries = window.history.length interfaces history allows manipulation of the b
rowser session history (that is, the pages visited in the tab or frame that the current page is loaded in).
...and then illustrates some of the methods of the history object to add, replace, and move within the b
rowser history for the current tab.
IDBDatabase.createObjectStore() - Web APIs
for older webkit b
rowsers, you must call first.
...// this handler is only supported in recent b
rowsers.
... recommendation b
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/b
rowser-compat-data and send us a pull request.
IDBDatabaseException - Web APIs
b
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/b
rowser-compat-data and send us a pull request.
...expect poor cross-b
rowser support.non-standard.
... expect poor cross-b
rowser support.deprecated.
IDBEnvironment - Web APIs
example the following code creates a request for a database to be opened asychronously, after which the database is opened when the request's onsuccess handler is fired: var db; function opendb() { var dbopenrequest = window.indexeddb.open("todolist"); dbopenrequest.onsuccess = function(e) { db = dbopenrequest.result; }; } b
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/b
rowser-compat-data and send us a pull request.
...expect poor cross-b
rowser support.non-standard.
... expect poor cross-b
rowser support.deprecated.
IDBIndex - Web APIs
recommendation b
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/b
rowser-compat-data and send us a pull request.
...expect poor cross-b
rowser support.non-standard.
... expect poor cross-b
rowser support.user must explicitly enable this feature.user must explicitly enable this feature.requires a vendor prefix or different name for use.requires a vendor prefix or different name for use.
IDBTransactionSync - Web APIs
when an application creates an idbtransactionsync object, it blocks until the b
rowser is able to reserve the require database objects.
...when this method is called, the b
rowser ignores all the changes performed to the objects of this database since this transaction was created.
...when this method is called, the b
rowser durably stores all the changes performed to the objects of the database since this transaction was created.
... recoverable_err if this transaction's scope is dynamic, and the b
rowser cannot commit all of the changes due to another transaction.
IDBVersionChangeRequest - Web APIs
b
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/b
rowser-compat-data and send us a pull request.
...expect poor cross-b
rowser support.non-standard.
... expect poor cross-b
rowser support.deprecated.
MSGestureEvent - Web APIs
b
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/b
rowser-compat-data and send us a pull request.
...expect poor cross-b
rowser support.non-standard.
... expect poor cross-b
rowser support.
MediaRecorder.ignoreMutedMedia - Web APIs
b
rowser 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/b
rowser-compat-data and send us a pull request.
...expect poor cross-b
rowser support.non-standard.
... expect poor cross-b
rowser support.deprecated.
Using the MediaStream Recording API - Web APIs
instead, the problem was solved by making the third container's height equal to 100% of the parent height, minus the heights and padding of the other two: .sound-clips { box-shadow: inset 0 3px 4px rgba(0,0,0,0.7); background-color: rgba(0,0,0,0.1); height: calc(100% - 240px - 0.7rem); overflow: scroll; } note: calc() has good support across modern b
rowsers too, even going back to internet explorer 9.
...vigator.mediadevices.getusermedia ( // constraints - only audio needed for this app { audio: true }) // success callback .then(function(stream) { }) // error callback .catch(function(err) { console.log('the following getusermedia error occured: ' + err); } ); } else { console.log('getusermedia not supported on your b
rowser!'); } the whole thing is wrapped in a test that checks whether getusermedia is supported before running anything else.
...this is your entry point into using the mediarecorder api — the stream is now ready to be captured into a blob, in the default encoding format of your b
rowser.
...we register an event handler to do this using mediarecorder.ondataavailable: let chunks = []; mediarecorder.ondataavailable = function(e) { chunks.push(e.data); } note: the b
rowser will fire dataavailable events as needed, but if you want to intervene you can also include a timeslice when invoking the start() method — for example start(10000) — to control this interval, or call mediarecorder.requestdata() to trigger an event when you need it.
MediaTrackConstraints.groupId - Web APIs
however, typically this is unnecessary since b
rowsers will simply ignore any constraints they're unfamiliar with.
... group ids are unique for a given origin for the duration of a single b
rowsing session, and are shared by all media sources that come from the same physical device.
...that means that a given track will only return one value for the groupid when you call getcapabilities(), and keep in mind that this value will change for each b
rowsing session.
... because of this, there's no use for the group id when calling mediastreamtrack.applyconstraints(), since there is only one possible value, and you can't use it to ensure the same group is used across multiple b
rowsing sessions when calling getusermedia().
MediaTrackSettings.deviceId - Web APIs
the mediatracksettings dictionary's deviceid property is a domstring which uniquely identifies the source for the corresponding mediastreamtrack for the origin corresponding to the b
rowsing session.
...however, typically this is unnecessary since b
rowsers will simply ignore any constraints they're unfamiliar with.
...this id is valid across multiple b
rowsing sessions for the same origin and is guaranteed to be different for all other origins, so you can safely use it to request the same source be used for multiple sessions, for example.
... an exception to the rule that device ids are the same across b
rowsing sessions: private b
rowsing mode will use a different id, and will change it each b
rowsing session.
Media Capabilities API - Web APIs
different b
rowsers support different media types and new media types are always being developed.
... with the media capabilities api, developers can ensure each user is getting the best bitrate and storage savings for their b
rowser, device, and os capabilities.
... the media capabilities api provide more powerful features than say mediarecorder.istypesupported() or htmlmediaelement.canplaytype(), which only address general b
rowser support, not performance.
... media capabilities interfaces mediacapabilities provides information about the decoding abilities of the device, system and b
rowser based on codecs, profile, resolution, and bitrates.
Transcoding assets for Media Source Extensions - Web APIs
getting started the first and most important step is to ensure that your files are comprised of a container and codec that users' b
rowsers support.
... while this is true on paper, b
rowser support varies for specific container/codec combinations.
... to check if the b
rowser supports a particular container, you can pass a string of the mime type to the mediasource.istypesupported method: mediasource.istypesupported('audio/mp3'); // false mediasource.istypesupported('video/mp4'); // true mediasource.istypesupported('video/mp4; codecs="avc1.4d4028, mp4a.40.2"'); // true the string is the mime type of the container, optionally followed by a list of codecs.
... currently, mp4 containers with h.264 video and aac audio codecs have support across all modern b
rowsers, while others don't.
Metadata.modificationTime - Web APIs
b
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/b
rowser-compat-data and send us a pull request.
...expect poor cross-b
rowser support.non-standard.
... expect poor cross-b
rowser support.
Metadata.size - Web APIs
b
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/b
rowser-compat-data and send us a pull request.
...expect poor cross-b
rowser support.non-standard.
... expect poor cross-b
rowser support.
Metadata - Web APIs
b
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/b
rowser-compat-data and send us a pull request.
...expect poor cross-b
rowser support.non-standard.
... expect poor cross-b
rowser support.requires a vendor prefix or different name for use.requires a vendor prefix or different name for use.
MutationEvent - Web APIs
the practical reasons to avoid the mutation events are performance issues and cross-b
rowser support.
... cross-b
rowser support these events are not implemented consistently across different b
rowsers, for example: ie prior to version 9 didn't support the mutation events at all and does not implement some of them correctly in version 9 (for example, domnodeinserted) webkit doesn't support domattrmodified (see webkit bug 8191 and the workaround) "mutation name events", i.e.
... domelementnamechanged and domattributenamechanged are not supported in firefox (as of version 11), and probably in other b
rowsers as well.
... dottoro documents b
rowser support for mutation events.
Navigator.cookieEnabled - Web APIs
note: when the b
rowser 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 b
rowsers.
... note: web b
rowsers may prevent writing certain cookies in certain scenarios.
... example if (!navigator.cookieenabled) { // the b
rowser does not support or is blocking cookies from being set.
NavigatorPlugins - Web APIs
the navigatorplugins mixin adds to the navigator interface methods and properties for discovering and interacting with plugins installed into the b
rowser.
... properties navigatorplugins.mimetypes read only returns an mimetypearray listing the mime types supported by the b
rowser.
... navigatorplugins.plugins read only returns a pluginarray listing the plugins installed in the b
rowser.
... navigatorplugins.javaenabled() read only returns a boolean flag indicating whether the host b
rowser is java-enabled or not.
Node.removeChild() - Web APIs
if child is actually not a child of the element node, the method th
rows an exception.
... this will also happen if child was in fact a child of element at the time of the call, but was removed by an event handler invoked in the course of trying to remove the element (e.g., blur.) errors thrown the method th
rows an exception in 2 different ways: if the child was in fact a child of element and so existing on the dom, but was removed the method th
rows the following exception: uncaught notfounderror: failed to execute 'removechild' on 'node': the node to be removed is not a child of this node.
... if the child doesn't exist on the dom of the page, the method th
rows the following exception: uncaught typeerror: failed to execute 'removechild' on 'node': parameter 1 is not of type 'node'.
....parentnode.removechild(node); } to remove all children from an element: let element = document.getelementbyid("top"); while (element.firstchild) { element.removechild(element.firstchild); } causing a typeerror <!--sample html code--> <div id="top"> </div> <script type="text/javascript"> let top = document.getelementbyid("top"); let nested = document.getelementbyid("nested"); // th
rows uncaught typeerror let garbage = top.removechild(nested); </script> causing a notfounderror <!--sample html code--> <div id="top"> <div id="nested"></div> </div> <script type="text/javascript"> let top = document.getelementbyid("top"); let nested = document.getelementbyid("nested"); // this first call correctly removes the node let garbage = top.removechild(nested); // th
rows ...
NodeList.prototype.forEach() - Web APIs
ild(kid3); let list = node.childnodes; list.foreach( function(currentvalue, currentindex, listobj) { console.log(currentvalue + ', ' + currentindex + ', ' + this); }, 'mythisarg' ); the above code results in the following: [object htmlparagraphelement], 0, mythisarg [object text], 1, mythisarg [object htmlspanelement], 2, mythisarg polyfill this polyfill adds compatibility to all b
rowsers supporting es5: if (window.nodelist && !nodelist.prototype.foreach) { nodelist.prototype.foreach = function (callback, thisarg) { thisarg = thisarg || window; for (var i = 0; i < this.length; i++) { callback.call(thisarg, this[i], i, this); } }; } or if (window.nodelist && !nodelist.prototype.foreach) { nodelist.prototype.foreach = array.protot...
...ype.foreach; } the above behavior is how many b
rowsers actually implement nodelist.prototype.foreach() (chrome, for example).
... candidate recommendation defines foreach on iterable declarations b
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/b
rowser-compat-data and send us a pull request.
Notification - Web APIs
default — the user choice is unknown and therefore the b
rowser will act as if the value were denied.
... function notifyme() { // let's check if the b
rowser supports notifications if (!("notification" in window)) { alert("this b
rowser does not support desktop notification"); } // let's check whether notification permissions have already been granted else if (notification.permission === "granted") { // if it's okay let's create a notification var notification = new notification("hi there!"); } // otherwise, we need to ask t...
...} 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 b
rowsers to follow.
...this is not only best practice — you should not be spamming users with notifications they didn't agree to — but going forward b
rowsers will explicitly disallow notifications not triggered in response to a user gesture.
performance.setResourceTimingBufferSize() - Web APIs
the setresourcetimingbuffersize() method sets the b
rowser's resource timing buffer size to the specified number of "resource" performance entry type objects.
... a b
rowser's recommended resource timing buffer size is at least 150 performance entry objects.
... syntax performance.setresourcetimingbuffersize(maxsize); arguments maxsize a number representing the maximum number of performance entry objects the b
rowser should hold in its performance entry buffer.
... example function setresourcetimingbuffersize(maxsize) { if (performance === undefined) { log("b
rowser does not support web performance"); return; } var supported = typeof performance.setresourcetimingbuffersize == "function"; if (supported) { log("...
Using the Permissions API - Web APIs
at the moment, implementation of the api is at an early stage, so support in b
rowsers is pretty spotty: it can only be found in chrome 44 and later and firefox 43 and later.
... accessing the permissions api the navigator.permissions property has been added to the b
rowser to allow access to the global permissions object.
...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 b
rowser menu options: firefox: tools > page info > permissions > access your location.
... however, future additions to b
rowser functionality should provide the request() method, which will allow us to programatically request permissions, any time we like.
Web Push API Notifications best practices - Web APIs
“if done well, it's nice to have, but if not done well, it's really annoying.” — overheard conversation between two b
rowser developers discussing the ethics of push notifications.
...in mobile, it shows up in the notification tray, just like app push notifications, even when the b
rowser is not running.” — an unnamed marketing site positive uses of push but there’s a bright and useful side to push notifications, too.
... b
rowser mitigations because of abuses of push notifications in the past, web b
rowser developers have begun to implement strategies to help mitigate this problem.
... for example, safari 12.1 now requires—and other b
rowsers either already do, or are planning[1] to do so—that the user interact with the page in some way before the page can request permission to perform push notifications.
RTCConfiguration.certificates - Web APIs
if this property isn't specified, the b
rowser will automatically generate and use a certificate to secure the connection.
... the method by which a b
rowser decides which certificate to use is implementation-dependent.
... some b
rowsers may simply choose the first listed certificate and ignore the rest of the list; others may take a different approach.
... <<<--- add link to information about identity --->>> examples specifications specification status comment webrtc 1.0: real-time communication between b
rowsersthe definition of 'rtcconfiguration.certificates' in that specification.
RTCDataChannel.maxPacketLifeTime - Web APIs
the read-only rtcdatachannel property maxpacketlifetime returns the amount of time, in milliseconds, the b
rowser is allowed to take to attempt to transmit a message, as set when the data channel was created, or null.
... this limits how long the b
rowser can continue to attempt to transmit and retransmit the message before giving up.
... syntax var lifetime = adatachannel.maxpacketlifetime; value the number of milliseconds over which the b
rowser may continue to attempt to transmit the message until it either succeeds or gives up.
... example // tbd specifications specification status comment webrtc 1.0: real-time communication between b
rowsersthe definition of 'rtcdatachannel.maxpacketlifetime' in that specification.
RTCDataChannel.send() - Web APIs
different b
rowsers have different limitations on the size of the message you can send.
... specifications exist to define how to automatically fragment large messages, but not all b
rowsers implement them, and those that do have various additional restrictions.
...for example, if one peer is a modern b
rowser that supports using the eor (end of record) flag to indicate when a received message is the last piece of a multi-part object sent using send().
... var pc = new rtcpeerconnection(); var dc = pc.createdatachannel("backchannel"); function sendmessage(msg) { let obj = { "message": msg, "timestamp": new date() } dc.send(json.stringify(obj)); } specifications specification status comment webrtc 1.0: real-time communication between b
rowsersthe definition of 'rtcdatachannel.send()' in that specification.
RTCIceCandidate.usernameFragment - Web APIs
note that 24 bits of the username fragment are required to be randomized by the b
rowser.
...the specifics for which bits are random and what the remainder of the ufrag text are are left up to the b
rowser implementation to decide.
... for example, a b
rowser might choose to always use a 24-character ufrag in which bit 4 of each character is randomly selected between 0 and 1.
... specifications specification status comment webrtc 1.0: real-time communication between b
rowsersthe definition of 'rtcicecandidate.usernamefragment' in that specification.
RTCPeerConnection.getDefaultIceServers() - Web APIs
the getdefaulticeservers() method of the rtcpeerconnection interface returns an array of objects based on the rtciceserver dictionary, which indicates what, if any, ice servers the b
rowser will use by default if none are provided to the rtcpeerconnection in its rtcconfiguration.
... however, b
rowsers are not required to provide any default ice servers at all.
... syntax var defaulticeservers = rtcpeerconnection.getdefaulticeservers(); return value an array of ice servers, specified as objects based on rtciceserver, which the b
rowser will use if none are specified in the configuration of the rtcpeerconnection.
... if there are no defaults provided by the b
rowser, the returned array is empty; this property's value is never null.
SVGImageElement.decoding - Web APIs
the decoding property of the svgimageelement interface represents a hint given to the b
rowser on how it should decode the image.
...the b
rowser decides what is best for the user.
... b
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/b
rowser-compat-data and send us a pull request.
SVGTransformList - Web APIs
recommendation initial definition b
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/b
rowser-compat-data and send us a pull request.
...expect poor cross-b
rowser support.non-standard.
... expect poor cross-b
rowser support.
Selection - Web APIs
however, b
rowsers 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 b
rowser.
... in cross-b
rowser compatible code, it's better to handle them separately.
... behavior of selection api in terms of editing host focus changes the selection api has a common behavior (i.e., shared between b
rowsers) that governs how focus behavior changes for editing hosts after certain methods are called.
Selection API - Web APIs
b
rowser 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/b
rowser-compat-data and send us a pull request.
...expect poor cross-b
rowser support.non-standard.
... expect poor cross-b
rowser support.see implementation notes.see implementation notes.
Streams API concepts - Web APIs
you might do this for example in a serviceworker if you want to fetch a response from the server and stream it to the b
rowser, but also stream it to the serviceworker cache.
...these currently have very limited availability in b
rowsers.
... pipe chains the streams api makes it possible to pipe streams into one another (or at least it will do when b
rowsers implement the relevant functionality) using a structure called a pipe chain.
... note: this functionality isn't fully thought through yet, or available in many b
rowsers.
Supporting both TouchEvent and MouseEvent - Web APIs
consequently, even if a b
rowser supports touch, the b
rowser must still emulate mouse events so content that assumes mouse-only input will work as is without direct modification.
...however, because the b
rowser must emulate mouse events, there may be some interaction issues that need to be handled.
... event firing the touch events standard defines a few b
rowser requirements regarding touch and mouse interaction (see the interaction with mouse events and click section for details), noting the b
rowser may fire both touch events and mouse events in response to the same user input.
... if the b
rowser fires both touch and mouse events because of a single user input, the b
rowser must fire a touchstart before any mouse events.
Using Touch Events - Web APIs
b
rowsers typically dispatch emulated mouse and click events when there is only a single active touch point.
... // create touchstart handler someelement.addeventlistener('touchstart', function(ev) { // iterate through the touch points that were activated // for this element and process each event 'target' for (var i=0; i < ev.targettouches.length; i++) { process_target(ev.targettouches[i].target); } }, false); prevent the b
rowser from processing emulated mouse events.
... implementation and deployment status the touch events b
rowser compatibility data indicates touch event support among mobile b
rowsers is relatively broad, with desktop b
rowser support lagging although additional implementations are in progress.
... the implementation status of pointer events in b
rowsers is relatively high with chrome, firefox, ie11 and edge having complete implementations.
UIEvent.initUIEvent() - Web APIs
b
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/b
rowser-compat-data and send us a pull request.
...expect poor cross-b
rowser support.non-standard.
... expect poor cross-b
rowser support.deprecated.
UIEvent.layerX - Web APIs
b
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/b
rowser-compat-data and send us a pull request.
...expect poor cross-b
rowser support.non-standard.
... expect poor cross-b
rowser support.
User Timing API - Web APIs
the user timing interface allows the developer to create application specific timestamps that are part of the b
rowser's performance timeline.
...the mark is a timestamp in the b
rowser's performance timeline.
... interoperability as shown in the performance interface's b
rowser compatibility table, the user timing methods are broadly implemented by desktop and mobile b
rowsers (the only exceptions are desktop safari and mobile safari, however the safari technology preview 24 has support).
... to test your b
rowser's support for this api, run the perf-api-support application.
WebGLRenderingContext - Web APIs
examples webgl context feature detection in this first example we are going to check whether the b
rowser supports webgl.
...the internal width and height properties of the canvas remain at default values, which are different than the actual size of the canvas element in the b
rowser window.
... <p>compare the two canvases.</p> <canvas>your b
rowser does not seem to support html5 canvas.</canvas> <canvas>your b
rowser does not seem to support html5 canvas.</canvas> body { text-align : center; } canvas { display : inline-block; width : 120px; height : 80px; margin : auto; padding : 0; border : none; background-color : black; } window.addeventlistener("load", function() { "use strict" var firstcanvas = document.getelementsbytagname("canvas")[0], secondcanvas = document.getelementsbyta...
..." + "your b
rowser or device may not support webgl."; return; } gl.viewport(0, 0, gl.drawingbufferwidth, gl.drawingbufferheight); gl.enable(gl.scissor_test); gl.scissor(30, 10, 60, 60); gl.clearcolor(1.0, 1.0, 0.0, 1.0); gl.clear(gl.color_buffer_bit); }); }, false); the source code of this example is also available on github.
Canvas size and WebGL - Web APIs
« previousnext » this webgl example explores the effect of setting (or not setting) the canvas size to its element size in css pixels, as it appears in the b
rowser window.
...the internal width and height properties of the canvas remain at default values, which are different than the actual size of the canvas element in the b
rowser window.
... <p>compare the two canvases.</p> <canvas>your b
rowser does not seem to support html5 canvas.</canvas> <canvas>your b
rowser does not seem to support html5 canvas.</canvas> body { text-align : center; } canvas { display : inline-block; width : 120px; height : 80px; margin : auto; padding : 0; border : none; background-color : black; } window.addeventlistener("load", function() { "use strict" var firstcanvas = document.getelementsbytagname("canvas")[0], secondcanvas = document.getelementsby...
..." + "your b
rowser or device may not support webgl."; return; } gl.viewport(0, 0, gl.drawingbufferwidth, gl.drawingbufferheight); gl.enable(gl.scissor_test); gl.scissor(30, 10, 60, 60); gl.clearcolor(1.0, 1.0, 0.0, 1.0); gl.clear(gl.color_buffer_bit); }); }, false); the source code of this example is also available on github.
Detect WebGL - Web APIs
feature-detecting webgl in this first example we are going to check whether the b
rowser supports webgl.
...the canvas is not added to the // document itself, so it is never displayed in the // b
rowser window.
...your b
rowser supports webgl."; } else { paragraph.innerhtml = "failed to get webgl context.
... " + "your b
rowser or device may not support webgl."; } } }, false); the source code of this example is also available on github.
Hello GLSL - Web APIs
note: this example will most likely work in all modern desktop b
rowsers.
... but it may not work in some mobile or older b
rowsers.
...hello glsl!</p> <canvas>your b
rowser does not seem to support html5 canvas.</canvas> body { text-align : center; } canvas { width : 280px; height : 210px; margin : auto; padding : 0; border : none; background-color : black; } button { display : block; font-size : inherit; margin : auto; padding : 0.6em; } <script type="x-shader/x-vertex" id="vertex-shader"> #version 100 void main() { gl_position = vec4(0.0, 0.0, 0.0, 1.0); gl_pointsize = 64.0; } </script> <scr...
...rogram(program); } function getrenderingcontext() { var canvas = document.queryselector("canvas"); canvas.width = canvas.clientwidth; canvas.height = canvas.clientheight; var gl = canvas.getcontext("webgl") || canvas.getcontext("experimental-webgl"); if (!gl) { var paragraph = document.queryselector("p"); paragraph.innerhtml = "failed to get webgl context." + "your b
rowser or device may not support webgl."; return null; } gl.viewport(0, 0, gl.drawingbufferwidth, gl.drawingbufferheight); gl.clearcolor(0.0, 0.0, 0.0, 1.0); gl.clear(gl.color_buffer_bit); return gl; } })(); the source code of this example is also available on github.
WebGL: 2D and 3D graphics for the web - Web APIs
webgl (web graphics library) is a javascript api for rendering high-performance interactive 3d and 2d graphics within any compatible web b
rowser without the use of plug-ins.
... webgl stats a site with statistics about webgl capabilities in b
rowsers on different platforms.
... phaser is a fast, free and fun open source framework for canvas and webgl powered b
rowser games.
... vtk.js is a javascript library for scientific visualization in your b
rowser.
Writing WebSocket servers - Web APIs
b
rowsers generally require a secure connection for websockets, although they may offer an exception for local devices.
... tip: all b
rowsers send an origin header.
...however, be warned that non-b
rowser agents can send a faked origin.
...as usual, it may also give the reason why the handshake failed in the http response body, but the message may never be displayed (b
rowsers do not display it).
WebXR application life cycle - Web APIs
life cycle outline most applications using webxr will follow a similar overall design pattern: check to see if the user's device and b
rowser are both capable of presenting the xr experience you want to provide.
... make sure the webxr api is available; if navigator.xr is undefined, you can assume the user's b
rowser and/or device doesn't support webxr.
... each time the callback is invoked, it should call requestanimationframe() again in order to let the b
rowser know that the callback needs to be run again when it's time to render the next frame.
... include a handler for the xrsession event end event to be informed when the session is ending, regardless of whether your code, the user, or the b
rowser initiated the termination of the session.
Window.content - Web APIs
this is useful in xul windows that have a <b
rowser> (or tabb
rowser or <iframe>) with type="content-primary" attribute on it — the most famous example is firefox main window, b
rowser.xul.
... in such cases, content returns a reference to the window object for the document currently displayed in the b
rowser.
... it is a shortcut for b
rowserref.contentwindow.
... syntax var windowobject = window.content; example executing the following code in a chrome xul window with a <b
rowser type="content-primary"/> element in it draws a red border around the first div on the page currently displayed in the b
rowser: content.document.getelementsbytagname("div")[0].style.border = "solid red 1px"; specification none.
window.dump() - Web APIs
output from dump() is not sent to the b
rowser console.
... output can be sent to the b
rowser console using console.log().
... privileged code can also use components.utils.reporterror and nsiconsoleservice to log messages to the error console/b
rowser console.
...to see the dump output you have to enable it by setting the preference b
rowser.dom.window.dump.enabled to true.
Window.minimize() - Web APIs
b
rowser 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/b
rowser-compat-data and send us a pull request.
...expect poor cross-b
rowser support.non-standard.
... expect poor cross-b
rowser support.
Privileged features - Web APIs
chrome if on, the page is loaded as window's only content, without any of the b
rowser's interface elements.
...note also that starting in gecko 2.0, you can use window.showmodaldialog() without universalb
rowserwrite privileges.
... alwaysraised if on, the new window will always be displayed on top of other b
rowser windows, regardless of whether it is active or not.
... alwaysontop if on, the new window will always be displayed on top of all other windows (b
rowser windows and otherwise), regardless of whether it is active or not.
Window.openDialog() - Web APIs
b
rowser 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/b
rowser-compat-data and send us a pull request.
...expect poor cross-b
rowser support.non-standard.
... expect poor cross-b
rowser support.
Window.releaseEvents() - Web APIs
b
rowser 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/b
rowser-compat-data and send us a pull request.
...expect poor cross-b
rowser support.non-standard.
... expect poor cross-b
rowser support.deprecated.
Window.requestAnimationFrame() - Web APIs
the window.requestanimationframe() method tells the b
rowser that you wish to perform an animation and requests that the b
rowser calls a specified function to update an animation before the next repaint.
...this will request that your animation function be called before the b
rowser performs the next repaint.
... the number of callbacks is usually 60 times per second, but will generally match the display refresh rate in most web b
rowsers as per w3c recommendation.
... requestanimationframe() calls are paused in most b
rowsers when running in background tabs or hidden <iframe>s in order to improve performance and battery life.
Window.sessionStorage - Web APIs
a page session lasts as long as the b
rowser is open, and survives over page reloads and restores.
... opening a page in a new tab or window creates a new session with the value of the top-level b
rowsing context, which differs from how session cookies work.
...for example, the user may have their b
rowser configured to deny permission to persist data for the specified origin.
... sessionstorage.setitem('mycat', 'tom'); the following example autosaves the contents of a text field, and if the b
rowser is refreshed, restores the text field content so that no writing is lost.
Window.setCursor() - Web APIs
b
rowser 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/b
rowser-compat-data and send us a pull request.
...expect poor cross-b
rowser support.non-standard.
... expect poor cross-b
rowser support.
Window.showModalDialog() - Web APIs
specification msdn page for showmodaldialog b
rowser 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/b
rowser-compat-data and send us a pull request.
...expect poor cross-b
rowser support.non-standard.
... expect poor cross-b
rowser support.deprecated.
Window.updateCommands() - Web APIs
b
rowser 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/b
rowser-compat-data and send us a pull request.
...expect poor cross-b
rowser support.non-standard.
... expect poor cross-b
rowser support.
WindowOrWorkerGlobalScope.setInterval() - Web APIs
if you want to enable this functionality on that b
rowser, you must use a polyfill (see the callback arguments section).
...if you want to work on it with b
rowsers that natively do not support this feature, use one of the methods proposed above.
...to mitigate the potential impact this can have on performance, once intervals are nested beyond five levels deep, the b
rowser will automatically enforce a 4 ms minimum value for the interval.
... b
rowsers may enforce even more stringent minimum values for the interval under some circumstances, although these should not be common.
WorkerGlobalScope.console - Web APIs
the console read-only property of the workerglobalscope interface returns a console object providing access to the b
rowser console for the worker.
... example this property allows you to have access to a b
rowser console for debugging purposes, inside a worker.
... so for example you could call console.log('test'); inside a worker (which would basically be the equivalent of self.console.log('test');, as these are being called on the worker scope, which can be referenced with workerglobalscope.self), to return a test message out to the b
rowser console.
...however, if you are calling console.log() from a sharedworkerglobalscope, the global b
rowser console will receive the logs.
HTML in XMLHttpRequest - Web APIs
this th
rows an error in the b
rowsers that implement the feature and works on others.
... method 2 there are two challenges to detecting exactly if a b
rowser supports html parsing in xmlhttprequest.
... handling html on older b
rowsers xmlhttprequest originally supported only xml parsing.
...for older b
rowsers, you can even use the xmlhttprequest.responsetext property in association with regular expressions in order to get, for example, the source code of an html element given its id: function gethtml (oxhr, stargetid) { var ropen = new regexp("<(?!\!)\\s*([^\\s>]+)[^>]*\\s+id\\=[\"\']" + stargetid + "[\"\'][^>]*>" ,"i"), ssrc = oxhr.responsetext, aexec = ropen.exec(ssrc); return aexec ?
Sending and Receiving Binary Data - Web APIs
}; oreq.send(); receiving binary data in older b
rowsers the load_binary_resource() function shown below loads binary data from the specified url, returning it to the caller.
...unction load_binary_resource(url) { var req = new xmlhttprequest(); req.open('get', url, false); //xhr binary charset opt by marcus granado 2006 [http://mgran.blogspot.com] req.overridemimetype('text\/plain; charset=x-user-defined'); req.send(null); if (req.status != 200) return ''; return req.responsetext; } the magic happens in line 5, which overrides the mime type, forcing the b
rowser to treat it as plain text, using a user-defined character set.
... this tells the b
rowser not to parse it, and to let the bytes pass through unprocessed.
...add information about other b
rowsers' support here.
ARIA: document role - Accessibility
generally used in complex composite widgets or applications, the document role can inform assistive technologies to switch context to a reading mode: the document role tells assistive technologies with reading or b
rowse modes to use the document mode to read the content contained within this element.
... description by default, web pages are treated as documents; assistive technologies (at) enter b
rowse or read mode when entering a new web page.
...the document role brings the at back into b
rowse or read mode.
... generally placed within an application role or other interactive widget role, the document role is used to indicate a section of a complex composit widget that an assistive technology user should read using its b
rowse or virtual reading mode, if available.
Multipart labels: Using ARIA for labels with embedded fields inside them - Accessibility
a classic example we all know from our b
rowser settings is the setting “delete history after x days”.
...if on an html page you provide aria-labelledby, you should also provide a label for construct to also support older b
rowsers that do not have aria support yet.
... with firefox 3, your blind users will automatically get better accessibility from the new attribute, but the users of older b
rowsers are not left in the dark this way.
...this technique works in firefox; however, it doesn't currently work in many other b
rowsers, including ie.
Web accessibility for seizures and physical reactions - Accessibility
the epilepsy foundation's article "take advantage of media queries with <style> in setting up media queries, you are enabling controls by the user; these controls are made available in the b
rowser or in the os.
... see the mdn document, "accessibility: what users can to to b
rowse more safely" to see more details of how a user accesses the controls.
... prefers-reduced-motion support for prefers-reduced-motion in modern b
rowsers is growing.
... see also mdn accessibility: what users can to to b
rowse more safely accessibility: understanding color and luminance applying svg effects to html content basic animations (canvas tutorial) canvas api canvasrenderingcontext2d.drawimage() <color> document object model mediaquerylist using dynamic styling information webgl: 2d and 3d graphics for the web color color tutorial: describing color tom jewett.
:checked - CSS: Cascading Style Sheets
note: because b
rowsers often treat <option>s as replaced elements, the extent to which they can be styled with the :checked pseudo-class varies from b
rowser to b
rowser.
...[cell text]</td><td>[cell text]</td><td>[cell text]</td></tr> <tr><td>[cell text]</td><td>[cell text]</td><td>[cell text]</td></tr> <tr class="expandable"><td>[more text]</td><td>[more text]</td><td>[more text]</td></tr> <tr class="expandable"><td>[more text]</td><td>[more text]</td><td>[more text]</td></tr> </tbody> </table> <label for="expand-toggle" id="expand-btn">toggle hidden
rows</label> css /* hide the toggle checkbox */ #expand-toggle { display: none; } /* hide expandable content by default */ .expandable { visibility: collapse; background: #ddd; } /* style the button */ #expand-btn { display: inline-block; margin-top: 12px; padding: 5px 11px; background-color: #ff7; border: 1px solid; border-radius: 3px; } /* show hidden content when the checkbo...
... recommendation defines the pseudo-class, but not the associated semantic b
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/b
rowser-compat-data and send us a pull request.
:link - CSS: Cascading Style Sheets
syntax :link examples by default, most b
rowsers apply a special color value to visited links.
...(after that, you'll need to clear your b
rowser history to see them again.) however, the background-color values are likely to remain, as most b
rowsers do not set that property on visited links by default.
... b
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/b
rowser-compat-data and send us a pull request.
@font-face - CSS: Cascading Style Sheets
since firefox 61 (and in other modern b
rowsers) this also accepts two values to specify a range that is supported by a font-face, for example font-stretch: 50% 200%; font-style a font-style value.
... since firefox 61 (and in other modern b
rowsers) this also accepts two values to specify a range that is supported by a font-face, for example font-style: oblique 20deg 50deg; font-weight a font-weight value.
... since firefox 61 (and in other modern b
rowsers) this also accepts two values to specify a range that is supported by a font-face, for example font-weight: 100 400; font-variant a font-variant value.
... to provide the b
rowser with a hint as to what format a font resource is — so it can select a suitable one — it is possible to include a format type inside a format() function: src: url(ideal-sans-serif.woff) format("woff"), url(basic-sans-serif.ttf) format("truetype"); the available types are: "woff", "woff2", "truetype", "opentype", "embedded-opentype", and "svg".
forced-colors - CSS: Cascading Style Sheets
syntax the forced-colors media feature indicates whether or not the b
rowser is currently in forced-colors mode.
...the b
rowser provides the color palette to authors through the css system color keywords and, if appropriate, it triggers the appropriate value of prefers-color-scheme so that authors can adapt the page.
...that is, user-specified values (if any) or b
rowser-specified values are used instead.
... examples note: no b
rowser currently implements this feature so the following example will not work.
Block and inline layout in normal flow - CSS: Cascading Style Sheets
the default b
rowser stylesheet adds spacing between the paragraphs by way of adding a margin to the top and bottom.
... note: if you are not sure whether margins are collapsing, check the box model values in your b
rowser devtools.
... changing the formatting context an element participates in b
rowsers display items as part of a block or inline formatting context in terms of what normally makes sense for that element.
... for example, a <strong> element is used to highlight a word and displays bold in b
rowsers.
CSS Grid Layout - CSS: Cascading Style Sheets
like tables, grid layout enables an author to align elements into columns and
rows.
... basic example the example below shows a three-column track grid with new
rows created at a minimum of 100 pixels and a maximum of auto.
... background-color: rgba(233,171,88,.5); padding: 1em; color: #d9480f; } html <div class="wrapper"> <div class="one">one</div> <div class="two">two</div> <div class="three">three</div> <div class="four">four</div> <div class="five">five</div> <div class="six">six</div> </div> css .wrapper { display: grid; grid-template-columns: repeat(3, 1fr); grid-gap: 10px; grid-auto-
rows: minmax(100px, auto); } .one { grid-column: 1 / 3; grid-row: 1; } .two { grid-column: 2 / 4; grid-row: 1 / 3; } .three { grid-column: 1; grid-row: 2 / 5; } .four { grid-column: 3; grid-row: 3; } .five { grid-column: 2; grid-row: 4; } .six { grid-column: 3; grid-row: 4; } reference css properties grid-template-columns grid-template-
rows grid-template-areas grid-...
...template grid-auto-columns grid-auto-
rows grid-auto-flow grid grid-row-start grid-column-start grid-row-end grid-column-end grid-row grid-column grid-area row-gap column-gap gap css functions repeat() minmax() fit-content() css data types <flex> glossary entries grid grid lines grid tracks grid cell grid area gutters grid axis grid row grid column guides basic concepts of grid layout relationship of grid layout to other layout methods layout using line-based placement grid template areas layout using named grid lines auto-placement in css grid layout box alignment in css grid layout css grid, logical values and writing modes css grid layout and accessibility css grid and progressive enhancement realising common layouts using css gri...
Logical properties for margins, borders and padding - CSS: Cascading Style Sheets
as these are new properties check b
rowser support before using.
...as these are new properties check b
rowser support before using.
... .box { border-block: 2px solid green; border-inline-width: 4px; border-inline-style: dotted; border-inline-color: rebeccapurple; } note: these two value shorthands shipped in firefox 66, check b
rowser support before using as other b
rowsers may not have implemented them yet.
...these have not yet been implemented by any b
rowser.
CSS reference - CSS: Cascading Style Sheets
use this css reference to b
rowse an alphabetical index of all of the standard css properties, pseudo-classes, pseudo-elements, data types, and at-rules.
... you can also b
rowse key css concepts and a list of selectors organized by type.
...invalid rules are ignored by the b
rowser.
...thesisfont-variantfont-variant (@font-face)font-variant-alternatesfont-variant-capsfont-variant-east-asianfont-variant-ligaturesfont-variant-numericfont-variant-positionfont-variation-settingsfont-variation-settings (@font-face)font-weightfont-weight (@font-face)format()fr<frequency><frequency-percentage>:fullscreenggapgrad<gradient>grayscale()gridgrid-areagrid-auto-columnsgrid-auto-flowgrid-auto-
rowsgrid-columngrid-column-endgrid-column-startgrid-rowgrid-row-endgrid-row-startgrid-templategrid-template-areasgrid-template-columnsgrid-template-
rowshhzhanging-punctuationheightheight (@viewport)@historical-forms:hoverhsl()hsla()hue-rotate()hyphensi<ident><image>image()image-orientationimage-renderingimage-set()@importin:in-range:indeterminateinheritinitialinline-sizeinsetinset()inset-blockinset-bl...
Syntax - CSS: Cascading Style Sheets
the basic goal of the cascading stylesheet (css) language is to allow a b
rowser engine to paint elements of the page with specific features, like colors, positioning, or decorations.
...each property has a set of valid values, defined by a formal grammar, as well as a semantic meaning, implemented by the b
rowser engine.
...these statements only apply if a specific condition is matched: the @media at-rule content is applied only if the device on which the b
rowser runs matches the expressed condition; the @document at-rule content is applied only if the current page matches some conditions, and so on.
...now, though still experimental and not supported by every b
rowser, conditional group rules can contain a wider range of content: rulesets but also some, but not all, at-rules.
all - CSS: Cascading Style Sheets
body { font-size: small; background-color: #f0f0f0; color:blue; } blockquote { background-color: skyblue; color: red; } the <blockquote> uses the b
rowser's default styling together with a specific background and text color.
... body { font-size: small; background-color: #f0f0f0; color:blue; } blockquote { background-color: skyblue; color: red; } blockquote { all: unset; } the <blockquote> doesn't use the b
rowser default styling: it is an inline element now (initial value), its background-color is transparent (initial value), but its font-size is still small (inherited value) and its color is blue (inherited value).
... body { font-size: small; background-color: #f0f0f0; color:blue; } blockquote { background-color: skyblue; color: red; } blockquote { all: initial; } the <blockquote> doesn't use the b
rowser default styling: it is an inline element now (initial value), its background-color is transparent (initial value), its font-size is normal (initial value) and its color is black (initial value).
... body { font-size: small; background-color: #f0f0f0; color:blue; } blockquote { background-color: skyblue; color: red; } blockquote { all: inherit; } the <blockquote> doesn't use the b
rowser default styling: it is a block element now (inherited value from its containing <body> element), its background-color is #f0f0f0 (inherited value), its font-size is small (inherited value) and its color is blue (inherited value).
aspect-ratio - CSS: Cascading Style Sheets
this property is not yet implemented in b
rowsers, however some b
rowsers are implementing this internally in order to provide the aspect ratio mapping described below.
...this appears in the b
rowser's internal ua stylesheet.
... editor's draft initial definition b
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/b
rowser-compat-data and send us a pull request.
box-align - CSS: Cascading Style Sheets
b
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/b
rowser-compat-data and send us a pull request.
...expect poor cross-b
rowser support.non-standard.
... expect poor cross-b
rowser support.deprecated.
box-direction - CSS: Cascading Style Sheets
b
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/b
rowser-compat-data and send us a pull request.
...expect poor cross-b
rowser support.non-standard.
... expect poor cross-b
rowser support.deprecated.
box-lines - CSS: Cascading Style Sheets
the box-lines css property determines whether the box may have a single or multiple lines (
rows for horizontally oriented boxes, columns for vertically oriented boxes).
... if a value of multiple is specified, however, then the box is allowed to expand to multiple lines (that is, multiple
rows or columns) in order to accommodate all of its children.
... multiple box elements layout in multiple
rows or columns.
...this was only supported in webkit-based b
rowsers, with a prefix.
break-after - CSS: Cascading Style Sheets
page break aliases for compatibility reasons, the legacy page-break-after property should be treated by b
rowsers as an alias of break-after.
...a subset of values should be aliased as follows: page-break-after break-after auto auto left left right right avoid avoid always page the always value of page-break-* was implemented by b
rowsers as a page break, and not as a column break.
... b
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/b
rowser-compat-data and send us a pull request.
break-before - CSS: Cascading Style Sheets
page break aliases for compatibility reasons, the legacy page-break-before property should be treated by b
rowsers as an alias of break-before.
...a subset of values should be aliased as follows: page-break-before break-before auto auto left left right right avoid avoid always page the always value of page-break-* was implemented by b
rowsers as a page break, and not as a column break.
... b
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/b
rowser-compat-data and send us a pull request.
break-inside - CSS: Cascading Style Sheets
page break aliases for compatibility reasons, the legacy page-break-inside property should be treated by b
rowsers as an alias of break-inside.
... b
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/b
rowser-compat-data and send us a pull request.
... for older webkit-based b
rowsers, the prefixed property -webkit-column-break-inside can be used to control column breaks.
caption-side - CSS: Cascading Style Sheets
b
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/b
rowser-compat-data and send us a pull request.
...expect poor cross-b
rowser support.non-standard.
... expect poor cross-b
rowser support.
font-optical-sizing - CSS: Cascading Style Sheets
syntax /* keyword values */ font-optical-sizing: none; font-optical-sizing: auto; /* default */ /* global values */ font-optical-sizing: inherit; font-optical-sizing: initial; font-optical-sizing: unset; values none the b
rowser will not modify the shape of glyphs for optimal viewing.
... auto the b
rowser will modify the shape of glyphs for optimal viewing.
... this is the default across b
rowsers.</p> <p class="no-optical-sizing">this paragraph is not optically sized.
... you should see a difference in supporting b
rowsers.</p> @font-face { src: url('amstelvaralpha-vf.ttf'); font-family:'amstelvar'; font-style: normal; } p { font-size: 36px; font-family: amstelvar; } .no-optical-sizing { font-optical-sizing: none; } note: the font referenced above — which includes optical sizing and is freely-licensed — is good for testing.
image() - CSS: Cascading Style Sheets
if the b
rowser doesn't understand the media fragments notation, it simply ignores the fragment, displaying the entire image.
... b
rowsers that understand image() also understand the fragment notation.
... accessibility concerns b
rowsers do not provide any special information on background images to assistive technology.
... providing fallback images .help::before { content: image("try.webp", "try.svg", "try.gif"); } in this example, the b
rowser will display an image as generated content before the content of the element with the class of help.
max-width - CSS: Cascading Style Sheets
auto the b
rowser will calculate and select a max-width for the specified element.
... mdn understanding wcag, guideline 1.4 explanations understanding success criterion 1.4.4 | w3c understanding wcag 2.0 formal definition initial valuenoneapplies toall elements but non-replaced inline elements, table
rows, and row groupsinheritednopercentagesrefer to the width of the containing blockcomputed valuethe percentage as specified or the absolute length or noneanimation typea length, percentage or calc(); formal syntax auto | <length> | <percentage> | min-content | max-content | fit-content(<length-percentage>)where <length-percentage> = <length> | <percentage> examples setting max width in pixels i...
... b
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/b
rowser-compat-data and send us a pull request.
min-width - CSS: Cascading Style Sheets
auto the b
rowser will calculate and select a min-width for the specified element.
... formal definition initial valueautoapplies toall elements but non-replaced inline elements, table
rows, and row groupsinheritednopercentagesrefer to the width of the containing blockcomputed valuethe percentage as specified or the absolute lengthanimation typea length, percentage or calc(); formal syntax auto | <length> | <percentage> | min-content | max-content | fit-content(<length-percentage>)where <length-percentage> = <length> | <percentage> examples setting minimum element width table {...
... b
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/b
rowser-compat-data and send us a pull request.
outline-color - CSS: Cascading Style Sheets
note that b
rowsers are not required to support this value; if they don't, this keyword is considered invalid.
... webaim: color contrast checker mdn understanding wcag, guideline 1.4 explanations understanding success criterion 1.4.3 | w3c understanding wcag 2.0 formal definition initial valueinvert, for b
rowsers supporting it, currentcolor for the otherapplies toall elementsinheritednocomputed valuefor the keyword invert, the computed value is invert.
... b
rowser 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/b
rowser-compat-data and send us a pull request.
Guide to scroll anchoring - CSS: Cascading Style Sheets
you b
rowse to a long page on a slow connection and begin to scroll to read the content; while you are busy reading, the part of the page you are looking at suddenly jumps.
... scroll anchoring is a b
rowser feature that aims to solve this problem of content jumping, which happens if content loads in after the user has already scrolled to a new part of the document.
...the feature is enabled by default in supporting b
rowsers.
... the only possible values are auto or none: auto is the initial value; as long as the user has a supported b
rowser the scroll anchoring behavior will happen, and they should see fewer content jumps.
page-break-after - CSS: Cascading Style Sheets
for compatibility reasons, page-break-after should be treated by b
rowsers as an alias of break-after.
... working draft extends the element that this property applies to table
rows and table row groups.
... recommendation initial definition b
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/b
rowser-compat-data and send us a pull request.
page-break-before - CSS: Cascading Style Sheets
for compatibility reasons, page-break-before should be treated by b
rowsers as an alias of break-before.
... working draft extends the element that this property applies to table
rows and table row groups.
... recommendation initial definition b
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/b
rowser-compat-data and send us a pull request.
row-gap (grid-row-gap) - CSS: Cascading Style Sheets
the row-gap css property sets the size of the gap (gutter) between an element's grid
rows.
...however, in order to support b
rowsers that implemented grid-row-gap and not row-gap for grid, you will need to use the prefixed property as in the interactive example above.
... syntax /* <length> values */ row-gap: 20px; row-gap: 1em; row-gap: 3vmin; row-gap: 0.5cm; /* <percentage> value */ row-gap: 10%; /* global values */ row-gap: inherit; row-gap: initial; row-gap: unset; values <length-percentage> is the width of the gutter separating the
rows.
...x-wrap: wrap; width: 300px; row-gap: 20px; } #flexbox > div { border: 1px solid green; background-color: lime; flex: 1 1 auto; width: 100px; height: 50px; } result grid layout html <div id="grid"> <div></div> <div></div> <div></div> </div> css #grid { grid-row-gap: 20px; } #grid { display: grid; height: 200px; grid-template-columns: 200px; grid-template-
rows: repeat(3, 1fr); row-gap: 20px; } #grid > div { border: 1px solid green; background-color: lime; } result specifications specification status comment css box alignment module level 3the definition of 'row-gap' in that specification.
text-decoration-thickness - CSS: Cascading Style Sheets
syntax /* single keyword */ text-decoration-thickness: auto; text-decoration-thickness: from-font; /* length */ text-decoration-thickness: 0.1em; text-decoration-thickness: 3px; /* percentage */ text-decoration-thickness: 10%; /* global values */ text-decoration-thickness: inherit; text-decoration-thickness: initial; text-decoration-thickness: unset; values auto the b
rowser chooses an appropriate width for the text decoration line.
...if the font file doesn't include this information, behave as if auto was set, with the b
rowser choosing an appropriate thickness.
... <length> specifies the thickness of the text decoration line as a <length>, overriding the font file suggestion or the b
rowser default.
...the b
rowser must use a minimum of 1 device pixel.
text-transform - CSS: Cascading Style Sheets
when applying text-transform: lowercase to an uppercase sigma (Σ), the b
rowser needs to choose the right lowercase form based on context.
... note: support for language-specific cases varies between b
rowsers, so check the b
rowser compatibility table.
...this resulted in differences between b
rowsers in the way the first letter was calculated (firefox considered - and _ as letters, but other b
rowsers did not.
...the capitalize line in the b
rowser compatibility table contains the version the different engines started to support this now precisely-defined behavior.
Mutation events - Developer guides
the practical reasons to avoid the mutation events are performance issues and cross-b
rowser support.
... cross-b
rowser support these events are not implemented consistently across different b
rowsers, for example: ie prior to version 9 didn't support the mutation events at all and does not implement some of them correctly in version 9 (for example, domnodeinserted) webkit doesn't support domattrmodified (see webkit bug 8191 and the workaround) "mutation name events", i.e.
... domelementnamechanged and domattributenamechanged are not supported in firefox (as of version 11), and probably in other b
rowsers as well.
... dottoro documents b
rowser support for mutation events.
Mobile-friendliness - Developer guides
goal #3 (performance) “give your users a smooth experience, even on a slow connection.” though things have been getting better in recent years, b
rowsing the internet over a wireless data connection can still be pretty painful.
...for example, it is absolutely critical to keep in mind which b
rowsers and devices you will target when picking a mobile strategy.
... if your audience is full of early-adopters, you can focus on tablets and smartphones with standards-friendly b
rowsers.
... on the other hand, if many of your site’s users are on devices with less capable b
rowsers, that may eliminate certain strategies as viable options.
disabled - HTML: Hypertext Markup Language
often b
rowsers grey out such controls and it won't receive any b
rowsing events, like mouse clicks or focus-related ones.
... firefox will, unlike other b
rowsers, persist the dynamic disabled state of a <button> across page loads.
... usability b
rowsers display disabled form controls greyed as disabled form controls are immutable, won't receive focus or any b
rowsing events, like mouse clicks or focus-related ones, and aren't submitted with the form.
... examples when form controls are disabled, many b
rowsers will display them in a lighter, greyed-out color by default.
HTML attribute: pattern - HTML: Hypertext Markup Language
tip: use the title attribute to specify text that most b
rowsers will display as a tooltip to explain what the requirements are to match the pattern.
...some b
rowsers show a tooltip with title contents, improving usability for sighted users.
...some b
rowsers show a tooltip when an element with a title is hovered, but that leaves out keyboard-only and touch-only users.
... while titles are used by some b
rowsers to populate error messaging, because b
rowsers sometimes also show the title as text on hover, it therefore shows in non-error situations, so be careful not to word titles as if an error has occurred.
<basefont> - HTML: Hypertext Markup Language
the document text in the default style is rendered in the first font face that the client's b
rowser supports.
... if no font listed is installed on the local system, the b
rowser typically defaults to the proportional or fixed-width font for that system.
...though once (imprecisely) normalized in html 3.2, it wasn't supported in all major b
rowsers.
... further, b
rowsers, and even successive versions of b
rowsers, never implemented it in the same way: practically, using it has always brought indeterminate results.
<bdi>: The Bidirectional Isolate element - HTML: Hypertext Markup Language
the html bidirectional isolate element (<bdi>) tells the b
rowser's bidirectional algorithm to treat the text it contains in isolation from its surrounding text.
...b
rowsers implement the unicode bidirectional algorithm to handle this.
... though the same visual effect can be achieved using the css rule unicode-bidi: isolate on a <span> or another text-formatting element, html authors should not use this approach because it is not semantic and b
rowsers are allowed to ignore css styling.
...these elements instruct the b
rowser to treat the name in isolation from its embedding context, so the example output is properly ordered: <ul> <li><bdi class="name">اَلأَعْشَى</bdi> - 1st place</li> <li><bdi class="name">jerry cruncher</bdi> - 2nd place</li> </ul> body { border: 1px solid #3f87a6; max-width: calc(100% - 40px - 6px); padding: 20px; width: calc(100% - 40px - 6px); border-width: 1px 1px 1p...
<element>: The Custom Element element (Obsolete) - HTML: Hypertext Markup Language
b
rowser 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/b
rowser-compat-data and send us a pull request.
...expect poor cross-b
rowser support.non-standard.
... expect poor cross-b
rowser support.deprecated.
<input type="hidden"> - HTML: Hypertext Markup Language
this specifically can't be edited or seen by the user via the user interface, although you could edit the value via b
rowser developer tools.
... important: while the value isn't displayed to the user in the page's content, it is visible—and can be edited—using any b
rowser's developer tools or "view source" functionality.
... the edit form's html might look a little bit like this: <form> <div> <label for="title">post title:</label> <input type="text" id="title" name="title" value="my excellent blog post"> </div> <div> <label for="content">post content:</label> <textarea id="content" name="content" cols="60"
rows="5"> this is the content of my excellent blog post.
...display: flex; margin-bottom: 10px; } label { flex: 2; line-height: 2; text-align: right; padding-right: 20px; } input, textarea { flex: 7; font-family: sans-serif; font-size: 1.1rem; padding: 5px; } textarea { height: 60px; } the server would set the value of the hidden input with the id "postid" to the id of the post in its database before sending the form to the user's b
rowser and would use that information when the form is returned to know which database record to update with modified information.
<isindex> - HTML: Hypertext Markup Language
its support depended on both the b
rowser and the server to react to the query.
...all major b
rowsers have now removed <isindex>.
... example <head> <isindex prompt="search document..." action="/search"> </head> in past b
rowsers, this would generate, at parse time, a dom tree equivalent to the following html: <form action="/search"> <hr> <label> search document...
...the question of forms for making queries is mentioned in reference to dynatext b
rowser: "the b
rowser displays toggle buttons, text fields etc.
<noframes>: The Frame Fallback element - HTML: Hypertext Markup Language
the obsolete html no frames or frame fallback element, <noframes>, provides content to be presented in b
rowsers that don't support (or have disabled support for) the <frame> element.
... although most commonly-used b
rowsers support frames, there are exceptions, including certain special-use b
rowsers including some mobile b
rowsers, as well as text-mode b
rowsers.
... <noframes> can be used to present a message explaining that the user's b
rowser doesn't support frames, but ideally should be used to present an alternate form of the site that doesn't use frames but still offers the same or similar functionality.
... <frameset cols="50%,50%"> <frame src="https://developer.mozilla.org/en/html/element/frameset" /> <frame src="https://developer.mozilla.org/en/html/element/frame" /> <noframes><p>it seems your b
rowser does not support frames or is configured to not allow them.</p></noframes> </frameset> specifications specification status comment html5the definition of 'noframes' in that specification.
<picture>: The Picture element - HTML: Hypertext Markup Language
the b
rowser will consider each child <source> element and choose the best match among them.
... if no matches are found—or the b
rowser doesn't support the <picture> element—the url of the <img> element's src attribute is selected.
...this lets b
rowsers opt for lower-density versions in data-saving modes, and you don't have to write explicit media conditions.
... if the <source>'s media condition evaluates to false, the b
rowser skips it and evaluates the next element inside <picture>.
<plaintext>: The Plain Text element (Deprecated) - HTML: Hypertext Markup Language
<plaintext> is deprecated since html 2, and not all b
rowsers implemented it.
... b
rowsers that did implement it didn't do so consistently.
... <plaintext> is obsolete in html5; b
rowsers that accept it may instead treat it as a <pre> element that still interprets html within.
...escape any <, > and & characters, to prevent b
rowsers inadvertently parsing content the element content as html.
<template>: The Content Template element - HTML: Hypertext Markup Language
now that the table has been created and the template defined, we use javascript to insert
rows into the table, with each row being constructed using the template as its basis.
... // test to see if the b
rowser supports the html template element by checking // for the presence of the template element's content attribute.
...].textcontent = "1235646565"; td[1].textcontent = "stuff"; tbody.appendchild(clone); // clone the new row and insert it into the table var clone2 = template.content.clonenode(true); td = clone2.queryselectorall("td"); td[0].textcontent = "0384928528"; td[1].textcontent = "acme kidney beans 2"; tbody.appendchild(clone2); } else { // find another way to add the
rows to the table because // the html template element is not supported.
... } the result is the original html table, with two new
rows appended to it via javascript: table { background: #000; } table td { background: #fff; } avoiding documentfragment pitfall a documentfragment is not a valid target for various events, as such it is often preferable to clone or refer to the elements within it.
Resource URLs - HTTP
resource urls, urls prefixed with the resource: scheme, are used by firefox and firefox b
rowser extensions to load resources internally, but some of the information is available to sites the b
rowser connects to as well.
... syntax resource urls are composed of two parts: a prefix (resource:), and a url pointing to the resource you want to load: resource://<url> an example: resource://gre/res/svg.css when ar
rows are found in the resource url's ('->'), it means that the first file loaded the next one: resource://<file-loader> -> <file-loaded> please refer to identifying resources on the web for more general details.
... for example, a script on b
rowserleaks highlights what firefox reveals when queried by a simple script running on the site (you can find the code in https://b
rowserleaks.com/firefox#more).
...for example: http://searchfox.org/mozilla-central/rev/48ea452803907f2575d81021e8678634e8067fc2/b
rowser/app/profile/firefox.js#575 web sites can easily collect firefox default preferences by overriding this pref() function and using the script resource:///defaults/preferences/firefox.js.
Compression in HTTP - HTTP
in practice, web developers don't need to implement compression mechanisms, both b
rowsers and servers have it implemented already, but they have to be sure that the server is configured adequately.
... all modern b
rowsers and servers do support it and the only thing to negotiate is the compression algorithm to use.
... to select the algorithm to use, b
rowsers and servers use proactive content negotiation.
... the b
rowser sends an accept-encoding header with the algorithm it supports and its order of precedence, the server picks one, uses it to compress the body of the response and uses the content-encoding header to tell the b
rowser the algorithm it has chosen.
Connection management in HTTP/1.x - HTTP
http pipelining http pipelining is not activated by default in modern b
rowsers: buggy proxies are still common and these lead to strange and erratic behaviors that web developers cannot foresee and diagnose easily.
... today, every http/1.1-compliant proxy and server should support pipelining, though many have limitations in practice: a significant reason no modern b
rowser activates this feature by default.
...as a solution, b
rowsers open several connections to each domain, sending parallel requests.
...each of these domains resolve to the same server, and the web b
rowser will open 6 connections to each (in our example, boosting the connections to 18).
Feature Policy - HTTP
feature policy allows web developers to selectively enable, disable, and modify the behavior of certain features and apis in the b
rowser.
... with feature policy, you opt-in to a set of "policies" for the b
rowser to enforce on specific features used throughout a website.
... these policies restrict what apis the site can access or modify the b
rowser's default behavior for certain features.
... for each policy-controlled feature, the b
rowser maintains a list of origins for which the feature is enabled, known as an allowlist.
Access-Control-Allow-Credentials - HTTP
the access-control-allow-credentials response header tells b
rowsers whether to expose the response to frontend javascript code when the request's credentials mode (request.credentials) is include.
... when a request's credentials mode (request.credentials) is include, b
rowsers will only expose the response to frontend javascript code if the access-control-allow-credentials value is true.
...note that simple get requests are not preflighted, and so if a request is made for a resource with credentials, if this header is not returned with the resource, the response is ignored by the b
rowser and not returned to web content.
...for a cors request with credentials, in order for b
rowsers to expose the response to frontend javascript code, both the server (using the access-control-allow-credentials header) and the client (by setting the credentials mode for the xhr, fetch, or ajax request) must indicate that they’re opting in to including credentials.
Cache-Control - HTTP
cache-control: immutable cache-control: stale-while-revalidate=<seconds> cache-control: stale-if-error=<seconds> directives cacheability a response is normally cached by the b
rowser if: it has a status code of 301, 302, 307, 308, or 410 and cache-control does not have no-store, or if proxy, does not have private and authorization is unset either has a status code of 301, 302, 307, 308, or 410 or has public, max-age or s-maxage in cache-control or has expires set public the response may be stored by any cache, even if the response is normally non...
... private the response may be stored only by a b
rowser's cache, even if the response is normally non-cacheable.
...although other directives may be set, this alone is the only directive you need in preventing cached responses on modern b
rowsers.
...it therefore forbids a proxy or b
rowser feature, such as google’s web light, from converting images to minimize data for a cache store or slow connection.
Content-Disposition - HTTP
in a regular http response, the content-disposition response header is a header indicating if the content is expected to be displayed inline in the b
rowser, that is, as a web page or as part of a web page, or as an attachment, that is downloaded and saved locally.
...header type response header (for the main body) general header (for a subpart of a multipart body) forbidden header name no syntax as a response header for the main body the first parameter in the http context is either inline (default value, indicating it can be displayed inside the web page, or as the web page) or attachment (indicating it should be downloaded; most b
rowsers presenting a 'save as' dialog, prefilled with the value of the filename parameters if present).
... examples a response triggering the "save as" dialog: 200 ok content-type: text/html; charset=utf-8 content-disposition: attachment; filename="cool.html" content-length: 21 <html>save me!</html> this simple html file will be saved as a regular download rather than displayed in the b
rowser.
... most b
rowsers will propose to save it under the cool.html filename (by default).
Cross-Origin-Opener-Policy - HTTP
the http cross-origin-opener-policy (coop) response header allows you to ensure a top-level document does not share a b
rowsing context group with cross-origin documents.
...allows the document to be added to its opener's b
rowsing context group unless the opener itself has a coop of same-origin or same-origin-allow-popups.
... same-origin isolates the b
rowsing context exclusively to same-origin documents.
... cross-origin documents are not loaded in the same b
rowsing context.
Expect-CT - HTTP
wing mechanisms: x.509v3 certificate extension to allow embedding of signed certificate timestamps issued by individual logs a tls extension of type signed_certificate_timestamp sent during the handshake supporting ocsp stapling (that is, the status_request tls extension) and providing a signedcertificatetimestamplist when a site enables the expect-ct header, they are requesting that the b
rowser check that any certificate for that site appears in public ct logs.
... b
rowsers ignore the expect-ct header over http; the header only has effect on https connections.
... b
rowsers will not remember an expect-ct policy, unless the site has 'proven' it can serve a certificate satisfying the certificate transparency requirements.
... b
rowsers implement their own trust model regarding which ct logs are considered trusted for the certificate to have been logged to.
X-DNS-Prefetch-Control - HTTP
the x-dns-prefetch-control http response header controls dns prefetching, a feature by which b
rowsers proactively perform domain name resolution on both links that the user may choose to follow as well as urls for items referenced by the document, including images, css, javascript, and so forth.
...this is what b
rowsers do, if they support the feature, when this header is not present off disables dns prefetching.
... the implementation of this prefetching in some b
rowsers allows domain name resolution to occur in parallel with (instead of in serial with) the fetching of actual page content.
... configuring prefetching in the b
rowser in general, you don't need to do anything to manage prefetching.
Proxy Auto-Configuration (PAC) file - HTTP
a proxy auto-configuration (pac) file is a javascript function that determines whether web b
rowser requests (http, https, and ftp) go directly to the destination or are forwarded to a web proxy server.
... the b
rowser will automatically retry a previously unresponsive proxy after 30 minutes.
... if all proxies are down, and there was no direct option specified, the b
rowser will ask if proxies should be temporarily ignored, and direct connections attempted.
... after 20 minutes, the b
rowser will ask if proxies should be retried, asking again after an additional 40 minutes.
JSON.stringify() - JavaScript
exceptions th
rows a typeerror ("cyclic object value") exception when a circular reference is found.
... th
rows a typeerror ("bigint value can't be serialized in json") when trying to stringify a bigint value.
... const circularreference = {}; circularreference.myself = circularreference; // serializing circular references th
rows "typeerror: cyclic object value" json.stringify(circularreference); to serialize circular references you can use a library that supports them (e.g.
..."quux", foo: "bar" }) //'{"baz":"quux","foo":"bar"}' console.log(a !== b) // true // some memoization functions use json.stringify to serialize arguments, // which may cause a cache miss when encountering the same object like above example of using json.stringify() with localstorage in a case where you want to store an object created by your user and allowing it to be restored even after the b
rowser has been closed, the following example is a model for the applicability of json.stringify(): // creating an example of json var session = { 'screens': [], 'state': true }; session.screens.push({ 'name': 'screena', 'width': 450, 'height': 250 }); session.screens.push({ 'name': 'screenb', 'width': 650, 'height': 350 }); session.screens.push({ 'name': 'screenc', 'width': 750, 'height': 120 })...
Object.create() - JavaScript
however, when attempting to actually use these objects, their differences quickly become apparent: > "oco is: " + oco // shows "oco is: [object object]" > "ocn is: " + ocn // th
rows error: cannot convert object to primitive value testing just a few of the many most basic built-in functions shows the magnitude of the problem more clearly: > alert(oco) // shows [object object] > alert(ocn) // th
rows error: cannot convert object to primitive value > oco.tostring() // shows [object object] > ocn.tostring() // th
rows error: ocn.tostring is not a function > oco.valueof() // s...
...hows {} > ocn.valueof() // th
rows error: ocn.valueof is not a function > oco.hasownproperty("p") // shows "true" > ocn.hasownproperty("p") // th
rows error: ocn.hasownproperty is not a function > oco.constructor // shows "object() { [native code] }" > ocn.constructor // shows "undefined" as said, these differences can make debugging even simple-seeming problems quickly go astray.
... if (typeof object.create !== "function") { object.create = function (proto, propertiesobject) { if (typeof proto !== 'object' && typeof proto !== 'function') { throw new typeerror('object prototype may only be an object: ' + proto); } else if (proto === null) { throw new error("this b
rowser's implementation of object.create is a shim and doesn't support 'null' as the first argument."); } if (typeof propertiesobject != 'undefined') { throw new error("this b
rowser's implementation of object.create is a shim and doesn't support a second argument."); } function f() {} f.prototype = proto; return new f(); }; } example...
...if support for older b
rowsers is necessary, jquery.extend() or _.assign() can be used.
Object.defineProperty() - JavaScript
}, get() { return bvalue; }, set(newvalue) { bvalue = newvalue; }, enumerable: true, configurable: true }); o.b; // 38 // 'b' property exists in the o object and its value is 38 // the value of o.b is now always identical to bvalue, // unless o.b is redefined // you cannot try to mix both: object.defineproperty(o, 'conflict', { value: 0x9f91102, get() { return 0xdeadbeef; } }); // th
rows a typeerror: value appears // only in data descriptors, // get appears only in accessor descriptors modifying a property when the property already exists, object.defineproperty() attempts to modify the property according to the values in the descriptor and the object's current configuration.
... // strict mode (function() { 'use strict'; var o = {}; object.defineproperty(o, 'b', { value: 2, writable: false }); o.b = 3; // th
rows typeerror: "b" is read-only return o.b; // returns 2 without the line above }()); as seen in the example, trying to write into the non-writable property doesn't change it but doesn't throw an error either.
... var o = {}; object.defineproperty(o, 'a', { get() { return 1; }, configurable: false }); object.defineproperty(o, 'a', { configurable: true }); // th
rows a typeerror object.defineproperty(o, 'a', { enumerable: true }); // th
rows a typeerror object.defineproperty(o, 'a', { set() {} }); // th
rows a typeerror (set was undefined previously) object.defineproperty(o, 'a', { get() { return 1; } }); // th
rows a typeerror // (even though the new get does exactly the same thing) object.defineproperty(o, 'a', { value: 12 }); // th
rows a typeerror // ...
... function myclass() { } myclass.prototype.x = 1; object.defineproperty(myclass.prototype, "y", { writable: false, value: 1 }); var a = new myclass(); a.x = 2; console.log(a.x); // 2 console.log(myclass.prototype.x); // 1 a.y = 2; // ignored, th
rows in strict mode console.log(a.y); // 1 console.log(myclass.prototype.y); // 1 specifications specification ecmascript (ecma-262)the definition of 'object.defineproperty' in that specification.
Object.prototype.__proto__ - JavaScript
warning: changing the [[prototype]] of an object is, by the nature of how modern javascript engines optimize property accesses, a very slow operation, in every b
rowser and javascript engine.
... warning: while object.prototype.__proto__ is supported today in most b
rowsers, its existence and exact behavior has only been standardized in the ecmascript 2015 specification as a legacy feature to ensure compatibility for web b
rowsers.
...it was never originally included in the ecmascript language spec, but modern b
rowsers implemented it anyway.
... only recently was the __proto__ property standardized by the ecmascript 2015 specification for compatibility with web b
rowsers, so it will be supported into the future.
Lexical grammar - JavaScript
although bom before hashbang comment will work in a b
rowser it is not advised to use bom in a script with hasbang.
... abstract boolean byte char double final float goto int long native short synchronized th
rows transient volatile additionally, the literals null, true, and false cannot be used as identifiers in ecmascript.
...because this syntax is new in ecmascript 2015, see the b
rowser compatibility table, below.
...because this syntax is new in ecmascript 2015, see the b
rowser compatibility table, below.
delete operator - JavaScript
exceptions th
rows typeerror in strict mode if the property is an own non-configurable property.
...console.log(delete func); // false cross-b
rowser notes although ecmascript makes iteration order of objects implementation-dependent, it may appear that all major b
rowsers support an iteration order based on the earliest added property coming first (at least for properties not on the prototype).
... however, in the case of internet explorer, when one uses delete on a property, some confusing behavior results, preventing other b
rowsers from using simple objects like object literals as ordered associative arrays.
... if you want to use an ordered associative array in a cross-b
rowser environment, use a map object if available, or simulate this structure with two separate arrays (one for the keys and the other for the values), or build an array of single-property objects, etc.
const - JavaScript
my_fav = 20; // my_fav is 7 console.log('my favorite number is: ' + my_fav); // trying to redeclare a constant th
rows an error // uncaught syntaxerror: identifier 'my_fav' has already been declared const my_fav = 20; // the name my_fav is reserved for constant above, so this will fail too var my_fav = 20; // this th
rows an error too let my_fav = 20; block scoping it's important to note the nature of block scoping.
... if (my_fav === 7) { // this is fine and creates a block scoped my_fav variable // (works equally well with let to declare a block scoped non const variable) let my_fav = 20; // my_fav is now 20 console.log('my favorite number is ' + my_fav); // this gets hoisted into the global context and th
rows an error var my_fav = 20; } // my_fav is still 7 console.log('my favorite number is ' + my_fav); const needs to be initialized // th
rows an error // uncaught syntaxerror: missing initializer in const declaration const foo; const in objects and arrays const also works on objects and arrays.
... const my_object = {'key': 'value'}; // attempting to overwrite the object th
rows an error // uncaught typeerror: assignment to constant variable.
... my_object = {'other_key': 'value'}; // however, object keys are not protected, // so the following statement is executed without problem my_object.key = 'othervalue'; // use object.freeze() to make object immutable // the same applies to arrays const my_array = []; // it's possible to push items into the array my_array.push('a'); // ["a"] // however, assigning a new array to the variable th
rows an error // uncaught typeerror: assignment to constant variable.
display - Web app manifests
the display mode changes how much of b
rowser ui is shown to the user and can range from b
rowser (when the full b
rowser window is shown) to fullscreen (when the app is full-screened).
... note: if the display member is not specified, it defaults to b
rowser.
...the elements will vary by b
rowser.
... b
rowser b
rowser the application opens in a conventional b
rowser tab or new window, depending on the b
rowser and platform.
Lazy loading - Web Performance
css by default, css is treated as a render blocking resource, so the b
rowser won't render any processed content until the cssom is constructed.
... loading attribute the loading attribute on an <img> element (or the loading attribute on an <iframe>) can be used to instruct the b
rowser to defer loading of images/iframes that are off-screen until the user scrolls near them.
... polyfill include this polyfill to provide support for older and currently incompatible b
rowsers: loading-attribute-polyfill intersection observer api intersection observers allow the user to know when an observed element enters or exits the b
rowser’s viewport.
... event handlers when b
rowser compatibility is crucial, there are a few options: polyfill intersection observer fallback to scroll, resize or orientation change event handlers to determine if a specific element is in viewport specifications specification status comment html living standard living standard ...
Progressive loading - Progressive web apps (PWAs)
render-blocking resources bundling is a problem, because the b
rowser has to load the html, css, and javascript before it can paint their rendered results onto the screen.
...we can also split css files and add media types to them: <link rel="stylesheet" href="style.css"> <link rel="stylesheet" href="print.css" media="print"> this will tell the b
rowser to load them only when the condition is met.
... placeholder image instead of having all the screenshots of games referenced in <img> element src attributes, which will force the b
rowser to download them automatically, we can do it selectively via javascript.
... remember about the progressive enhancement approach — offer a usable product no matter the device or platform, but be sure to enrich the experience to those using modern b
rowsers.
Making PWAs work offline with Service workers - Progressive web apps (PWAs)
service workers explained service workers are a virtual proxy between the b
rowser and the network.
... "progressive" in pwa when implemented properly as a progressive enhancement, service workers can benefit users who have modern b
rowsers that support the api by providing offline support, but won't break anything for those using legacy b
rowsers.
... registering the service worker we'll start by looking at the code that registers a new service worker, in the app.js file: note : we're using the es6 arrow functions syntax in the service worker implementation if('serviceworker' in navigator) { navigator.serviceworker.register('./pwa-examples/js13kpwa/sw.js'); }; if the service worker api is supported in the b
rowser, it is registered against the site using the serviceworkercontainer.register() method.
...need anymore: self.addeventlistener('activate', (e) => { e.waituntil( caches.keys().then((keylist) => { return promise.all(keylist.map((key) => { if(key !== cachename) { return caches.delete(key); } })); }) ); }); this ensures we have only the files we need in the cache, so we don't leave any garbage behind; the available cache space in the b
rowser is limited, so it is a good idea to clean up after ourselves.
Progressive web apps (PWAs)
progressive web apps are web apps that use emerging web b
rowser apis and features along with traditional progressive enhancement strategy to bring a native app-like user experience to cross-platform web applications.
... service workers a service worker is a script that allows intercepting and control of how a web b
rowser handles its network requests and asset caching.
... documentation <-- the temporary automatic list below will be replaced soon --> add to home screenadd to home screen (or a2hs for short) is a feature available in modern b
rowsers that allows a user to "install" a web app, ie.
...this guide explains how a2hs is used, and what you need to do as a developer to allow your users to take advantage of it.how to make pwas installablein 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 b
rowser.how to make pwas re-engageable using notifications and pushhaving the ability to cache the contents of an app to work offline is a great feature.
color-profile - SVG: Scalable Vector Graphics
<name> a name corresponding to a defined color profile that is in the b
rowser's color profile description database.
... the b
rowser searches the color profile description database for a color profile description entry whose name descriptor matches <name> and uses the last matching entry that is found.
... recommendation initial definition b
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/b
rowser-compat-data and send us a pull request.
<a> - SVG: Scalable Vector Graphics
attributes download instructs b
rowsers to download a url instead of navigating to it, so the user will be prompted to save it as a local file.
... value type: <string> ; default value: none; animatable: yes ping a space-separated list of urls to which, when the hyperlink is followed, post requests with the body ping will be sent by the b
rowser (in the background).
...may be required for backwards compatibility for older b
rowsers.
...ia-errormessage, aria-expanded, aria-flowto, aria-grabbed, aria-haspopup, aria-hidden, aria-invalid, aria-keyshortcuts, aria-label, aria-labelledby, aria-level, aria-live, aria-modal, aria-multiline, aria-multiselectable, aria-orientation, aria-owns, aria-placeholder, aria-posinset, aria-pressed, aria-readonly, aria-relevant, aria-required, aria-roledescription, aria-rowcount, aria-rowindex, aria-
rowspan, aria-selected, aria-setsize, aria-sort, aria-valuemax, aria-valuemin, aria-valuenow, aria-valuetext, role usage notes categoriescontainer elementpermitted contentany number of the following elements, in any order:animation elementsdescriptive elementsshape elementsstructural elementsgradient elements<a>, <altglyphdef>, <clippath>, <color-profile>, <cursor>, <filter>, <font>, <font-face>, <...
2015 MDN Fellowship Program - Archive of obsolete content
to support our efforts, the fellow will review various technical specifications to identify gaps between the documentation and current situation and refine existing tests to adapt to this cross-b
rowser test harness.
... github: jdm twitter: @lastontheboat service workers brief project description service workers essentially act as proxy servers that sit between web applications, the b
rowser and (when available) the network.
...finding and addressing performance bottlenecks depends on tooling the b
rowser networking and rendering but also, often more important, user perception.
simple-prefs - Archive of obsolete content
if you need to get and set the general b
rowser preferences, use preferences/service.
... { "type": "color", "name": "highlightcolor", "value": "#6a5acd", "title": "highlight color" } file displayed as a "b
rowse" button that opens a file picker and stores the full path and name of the file selected.
... { "type": "file", "name": "myfile", "title": "select a file" } directory displayed as a "b
rowse" button that opens a directory picker and stores the full path and name of the directory selected.
High-Level APIs - Archive of obsolete content
modules listed on this page implement high-level apis for building add-ons: creating user interfaces, interacting with the web, and interacting with the b
rowser.
... private-b
rowsing check whether a given object is private, so an add-on can respect private b
rowsing querystring utility functions for working with query strings.
... windows enumerate and examine open b
rowser windows, open new windows, and listen for window events.
remote/parent - Archive of obsolete content
usage in multiprocess firefox: the b
rowser ui runs in one process, sometimes called the chrome process or the parent process web content runs in one or more other processes, sometimes called content processes or remote processes or child processes.
...for example, this may be a xul <b
rowser> element.
... istab a boolean property indicating if this frame displays in one of the application's main b
rowser tabs.
test/assert - Archive of obsolete content
th
rows(block, error, message) assert that a block of code th
rows the expected exception.
...; function anothererror(message) { this.name = "anothererror"; this.message = message || "default message"; console.log(this.message); } anothererror.prototype = new error(); anothererror.prototype.constructor = anothererror; we can check the type of exception by passing a function as the error argument: exports["test exception type 1 expected to pass"] = function(assert) { assert.th
rows(function() { throw new myerror("custom message"); }, myerror, "test throwing a specific exception"); } exports["test exception type 2 expected to fail"] = function(assert) { assert.th
rows(function() { throw new myerror("custom message"); }, anothererror, "test throwing a specific exception"); } we can check the message by passing a regular expression: exports["test except...
...ion message 1 expected to pass"] = function(assert) { assert.th
rows(function() { throw new myerror("custom message"); }, /custom message/, "test throwing a specific message"); } exports["test exception message 2 expected to pass"] = function(assert) { assert.th
rows(function() { throw new anothererror("custom message"); }, /custom message/, "test throwing a specific exception"); } exports["test exception message 3 expected to fail"] = function(assert) { assert.th
rows(function() { throw new myerror("another message"); }, /custom message/, "test throwing a specific message"); } parameters block : block the block of code to test.
ui/button/toggle - Archive of obsolete content
depending on your application, you might want a button to have different state in different b
rowser windows or different tabs.
...for example, suppose the b
rowser has two windows (w1 and w2), and each window has two tabs.
... initially the buttons in all tabs and windows will display the label value inherited from the global state: b
rowser: label = "my default" w1 t1 > displays "my default" t2 > displays "my default" w2 t3 > displays "my default" t4 > displays "my default" if you then set a label specific to t3 as "my t3 label", then set a label state specific to w2 as "my w2 label", then the button displayed when t3 is the active tab will still show "my t3 label", but the button displayed when t4 is the active tab will show "my w2 label": b
rowser: label = "my default" w1 t1 > displays "my default" t2 > displays "my default" w2 t3 > displays "my t3 label" t4 > displays "my w2 label"...
ui/toolbar - Archive of obsolete content
working with multiple b
rowser windows there's only a single toolbar for all b
rowser windows, so operations like show and hide work across all b
rowser windows.
... if you need to customize content for a particular b
rowser window, you can do that by messaging the window-specific frame hosted by that toolbar.
...note that since there is only one toolbar for the whole b
rowser, opening another b
rowser window does not cause this event to be emitted again.
Creating Reusable Modules - Archive of obsolete content
the documentation for that interface includes an example which we can adapt like this: var {cc, ci} = require("chrome"); function promptforfile() { const nsifilepicker = ci.nsifilepicker; var fp = cc["@mozilla.org/filepicker;1"] .createinstance(nsifilepicker); var window = require("sdk/window/utils").getmostrecentb
rowserwindow(); fp.init(window, "select a file", nsifilepicker.modeopen); fp.appendfilters(nsifilepicker.filterall | nsifilepicker.filtertext); var rv = fp.show(); if (rv == nsifilepicker.returnok || rv == nsifilepicker.returnreplace) { var file = fp.file; // get the path as string.
... var s = array.from(hash, (c, i) => tohexstring(hash.charcodeat(i))).join(""); return s; } function promptforfile() { var window = require("sdk/window/utils").getmostrecentb
rowserwindow(); const nsifilepicker = ci.nsifilepicker; var fp = cc["@mozilla.org/filepicker;1"] .createinstance(nsifilepicker); fp.init(window, "select a file", nsifilepicker.modeopen); fp.appendfilters(nsifilepicker.filterall | nsifilepicker.filtertext); var rv = fp.show(); if (rv == nsifilepicker.returnok || rv == nsifilepicker.returnreplace) { var file = fp.file; //...
... so "filepicker.js" should look like this: var {cc, ci} = require("chrome"); function promptforfile() { var window = require("sdk/window/utils").getmostrecentb
rowserwindow(); const nsifilepicker = ci.nsifilepicker; var fp = cc["@mozilla.org/filepicker;1"] .createinstance(nsifilepicker); fp.init(window, "select a file", nsifilepicker.modeopen); fp.appendfilters(nsifilepicker.filterall | nsifilepicker.filtertext); var rv = fp.show(); if (rv == nsifilepicker.returnok || rv == nsifilepicker.returnreplace) { var file = fp.file;...
Getting Started (jpm) - Archive of obsolete content
if firefox can not be located, or you have installed firefox developer as an alternate b
rowser, you may need to provide the path to it.
... for example, in ubuntu: jpm run -b /usr/bin/firefox when firefox launches, in the top-right corner of the b
rowser you'll see an icon with the firefox logo.
...it uses two sdk modules: the action button module, which enables you to add buttons to the b
rowser, and the tabs module, which enables you to perform basic operations with tabs.
Developing for Firefox Mobile - Archive of obsolete content
info: starting info: starting zerdatime 1329258528988 - b
rowser chrome startup finished.
...the easiest way is probably to copy the signed xpi somewhere on the device: adb push my-addon.xpi /mnt/sdcard/ then open firefox mobile and type this into the address bar: file:///mnt/sdcard/my-addon.xpi the b
rowser should open the xpi and ask if you want to install it.
...-page not supported base64 supported clipboard not supported context-menu not supported hotkeys supported indexed-db supported l10n supported notifications supported page-mod supported page-worker supported panel not supported passwords supported private-b
rowsing not supported querystring supported request supported 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 ...
IsDefaultNamespace - Archive of obsolete content
the following is a snippet to get isdefaultnamespace() supported across other b
rowsers.
... note that all gecko-based b
rowsers (including firefox) support node.isdefaultnamespace.
... this function is not necessary for gecko-based b
rowsers (though the function will quickly return the standard value for mozilla b
rowsers).
LookupPrefix - Archive of obsolete content
here is an implementation of lookupprefix which should work cross-b
rowser.
... note that all gecko-based b
rowsers (including firefox) support node.lookupprefix.
... this function is not necessary for gecko-based b
rowsers when used in xhtml.
JavaScript timers - Archive of obsolete content
the requestanimationframe() function tells the b
rowser that you wish to perform an animation and requests that the b
rowser schedule a repaint of the window for the next animation frame.
... setimmediate() calls a function immediately after the b
rowser has completed other operations, such as events and display updates.
... requestanimationframe() requestanimationframe() tells the b
rowser that you wish to perform an animation and requests that the b
rowser schedule a repaint of the window for the next animation frame.
Windows - Archive of obsolete content
opening new b
rowser windows to open a new b
rowser window, you can simply use window.open().
... however, window.open() returns a window object for content, not for the b
rowser window itself, so you should get the chrome window first.
... example window.open(); //this open a pop-up window that could be "blocked" client-side //the following code generate an error as describe in the following warning box var wm = components.classes["@mozilla.org/appshell/window-mediator;1"] .getservice(components.interfaces.nsiwindowmediator); var newwindow = wm.getmostrecentwindow("navigator:b
rowser"); var b = newwindow.gb
rowser; the code generate a typeerror from firefox console.
getAttributeNS - Archive of obsolete content
as some b
rowsers do not support getattributens, the following might be used to work on them as well.
... note that all gecko-based b
rowsers (including firefox) support dom:element.getattributens.
... this function is not necessary for gecko-based b
rowsers.
Jetpack Processes - Archive of obsolete content
handles messages that communicate between the b
rowser and jetpack process may contain only serializable (json) data and handles.
...either the b
rowser or the jetpack implementation may create one.
...by default, a handle is rooted in the javascript interpreter's garbage collector, meaning that even if a process th
rows it away, it will not be garbage collected unless the other process explicitly does something to indicate that it is no longer needed.
Appendix F: Monitoring DOM changes - Archive of obsolete content
while they are still viable for add-ons targeting only the latest firefox, those wishing to support older b
rowsers will need to provide fallbacks.
... the code below contains an inefficient fallback implementation for older b
rowsers.
...minor changes are also required if one wishes to support other b
rowsers, or to run in non-chrome-privileged scopes.
Introduction - Archive of obsolete content
mozilla and firefox the term mozilla can be used to refer to several concepts: the mozilla project, the mozilla foundation, the mozilla corporation and the old mozilla b
rowser.
... mozilla has spawned several products and projects, the most notable being the mozilla firefox web b
rowser.
...you can identify the level of compatibility of web standards in gecko-based b
rowsers looking at their user agent string, which should include the gecko version.
Performance best practices in extensions - Archive of obsolete content
there is a down side to this: poorly written extensions can have a severe impact on the b
rowsing experience, including on the overall performance of firefox itself.
... improving startup performance extensions are loaded and run whenever a new b
rowser window opens.
...the b
rowser window is blocked while your add-on's load handler runs, so the more it does, the slower firefox will appear to the user.
XML data - Archive of obsolete content
you create a sample xml document, and a stylesheet that you can use to display it in your b
rowser.
...by default, your mozilla b
rowser displays xml in a format very similar to the original data in the xml file.
...olor: white; } ocean { display: block; margin-bottom: 1em; } name { display: block; font-weight: bold; font-size: 150%; } area { display: block; } area:before { content: "area: "; } area:after { content: " million km\b2"; } depth { display: block; } depth:before { content: "mean depth: "; } depth:after { content: " m"; } open the document in your b
rowser: oceans arctic area: 13,000 million km² mean depth: 1,200 m atlantic area: 87,000 million km² mean depth: 3,900 m .
Using XML Data Islands in Mozilla - Archive of obsolete content
this feature is not based on multi-vendor web standards and is not supported in firefox (or other non-ie b
rowsers).
...aseorder> </script> the xml source text can then be retrieved like this: var ordersource = document.getelementbyid("purchase-order").textcontent; the xml source text can be parsed into a dom tree using the domparser api: var parser = new domparser(); var doc = parser.parsefromstring(ordersource, "application/xml"); the html5 data block-based way shown here works in firefox, opera, webkit-based b
rowsers such as chrome and safari, and ie9 while ie's xml data islands work only in ie.
...the price of the first line item is " + firstprice + "."; } </script> </head> <body onload="rundemo()";> demo did not run </body> </html> the xml source text can be parsed into a dom tree using the domparser api: var parser = new domparser(); var doc = parser.parsefromstring(ordersource, "application/xml"); the html5 data block-based way shown here works in firefox, opera, webkit-based b
rowsers such as chrome and safari, and ie9 while ie's xml data islands work only in ie.
Finding the code to modify - Archive of obsolete content
the "document - dom nodes" pane on the left-hand side of the inspector window displays a tree representation of the b
rowser window's xul file.
... when you select a node in the tree, a red border flashes for several seconds around the visual representation of that node in the b
rowser window.
...notice the flashing red border around the horizontal status bar at the bottom of the b
rowser window.
Making it into a static overlay - Archive of obsolete content
when navigator.xul is rendering into the b
rowser's application interface, this causes any attributes or child elements of the statusbar element in the overlay file to be added to the interface's dom and thus show up in the interface as if they were defined on the same element in navigator.xul.
... <!-- navigator --> <script type="application/javascript" src="chrome://navigator/content/b
rowser.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"/> <...
...ess"> <progressmeter class="progressmeter-statusbar" id="statusbar-icon" mode="normal" value="0"/> </statusbarpanel> <statusbarpanel class="statusbarpanel-iconic" id="tinderbox-status" status="none"/> <statusbarpanel class="statusbarpanel-iconic" id="offline-status"/> <statusbarpanel class="statusbarpanel-iconic" id="security-button" onclick="b
rowserpageinfo(null, 'securitytab')"/> </statusbar> ...
Getting Started - Archive of obsolete content
skin\classic\mozapps mozapps contains all the styles and icons for the b
rowser peripherals, such as the extension manager or update wizard.
...the packages section lists which components of the b
rowser you're modifying.
...css files the css files in these directories tell the b
rowser how to display the buttons and other controls, where to put the images, what border and padding it should put around them, and so on.
Layout System Overview - Archive of obsolete content
presentation formatting is also required to provide compatibility with legacy b
rowsers (microsoft internet explorer and netscape navigator 4.x).
...this is referred to as the galley mode presentation, and is what one expects from a typical b
rowser.
...in other words, the same html or xml document could be viewed as a normal galley presentation in a b
rowser window, while simultaneously being presented in a paged presentation to a printer, or even an aural presentation to a speech-synthesizer.
Repackaging Firefox - Archive of obsolete content
take a moment and b
rowse through the files, and don't forget to check mdc for reference material.
...if you find a preference you think is generally useful to most partner repacks, please add it below, using the same style: localizable preferences b
rowser.startup.homepage=<string> b
rowser.startup.homepage_reset=<string> url for the default homepage, and what the homepage gets reset to when the user hits "restore to default" in the preferences.
... b
rowser.search.defaultenginename=<string> name of the default search engine.
JavaScript crypto - Archive of obsolete content
though some b
rowsers may still support it, it is in the process of being dropped.
... warning: the features mentioned in this article are deleted proprietary mozilla extensions, and are not supported in any other b
rowser.
... note: this function provides a convenient way to erase the ssl session state at the b
rowser level, but in order to really guarantee that the state is erased, it is more secure to do it on the server side whenever possible.
Basics - Archive of obsolete content
class notifications the notification box appears at the bottom right corner of the b
rowser and displays important information to the user.
...blah(lengthstringfocusedstringtostringstringpopstringpushstringreversestringshiftstringsortstringsplicestringunshiftstring)this is some default text lengththe number of open tabsstring focusedthe current tab in your b
rowserstring tostringstuffstring popstuffstring pushstuffstring reversestuffstring shiftstuffstring sortstuffstring splicestuffstring unshiftstuffstring onready()when the inherited document is fully loaded.
...methods open(urlstring)opens a new tab in your b
rowser with a defined url.
Tabs - Archive of obsolete content
blah(lengthstringfocusedstringtostringstringpopstringpushstringreversestringshiftstringsortstringsplicestringunshiftstring)this is some default text lengththe number of open tabsstring focusedthe current tab in your b
rowserstring tostringstuffstring popstuffstring pushstuffstring reversestuffstring shiftstuffstring sortstuffstring splicestuffstring unshiftstuffstring onready()when the inherited document is fully loaded.
...methods open(urlstring)opens a new tab in your b
rowser with a defined url.
... urlurl to be openedstring jetpack.tabs.open("http://www.example.com/"); blah(lengthstringfocusedstringtostringstringpopstringpushstringreversestringshiftstringsortstringsplicestringunshiftstring)this is some default text lengththe number of open tabsstring focusedthe current tab in your b
rowserstring tostringstuffstring popstuffstring pushstuffstring reversestuffstring shiftstuffstring sortstuffstring splicestuffstring unshiftstuffstring onready()when the inherited document is fully loaded.
Monitoring downloads - Archive of obsolete content
although it may still work in some b
rowsers, its use is discouraged since it could be removed at any time.
...the first three
rows are set to the values of the source uri, file size, and start time fields from the download object.
... the remaining
rows are set to zeroes since that's not information we have at the moment.
FAQ - Archive of obsolete content
it lets users start web applications from their desktop, start menu, and dock, and it opens those applications in their own window separate from a web b
rowser and without the b
rowser interface (back and forward buttons, location bar, etc.).
...prism is a simple xulrunner application with the main portion of the ui consisting of a xul <b
rowser> element.
...prism uses gecko, the same b
rowser rendering system found in firefox.
Priority Content - Archive of obsolete content
dependant on: updating dhtml web pages for next generation b
rowsers on devedge the tune-up wizard (see below, in the wishlist section) mostly completed: popup window controls devedge article migrators: mathieu deaudelin there are inline examples on this page that cannot be migrated.
... started: scripting plugins: macromedia flash original: scripting plugins: macromedia flash wiki location: scripting plugins: macromedia flash migrators: dependant on (these parts need to be done, put your name down) completed: soap in netscape gecko-based b
rowsers original: soap in netscape gecko-based b
rowsers wiki location: soap in gecko-based b
rowsers migrators: doron rosenberg in progress: css support charts original: css support charts and archive.org mirror wiki location: css support charts migrators: serge k.
...keller note: henrik contacted me on apr 27 and gave us permission to use any of his materials in devedge in the devmo wiki under the cc:by-sa license (yay!) started: b
rowser feature detection original: b
rowser feature detection wiki location: b
rowser feature detection migrators: serge k.
New Skin Notes - Archive of obsolete content
when the skin is updated on test/docs, editform textarea should be resizeable in all b
rowsers.
...--nickolay 09:19, 25 aug 2005 (pdt) (moving this to a new item) on the contrary, the list of categories current page belongs to, should be near the footer (see mdc:policies_and_guidelines page) (dria: fix catlinks style) the ar
rows that appear if you select "enhanced recent changes" in your preferences have an ugly border around them.
...--dria the menu column seems larger than before in the current test theme, so as to cause some reference pages to look ugly when b
rowser set in 800x* resolution, using the default firefox 1.0.6 fonts settings on xfree86.
Frequently Asked Questions - Archive of obsolete content
when servers send user agents an svg file they must tell the user agent that the file has the mime type "image/svg+xml", and if the svg file is stored gzipped they must tell the b
rowser that too.
...failing to respect the mime types servers send is incorrect and has been a source of security holes in other b
rowsers.
...this is either because your b
rowser doesn't support svg (you must have mozilla firefox 1.5 or newer), or because the webpage/server isn't correctly telling mozilla that the file contains svg.
XPJS Components Proposal - Archive of obsolete content
xpconnect provides the mechanisms for communication between native and js xpcom components, but it does not provide all of the infrastructure to register and instantiate js components outside of the limitations of the b
rowser window.
...these components will be independent of web content and b
rowser windows.
... xjs components are not run in b
rowser windows.
appendNotification - Archive of obsolete content
var window=components.classes["@mozilla.org/appshell/window-mediator;1"] .getservice(components.interfaces.nsiwindowmediator) .getmostrecentwindow("navigator:b
rowser"); } if (typeof gb
rowser === "undefined") { //if there is no gb
rowser defined, get it var gb
rowser = window.gb
rowser; } function testnotificationbutton1callback(thenotification, buttoninfo, eventtarget) { window.alert("button 1 pressed"); //prevent notification from closing: return true; }; function testnotificationbutton2callbac...
...k(thenotification, buttoninfo, eventtarget) { window.alert("button 2 pressed"); //do not prevent notification from closing: }; function testnotificationcallback(reason) { window.alert("reason is: " + reason); }; let notifybox = gb
rowser.getnotificationbox(); let buttons = []; let button1 = { isdefault: false, accesskey: "1", label: "button 1", callback: testnotificationbutton1callback, type: "", // if a popup, then must be: "menu-button" or "menu".
... popup: null }; buttons.push(button2); //appendnotification( label , value , image (url) , priority , buttons, eventcallback ) notifybox.appendnotification("my notification text", "test notification unique id", "chrome://b
rowser/content/aboutrobots-icon.png", notifybox.priority_info_high, buttons, testnotificationcallback); } ...
Sorting Results - Archive of obsolete content
when the sort is ascending, the tree
rows will be sorted in alphabetical order.
... when the sort is descending, the tree
rows will be sorted in the reverse order.
... for natural sorting, the
rows will be sorted according to the natural order.
SeaMonkey - making custom toolbar (SM ver. 1.x) - Archive of obsolete content
illa:package:custombutton"/> </rdf:seq> <rdf:description rdf:about="urn:mozilla:package:custombutton" chrome:displayname="custom button" chrome:description="my custom toolbar button" chrome:author="my name" chrome:name="custombutton" chrome:localeversion="1.8" chrome:skinversion="1.5" chrome:extension="true"/> <rdf:seq about="urn:mozilla:overlays"> <!-- b
rowser --> <rdf:li> <rdf:seq about="chrome://navigator/content/navigator.xul"> <rdf:li>chrome://custombutton/content/button.xul</rdf:li> </rdf:seq> </rdf:li> <!-- address book --> <rdf:li> <rdf:seq about="chrome://messenger/content/addressbook/addressbook.xul"> <rdf:li>chrome://custombutton/content/button.xul</rdf:li> </rdf:seq> </rdf:li> ...
...paste it into the new file: <?xml version="1.0" encoding="utf-8"?> <?xml-stylesheet type="text/css" href="chrome://custombutton/content/button.css"?> <!doctype overlay > <overlay id="custombutton-overlay" xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"> <script type="application/javascript" src="chrome://custombutton/content/button.js"/> <!-- b
rowser --> <toolbar id="nav-bar"> <hbox id="nav-bar-buttons"> <toolbarbutton id="custom-button-1"/> </hbox> </toolbar> <!-- address book --> <toolbar id="abtoolbar"> <hbox id="toolbar_button_box"> <toolbarbutton id="custom-button-1" position="8"/> </hbox> </toolbar> <!-- message compose --> <toolbar id="composetoolbar"> <hbox id="toolbar_button_box"> <toolbarbutton id="...
...restart seamonkey and type the chrome url: chrome://myapp/content/myapp.xul, the b
rowser should show you the content of the xul file.
Custom toolbar button - Archive of obsolete content
copy the following content, and paste it into the new file: content custombutton chrome/ style chrome://global/content/customizetoolbar.xul chrome://custombutton/content/button.css # firefox overlay chrome://b
rowser/content/b
rowser.xul chrome://custombutton/content/button.xul # thunderbird mail overlay chrome://messenger/content/messenger.xul chrome://custombutton/content/button.xul # thunderbird compose overlay chrome://messenger/content/messengercompose/messengercompose.xul chrome://custombutton/content/button.xul # thunderbird address book overlay chrome://messenger/content/addressbook/addressbook.xu...
...nto the new file: <?xml version="1.0" encoding="utf-8"?> <?xml-stylesheet type="text/css" href="chrome://custombutton/content/button.css"?> <!doctype overlay > <overlay id="custombutton-overlay" xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"> <script type="application/javascript" src="chrome://custombutton/content/button.js"/> <!-- firefox --> <toolbarpalette id="b
rowsertoolbarpalette"> <toolbarbutton id="custom-button-1"/> </toolbarpalette> <!-- thunderbird mail --> <toolbarpalette id="mailtoolbarpalette"> <toolbarbutton id="custom-button-1"/> </toolbarpalette> <!-- thunderbird compose --> <toolbarpalette id="msgcomposetoolbarpalette"> <toolbarbutton id="custom-button-1"/> </toolbarpalette> <!-- thunderbird address book --> <toolbarpalette id="a...
... to open the javascript console, choose tools – web developer- b
rowser console, and enable js.
Input Controls - Archive of obsolete content
if you set the multiline attribute to true, the text entry field will display multiple
rows.
... example 2 : source view <textbox multiline="true" value="this is some text that could wrap onto multiple lines."/> like the html textarea, you can use the
rows and cols attributes to set the size.
... this should be set to the number of
rows and columns of characters to display.
Popup Menus - Archive of obsolete content
a good example is the drop down menu that appears when you click on the little down ar
rows next to the back and forward buttons in a b
rowser window.
...for example, the popup menu that appears when you click the back button in a b
rowser should appear underneath the back button, not where the mouse pointer is.
...this is the value used for the drop-down menus associated with the b
rowser's back and forward buttons.
tooltip - Archive of obsolete content
page type: boolean setting the page attribute to true will result in the tooltip being filled automatically as appropriate for a b
rowser content area tooltip, i.e.
... the tooltip text is set according to the dom element in the b
rowser that the user hovered over.
... example <tooltip id="pagetooltip" page="true"/> <b
rowser tooltip="pagetooltip"/> position type: string the position attribute determines where the popup appears relative to the element the user clicked to invoke the popup.
nsIContentPolicy - Archive of obsolete content
63 introduced gecko 1.0 inherits from: nsicontentpolicybase last changed in gecko 42 (firefox 42 / thunderbird 42 / seamonkey 2.39) you can observe content that is being loaded into your b
rowser by implementing nsicontentpolicy.
... this interface can be very useful if you are developing a content-aware plugin (blocking ads or altering the look of content, for example), or if you want to stop or allow user-b
rowsed urls.
... type_document 6 indicates a dom document at the top-level (that is, directly within a b
rowser tab).
2006-12-01 - Archive of obsolete content
how do allow an internal web site to have universalb
rowserwrite?
... a question regarding having an internal website use universalb
rowserwrite on a local intranet.
... dual screen b
rowsing discussion regarding b
rowsing across dual screens and simplifying the process.
Multi-process plugin architecture - Archive of obsolete content
plugins are a frequent source of instability or crashes for b
rowser users.
... when plugins run in the same process as the b
rowser, any leaks or crashes in the plugin will affect the entire b
rowser: in order to make the b
rowser user experience better, it is possible to separate plugin execution from the process in which the b
rowser normally executes.
... when multi-process plugins are enabled, a shim layer in the b
rowser implements the plugin api (the npp_ functions which would normally be implemented directly by the plugin).
NPEvent - Archive of obsolete content
in addition to these standard types, the b
rowser provides three additional event types that can be passed in the what field of the eventrecord: getfocusevent: sent when the instance could become the focus of subsequent key events, when the user clicks the instance or presses the tab key to focus the instance.
... if your plug-in ignores key events, return false, and the key events will be processed by the b
rowser itself.
... if you don't want a special cursor, return false and the b
rowser will use the standard arrow cursor.
NPN_DestroyStream - Archive of obsolete content
stream pointer to current stream, initiated by either the b
rowser or the plug-in.
...values: npres_done (most common): stream completed normally; all data was sent by the plug-in to the b
rowser.
...this stream can be either a stream that the b
rowser created and passed to the plug-in in npp_newstream(), or a stream created by the plug-in through a call to npn_newstream().
NPN_GetValueForURL - Archive of obsolete content
« gecko plugin api reference « b
rowser side plug-in api summary provides information to a plugin which is associated with a given url, for example the cookies or preferred proxy.
...the b
rowser passes back the requested information.
... description this entry point is designed to allow plugins which implement their own http stacks to form requests to the web server in the same way the b
rowser does.
NPN NewStream - Archive of obsolete content
summary requests the creation of a new data stream produced by the plug-in and consumed by the b
rowser.
... stream stream to be created by the b
rowser.
... description npn_newstream creates a new stream of data produced by the plug-in and consumed by the b
rowser.
NPN_ReloadPlugins - Archive of obsolete content
« gecko plugin api reference « b
rowser side plug-in api summary reloads all of the installed plugins.
...normally, if you add or remove any plug-ins, the b
rowser does not see them until you restart gecko.
... npn_reloadplugins() lets you install a new plug-in and load it, or to remove a plug-in, without having to restart the b
rowser.
NPN_Status - Archive of obsolete content
« gecko plugin api reference « b
rowser side plug-in api summary lets a plug-in display a message on the b
rowser's status line.
... description you can use this function to make your plug-in display status information in the b
rowser window, in the same place the b
rowser does.
...the b
rowser always displays the last status line message it receives, regardless of the message source.
NPObject - Archive of obsolete content
plugin specific, or b
rowser specific) members.
... npobject is the type used to express objects exposed by either the plugin or by the b
rowser through this api.
... the b
rowsers are expected to expose their window objects and everything reachable from it through this api.
NPP - Archive of obsolete content
typedef struct _npp { void* pdata; /* plug-in private data */ void* ndata; /* mozilla private data */ } npp_t; typedef npp_t* npp; fields the data structure has the following fields: pdata a value, whose definition is up to the plug-in, that the plug-in can use to store a pointer to an internal data structure associated with the instance; this field isn't modified by the b
rowser.
... ndata a private value, owned by the b
rowser, which is used to store data associated with the instance; this value should not be modified by the plug-in.
...npp contains private instance data for both the plug-in and the b
rowser.
NPSetWindowCallbackStruct - Archive of obsolete content
pointer to the display structure that represents the b
rowser-server connection.
...the npsetwindowcallbackstruct object, allocated by the b
rowser, contains information required for the ws_info field of an npwindow.
...the remaining fields are standard x toolkit attributes of the top-level shell window in the b
rowser window hierarchy.
NPWindow - Archive of obsolete content
the b
rowser calls npp_setvalue whenever the drawable changes.
...for windowed plug-ins, the b
rowser calls the npp_setwindow method with an npwindow structure that represents a drawable (a pointer to an npwindow allocated by the b
rowser).
...for windowless plug-ins, the b
rowser calls the npp_setwindow method with an npwindow structure that represents a drawable.
NP_Shutdown - Archive of obsolete content
syntax #include <npapi.h> void np_shutdown(void); windows #include <npapi.h> void winapi np_shutdown(void); description the b
rowser calls this function once after the last instance of your plug-in is destroyed, before unloading the plug-in library itself.
... note: if enough memory is available, the b
rowser can keep the plug-in library loaded if it expects to create more instances in the near future.
... the b
rowser calls np_shutdown only when the library is finally unloaded.
-ms-scrollbar-face-color - Archive of obsolete content
the -ms-scrollbar-face-color css property is a microsoft extension that specifies the color of the scroll box and scroll ar
rows of a scroll bar.
... initial valuethreedfaceapplies toall elementsinheritedyescomputed valueas specifiedanimation typediscrete syntax values <color> the color of the scroll box and scroll ar
rows.
...)where <alpha-value> = <number> | <percentage><hue> = <number> | <angle> examples this example uses -ms-scrollbar-face-color and -ms-scrollbar-arrow-color to display a scroll bar with a blue scroll box and ar
rows, and a scroll bar with a green scroll box and ar
rows.
CSS - Archive of obsolete content
ms-scroll-snap-points-y properties.-ms-scroll-translationthe -ms-scroll-translation css property is a microsoft extension that specifies whether vertical-to-horizontal scroll wheel translation occurs on the specified element.-ms-scrollbar-3dlight-colorthe -ms-scrollbar-3dlight-color css property is a microsoft extension specifying the color of the top and left edges of the scroll box and scroll ar
rows of a scroll bar.-ms-scrollbar-arrow-colorthe -ms-scrollbar-arrow-color css property is a microsoft extension that specifies the color of the arrow elements of a scroll arrow.-ms-scrollbar-base-colorthe -ms-scrollbar-base-color css property is a microsoft extension that specifies the base color of the main elements of a scroll bar.-ms-scrollbar-darkshadow-colorthe -ms-scrollbar-darkshadow-color cs...
...s property is a microsoft extension that specifies the color of a scroll bar's gutter.-ms-scrollbar-face-colorthe -ms-scrollbar-face-color css property is a microsoft extension that specifies the color of the scroll box and scroll ar
rows of a scroll bar.-ms-scrollbar-highlight-colorthe -ms-scrollbar-highlight-color css property is a microsoft extension that specifies the color of the slider tray, the top and left edges of the scroll box, and the scroll ar
rows of a scroll bar.-ms-scrollbar-shadow-colorthe -ms-scrollbar-shadow-color css property is a microsoft extension that specifies the color of the bottom and right edges of the scroll box and scroll ar
rows of a scroll bar.-ms-scrollbar-track-colorthe -ms-scrollbar-track-color css property is a microsoft extension that specifies the color of t...
...however, those elements' ancestors have this pseudo-class applied to them.:-moz-system-metric()this page was auto-generated because a user created a sub-page to this page.::-ms-b
rowsethe ::-ms-b
rowse css pseudo-element is a microsoft extension that represents the button that opens the file picker of <input type="file">.::-ms-checkthe ::-ms-check css pseudo-element is a microsoft extension that represents checkboxes and radio button groups created by <input type="checkbox"> and <input type="radio">.::-ms-clearthe ::-ms-clear css pseudo-element creates a clear button at the ed...
MSX Emulator (jsMSX) - Archive of obsolete content
since javascript currently is mostly an interpreted language in web b
rowsers, it is at least an order of magnitude slower than other languages such as c and java.
... therefore, jsmsx requires a very fast computer to emulate msx at the normal 50-60 interrupts per second inside a web b
rowser.
...the initial motivation was to find some interesting project to develop while exploring the possibilities of the <canvas> tag and javascript language in the most recent web b
rowsers like firefox 2.
Standards-Compliant Authoring Tools - Archive of obsolete content
creating cross-b
rowser code upfront will save you lots of time quality testing your web content.
...if you're using older versions of tools that rely on old b
rowser bugs or generate b
rowser-specific code, it may be time to upgrade: nvu is a standalone editor created from the remains of mozilla composer.
... macromedia™ dreamweaver™ cs6 style master and layout master by western civilisation some caveats: it appears that tools currently available from namo generate ie-specific or netscape 4-specific code that may require extra debugging for compatibility with standards-based b
rowsers.
Reference - Archive of obsolete content
-- dria 05:30, 22 september 2005 (pdt) the examples (or most of them at least) say that the b
rowser can use the js 1.2 engine with the language="javascript1.2" tag, but this is no longer possible; language="javascript1.x" tags will always use the current version now, i.e.
... unfortunately there is not an [easy] method to download content/packages of content off of devmo for 'local' b
rowsing/viewing/printing, yet.
... <hr> xmlhttprequest xmlhttprequest is a host object provided by the b
rowser, not part of js core language.
Introduction to game development for the Web - Game development
with modern web technologies and a recent b
rowser, it's entirely possible to make stunning, top-notch games for the web.
...thanks to massive performance improvements in javascript just-in-time compiler technology and new apis, you can build games that run in the b
rowser (or on html5-powered devices) without making compromises.
... javascript javascript, the programming language used on the web, is blazing fast in modern b
rowsers and getting faster all the time.
Building up a basic demo with the PlayCanvas engine - Game development
built for modern b
rowsers, playcanvas is a fully-featured 3d game engine with resource loading, an entity and component system, advanced graphics manipulation, collision and physics engine (built with ammo.js), audio, and facilities to handle control inputs from various devices (including gamepads).
...you should start off by: making sure you are using a modern b
rowser with good webgl support, such as the latest firefox or chrome.
... try saving the file and loading it in your b
rowser.
3D games on the Web - Game development
documentation and b
rowser support the webgl project documentation and specification is maintained by the khronos group, not the w3c as with most of the web apis.
... support on modern b
rowsers is very good, even on mobile, so you don't have to worry about that too much.
... the main b
rowsers are all supporting webgl and all you need to focus on is optimizing the performance on the devices you use.
Build the brick field - Game development
his will come in handy very soon: function initbricks() { brickinfo = { width: 50, height: 20, count: { row: 3, col: 7 }, offset: { top: 50, left: 60 }, padding: 10 }; } this brickinfo object will hold all the information we need: the width and height of a single brick, the number of
rows and columns of bricks we will see on screen, the top and left offset (the location on the canvas where we shall start to draw the bricks) and the padding between each row and column of bricks.
... now, let's start creating the bricks themselves — add an empty group first to contain the bricks, by adding the following line at the bottom of the initbricks() function: bricks = game.add.group(); we can loop through the
rows and columns to create new brick on each iteration — add the following nested loop below the previous line of code: for(c=0; c<brickinfo.count.col; c++) { for(r=0; r<brickinfo.count.row; r++) { // create new brick and add it to the group } } this way we will create the exact number of bricks we need and have them all contained in a group.
... for(c=0; c<brickinfo.count.col; c++) { for(r=0; r<brickinfo.count.row; r++) { var brickx = 0; var bricky = 0; newbrick = game.add.sprite(brickx, bricky, 'brick'); game.physics.enable(newbrick, phaser.physics.arcade); newbrick.body.immovable = true; newbrick.anchor.set(0.5); bricks.add(newbrick); } } here we're looping through the
rows and columns to create the new bricks and place them on the screen.
2D maze game with device orientation - Game development
you can open the index file in your favourite b
rowser to launch the game and try it.
... adding the sound among the preloaded assets there was an audio track (in various formats for b
rowser compatibility), which we can use now.
... the best way to use it in our case is to vibrate the phone every time the ball hits the walls — inside the wallcollision function: if("vibrate" in window.navigator) { window.navigator.vibrate(100); } if the vibrate method is supported by the b
rowser and available in the window.navigator object, vibrate the phone for 100 miliseconds.
Visual-js game engine - Game development
manual start from cmd : server_folder/node editor.js after starting on-page-editor open b
rowser icon to open internet b
rowser in editor mode .
... save on drop menu or better with ctrl+s before testing in b
rowsers.
... 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 b
rowser for testing .
DOM (Document Object Model) - MDN Web Docs Glossary: Definitions of Web-related terms
the dom is a document model loaded in the b
rowser and representing the document as a node tree, where each node represents part of the document (e.g.
... the dom is one of the most-used apis on the web because it allows code running in a b
rowser to access and interact with every node in the document.
... dom was not originally specified—it came about when b
rowsers began implementing javascript.
Favicon - MDN Web Docs Glossary: Definitions of Web-related terms
a favicon (favorite icon) is a tiny icon included along with a website, which is displayed in places like the b
rowser's address bar, page tabs and bookmarks menu.
... note, however, that most modern b
rowsers replaced the favicon from the address bar by an image indicating whether or not the website is using https.
...when a familiar icon is seen in the b
rowser's address bar, for example, it helps users know they are in the right place.
Global object - MDN Web Docs Glossary: Definitions of Web-related terms
in a web b
rowser, when scripts create global variables, they're created as members of the global object.
...for example: in a web b
rowser, any code which the script doesn't specifically start up as a background task has a window as its global object.
... window object in the b
rowser the window object is the global object in the b
rowser.
Grid - MDN Web Docs Glossary: Definitions of Web-related terms
a css grid is defined using the grid value of the display property; you can define columns and
rows on your grid using the grid-template-
rows and grid-template-columns properties.
... in the example below i have created an explicit grid of three columns and two
rows.
... * {box-sizing: border-box;} .wrapper { border: 2px solid #f76707; border-radius: 5px; background-color: #fff4e6; } .wrapper > div { border: 2px solid #ffa94d; border-radius: 5px; background-color: #ffd8a8; padding: 1em; color: #d9480f; } .wrapper { display: grid; grid-template-columns: 1fr 1fr 1fr; grid-template-
rows: 100px 100px; } <div class="wrapper"> <div>one</div> <div>two</div> <div>three</div> <div>four</div> <div>five</div> <div>six</div> <div>seven</div> <div>eight</div> </div> ...
Grid Tracks - MDN Web Docs Glossary: Definitions of Web-related terms
they are defined in the explicit grid by using the grid-template-columns and grid-template-
rows properties or the shorthand grid or grid-template properties.
... track sizing in the explicit grid when defining grid tracks using grid-template-columns and grid-template-
rows you may use any length unit, and also the flex unit, fr which indicates a portion of the available space in the grid container.
...ing: 1em; color: #d9480f; } .wrapper { display: grid; grid-template-columns: 200px 1fr 3fr; } <div class="wrapper"> <div>one</div> <div>two</div> <div>three</div> <div>four</div> <div>five</div> </div> track sizing in the implicit grid tracks created in the implicit grid are auto-sized by default, however you can define a size for these tracks using the grid-auto-
rows and grid-auto-columns properties.
JavaScript - MDN Web Docs Glossary: Definitions of Web-related terms
javascript is primarily used in the b
rowser, enabling developers to manipulate webpage content through the dom, manipulate data with ajax and indexeddb, draw graphics with canvas, interact with the device running the b
rowser through various apis, and more.
... javascript is one of the world's most commonly-used languages, owing to the recent growth and performance improvement of apis available in b
rowsers.
... recently, javascript's popularity has expanded even further through the successful node.js platform—the most popular cross-platform javascript runtime environment outside the b
rowser.
Style origin - MDN Web Docs Glossary: Definitions of Web-related terms
user-agent origin the user agent origin is the style origin comprised of the default styles used by the user's web b
rowser.
... user origin the user origin is the style origin containing any css that the user of the web b
rowser has added.
... these may be from adding styles using a developer tool or from a b
rowser extension that automatically applies custom styles to content, such as stylus or stylish.
Transport Layer Security (TLS) - MDN Web Docs Glossary: Definitions of Web-related terms
transport layer security (tls), formerly known as secure sockets layer (ssl), is a protocol used by applications to communicate securely across a network, preventing tampering with and eavesdropping on email, web b
rowsing, messaging, and other protocols.
... all modern b
rowsers support the tls protocol, requiring the server to provide a valid digital certificate confirming its identity in order to establish a secure connection.
... note: tls 1.0 and 1.1 support will be removed from all major b
rowsers in early 2020; you'll need to make sure your web server supports tls 1.2 or 1.3 going forward.
Thread - MDN Web Docs Glossary: Definitions of Web-related terms
the main thread is the one used by the b
rowser to handle user events, render and paint the display, and to run the majority of the code that comprises a typical web page or app.
... because these things are all happening in one thread, a slow website or app script slows down the entire b
rowser; worse, if a site or app script enters an infinite loop, the entire b
rowser will hang.
...this allows slow, complex, or long-running tasks to be executed independently of the main thread, preserving the overall performance of the site or app—as well as that of the b
rowser overall.
WebExtensions - MDN Web Docs Glossary: Definitions of Web-related terms
webextensions is a cross-b
rowser system for developing b
rowser extensions in firefox.
... this system provides apis, which to a large extent are supported across different b
rowsers like mozilla firefox, google chrome, opera b
rowser, and microsoft edge .
... learn more technical reference b
rowser extensions on mdn ...
Overflowing content - Learn web development
it is the way you instruct the b
rowser how it should behave.
...using overflow: scroll, b
rowsers with visible scrollbars will always display them—even if there is not enough content to overflow.
...this allows the b
rowser to determine if it should display scrollbars.
Type, class, and ID selectors - Learn web development
this means that instead of the default styling added by the b
rowser, which spaces out headings and paragraphs with margins, everything is close together and we can't see the different paragraphs easily.
... this kind of behavior can sometimes be seen in "reset stylesheets", which strips out all of the b
rowser styling.
... we can tell the b
rowser that we only want to match the element if it has two classes applied by chaining them together with no white space between them.
Floats - Learn web development
there are three potential ways to deal with this, two of which work in all b
rowsers — yet are slightly hacky — and a third new way that deals with this situation properly.
...assuming you have a supporting b
rowser, the box will clear.
... previous overview: css layout next in this module introduction to css layout normal flow flexbox grid floats positioning multiple-column layout responsive design beginner's guide to media queries legacy layout methods supporting older b
rowsers fundamental layout comprehension assessment ...
Multiple-column layout - Learn web development
the column-count property will create as many columns as the value you give it, so if you add the following css to your stylesheet and reload the page, you will get three columns: .container { column-count: 3; } the columns that you create have flexible widths — the b
rowser works out how much space to assign each column.
...cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus.</p> </div> .container { column-count: 3; } change your css to use column-width as follows: .container { column-width: 200px; } the b
rowser will now give you as many columns as it can of the size that you specify; any remaining space is then shared between the existing columns.
... at the present time it is also worth adding the older property page-break-inside: avoid for best b
rowser support.
Positioning - Learn web development
previous overview: css layout next positioning allows you to take elements out of the normal document layout flow, and make them behave differently; for example sitting on top of one another, or always remaining in the same place inside the b
rowser viewport.
...or if you want to create a ui element that floats over the top of other parts of the page, and/or always sits in the same place inside the b
rowser window no matter how much the page is scrolled?
...when we add position: sticky to the <dt> element, along with a top value of 0, supporting b
rowsers will stick the headings to the top of the viewport as they reach that position.
Front-end web developer - Learn web development
subjects covered the subjects covered are: basic setup and learning how to learn web standards and best practices (such as accessibility and cross-b
rowser compatibility) html, the language that gives web content structure and meaning css, the language used to style web pages javascript, the scripting language used to create dynamic functionality on the web tooling that is used to facilitate modern client-side web development.
...all you need is a computer that can run modern web b
rowsers, an internet connection, and a willingness to learn.
... modules cross-b
rowser testing (25–30 hour read/exercises) accessibility (20–25 hour read/exercises) modern tooling time to complete: 55–90 hours prerequisites it is a good idea to know html, css, and javascript before working through this section, as the tools discussed work alongside many of these technologies.
Use JavaScript within a webpage - Learn web development
how to trigger javascript from html within a b
rowser, javascript doesn't do anything by itself.
...you can hardly ever predict just how long it will take for users or b
rowsers to complete an process (especially asynchronous actions such as loading resources).
...moreover, third-party scripts (ads, tracking scripts, b
rowser extensions) might break your scripts.
Working with JSON - Learn web development
try loading this up and then accessing data inside the variable via your b
rowser's javascript console.
...luckily, these two problems are so common in web development that a built-in json object is available in b
rowsers, which contains the following two methods: parse(): accepts a json string as a parameter, and returns the corresponding javascript object.
...try entering the following lines into your b
rowser's javascript console one by one to see it in action: let myjson = { "name": "chris", "age": "38" }; myjson let mystring = json.stringify(myjson); mystring here we're creating a javascript object, then checking what it contains, then converting it to a json string using stringify() — saving the return value in a new variable — then checking it again.
Test your skills: Object basics - Learn web development
note: in the examples below, if there is an error in your code it will be outputted into the results panel on the page, to help you try to figure out the answer (or into the b
rowser's javascript console, in the case of the downloadable version).
... run the greeting() method using dot notation (it will log the greeting to the b
rowser devtools' console).
...we want you to rewrite the greeting() method so that it logs "hello, said bertie the cymric." to the b
rowser devtools' console, but in a way that will work across any cat object of the same structure, regardless of its name or breed.
Perceived performance - Learn web development
first paint is reported by the b
rowser and provides the time, in ms, of when the page starts changing; but this change can be a simple background color update or something even less noticable.
...first contentful paint (fcp) reports the time when the b
rowser first rendered anything of signifigance, be that text, foreground or background image, or a canvas or svg; capturing the very beginning of the loading experience.
... improving perceived performance understanding networking, how the b
rowser works, user perception of time, etc., can help you better understand how to improve the user interaction.
Web performance resources - Learn web development
best practices start with learning the critical rendering path of the b
rowser.
... <link rel="stylesheet" href="/path/to/my.css" media="print" onload="this.media='all'"> <noscript><link rel="stylesheet" href="/path/to/my.css"></noscript> the downside with this approach is the flash of unstyled text (fout.) the simplist way to address this is by inlining css that is required for any content that is rendered above the fold, or what you see in the b
rowser viewport before scrolling.
...by using font display swap the b
rowser will not block rendering and will use the backup system fonts that are defined.
Beginning our React todo list - Learn web development
<title>todomatic</title> when your b
rowser refreshes, you should see something like this: it's ugly, and doesn’t function yet, but that's okay — we'll style it in a moment.
...if we were to use checked, as we would in regular html, react would log some warnings into our b
rowser console relating to handling events on the checkbox, which we want to avoid.
...c; } .c-cb > label::after { box-sizing: content-box; content: ""; position: absolute; top: 11px; left: 9px; width: 18px; height: 7px; transform: rotate(-45deg); border: solid; border-width: 0 0 5px 5px; border-top-color: transparent; opacity: 0; background: transparent; } .c-cb > input[type="checkbox"]:checked + label::after { opacity: 1; } save and look back at your b
rowser, and your app should now have reasonable styling.
Starting our Svelte Todo list app - Learn web development
we want our users to be able to b
rowse, add and delete tasks, and also to mark them as complete.
... repl to code along with us using the repl, start at https://svelte.dev/repl/b7b831ea3a354d3789cefbc31e2ca495?version=3.23.2 todo list app features this is how our todo list app wil look like once it's ready: using this ui our user will be able to: b
rowse their tasks.
...with the following content: <h1>svelte to-do list</h1> change the title element in public/index.html to contain the text svelte to-do list: <title>svelte to-do list</title> open src/app.svelte and replace its contents with the following: <script> import todos from './components/todos.svelte' </script> <todos /> in development mode, svelte will issue a warning in the b
rowser console when specifying a prop that doesn't exist in the component; in this case we have a name prop being specified when we instantiate the app component inside src/main.js, which isn't used inside app.
TypeScript support in Svelte - Learn web development
that means that it parses typescript code and produces the equivalent vanilla javascript code for b
rowsers to run.
...todos.filter(t => t.completed) : todos $: { if (filter === filter.all) $alert = 'b
rowsing all todos' else if (filter === filter.active) $alert = 'b
rowsing active todos' else if (filter === filter.completed) $alert = 'b
rowsing completed todos' } validate will still give us some warnings from todos.svelte.
...todos.filter(t => t.completed) : todos $: { if (filter === filter.all) $alert = 'b
rowsing all todos' else if (filter === filter.active) $alert = 'b
rowsing active todos' else if (filter === filter.completed) $alert = 'b
rowsing completed todos' } const checkalltodos = (completed: boolean) => { todos = todos.map(t => ({...t, completed})) $alert = `${completed ?
Advanced Svelte: Reactivity, lifecycle, accessibility - Learn web development
update your existing checkalltodos() function to the following: const checkalltodos = (completed) => { todos.foreach(t => t.completed = completed) console.log('todos', todos) } go back to your b
rowser, open your devtools console, and click check all/uncheck all a few times.
...this outline is your visual indicator that the b
rowser is currently focused on this element.
...doing so avoids unnecessary work and allows the b
rowser to batch things more effectively.
Creating our first Vue component - Learn web development
your component’s template section should now look like this: <template> <div> <input type="checkbox" id="todo-item" checked="false" /> <label for="todo-item">{{label}}</label> </div> </template> go back to your b
rowser and you'll see the todo item rendered as before, but without a label (oh no!).
... go to your b
rowser's devtools and you’ll see a warning along these lines in the console: [vue warn]: missing required prop: "label" found in ---> <todoitem> at src/components/todoitem.vue <app> at src/app.vue <root> this is because we marked the label as a required prop, but we never gave the component that prop — we've defined where inside the template we want it used, but we haven't passed it into the component when calling it.
...you can check if the unique ids are working by temporarily adding more <to-do-item></to-do-item> calls into app.vue, and then checking their rendered output with your b
rowser's devtools.
Focus management with Vue refs - Learn web development
in addition, what happens when you press tab again varies depending on the b
rowser you're using.
...however, it also means you often should not edit your html elements directly through native b
rowser apis (like document.getelementbyid) when using frameworks, because it results in the vdom and real dom going out of sync.
... now that we have a ref and have let b
rowsers know that we can programmatically focus the <h2>, we need to set focus on it.
Deploying our app - Learn web development
this is the strategy of breaking a b
rowser's own caching mechanism, which forces the b
rowser to download a new copy of your code.
...this unique filename "busts" your b
rowser's cache, thereby making sure the b
rowser downloads the fresh code each time an update is made to the deployed code.
...also see our cross b
rowser testing module for a bunch of useful testing information remember also that tests are not limited to javascript; tests can be run against the rendered dom, user interactions, css, and even how a page looks.
Tools and testing - Learn web development
on top of that, we still need to keep cross-b
rowser support in the forefront of our minds, and make sure that our code follows best practices that allow our projects to work across different b
rowsers and devices that our users are using to b
rowse the web, and be usable by people with disabilities.
... cross b
rowser testing this module looks specifically at the area of testing web projects across different b
rowsers.
...what users, b
rowsers and devices do you most need to worry about?), how to go about testing, the main issues that you'll face with different types of code and how to fix/mitigate those, what tools are most useful in helping you test and fix problems, and how to use automation to speed up testing.
Accessibility information for UI designers and developers
only one element has focus at a given time, typically revealed by b
rowsers with a dotted outline.
... see also: understanding sc 2.4.7: focus visible be ready for resizing and custom styles on the web, users can use tools in their b
rowser to make font sizes larger, or even provide custom css to meet their specific needs.
... use default controls controls that are built into b
rowsers come with a lot of accessibility for free.
Mozilla Plugin Accessibility
plugins in gecko-based b
rowsers have a lot of accessibility issues.
...all b
rowser keys unavailable when plugin has focus focused plugins currently have no choice but to consume all keyboard events.
... the new plugin api will allow plugins to bubble unused keypresses to the b
rowser.
Accessibility and Mozilla
however, many of the concepts were also used during the development of firevox, an at using iaccessible2.accessible toolkit checklistplease contact the mozilla accessibility community with questions or feedback.csun firefox materialsfirefox 1.5 is a fast, free, standards compliant web b
rowser which is rapidly gaining recognition for its fresh, streamlined approach to b
rowsing the web.
... in addition to winning major awards such as pc world product of the year, firefox has attracted a huge following among savvy users who simply care enough about their web b
rowsing experience to download a new piece of software.
...feedback and constructive suggestions are encouraged.mozilla plugin accessibilityplugins in gecko-based b
rowsers have a lot of accessibility issues.
Themes
b
rowser themes b
rowser theme concepts get an introduction to creating themes for the latest versions of firefox using the amo theme generator use the theme generator to create and submit a new theme to amo lightweight themes lightweight themes have been deprecated and are no longer accepted by amo.
... only b
rowser themes will be accepted going forward.
... tools & resources b
rowser theme manifest.json keys b
rowser extensions theme api discourse forum theme related blog posts archived resources ...
Chrome registration
chrome providers a supplier of chrome for a given window type (e.g., for the b
rowser window) is called a chrome provider.
... this example shows how a different overlay can be used for different applications: overlay chrome://b
rowser/content/b
rowser.xul chrome://myaddon/content/ffoverlay.xul application={ec8030f7-c20a-464f-9b0e-13a3a9e97384} overlay chrome://messenger/content/mailwindowoverlay.xul chrome://myaddon/content/tboverlay.xul application={3550f703-e582-4d05-9a08-453d09bdfdc6} overlay chrome://songbird/content/xul/layoutbaseoverlay.xul chrome://myaddon/content/sboverlay.xul application=songbird@songbirdnest.com a...
...mple chrome manifest content necko jar:comm.jar!/content/necko/ locale necko en-us jar:en-us.jar!/locale/necko/ content xbl-marquee jar:comm.jar!/content/xbl-marquee/ content pipnss jar:pipnss.jar!/content/pipnss/ locale pipnss en-us jar:en-us.jar!/locale/pipnss/ # firefox-only overlay chrome://b
rowser/content/pageinfo.xul chrome://pippki/content/pageinfooverlay.xul application={ec8030f7-c20a-464f-9b0e-13a3a9e97384} # seamonkey-only overlay chrome://navigator/content/pageinfo.xul chrome://pippki/content/pageinfooverlay.xul application={92650c4d-4b8e-4d2a-b7eb-24ecf4f6b63a} overlay chrome://communicator/content/pref/preftree.xul chrome://pippki/content/prefoverlay.xul content...
Creating MozSearch plugins
the following xml is the bundled firefox 2 search plugin for searching using yahoo!: <searchplugin xmlns="http://www.mozilla.org/2006/b
rowser/search/"> <shortname>yahoo</shortname> <description>yahoo search</description> <inputencoding>utf-8</inputencoding> <image width="16" height="16">data:image/x-icon;base64,r0lgodlheaaqajecap8aaaaaap///waaach5baeaaaialaaaaaaqabaaaaipli+py+0nogquybdened2khkffwuamezmpzsfmaihphrrguum/ft+uwaaow==</image> <url type="application/x-suggestions+json" method="get" template="http://ff.search.yahoo.com...
...firefox will use the above search engine description to construct the following search url: http://search.yahoo.com/search?p=mozilla&ei=utf-8&fr=moz2 if the user clicks the magnifying glass icon in the search bar, or chooses the web search option in the tools menu when the search bar isn't visible, the b
rowser will take them to http://search.yahoo.com/, the value of the <searchform> element.
... <searchplugin xmlns="http://www.mozilla.org/2006/b
rowser/search/"> <shortname>mdc</shortname> <description>mozilla developer center search</description> <inputencoding>utf-8</inputencoding> <image width="16" height="16">data:image/x-icon;base64,ivborw0kggoaaaansuheugaaabaaaaaqcayaaaaf8%2f9haaaabgdbtueaak%2finwwk6qaaabl0rvh0u29mdhdhcmuaqwrvymugsw1hz2vszwfkexhjztwaaahwsurbvhjayvz%2f%2fz8djqaggjiqoe%2ffv2fv7oz8rays%2fn%2bvkfg%2fiynjfyd%2f1%2brvq7ffu3dpfpsbaaheahibcj85c8bn2nj4vwsdw%2f8zqlwkio8ccroqu0dxqlwrdshuwzbaaigjmtnnpgya9j8uqhfelwpxf2mideirksn9fwsjorkaeeam0dd4dzmaypi%2fg%2bqky4hh5waxgf8pdq0fgwj22d27cjadaaiirlmjo%2bmxa9r2kahvgba2wwx6b8w7od6ceqcggkcmcel8bgwxycbuigtdvkhdbia%2bcuotgaccued3tdqn75d4...
Debugging on Mac OS X
these builds enable hardened runtime and only differ from production builds in that they are not notarized which should not otherwise affect functionality, (other than the ability to easily launch the b
rowser on macos 10.15+ -- see quarantine note below).
...b
rowse to the .app file that you want to debug (firefox.app, nightlydebug.app etc).
... debugging e10s child processes using xcode to debug child processes created by an e10s-enabled b
rowser is a little trickier than debugging a single-process b
rowser, but it can be done.
Debugging on Windows
if it is empty or incorrect, use the arrow button and select b
rowse...
... some common options would be the url of the file you want the b
rowser to open as soon as it starts, starting the profile manager, or selecting a profile.
...for each dll, click the "new" button which creates a new entry and then hit the "..." buttons which lets you b
rowse to the dll.
Commenting IDL for better documentation
this will help the tools generate proper links to help make the documentation easier to read and b
rowse through.
... @th
rows error description the error should be the actual name of the error constant, in all caps.
... * * @th
rows ns_error_failure unable to locate the requested quote.
Contributing to the Mozilla code base
project skills documentation/onboarding firefox b
rowser (core layers) c++ firefox developers documentation firefox (front-end) javascript and/or html/css firefox developers documentation devtools javascript and/or html/css contribute to devtools add-ons javascript and/or html/css contribute to add-ons firefox focus for android java contribute to firefox focus for android fire...
...fox for fire tv java contribute to firefox for fire tv firefox preview (mobile b
rowser, codename: "fenix") kotlin contribute to firefox preview firefox for ios swift contribute to firefox for ios firefox focus for ios swift contribute to firefox focus for ios mozilla hubs javascript and/or html/css, vr contribute to mozilla hubs servo rust contribute to servo there are even many ways to contribute to the mozilla mission without programming.
...b
rowse this component on bugzilla for related bugs ask in our matrix channels : #introduction:mozilla.org or #developers:mozilla.org find a bug we've identified as a good fit for new contributors.
Limitations of frame scripts
for example: nsifileinputstream nsifileoutputstream constructing a file from a string or nsifile (but file objects can be sent via message manager) htmlinputelement.mozsetfilenamearray (alternative: mozsetfilearray) file: uris, see bug 1187099 <...> xul and b
rowser ui anything that tries to touch the b
rowser ui or anything to do with xul is likely not to work in the content process.
...the target property of the object passed into the message handler in the chrome process is the xul <b
rowser> receiving the message, and you can get the chrome window from that (i'm not sure how).
...by default, about: pages (except for a small whitelist) are loaded in the chrome process when b
rowsed to from the awesomebar.
Performance
the more expensive they are to execute the longer it will take for the b
rowser to become responsive after startup.
...ister observers (and other callbacks to global services) in a frame script bad: //framescript.js services.obs.addobserver("document-element-inserted", { observe: function(doc, topic, data) { if(doc.ownerglobal.top != content) return; // bail out if this is for another tab decoratedocument(doc); } }) observer notifications get fired for events that happen anywhere in the b
rowser, they are not scoped to the current tab.
...mescript // framescript.js function onlyonceinabluemoon() { // we only need this during a total solar eclipse while goat blood rains from the sky sendasyncmessage('my-addon:paragraph-count', {num: content.document.queryselectorall('p').length}) } addmessagelistener("my-addon:request-from-parent", onlyonceinabluemoon) better: // addon.js function ontoolbarbutton(event) { let tabmm = gb
rowser.mcurrentb
rowser.frameloader.messagemanager; let button = event.target; let callback = (message) => { tabmm.removemessagelistener("my-addon:paragraph-count", callback) decoratebutton(button, message.data.num) } tabmm.addmessagelistener("my-addon:paragraph-count", callback); tabmm.loadframescript("data:,sendasyncmessage('my-addon:paragraph-count', {num: content.document.querysel...
Storage access policy: Block cookies from trackers
domains are matched against the list in accordance with the safeb
rowsing v4 specification.
... indexeddb: attempting to access the indexeddb factory object th
rows a securityerror exception.
... b
rowser caches: the http cache, the image cache, and the alternative services (alt-svc) cache are all partitioned for tracking resources, such that each top-level origin will have a separate partition and tracking resources on different top-level origins will be cached separate from each other.
Firefox Operational Information Database: SQLite
a large amount of operational information about websites visited and b
rowser configuration is stored in relational databases in sqlite used by firefox.
... the sqlite manager add-on allows convenient b
rowsing of this information.
... in the manager, select the database you want to explore in the '(select profile database)' pulldown, click 'go', select one of the tables listed in the left column and see the current contents of the database in the 'b
rowse & search' tab.) some databases are used by the b
rowser itself, others are used by applications that you have installed or used; for example: content-prefs.sqlite cookies.sqlite download.sqlite formhistory.sqlite persmissions.sqlite places.sqlite search.sqlite signons.sqlite webappstore.sqlite ...
HTMLIFrameElement.getActive()
the getactive() method of the htmliframeelement indicates whether the current b
rowser <iframe> is the currently active frame.
... syntax var amiactive = instanceofhtmliframeelement.getactive(); returns a boolean indicating whether the current b
rowser <iframe> is the currently active frame (true) or not (false.) parameters none.
... example var b
rowser = document.queryselector('iframe'); var amiactive = b
rowser.getactive(); specification not part of any specification.
HTMLIFrameElement.getMuted()
the getmuted() method of the htmliframeelement indicates whether the b
rowser <iframe> is currently muted.
... example callback version: var b
rowser = document.queryselector('iframe'); var request = b
rowser.getmuted(); request.onsuccess = function() { if(request.result) { console.log('the b
rowser is muted.'); } else { console.log('the b
rowser is unmuted.'); } } promise version: var b
rowser = document.queryselector('iframe'); b
rowser.getmuted().then(function(muted) { if(muted) { console.log('the b
rowser is muted.');...
... } else { console.log('the b
rowser is unmuted.'); } }); specification not part of any specification.
HTMLIFrameElement.getStructuredData()
the getstructureddata() method of the htmliframeelement interface retrieves any structured microdata (and hcard and hcalendar microformat data) contained in the html loaded in the b
rowser <iframe> and returns it as json.
...if the request is successful, the request.result is a json object representation of all microdata contained on the page loaded in the b
rowser.
... examples var b
rowser = document.queryselector('iframe'); b
rowser.addeventlistener('mozb
rowserloadend',function() { var request = b
rowser.getstructureddata(); request.onsuccess = function() { console.log(request.result); } }); running this code in a b
rowser api app and then loading up a page that contains microdata (such as the website of british alt-country band salter cane) will result in a json object being returned, along the lines of: { "items": [ { "type":["http://microformats.org/profile/hcard"], "properties":{"fn":["chris askew"], "n":[ { "properties": { "given-name":["chris"], "family-name":["askew"], ...
HTMLIFrameElement.getVisible()
the getvisible() method of the htmliframeelement is used to request the current visible state of the b
rowser <iframe>.
...if the request is successful, the request's result is a boolean indicating the visible state of the b
rowser <iframe>.
... example var b
rowser = document.queryselector('iframe'); var request = b
rowser.getvisible(); request.onsuccess = function() { console.log('the visible state is: ' + this.result ?
HTMLIFrameElement.goBack()
the goback() method of the htmliframeelement interface is used to navigate backwards in the b
rowser <iframe>'s history.
... by calling this method, the b
rowser <iframe> changes its location for the previous location available in its navigation history, which sends a series of related events: mozb
rowserlocationchange, mozb
rowserloadstart, and so on.
... examples back.addeventlistener('touchend',function() { b
rowser.goback(); }); specification not part of any specification.
HTMLIFrameElement.goForward()
the goforward() method of the htmliframeelement is used to navigate forward in the b
rowser <iframe>'s history.
... by calling this method, the b
rowser <iframe> changes its location to the next location available in its navigation history, which sends a series of related events: mozb
rowserlocationchange, mozb
rowserloadstart and so on.
... examples fwd.addeventlistener('touchend',function() { b
rowser.goforward(); }); specification not part of any specification.
HTMLIFrameElement.purgeHistory()
the purgehistory() method of the htmliframeelement interface is used to clear the b
rowsing history associated with the b
rowser <iframe>.
... note: to delete cookies for a firefox os app, you could call clearb
rowserdata() on the actual app itself.
... examples domrequest: var b
rowser = document.queryselector('iframe'); var request = b
rowser.purgehistory(); request.onsuccess = function() { console.log('history deleted!'); } request.onerror = function() { console.error(this.error.name); } promise: var b
rowser = document.queryselector('iframe'); b
rowser.purgehistory().then(function() { console.log('history deleted!'); }, function(error) { console.error(this.error...
How test harnesses work
mozilla test harnesses are typically composed of a python runner that invokes firefox, utilizes the b
rowser to run tests, and reports the results.
... the python harness communicates with the b
rowser by inserting an extension in the testing profile or uses marionette's wire protocol to drive the b
rowser.
...ariables (mozrunner, currently) creates a profile (mozprofile via mozrunner) sets appropriate test preferences inserts a shim extension in the profile (for non-marionette tests) gathers the tests (manifestdestiny) potentially sets up an http server for test data (mozhttpd) invokes the binary (mozrunner) it is the job of the shim extension to shut down the b
rowser logging (mozlog, in theory) (run tests, accrue results) cleanup: shutdown the b
rowser check for crashes (mozcrash) reporting (moztest) marionette tests list of testing extensions pageloader (talos) mochitest: //github.com/realityripple/uxp/blob/master/testing/mochitest/install.rdf (mochitest) ...
Extending a Protocol
the tutorial is designed for b
rowser 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.
... implementing the navigator.echo() in your favorite editor, open dom/webidl/navigator.webidl at the end of the file, add: partial interface navigator { [th
rows] promise<domstring> echo(domstring astring); }; now we need to implement the echo() method in c++, so open up ./dom/base/navigator.h and let's add the method definition, so under public:: already_addrefed<promise> echo(const nsastring& astring, errorresult& arv); we use nsastring& as the domstring comes in from js as utf-16.
... we need to add the following things: at the top of the file: include protocol pecho; after "manager pb
rowser or pinprocess;", add: manages pecho; finally, under parent: add async pecho(); - this is the "constructor" part we talked about before, which will allow us to eventually send messages.
IPDL Tutorial
the following ipdl code defines a very basic interaction of b
rowser and plugin actors: async protocol pplugin { child: async init(nscstring pluginpath); async shutdown(); parent: async ready(); }; this code declares the pplugin protocol.
...here is a dirt-simple example of how a b
rowser implementor might use ppluginparent.
... when creating a plugin instance, the b
rowser should block until instance creation is finished, and needs some information returned from the plugin: sync protocol pplugininstance { child: sync init() returns (bool windowless, bool ok); }; we added two new keywords to the plugin protocol, sync and returns.
Integrated Authentication
so, it is paramount that the b
rowser does not freely exchange ntlm user credentials with any server that requests them.
... mozilla currently supports a whitelist of sites that are permitted to engage in spnego authentication with the b
rowser.
...ed-uris", site-list); pref("network.negotiate-auth.delegation-uris", site-list); pref("network.automatic-ntlm-auth.trusted-uris", site-list); where, site-list is a comma-separated list of url prefixes or domains of the form: site-list = "mydomain.com, https://myotherdomain.com" network.negotiate-auth.trusted-uris lists the sites that are permitted to engage in spnego authentication with the b
rowser, and network.negotiate-auth.delegation-uris lists the sites for which the b
rowser may delegate user authorization to the server.
JavaScript-DOM Prototypes in Mozilla
here is an attempt to modify a host object: (function(){ try { image.prototype.src = 1; } catch(ex){ alert(ex); } })(); this demonstrates that the image constructor, a host object supported in nearly all b
rowsers for mac and windows, has a prototype property, and that an attempt to modify the prototype's src - property results in an error.
... | |.__proto__ | object.prototype | |.__proto__ | null if you have an instance of a htmldivelement in javascript, the following will hold true: div.__proto__ === htmldivelement.prototype which means that the following should also be true: div.__proto__ === div.constructor.prototype non standard no b
rowser is required to provide modifiable __proto__, nor a global node, nor provide any way to get at host objects nor their associated prototypes.
...results in other b
rowsers is not guaranteed.
Downloads.jsm
ownloads.jsm"); method overview promise<download> createdownload(object aproperties); promise<void> fetch(asource, atarget, [optional] object aoptions); promise<downloadlist> getlist(atype); promise<downloadsummary> getsummary(atype); constants constant description public work on downloads that were not started from a private b
rowsing window.
... private work on downloads that were started from a private b
rowsing window.
...to enable the new download manager : first you have to set the pref b
rowser.download.usejstransfer to true.
NetUtil.jsm
exceptions thrown this method th
rows an exception with the message "must have a source and a sink" if either asource or asink is null.
... exceptions thrown this method th
rows an exception with the message "must have a source and a callback" if either asource or acallback is null.
... exceptions thrown this method th
rows an exception with the message "must have a non-null string spec or nsifile object" and result code ns_error_invalid_arg if aspec is null.
OS.File for the main thread
promise<object> openunique( in string path, [optional] in object options ) th
rows os.file.error arguments path the full native name of the file to open.
... void copy( in string sourcepath, in string destpath [optional] in object options) th
rows os.file.error arguments sourcepath the full path of the file to copy.
... os.file.makedir() create a new directory promise<void> makedir( in string path, [optional] in object options ) th
rows os.file.error arguments path the full name of the directory to create.
Promise
if the executor th
rows an exception, its value will be passed to the reject resolving function.
... warning: if the onfulfill callback th
rows an exception, the onreject callback is not invoked and the exception won't be caught, nor shown in the console (you will see a promise chain failed error).
... if the callback th
rows an exception, the new promise is rejected with the exception as the rejection reason, even if the original promise was fulfilled.
Task.jsm
the promise returned by the task either fulfills with the returned value if generator returns or rejects with the thrown error if the generator th
rows.
...the promise returned by the task either fulfills with the returned value if generator returns or rejects with the thrown error if the generator th
rows.
... return value a promise that is fulfills when the task returns or rejects when the task th
rows an exception.
openLocationLastURL.jsm
if the user is not in private b
rowsing mode, this automatically updates the value of the general.open_location.last_url preference.
... note: this module automatically handles private b
rowsing mode for you.
... the value preserved across accesses is not preserved when the user exits private b
rowsing mode.
Investigating leaks using DMD heap scan mode
this will keep the watch dog from killing the b
rowser when shut down takes multiple minutes.
... next, exit the b
rowser.
...this isn’t too bad, because unlike ref count logging, we have the full state of memory in our existing log, so we don’t need to run the b
rowser again.
DMD
desktop firefox (linux) build build firefox with these options: ac_add_options --enable-dmd if building via try server, modify b
rowser/config/mozconfigs/linux64/common-opt or a similar file before pushing.
... desktop firefox (mac) build build with these options: ac_add_options --enable-dmd if building via try server, modify b
rowser/config/mozconfigs/macosx64/common-opt or a similar file before pushing.
... desktop firefox (windows) build build with these options: ac_add_options --enable-dmd if building via try server, modify b
rowser/config/mozconfigs/win32/common-opt.
Leak Gauge
getting a log file to get a log file, run the b
rowser with the following environment variables set.
...the b
rowser will run with negligible slowdown.
... you must exit the b
rowser before post-processing the log file or the results will be unreliable.
Power profiling overview
web b
rowsers are popular applications and can be power-intensive, and therefore can significantly affect battery life.
... compare b
rowsers to see if firefox is doing better or worse than another b
rowser on a particular workload.
..."high" can most easily be gauged by comparing against other b
rowsers.
Patches and pushes
patchify search plugins are found in b
rowser/searchplugins.
...<searchplugin xmlns="http://www.mozilla.org/2006/b
rowser/search/"> <shortname>yahoo</shortname> <description>yahoo search</description> <inputencoding>utf-8</inputencoding> <image width="16" height="16">data:image/x-icon;base64,r0lgodlheaaqajecap8aaaaaap///waaach5baeaaaialaaaaaaqabaaaaipli+py+0nogquybdened2khkffwuamezmpzsfmaihphrrguum/ft+uwaaow==</image> ***this tag is optional***<url type="application/x-suggestions+json" method="get" template="http://ff.search.yahoo.com/gossip?output=fxjson&command={searchterms}" />*** <url type="text/html" method="get" template="http://search.yahoo.com/search"> <param name="p" value="{searchterms}"/> ...
... create a patch of the searchplugins directory by entering the following command in your command-line tool, where mypatch.diff is where you give your patch a name: $ hg add mozilla/b
rowser/searchplugins/ $ hg diff mozilla/b
rowser/searchplugins/ > mypatch.diff attach your patch file to the bug by clicking the "add an attachment" link.
Rhino FAQ
can i use rhino in a web b
rowser?
... rhino is a library for java use, and not for general web b
rowsers.
... however, a java-based b
rowser may use rhino with scripts from a page in the same manner that any other java program would.
Statistics API
the b
rowser preference javascript.options.mem.log controls dumping of human-readable gc stats messages to the developer console.
... the b
rowser preference javascript.options.mem.notify controls emission of json encoded gc stats to an observer interface.
...in between slices, other b
rowser code is allowed to run.
TPS Pref Lists
a prefs asset list is an array of objects with name and value keys, representing b
rowser preferences.
... for example: var prefs1 = [ { name: "b
rowser.startup.homepage", value: "http://www.getfirefox.com" }, { name: "b
rowser.urlbar.maxrichresults", value: 20 }, { name: "b
rowser.tabs.autohide", value: true } ]; pref lists and phase actions the only actions supported for preference asset lists are modify and verify: prefs.modify prefs.verify sync only syncs certain preferences.
... to find the list of valid preferences, go to about:config on a b
rowser that has weave installed, and search for services.sync.prefs.sync.
A Web PKI x509 certificate primer
in order for a certificate to be valid these three requirements must be met: there is a verification path from the site certificate to a trusted certificate of the user agent (ie if you follow the issuer path you will end on a self-signed certificate that is considered trusted by the b
rowser).
... one issue that is not commonly known is that the x509 trust graph is not a forest (a bunch of trees where each root is a trusted root) but a cyclic graph, where the same key/issuer can be a root or an intermediate for another root in the b
rowsers key store (when roots create intermediates for each other it is called cross-signing).
...*.yourcompany.com) but you want others outside of your organization to be able to b
rowse to your website using https without having to manually import a root certificate, then you can get an ssl certificate from one of the cas who already have a root certificate included in the major b
rowsers.
Setting up an update server
tuting <obj dir>, <mar output path>, <version> and <channel> appropriately: ./mach package touch "<obj dir>/dist/firefox/precomplete" mar="<obj dir>/dist/host/bin/mar.exe" moz_product_version=<version> mar_channel_id=<channel> ./tools/update-packaging/make_full_update.sh <mar output path> "<obj dir>/dist/firefox" for a local build, <channel> can be default, and <version> can be the value from b
rowser/config/version.txt (or something arbitrarily large like 2000.0a1).
...this is the python2 command: python -m simplehttpserver 8000 or, this is the python3 command: python3 -m http.server 8000 if you aren't sure that you started the server correctly, try using a web b
rowser to navigate to http://127.0.0.1:8000/update.xml and make sure that you get the xml file you created earlier.
...you can use this command with firefox's b
rowser 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, b
rowse to the directory and remove the subdirectory called updates.
Gecko Roles
role_table represents a table that contains
rows and columns of cells, and optionally, row headers and column headers.
...a specialized dialog that displays the files in the directory and lets the user select a file, b
rowse a different directory, or specify a filename.
... role_tree_table representas a control that is capable of expanding and collapsing
rows as well as showing multiple columns of data.
Accessing the Windows Registry Using XPCOM
you can use it as shown in the following example: var wss = components.classes["@mozilla.org/b
rowser/shell-service;1"] .getservice(components.interfaces.nsiwindowsshellservice); var id = wss.getregistryentry(wss.hklm, "software\\microsoft\\windows\\currentversion", "productid"); note: there's no way to set a registry value using this interface.
...it can be used as follows: var wss = components.classes["@mozilla.org/winhooks;1"] .getservice(components.interfaces.nsiwindowsregistry); var id = wss.getregistryentry(wss.hklm, "software\\microsoft\\windows\\currentversion", "productid"); backwards compatibility if you need to support firefox 1.0 and other older b
rowser versions, you should check to see which interfaces are available.
... the following skeleton code will allow you to determine which interface to use: if ("@mozilla.org/windows-registry-key;1" in components.classes) { // firefox 1.5 or newer } else if ("@mozilla.org/winhooks;1" in components.classes) { // seamonkey or other older non-toolkit application } else if ("@mozilla.org/b
rowser/shell-service;1" in components.classes) { var wss = components.classes["@mozilla.org/b
rowser/shell-service;1"] .getservice(components.interfaces.nsiwindowsshellservice); if ("getregistryentry" in wss) { // firefox 1.0 } else { // nothing supported } } else { // nothing supported } ...
An Overview of XPCOM
the most important use of xpcom is within gecko, an open source, standards compliant, embeddable web b
rowser and toolkit for creating web b
rowsers and other applications.
... gecko is used in many internet applications, mostly b
rowsers and most notably mozilla firefox.
... in c++, you can use a fairly advanced feature known as a dynamic_cast<>, which th
rows an exception if the shape object is not able to be cast to a circle.
Components.utils.Sandbox
example of obtaining content principal from the window: var principal = gb
rowser.selectedtab.linkedb
rowser.contentprincipal; var sandbox = components.utils.sandbox(principal); expanded principal an expanded principal is specified as an array of the principals it subsumes.
...for example the content principal above can be made expanded/extended like so: var principal = [gb
rowser.selectedtab.linkedb
rowser.contentprincipal]; // this is now an expanded (aka extended) principal var sandbox = components.utils.sandbox(principal); null principal you can create a null principal using code like: cc["@mozilla.org/nullprincipal;1"].createinstance(ci.nsiprincipal); from firefox 37 onwards, you can also specify the null principal by simply passing null as the principal argument.
... this example is to be run from scratchpad with environemnt set to b
rowser.
mozIPlacesAutoComplete
behavior_openpage 1 << 7 search for pages that have been marked as being opened, such as a tab in a tabb
rowser.
...note: pages will not be automatically unregistered when private b
rowsing mode is entered or exited.
...note: pages will not be automatically unregistered when private b
rowsing mode is entered or exited.
mozIStorageStatement
boolean executestep(); return value returns a boolean indicating whether there are more
rows or not.
... step() identical to calling executestep(), and then calling reset() when no more
rows are returned.
... boolean step() return value true if there are more
rows left in the results, otherwise false.
nsIConsoleService
xpcom/base/nsiconsoleservice.idlscriptable the console service is the back-end for the error console, bundled with every mozilla application, and for firefox's web console and b
rowser console.
...although it may still work in some b
rowsers, its use is discouraged since it could be removed at any time.
... see also error console (deprecated) web console b
rowser console nsiconsolemessage ...
nsICookieStorage
although it may still work in some b
rowsers, its use is discouraged since it could be removed at any time.
... last changed in gecko 1.7 inherits from: nsisupports method overview void getcookie(in string acookieurl, in voidptr acookiebuffer, in pruint32ref acookiesize); void setcookie(in string acookieurl, in constvoidptr acookiebuffer, in unsigned long acookiesize); methods getcookie() retrieves a cookie from the b
rowser's persistent cookie store.
... setcookie() stores a cookie in the b
rowser's persistent cookie store.
nsIDOMMozNetworkStatsManager
b
rowsingtrafficonly a boolean set to filter network stats by b
rowsing traffic.
... if true, return only b
rowsing traffic, which is generated from the mozb
rowser iframe element within an app.
... if false or not set, the total traffic, which is generated from both the mozapp and mozb
rowser iframe elements, is returned.
nsIDOMWindow
localstorage nsidomstorage local storage for the current b
rowsing context.
... sessionstorage nsidomstorage session storage for the current b
rowsing context.
... data stored in session storage may be accessed by any site in the b
rowsing context.
nsIFocusManager
setting this to null or to a non-top-level window th
rows an ns_error_invalid_arg exception.
...this is a special value used to focus links as the caret moves over them in caret b
rowsing mode.
...although it may still work in some b
rowsers, its use is discouraged since it could be removed at any time.
nsIMsgFilter
th
rows an exception if the action is not priority attribute nsmsgpriorityvalue priority; targetfolderuri // target folder..
... th
rows an exception if the action is not move to folder attribute acstring targetfolderuri; label // target label.
... th
rows an exception if the action is not label attribute nsmsglabelvalue label; junkscore attribute long junkscore; strvalue attribute autf8string strvalue; customid // action id if type is custom attribute acstring customid; customaction // custom action associated with customid // (which must be set prior to reading this attribute) readonly attribute nsimsgfiltercustomaction customaction; methods addterm() void nsimsgfilter::addterm ( in nsmsgsearchattribvalue attrib, in nsmsgsearchopvalue op, in nsimsgsearchvalue value, in boolean booleanand, in acstring arbitraryheader ) getterm() void nsimsgfilter::getterm ( in long termindex, in nsmsgsearchattribvalue attrib, in ...
nsIMsgRuleAction
th
rows an exception if the action is not priority attribute nsmsgpriorityvalue priority; // target folder..
... th
rows an exception if the action is not move to folder attribute acstring targetfolderuri; // target label.
... th
rows an exception if the action is not label attribute nsmsglabelvalue label; // junkscore th
rows an exception if the action type is not junkscore attribute long junkscore; attribute autf8string strvalue; // action id if type is custom attribute acstring customid; // custom action associated with customid // (which must be set prior to reading this attribute) readonly attribute nsimsgfiltercustomaction customaction; }; ...
Component; nsIPrefBranch
for example, if this object is created with the root "b
rowser.startup.", the preferences "b
rowser.startup.page", "b
rowser.startup.homepage", and "b
rowser.startup.homepage_override" can be accessed by simply passing "page", "homepage", or "homepage_override" to the various get/set methods.
...in string aprefname, in utf8string avalue); void setcomplexvalue(in string aprefname, in nsiidref atype, in nsisupports avalue); void setintpref(in string aprefname, in long avalue); void unlockpref(in string aprefname); attributes attribute type description root string called to get the root on which this branch is based, such as "b
rowser.startup." read only.
...now, this method never th
rows.
nsIRequest
this flag is used when b
rowsing via history.
... it is not recommended for normal b
rowsing as it may likely violate reasonable assumptions made by the server and confuse users.
... note: these flags are intended for normal b
rowsing, and they should therefore not apply to content that must be validated before each use.
nsISearchEngine
netwerk/base/public/nsib
rowsersearchservice.idlscriptable please add a summary to this article.
...this should only be called on engines created via nsib
rowsersearchservice.addenginewithdetails().
...see also nsisearchsubmission nsib
rowsersearchservice ...
nsISessionStartup
b
rowser/components/sessionstore/nsisessionstartup.idlscriptable handles the session restore process.
... 1.0 66 introduced gecko 1.8 inherits from: nsisupports last changed in gecko 8.0 (firefox 8.0 / thunderbird 8.0 / seamonkey 2.5) implemented by: @mozilla.org/b
rowser/sessionstartup;1.
... to use this service, use: var sessionstartup = components.classes["@mozilla.org/b
rowser/sessionstartup;1"] .getservice(components.interfaces.nsisessionstartup); method overview boolean dorestore(); attributes attribute type description sessiontype unsigned long the type of session being restored; this will be one of the session type constants.
nsITreeView
void selectionchanged(); void setcelltext(in long row, in nsitreecolumn col, in astring value); void setcellvalue(in long row, in nsitreecolumn col, in astring value); void settree(in nsitreeboxobject tree); void toggleopenstate(in long index); attributes attribute type description rowcount long the total number of
rows in the tree (including the offscreen
rows).
...although it may still work in some b
rowsers, its use is discouraged since it could be removed at any time.
...otherwise false iscontainer() whether the row has the potential to hold other
rows within it.
nsIWebNavigationInfo
this lets you determine whether a mime type can be displayed as-is inside a b
rowser, or if the b
rowser will instead forward handling of the data to a plug-in or an external helper application.
...you may specify null to check for compatibility with nsiwebnavigation objects that are in their default state; otherwise, the result is determined based on the configuration of the specified object (that is, how it is configured by using nsiwebb
rowsersetup).
...example let webnavigationinfo_service = components.classes["@mozilla.org/webnavigation-info;1"] .getservice(components.interfaces.nsiwebnavigationinfo); let support_code = webnavigationinfo_service.istypesupported(contenttype, null); if (support_code == webnavigationinfo_service.unsupported) { dump("unsupported content-type: not displaying in the b
rowser\n"); } see also nsiwebnavigation ...
Index
to test it 17 content tabs thunderbird content tabs enable thunderbird to display remote content in a tab, which users can b
rowse in (mostly) the same way as with a b
rowser.
...we will add a categorization system as the link list g
rows.
...beginning in thunderbird 2, additional views on those folders ("recent folders", "favorite folders", and "unread folders") were added, accessible via the scroll-ar
rows at the top of the pane.
Zombie compartments
restart the b
rowser.
... restart the b
rowser.
... b
rowse one or more pages and do something that exercises the add-on.
Plug-in Side Plug-in API - Plugins
the names of all of these methods begin with npp_ to indicate that they are implemented by the plug-in and called by the b
rowser.
... npp_getvalue allows the b
rowser to query the plug-in for information.
... np_getvalue allows the b
rowser to query the plug-in for information.
Plugins
plugins are shared libraries that users can install to display content that the b
rowser can't display natively.
... important: plugins are a legacy technology that are a security and performance problem for firefox (and other b
rowser) users.
... flash activation: b
rowser comparison each b
rowser activates flash slightly differently, which can be confusing for users and web authors.
DOM Inspector FAQ - Firefox Developer Tools
inspect content document inspect content, e.g., unprivileged web pages loaded in a b
rowser tab.
... inspect chrome document inspect application chrome, including open xul windows, e.g., the b
rowser window.
...this causes the document to be loaded in the b
rowser pane.
Use a source map - Firefox Developer Tools
the javascript sources executed by the b
rowser are often transformed in some way from the original sources created by a developer.
... in these situations, it's much easier to debug the original source, rather than the source in the transformed state that the b
rowser has downloaded.
... a source map is a file that maps from the transformed source to the original source, enabling the b
rowser to reconstruct the original source and present the reconstructed original in the debugger.
All keyboard shortcuts - Firefox Developer Tools
opening and closing tools these shortcuts work in the main b
rowser window to open the specified tool.
...for tools like the b
rowser console that open in a new window, you have to close the window to close the tool.
...tab) ctrl + shift + c cmd + opt + c ctrl + shift + c open style editor shift + f7 shift + f7 * shift + f7 open profiler shift + f5 shift + f5 * shift + f5 open network monitor 2 ctrl + shift + e cmd + opt + e ctrl + shift + e toggle responsive design mode ctrl + shift + m cmd + opt + m ctrl + shift + m open b
rowser console ctrl + shift + j cmd + shift + j ctrl + shift + j open b
rowser toolbox ctrl + alt + shift + i cmd + opt + shift + i ctrl + alt + shift + i open scratchpad shift + f4 shift + f4 * shift + f4 open webide shift + f8 shift + f8 * shift + f8 storage inspector shift + f9 shift + f9 * shift + f9 open deb...
Performance Analysis - Firefox Developer Tools
the network monitor includes a performance analysis tool, to help show you how long the b
rowser takes to download the different parts of your site.
... (alternatively, if you have only just opened the network monitor, so it's not yet populated with the list of requests, you'll get a stopwatch icon in the main window.) the network monitor then loads the site twice: once with an empty b
rowser cache, and once with a primed b
rowser cache.
...it displays the results for each run side by side, or vertically if the b
rowser window is narrow: the results for each run are summarised in a table and a pie chart.
Examine and edit CSS - Firefox Developer Tools
to view user-agent styles (i.e., b
rowser-default css rules), enable "inspector > show b
rowser styles" under the developer tool settings panel.
... (note that this setting is independent of the "b
rowser styles" checkbox in the computed view.) user-agent styles are displayed against a different background, and the link to the filename and line number contains the prefix (user agent): element {} rule the element {} rule at the top of the rules list isn't actually a css rule.
... clicking the arrow next to the property name (or pressing enter or space while it is selected) shows the rule that set this value, along with a link to the source filename and line number: by default, this view only shows values that have been explicitly set by the page: to see all values, click the "b
rowser styles" box.
The JavaScript input interpreter - Firefox Developer Tools
accessing variables you can access variables defined in the page, both built-in variables like window and variables added by javascript libraries like jquery: autocomplete the editor has autocomplete: enter the first few letters and a popup appears with possible completions: press enter, tab, or the right arrow key to accept the suggestion, use the up/down ar
rows to move to a different suggestion, or just keep typing if you don't like any of the suggestions.
... note: syntax highlighting is not visible in your b
rowser if accessibility features have been enabled.
...to move back and forward through your history: in single-line mode, use the up and down ar
rows.
Web Console remoting - Firefox Developer Tools
to see how the debugger is used in the web console code, look in b
rowser/devtools/webconsole/webconsole.js, and search for webconsoleconnectionproxy.
...this actor is used for the b
rowser console implementation and for debugging remote firefox/b2g instances.
... private b
rowsing the b
rowser console can be used while the user has private windows open.
AudioContext() - Web APIs
usage notes the specification doesn't go into a lot of detail about things like how many audio contexts a user agent should support, or minimum or maximum latency requirements (if any), so these details can vary from b
rowser to b
rowser.
... 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 b
rowser implementations to decide.
... non-standard exceptions in chrome if the value of the latencyhint property isn't valid, chrome th
rows a typeerror exception with the message "the provided value '...' is not a valid enum value of type audiocontextlatencycategory".
AudioContext.baseLatency - Web APIs
note: you can request a certain latency during construction time with the latencyhint option, but the b
rowser may ignore the option.
... b
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/b
rowser-compat-data and send us a pull request.
BasicCardResponse.billingAddress - Web APIs
example let's look at a sample payment request: var request = new paymentrequest(supportedinstruments, details, options); // call show() to trigger the b
rowser's payment flow.
... b
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/b
rowser-compat-data and send us a pull request.
BasicCardResponse.cardNumber - Web APIs
example let's look at a sample payment request: var request = new paymentrequest(supportedinstruments, details, options); // call show() to trigger the b
rowser's payment flow.
... b
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/b
rowser-compat-data and send us a pull request.
BasicCardResponse.cardSecurityCode - Web APIs
example let's look at a sample payment request: var request = new paymentrequest(supportedinstruments, details, options); // call show() to trigger the b
rowser's payment flow.
... b
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/b
rowser-compat-data and send us a pull request.
BasicCardResponse.cardholderName - Web APIs
example let's look at a sample payment request: var request = new paymentrequest(supportedinstruments, details, options); // call show() to trigger the b
rowser's payment flow.
... b
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/b
rowser-compat-data and send us a pull request.
BasicCardResponse.expiryMonth - Web APIs
example let's look at a sample payment request: var request = new paymentrequest(supportedinstruments, details, options); // call show() to trigger the b
rowser's payment flow.
... b
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/b
rowser-compat-data and send us a pull request.
BasicCardResponse.expiryYear - Web APIs
example let's look at a sample payment request: var request = new paymentrequest(supportedinstruments, details, options); // call show() to trigger the b
rowser's payment flow.
... b
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/b
rowser-compat-data and send us a pull request.
BasicCardResponse - Web APIs
// call show() to trigger the b
rowser's payment flow.
... b
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/b
rowser-compat-data and send us a pull request.
Using the Beacon API - Web APIs
navigator.sendbeacon() the beacon api's navigator.sendbeacon() method sends a beacon request to the server in the global b
rowsing context.
... if the b
rowser successfully queues the request for delivery, the method returns true and returns false otherwise.
...ge from the worker myworker.onmessage = function(event) { var msg = event.data; // log worker's send status console.log("worker reply: sendbeacon() status = " + msg); }; } this code snippet is for the worker (worker-using.js): onmessage = function(event) { var msg = event.data; // split the url and data from the message var url = msg[0]; var data = msg[1]; // if the b
rowser supports worker sendbeacon(), then send the beacon; otherwise // return failure message to the global context if (self.navigator.sendbeacon) { var status = self.navigator.sendbeacon(url, data); postmessage(status ?
readValue() - Web APIs
otherwise it th
rows an error.
... b
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/b
rowser-compat-data and send us a pull request.
BluetoothRemoteGATTDescriptor - Web APIs
otherwise it th
rows an error.
... b
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/b
rowser-compat-data and send us a pull request.
CSSOMString - Web APIs
when a specification says cssomstring, it depends on the b
rowser vendors to choose whether to use domstring or usvstring.
... while b
rowser 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 b
rowser 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.
CSSStyleRule.selectorText - Web APIs
this is readonly in some b
rowsers; to set stylesheet rules dynamically cross-b
rowser, see using dynamic styling information.
... working draft b
rowser 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/b
rowser-compat-data and send us a pull request.
Using the CSS Typed Object Model - Web APIs
in b
rowsers that support computedstylemap(), you'll see a list of all the css properties and values.
... in other b
rowsers, you'll just see a link.
...ld(document.createtextnode( propval )); row.appendchild( cssvalue ); // and the type of unit const cssunit = document.createelement( 'td' ); cssunit.appendchild( document.createtextnode( allcomputedstyles.get( ofinterest[i] ).unit )); row.appendchild( cssunit ); //add the row to the table stylestable.appendchild( row ); } for those of you using a non-supporting b
rowser, the above output should looks something like this: property value unit padding-top 0 px margin-bottom 16 px font-size 16 px font-stretch 100 percent animation-duration 0 s animation-iteration-count 1 number width auto undefined height auto undefined ...
Cache - Web APIs
each b
rowser has a hard limit on the amount of cache storage that a given origin can use.
...the b
rowser does its best to manage disk space, but it may delete the cache storage for an origin.
... the b
rowser will generally delete all of the data for an origin or none of the data for an origin.
Using images - Web APIs
external images can be used in any format supported by the b
rowser, such as png, gif, or jpeg.
... if you try to call drawimage() before the image has finished loading, it won't do anything (or, in older b
rowsers, may even throw an exception).
...in the code below, the first for loop iterates over the
rows.
Canvas tutorial - Web APIs
first introduced in webkit by apple for the os x dashboard, <canvas> has since been implemented in b
rowsers.
... today, all major b
rowsers support it.
...the <canvas> element is not supported in some older b
rowsers, but is supported in recent versions of all major b
rowsers.
Using channel messaging - Web APIs
the channel messaging api allows two separate scripts running in different b
rowsing contexts attached to the same document (e.g., two iframes, or the main document and an iframe, or two documents via a sharedworker) to communicate directly, passing messages between one another through two-way channels (or pipes) with a port at each end.
... message channels on the other hand can provide a secure channel that allows you to pass data between different b
rowsing contexts.
... an object, the ownership of which is transferred to the receiving b
rowsing context.
Channel Messaging API - Web APIs
the channel messaging api allows two separate scripts running in different b
rowsing contexts attached to the same document (e.g., two iframes, or the main document and an iframe, two documents via a sharedworker, or two workers) to communicate directly, passing messages between one another through two-way channels (or pipes) with a port at each end.
...once created, the two ports of the channel can be accessed through the messagechannel.port1 and messagechannel.port2 properties (which both return messageport objects.) the app that created the channel uses port1, and the app at the other end of the port uses port2 — you send a message to port2, and transfer the port over to the other b
rowsing context using window.postmessage along with two arguments (the message to send, and the object to transfer ownership of, in this case the port itself.) when these transferable objects are transferred, they are 'neutered' on the previous context — the one they previously belonged to.
... the other b
rowsing context can listen for the message using messageport.onmessage, and grab the contents of the message using the event's data attribute.
Clipboard - Web APIs
note: in reality, at this time b
rowser requirements for access to the clipboard vary significantly.
... clipboard availability the asynchronous clipboard api is a relatively recent addition, and the process of implementing it in b
rowsers is not yet complete.
... due to both potential security concerns and technical complexities, the process of integrating this api is happening gradually in most b
rowsers.
console.assert() - Web APIs
shorthand: // console.assert(number % 2 === 0, {number, errormsg}); } // output: // the # is 2 // the # is 3 // assertion failed: {number: 3, errormsg: "the # is not even"} // the # is 4 // the # is 5 // assertion failed: {number: 5, errormsg: "the # is not even"} note that, while a string containing a substitution string works as a parameter for console.log in node and many, if not most, b
rowsers...
... 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 b
rowsers: console.assert(false, 'the word is %s', 'foo'); // correct output in node.js and some b
rowsers // (e.g.
... firefox v60.0.2): // assertion failed: the word is foo // incorrect output in some b
rowsers // (e.g.
Console API - Web APIs
concepts and usage the console api started as a largely proprietary api, with different b
rowsers implementing it, albeit it in inconsistent ways.
... the console api spec was created to define consistent behavior, and all modern b
rowsers 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 b
rowser's web console.
CustomEvent - Web APIs
some other b
rowsers are starting to support it for web compatibility purposes.
...by specification, this value is time since epoch—but in reality, b
rowsers' definitions vary.
... event.istrusted read only indicates whether or not the event was initiated by the b
rowser (after a user click, for instance) or by a script (using an event creation method, like event.initevent).
DOMTokenList.forEach() - Web APIs
html <span class="a b c"></span> javascript let span = document.queryselector("span"); let classes = span.classlist; let iterator = classes.values(); classes.foreach( function(value, key, listobj) { span.textcontent += `${value} ${key}/${this} ++ `; }, "arg" ); result polyfill this polyfill adds compatibility to all b
rowsers supporting es5: if (window.domtokenlist && !domtokenlist.prototype.foreach) { domtokenlist.prototype.foreach = function (callback, thisarg) { thisarg = thisarg || window; for (var i = 0; i < this.length; i++) { callback.call(thisarg, this[i], i, this); } }; } specifications specification status comment domthe definition of 'foreach() (as it...
... b
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/b
rowser-compat-data and send us a pull request.
Document.evaluate() - Web APIs
recommendation initial specification b
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/b
rowser-compat-data and send us a pull request.
...t 4.2samsung internet android full support 1.0legend full support full support no support no support see also document.createexpression() xpathresult xpath code snippets check for b
rowser support ...
Document.execCommand() - Web APIs
don't try using the return value to verify b
rowser support before calling a command.
...conditions of having this behavior enabled vary from one b
rowser to another, and have evolved over time.
...when this behavior is enabled varies between b
rowsers, and its conditions have evolved over time.
Document.getElementsByTagNameNS() - Web APIs
as of january 2012, only in webkit b
rowsers is the returned value a pure nodelist.
...see the note in b
rowser compatibility section in element.getelementsbytagnamens for details.
... <p>some div2 text</p> </div> </div> <p>some outer text</p> <p>some outer text</p> <button onclick="getallparaelems();"> show all p elements in document</button><br /> <button onclick="div1paraelems();"> show all p elements in div1 element</button><br /> <button onclick="div2paraelems();"> show all p elements in div2 element</button> </body> </html> potential workaround for other b
rowsers which do not support if the desired b
rowser did not support xpath, another approach (such as traversing the dom through all its children, identifying all @xmlns instances, etc.) would be necessary to find all tags with the desired local name and namespace, but xpath is much faster.
Document: pointercancel event - Web APIs
the pointercancel event is fired when the b
rowser determines that there are unlikely to be any more pointer events, or if after the pointerdown event is fired, the pointer is then used to manipulate the viewport by panning, zooming, or scrolling.
... the b
rowser decides that the user started pointer input accidentally.
... after the pointercancel event is fired, the b
rowser will also send pointerout followed by pointerleave.
DocumentOrShadowRoot.activeElement - Web APIs
which elements are focusable varies depending on the platform and the b
rowser's current configuration.
... example html <p>select some text from one of the text areas below:</p> <form> <textarea name="ta-example-one" id="ta-example-one"
rows="7" cols="40">this is text area one.
...donec tincidunt, lorem a porttitor molestie, odio nibh iaculis libero, et accumsan nunc orci eu dui.</textarea> <textarea name="ta-example-two" id="ta-example-two"
rows="7" cols="40">this is text area two.
Examples of web and XML development using the DOM - Web APIs
the properties of event objects differs greatly between b
rowsers, the whatwg dom standard lists the standard properties, however many b
rowsers have extended these greatly.
... put the following code into a blank text file and load it into a variety of b
rowsers, you'll be surprised at the different number and names of properties.
... if dom core methods document.createelement and node.appendchild are used to create
rows and cells, ie requires that they are appended to a tbody element, whereas other b
rowsers will allow appending to a table element (the
rows will be added to the last tbody element).
Element.classList - Web APIs
the following polyfill for both classlist and domtokenlist ensures full compliance (coverage) for all standard methods and properties of element.prototype.classlist for ie10-ie11 b
rowsers plus nearly compliant behavior for ie 6-9.
...prototype, "classlist", { enumerable: 1, get: function(val){ if (!hasownprop.call(this, "classlist")) polyfillclasslist(this); return this.classlist; }, configurable: 0, set: function(val){this.classname = val} }); } catch(e) { // less performant fallback for older b
rowsers (ie 6-8): window[" ucl"] = polyfillclasslist; // the below code ensures polyfillclasslist is applied to all current and future elements in the doc.
...in all polyfilled b
rowsers (ie6-9), an additional element[" uclp"] property is added to element to ensure standards compliant prototyping, and a domtokenlist[" ucl"] property is added to each element["classlist"] object to ensure that the domtokenlist is bounded to its own element.
Event - Web APIs
some other b
rowsers are starting to support it for web compatibility purposes.
...by specification, this value is time since epoch—but in reality, b
rowsers' definitions vary.
... event.istrusted read only indicates whether or not the event was initiated by the b
rowser (after a user click, for instance) or by a script (using an event creation method, like event.initevent).
EventSource - Web APIs
unlike websockets, server-sent events are unidirectional; that is, data messages are delivered in one direction, from the server to the client (such as a user's web b
rowser).
... 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 b
rowser and set to a very low number (6).
...this limit is per b
rowser + 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.
EventTarget.dispatchEvent() - Web APIs
the dispatchevent() method th
rows unspecified_event_type_err if the event's type was not specified by initializing the event before the method was called, or if the event's type is null or an empty string.
... b
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/b
rowser-compat-data and send us a pull request.
Using Fetch - Web APIs
om/answer', { answer: 42 }) .then(data => { console.log(data); // json data parsed by `data.json()` call }); note that mode: "no-cors" only allows a limited set of headers in the request: accept accept-language content-language content-type with a value of application/x-www-form-urlencoded, multipart/form-data, or text/plain sending a request with credentials included to cause b
rowsers to send a request with credentials included, even for a cross-origin call, add credentials: 'include' to the init object you pass to the fetch() method.
... // the calling script is on the origin 'https://example.com' fetch('https://example.com', { credentials: 'same-origin' }); to instead ensure b
rowsers don’t include credentials in the request, use credentials: 'omit'.
...} polyfill to use fetch in unsupported b
rowsers, there is a fetch polyfill available that recreates the functionality for non-supporting b
rowsers.
Fetch API - Web APIs
the following b
rowsers shipped and outdated native fetch, and were updated in these versions: firefox version 61.0b13.
... if you are targetting older versions of these b
rowsers, be sure to include credentials: 'same-origin' init option on all api requests that may be affected by cookies/user login state.
... aborting a fetch b
rowsers have started to add experimental support for the abortcontroller and abortsignal interfaces (aka the abort api), which allow operations like fetch and xhr to be aborted if they have not already completed.
FileReaderSync.readAsArrayBuffer() - Web APIs
encodingerror is raised when the resource is a data url and exceed the limit length defined by each b
rowser.
... b
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/b
rowser-compat-data and send us a pull request.
FileReaderSync.readAsBinaryString() - Web APIs
encodingerror is raised when the resource is a data url and exceed the limit length defined by each b
rowser.
... b
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/b
rowser-compat-data and send us a pull request.
FileReaderSync.readAsDataURL() - Web APIs
encodingerror is raised when the resource is a data url and exceed the limit length defined by each b
rowser.
... b
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/b
rowser-compat-data and send us a pull request.
FileReaderSync.readAsText() - Web APIs
encodingerror is raised when the resource is a data url and exceed the limit length defined by each b
rowser.
... b
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/b
rowser-compat-data and send us a pull request.
FileSystemEntrySync - Web APIs
various b
rowsers implement pieces of the file and directory entries api (otherwise known as the file system api) but you should try to avoid using it.
...if you do not specify a name, the b
rowser preserves the entry's current name.
...if you do not specify a name, the b
rowser preserves the filesystementrysync's current name.
File and Directory Entries API support in Firefox - Web APIs
the original file system api was created to let b
rowsers implement support for accessing a sandboxed virtual file system on the user's storage device.
... this has caused a number of popular web sites not to work properly on b
rowsers other than chrome.
... to ensure your code will work in both chrome and other b
rowsers, you can include code similar to the following: var filesystemdirectoryentry = window.filesystemdirectoryentry || window.directoryentry; var filesystementry = window.filesystementry || window.entry; limitations in firefox next, let's look at limitations of the firefox implementation of the api.
FullscreenOptions.navigationUI - Web APIs
"hide" the b
rowser's navigation interface will be hidden and the entire dimensions of the screen will be allocated to the display of the element.
... "show" the b
rowser will present page navigation controls and possibly other user interface; the dimensions of the element (and the perceived size of the screen) will be clamped to leave room for this user interface.
... "auto" the b
rowser will choose which of the above settings to apply.
Using the Gamepad API - Web APIs
mapping: a string indicating whether the b
rowser has remapped the controls on the device to a known layout.
...if the b
rowser is able to map controls on the device to that layout the mapping property will be set to the string standard.
... to start with, we declare some variables: the gamepadinfo paragraph that the connection info is written into, the ball that we want to move, the start variable that acts as the id for requestanimation frame, the a and b variables that act as position modifiers for moving the ball, and the shorthand variables that will be used for the requestanimationframe() and cancelanimationframe() cross b
rowser forks.
Using the Geolocation API - Web APIs
the callback function is called multiple times, allowing the b
rowser to either update your location as you move, or provide a more accurate location as different techniques are used to geolocate you.
... this object allows you to specify whether to enable high accuracy, a maximum age for the returned position value (up until this age it will be cached and reused if the same position is requested again; after this the b
rowser will request fresh position data), and a timeout value that dictates how long the b
rowser should attempt to get the position data for, before it times out.
...ords.longitude; status.textcontent = ''; maplink.href = `https://www.openstreetmap.org/#map=18/${latitude}/${longitude}`; maplink.textcontent = `latitude: ${latitude} °, longitude: ${longitude} °`; } function error() { status.textcontent = 'unable to retrieve your location'; } if(!navigator.geolocation) { status.textcontent = 'geolocation is not supported by your b
rowser'; } else { status.textcontent = 'locating…'; navigator.geolocation.getcurrentposition(success, error); } } document.queryselector('#find-me').addeventlistener('click', geofindme); result ...
Geolocation API - Web APIs
the geolocation api is accessed via a call to navigator.geolocation; this will cause the user's b
rowser to ask them for permission to access their location data.
... if they accept, then the b
rowser will use the best available functionality on the device to access this information (for example, gps).
...ords.longitude; status.textcontent = ''; maplink.href = `https://www.openstreetmap.org/#map=18/${latitude}/${longitude}`; maplink.textcontent = `latitude: ${latitude} °, longitude: ${longitude} °`; } function error() { status.textcontent = 'unable to retrieve your location'; } if(!navigator.geolocation) { status.textcontent = 'geolocation is not supported by your b
rowser'; } else { status.textcontent = 'locating…'; navigator.geolocation.getcurrentposition(success, error); } } document.queryselector('#find-me').addeventlistener('click', geofindme); result specifications specification status comment geolocation api recommendation ...
HTMLAreaElement - Web APIs
htmlareaelement.download is a domstring indicating that the linked resource is intended to be downloaded rather than displayed in the b
rowser.
...if the name is not a valid filename of the underlying os, b
rowser will adapt it.
... htmlareaelement.target is a domstring that reflects the target html attribute, indicating the b
rowsing context in which to open the linked resource.
HTMLCanvasElement.getContext() - Web APIs
this context is only available on b
rowsers that implement webgl version 1 (opengl es 2.0).
...this context is only available on b
rowsers that implement webgl version 2 (opengl es 3.0).
...if set to false, the b
rowser now knows that the backdrop is always opaque, which can speed up drawing of transparent content and images.
HTMLDialogElement: cancel event - Web APIs
the cancel event fires on a <dialog> when the user instructs the b
rowser that they wish to dismiss the current open dialog.
... for example, the b
rowser might fire this event when the user presses the esc key or clicks a "close dialog" button which is part of the b
rowser's ui.
...e-dialog'); dialog.addeventlistener('cancel', (event) => { result.textcontent = 'dialog was canceled'; }); const opendialog = document.queryselector('.open-dialog'); opendialog.addeventlistener('click', () => { if (typeof dialog.showmodal === 'function') { dialog.showmodal(); result.textcontent = ''; } else { result.textcontent = 'the dialog api is not supported by this b
rowser'; } }); const closebutton = document.queryselector('.close'); closebutton.addeventlistener('click', () => { dialog.close(); }); result specifications specification status html living standardthe definition of 'cancel' in that specification.
HTMLElement.offsetTop - Web APIs
working draft b
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/b
rowser-compat-data and send us a pull request.
...(having display:none does not affect this b
rowser.) ...
HTMLElement: pointercancel event - Web APIs
the pointercancel event is fired when the b
rowser determines that there are unlikely to be any more pointer events, or if after the pointerdown event is fired, the pointer is then used to manipulate the viewport by panning, zooming, or scrolling.
... the b
rowser decides that the user started pointer input accidentally.
... after the pointercancel event is fired, the b
rowser will also send pointerout followed by pointerleave.
HTMLFormElement - Web APIs
htmlformelement.autocomplete a domstring reflecting the value of the form's autocomplete html attribute, indicating whether the controls in this form can have their values automatically populated by the b
rowser.
... deprecated methods htmlformelement.requestautocomplete() triggers a native b
rowser interface to assist the user in completing the fields which have an autofill field name value that is not off or on.
...tion from a <form> element and set some of its attributes: <form name="forma" action="/cgi-bin/test" method="post"> <p>press "info" for form details, or "set" to change those details.</p> <p> <button type="button" onclick="getforminfo();">info</button> <button type="button" onclick="setforminfo(this.form);">set</button> <button type="reset">reset</button> </p> <textarea id="form-info"
rows="15" cols="20"></textarea> </form> <script> function getforminfo(){ // get a reference to the form via its name var f = document.forms["forma"]; // the form properties we're interested in var properties = [ 'elements', 'length', 'name', 'charset', 'action', 'acceptcharset', 'action', 'enctype', 'method', 'target' ]; // iterate over the properties, turning them into a string...
HTMLImageElement.alt - Web APIs
for compatibility reasons, b
rowsers generally will accept an image without an alt attribute, but you should try to get into the habit of using it.
... unknown b
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/b
rowser-compat-data and send us a pull request.
HTMLImageElement.currentSrc - Web APIs
currentsrc lets you determine which image from the set of provided images was selected by the b
rowser.
... living standard b
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/b
rowser-compat-data and send us a pull request.
HTMLImageElement.x - Web APIs
let logbox = document.queryselector("pre"); let tbl = document.getelementbyid("userinfo") let log = msg => { logbox.innerhtml += `${msg}<br>`; } let cell = tbl.
rows[1].cells[2]; let image = cell.queryselector("img"); log(`image's global x: ${image.x}`); log(`image's global y: ${image.y}`); this uses the <table>'s
rows property to get a list of the
rows in the table, from which it looks up row 1 (which, being a zero-based index, means the second row from the top).
... working draft b
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/b
rowser-compat-data and send us a pull request.
HTMLImageElement.y - Web APIs
let logbox = document.queryselector("pre"); let tbl = document.getelementbyid("userinfo") let log = msg => { logbox.innerhtml += `${msg}<br>`; } let cell = tbl.
rows[1].cells[2]; let image = cell.queryselector("img"); log(`image's global x: ${image.x}`); log(`image's global y: ${image.y}`); this uses the <table>'s
rows property to get a list of the
rows in the table, from which it looks up row 1 (which, being a zero-based index, means the second row from the top).
... working draft b
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/b
rowser-compat-data and send us a pull request.
HTMLObjectElement - Web APIs
htmlobjectelement.contentdocument read only returns a document representing the active document of the object element's nested b
rowsing context, if any; otherwise null.
... htmlobjectelement.contentwindow read only returns a windowproxy representing the window proxy of the object element's nested b
rowsing context, if any; otherwise null.
... htmlobjectelement.name returns a domstring that reflects the name html attribute, specifying the name of the b
rowsing context.
HTMLOrForeignElement.nonce - Web APIs
examples retrieving a nonce value in the past, not all b
rowsers supported the nonce idl attribute, so a workaround is to try to use getattribute as a fallback: let nonce = script['nonce'] || script.getattribute('nonce'); however, recent b
rowsers version hide nonce values that are accessed this way (an empty string will be returned).
... b
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/b
rowser-compat-data and send us a pull request.
HTMLScriptElement - Web APIs
javascript files should be served with the application/javascript mime type, but b
rowsers are lenient and block them only if the script is served with an image type (image/*), video type (video/*), audio type (audio/*), or text/csv.
... the defer attribute may be specified with the async attribute, so legacy b
rowsers that only support defer (and not async) fall back to the defer behavior instead of the default blocking behavior.
... htmlscriptelement.nomodule is a boolean that if true, stops the script's execution in b
rowsers that support es2015 modules — used to run fallback scripts in older b
rowsers that do not support javascript modules.
HTMLTableRowElement.rowIndex - Web APIs
even when the <thead>, <tbody>, and <tfoot> elements are out of order in the html, b
rowsers render the table in the right order.
... therefore the
rows count from <thead> to <tbody>, from <tbody> to <tfoot>.
... html <table> <thead> <tr><th>item</th> <th>price</th></tr> </thead> <tbody> <tr><td>bananas</td> <td>$2</td></tr> <tr><td>oranges</td> <td>$8</td></tr> <tr><td>top sirloin</td> <td>$20</td></tr> </tbody> <tfoot> <tr><td>total</td> <td>$30</td></tr> </tfoot> </table> javascript let
rows = document.queryselectorall('tr');
rows.foreach((row) => { let z = document.createelement("td"); z.textcontent = `(row #${row.rowindex})`; row.appendchild(z); }); result ...
History.back() - Web APIs
the history.back() method causes the b
rowser to move back one page in the session history.
... b
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/b
rowser-compat-data and send us a pull request.
History.forward() - Web APIs
the history.forward() method causes the b
rowser to move forward one page in the session history.
... b
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/b
rowser-compat-data and send us a pull request.
History.replaceState() - Web APIs
title most b
rowsers currently ignore this parameter, although they may use it in the future.
...the new url must be of the same origin as the current url; otherwise replacestate th
rows an exception.
...then suppose https://www.mozilla.org/bar.html executes the following javascript: history.replacestate(stateobj, '', 'bar2.html'); this will cause the url bar to display https://www.mozilla.org/bar2.html, but won't cause the b
rowser to load bar2.html or even check that bar2.html exists.
IDBCursor.source - Web APIs
this function never returns null or th
rows an exception, even if the cursor is currently being iterated, has iterated past its end, or its transaction is not active.
... recommendation b
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/b
rowser-compat-data and send us a pull request.
IDBDatabase.deleteObjectStore() - Web APIs
for older webkit b
rowsers, you must call first.
... recommendation b
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/b
rowser-compat-data and send us a pull request.
IDBDatabase.onversionchange - Web APIs
objectstore.createindex("month", "month", { unique: false }); objectstore.createindex("year", "year", { unique: false }); objectstore.createindex("notified", "notified", { unique: false }); note.innerhtml += '<li>object store created.</li>'; db.onversionchange = function(event) { note.innerhtml += '<li>a database change has occurred; you should refresh this b
rowser window, or close it down and use the other open version of this application, wherever it exists.</li>'; }; }; specifications specification status comment indexed database api 2.0the definition of 'onversionchange' in that specification.
... recommendation b
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/b
rowser-compat-data and send us a pull request.
IDBDatabase.transaction() - Web APIs
if you need to open the object store in readwrite mode to change data, you would use the following: var transaction = db.transaction('my-store-name', "readwrite"); as of firefox 40, indexeddb transactions have relaxed durability guarantees to increase performance (see bug 1112702), which is the same behaviour as other indexeddb-supporting b
rowsers.
... recommendation b
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/b
rowser-compat-data and send us a pull request.
IDBFactory.cmp() - Web APIs
this th
rows an exception if either of the values is not a valid key.
... recommendation b
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/b
rowser-compat-data and send us a pull request.
databases - Web APIs
note: this method is introduced in a draft of a specifications and b
rowser compatibility is limited.
... b
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/b
rowser-compat-data and send us a pull request.
IDBFactory.open() - Web APIs
note: you can find out more information on the different available storage types, and how firefox handles client-side data storage, at b
rowser storage limits and eviction criteria.
... recommendation b
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/b
rowser-compat-data and send us a pull request.
IDBIndex.get() - Web APIs
if this value is null or missing, the b
rowser will use an unbound key range.
... recommendation b
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/b
rowser-compat-data and send us a pull request.
IDBIndex.getAll() - Web APIs
to use a feature like getall(), the b
rowser has to create all the objects at once.
...if this value is null or missing, the b
rowser will use an unbound key range.
...if this value exceeds the number of records in the query, the b
rowser will only retrieve the first item.
IDBIndex.getKey() - Web APIs
if this value is null or missing, the b
rowser will use an unbound key range.
... recommendation b
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/b
rowser-compat-data and send us a pull request.
IDBKeyRange.includes() - Web APIs
for b
rowsers that do not support it, the following polyfill can be used.
... recommendation b
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/b
rowser-compat-data and send us a pull request.
IDBObjectStore.createIndex() - Web APIs
(see above.) // it is only implemented in recent b
rowsers.
... recommendation b
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/b
rowser-compat-data and send us a pull request.
IDBObjectStore.deleteIndex() - Web APIs
his.result; // run the displaydata() function to populate the task list with all the to-do list data already in the idb displaydata(); }; // this event handles the event whereby a new version of the database needs to be created // either one has not been created before, or a new version number has been submitted via the // window.indexeddb.open line above //it is only implemented in recent b
rowsers dbopenrequest.onupgradeneeded = function(event) { var db = this.result; db.onerror = function(event) { note.innerhtml += '<li>error loading database.</li>'; }; // create an objectstore for this database var objectstore = db.createobjectstore("todolist", { keypath: "tasktitle" }); // define what data items the objectstore will contain objectstore.createindex("hours", "...
... recommendation b
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/b
rowser-compat-data and send us a pull request.
IDBOpenDBRequest.onblocked - Web APIs
either one has not been created // before, or a new version number has been submitted via the // window.indexeddb.open line above //it is only implemented in recent b
rowsers request.onupgradeneeded = function(event) { var db = event.target.result; db.onerror = function(event) { note.innerhtml += '<li>error loading database.</li>'; }; // create an objectstore for this database var objectstore = db.createobjectstore("todolist", { keypath: "tasktitle" }); ...
... recommendation b
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/b
rowser-compat-data and send us a pull request.
IDBTransaction.commit() - Web APIs
if it is called on a transaction that is not active, it th
rows an invalidstateerror domexception.
... b
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/b
rowser-compat-data and send us a pull request.
IDBTransaction.oncomplete - Web APIs
as of firefox 40, indexeddb transactions have relaxed durability guarantees to increase performance (see bug 1112702), which is the same behaviour as other indexeddb-supporting b
rowsers.
... recommendation b
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/b
rowser-compat-data and send us a pull request.
IndexedDB API - Web APIs
this is the main landing page for mdn's indexeddb coverage — here we provide links to the full api reference and usage guides, b
rowser support details, and some explanation of key concepts.
...the process by which the b
rowser works out how much space to allocate to web data storage and what to delete when that limit is reached is not simple, and differs between b
rowsers.
... b
rowser storage limits and eviction criteria attempts to explain how this works, at least in the case of firefox.
InterventionReportBody - Web APIs
an intervention report is generated when usage of a feature in a web document has been blocked by the b
rowser for reasons such as security, performance, or user annoyance.
... so for example, a script was been stopped because it was significantly slowing down the b
rowser, or the b
rowser's autoplay policy blocked audio from playing without a user gesture to trigger it.
...this typically matches the message a b
rowser will display in its devtools console when an intervention is imposed, if one is available.
KeyboardEvent - Web APIs
this may be the empty string if the b
rowser or device doesn't know the keyboard's locale.
...in the case of ui events, this is important for security reasons, as it prevents scripts from simulating user actions that interact with the b
rowser itself.
...this led to the implementation of non-standard initialization methods, the early dom events level 2 version, keyboardevent.initkeyevent() by gecko b
rowsers and the early dom events level 3 version, keyboardevent.initkeyboardevent() by others.
Location - Web APIs
ow.location.hash = '#' + $(this).attr('id'); }); }); [].foreach.call(document.queryselectorall('[title]'), function (node) { node.addeventlistener("click", function(e) { e.preventdefault(); e.stoppropagation(); window.location.hash = ''; }); }); result properties location.ancestororigins is a static domstringlist containing, in reverse order, the origins of all ancestor b
rowsing contexts of the document associated with the given location object.
...modern b
rowsers provide urlsearchparams and url.searchparams to make it easy to parse out the parameters from the querystring.
... examples // create anchor element and use href property for the purpose of this example // a more correct alternative is to b
rowse to the url and use document.location or window.location var url = document.createelement('a'); url.href = 'https://developer.mozilla.org:8080/search?q=url#search-results-close-container'; console.log(url.href); // https://developer.mozilla.org:8080/search?q=url#search-results-close-container console.log(url.protocol); // https: console.log(url.host); // developer.mozilla.org:8080 cons...
MediaDeviceInfo.deviceId - Web APIs
for private b
rowsing, a different identifier is used that is not persisted across sessions.
... b
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/b
rowser-compat-data and send us a pull request.
MediaPositionState.playbackRate - Web APIs
for example, a b
rowser might use this information along with the position property and the navigator.mediasession.playbackstate, as well as the session's metadata to provide an integrated common user interface showing the currently playing media as well as standard pause, play, forward, reverse, and other controls.
... example in this example, an app is updating the b
rowser to let it know that the user has clicked a button causing the playback to shift to a double-speed mode.
... it begins by creating a mediapositionstate object, then submits it to the b
rowser it by calling navigator.mediasession.setpositionstate().
MediaStream - Web APIs
the order is not defined, and may not only vary from one b
rowser to another, but also from one call to another.
...the order is not defined, and may not only vary from one b
rowser to another, but also from one call to another.
...the order is not defined, and may not only vary from one b
rowser to another, but also from one call to another.
MediaTrackConstraints.deviceId - Web APIs
however, typically this is unnecessary since b
rowsers will simply ignore any constraints they're unfamiliar with.
... device ids are unique for a given origin, and are guaranteed to be the same across b
rowsing sessions on the same origin.
... an exception to the rule that device ids are the same across b
rowsing sessions: private b
rowsing mode will use a different id, and will change it each b
rowsing session.
MediaTrackConstraints - Web APIs
this may be because a given b
rowser doesn't support the property, or because it doesn't apply.
...the value may be a single one of the following strings, or an array of them to allow the b
rowser flexibility in deciding what to do about the cursor.
... b
rowser the stream contains the contents of a single b
rowser tab selected by the user.
MediaTrackSettings - Web APIs
properties some or all of the following will be included in the object, either because it's not supported by the b
rowser or because it's not available due to context.
...the group id is a b
rowsing session-unique string identifying the source group of the track.
... b
rowser the stream contains the contents of a single b
rowser tab selected by the user.
Microdata DOM API - Web APIs
microdata were implemented in some b
rowsers for a long time.
... nowadays, they have been abandoned and removed from all b
rowsers and are therefore deprecated.
...setting the value when the element has no itemprop attribute or when the element's value is an item th
rows an invalidaccesserror exception.
NavigatorID.appName - Web APIs
the value of the navigatorid.appname property is always "netscape", in any b
rowser.
... note: do not rely on this property to return a real b
rowser name.
... all b
rowsers return "netscape" as the value of this property.
NavigatorPlugins.plugins - Web APIs
applications that must check for the presence of a b
rowser plugin should query navigator.plugins or navigator.mimetypes by exact name instead of enumerating the navigator.plugins array and comparing every plugin's name.
....textcontent = navigator.plugins[i].name; newrow.insertcell().textcontent = navigator.plugins[i].filename; newrow.insertcell().textcontent = navigator.plugins[i].description; newrow.insertcell().textcontent = navigator.plugins[i].version?navigator.plugins[i].version:""; } notes the plugin object exposes a small interface for getting information about the various plugins installed in your b
rowser.
... a list of plugins is also available by entering about:plugins in the b
rowser's location bar.
Notification.requestPermission() - Web APIs
function notifyme() { // let's check if the b
rowser supports notifications if (!("notification" in window)) { alert("this b
rowser does not support desktop notification"); } // let's check whether notification permissions have already been granted else if (notification.permission === "granted") { // if it's okay let's create a notification var notification = new notification("hi there!"); } // otherwise, we need to ask t...
...} 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 b
rowsers to follow.
...this is not only best practice — you should not be spamming users with notifications they didn't agree to — but going forward b
rowsers will explicitly disallow notifications not triggered in response to a user gesture.
NotificationEvent - Web APIs
tells the b
rowser that work is ongoing.
... b
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/b
rowser-compat-data and send us a pull request.
OffscreenCanvas.getContext() - Web APIs
this context is only available on b
rowsers that implement webgl version 1 (opengl es 2.0).
...this context is only available on b
rowsers that implement webgl version 2 (opengl es 3.0).
...if set to false, the b
rowser now knows that the backdrop is always opaque, which can speed up drawing of transparent content and images then.
PaymentRequest.PaymentRequest() - Web APIs
starting with more recent b
rowsers, this parameter is more generic than credit cards, it is a single domstring, and the meaning of the data parameter changes with the supportedmethods.
...if a value is not supplied, the b
rowser will construct one.
... // call show() to trigger the b
rowser's payment flow.
PaymentRequest.prototype.id - Web APIs
if none is provided, the b
rowser automatically sets the id value to a uuid.
... b
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/b
rowser-compat-data and send us a pull request.
PaymentResponse.complete() - Web APIs
see the b
rowser compatibility section below for details.
... b
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/b
rowser-compat-data and send us a pull request.
performance.clearResourceTimings() - Web APIs
the clearresourcetimings() method removes all performance entries with an entrytype of "resource" from the b
rowser's performance data buffer and sets the size of the performance data buffer to zero.
... to set the size of the b
rowser's performance data buffer, use the performance.setresourcetimingbuffersize() method.
... example function load_resource() { var image = new image(); image.src = "https://developer.mozilla.org/static/img/opengraph-logo.png"; } function clear_performance_timings() { if (performance === undefined) { log("b
rowser does not support web performance"); return; } // create a resource timing performance entry by loading an image load_resource(); var supported = typeof performance.clearresourcetimings == "function"; if (supported) { console.log("run: performance.clearresourcetimings()"); performance.clearresourcetimings(); } else { console.log("performance.clearresourcetimings() no...
performance.now() - Web APIs
it's important to keep in mind that to mitigate potential security threats such as spectre, b
rowsers typically round the returned value by some amount in order to be less predictable.
... reduced time precision to offer protection against timing attacks and fingerprinting, the precision of performance.now() might get rounded depending on b
rowser settings.
... starting with firefox 79, high resolution timers can be used if you cross-origin isolate your document using the cross-origin-opener-policy and cross-origin-embedder-policy headers: cross-origin-opener-policy: same-origin cross-origin-embedder-policy: require-corp these headers ensure a top-level document does not share a b
rowsing context group with cross-origin documents.
PerformanceFrameTiming - Web APIs
performanceframetiming is an abstract interface that provides frame timing data about the b
rowser's event loop.
... a frame represents the amount of work a b
rowser does in one event loop such as processing dom events, resizing, scrolling, rendering, css animations, etc..
...this means the b
rowser should process a frame in about 16.7ms.
PerformanceNavigationTiming.type - Web APIs
the value must be one of the following: navigate navigation started by clicking a link, entering the url in the b
rowser's address bar, form submission, or initializing through a script operation other than reload and back_forward as listed below.
... reload navigation is through the b
rowser's reload operation or location.reload().
... back_forward navigation is through the b
rowser's history traversal operation.
PerformanceNavigationTiming - Web APIs
the performancenavigationtiming interface provides methods and properties to store and retrieve metrics regarding the b
rowser's document navigation events.
... the interface also supports the following properties: performancenavigationtiming.domcomplete read only a domhighrestimestamp representing a time value equal to the time immediately before the b
rowser sets the current document readiness of the current document to complete.
... performancenavigationtiming.redirectcount read only a number representing the number of redirects since the last non-redirect navigation under the current b
rowsing context.
PerformanceResourceTiming.requestStart - Web APIs
the requeststart read-only property returns a timestamp of the time immediately before the b
rowser starts requesting the resource from the server, cache, or local resource.
... if the transport connection fails and the b
rowser retires the request, the value returned will be the start of the retry request.
... syntax resource.requeststart; return value a domhighrestimestamp representing the time immediately before the b
rowser starts requesting the resource from the server example in the following example, the value of the *start and *end properties of all "resource" type events are logged.
PointerEvent - Web APIs
a pointer's hit test is the process a b
rowser uses to determine the target element for a pointer event.
... pointerevent.getpredictedevents() returns a sequence of pointerevent instances that the b
rowser predicts will follow the dispatched pointermove event's coalesced events.
... pointercancel a b
rowser fires this event if it concludes the pointer will no longer be able to generate events (for example the related device is deactived).
RTCDataChannel.maxRetransmits - Web APIs
the read-only rtcdatachannel property maxretransmits returns the maximum number of times the b
rowser should try to retransmit a message before giving up, as set when the data channel was created, or null, which indicates that there is no maximum.
... syntax var tries = adatachannel.maxretransmits; value the maximum number of times the b
rowser will try to retransmit a message before giving up, or null if not set when rtcpeerconnection.createdatachannel() was called.
... example // tbd specifications specification status comment webrtc 1.0: real-time communication between b
rowsersthe definition of 'rtcdatachannel.maxretransmits' in that specification.
RTCDataChannel.onbufferedamountlow - Web APIs
the rtcdatachannel.onbufferedamountlow property is an eventhandler which specifies a function the b
rowser calls when the bufferedamountlow event is sent to the rtcdatachannel.
... syntax rtcdatachannel.onbufferedamountlow = function; value a function which the b
rowser will call to handle the bufferedamountlow event.
...*/ dc.onbufferedamountlow = function() { if (source.position <= source.length) { dc.send(source.readfile(65536)); } } specifications specification status comment webrtc 1.0: real-time communication between b
rowsersthe definition of 'rtcdatachannel.onbufferedamountlow' in that specification.
RTCDataChannel.onclose - Web APIs
the rtcdatachannel.onclose property is an eventhandler which specifies a function to be called by the b
rowser when the close event is received by the rtcdatachannel.
... syntax rtcdatachannel.onclose = function; value a function which the b
rowser will call to handle the close event.
...*/ specifications specification status comment webrtc 1.0: real-time communication between b
rowsersthe definition of 'rtcdatachannel.onclose' in that specification.
RTCDataChannel.onclosing - Web APIs
the rtcdatachannel.onclosing property is an eventhandler which specifies a function to be called by the b
rowser when the closing event is received by the rtcdatachannel.
... syntax rtcdatachannel.onclosing = function; value a function which the b
rowser will call to handle the closing event.
... specifications specification status comment webrtc 1.0: real-time communication between b
rowsersthe definition of 'rtcdatachannel.onclosing' in that specification.
RTCDtlsTransport - Web APIs
all b
rowsers support bundling, so when both endpoints are b
rowsers, you can rest assured that bundling will be used.
... some non-b
rowser legacy endpoints, however, may not support bundle.
... specifications specification status comment webrtc 1.0: real-time communication between b
rowsersthe definition of 'rtcdtlstransport' in that specification.
RTCIceCandidateInit.usernameFragment - Web APIs
the specifics for which bits are random and what the remainder of the ufrag text are are left up to the b
rowser implementation to decide.
... for example, a b
rowser might choose to always use a 24-character ufrag in which bit 4 of each character is randomly selected between 0 and 1.
... specifications specification status comment webrtc 1.0: real-time communication between b
rowsersthe definition of 'rtcicecandidateinit.usernamefragment' in that specification.
RTCNetworkType - Web APIs
unknown the user's b
rowser is unable or unwilling to identify the underlying connection technology used by the described connection.
... this may be because the b
rowser isn't able to determine the network type for some reason or it may be intentionally getting obscured for security reasons, such as to avoid device fingerprinting.
... specifications specification status comment webrtc 1.0: real-time communication between b
rowsersthe definition of 'rtcnetworktype' in that specification.
RTCPeerConnection.getStats() - Web APIs
this form of getstats() has been or will soon be removed from most b
rowsers; you should not use it, and should update existing code to use the new promise-based version.
... check the b
rowser compatibility table to verify the state of this method.
... specifications specification status comment webrtc 1.0: real-time communication between b
rowsersthe definition of 'rtcpeerconnection.getstats()' in that specification.
RTCRtpContributingSource.source - Web APIs
specifications specification status comment webrtc 1.0: real-time communication between b
rowsersthe definition of 'source' in that specification.
... b
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/b
rowser-compat-data and send us a pull request.
RTCRtpReceiver.track - Web APIs
specifications specification status comment webrtc 1.0: real-time communication between b
rowsersthe definition of 'track' in that specification.
... b
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/b
rowser-compat-data and send us a pull request.
Using the Resource Timing API - Web APIs
transfersize[" + i + "] = not supported"); } } managing the resource buffer although the b
rowser is required to support at least 150 resource timing performance entries in its resource timing buffer, some applications may use more resources than that limit.
...the clearresourcetimings() method removes all "resource" type performance entries from the b
rowser's resource performance entry buffer.
...performance.setresourcetimingbuffersize() = not supported"); } } the performance interface has a onresourcetimingbufferfull event handler that gets called (with an event of type event.type of "resourcetimingbufferfull") when the b
rowser's resource performance entry buffer is full.
SVGAnimatedString.baseVal - Web APIs
setter th
rows domexception.
... specifications specification status comment scalable vector graphics (svg) 1.1 (second edition) recommendation scalable vector graphics (svg) 2 candidate recommendation b
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/b
rowser-compat-data and send us a pull request.
SVGAnimatedString - Web APIs
setter th
rows domexception.
... specifications specification status comment scalable vector graphics (svg) 1.1 (second edition) recommendation scalable vector graphics (svg) 2 candidate recommendation b
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/b
rowser-compat-data and send us a pull request.
Screen Capture API - Web APIs
the value is one of application, b
rowser, monitor, or window.
...the value is one of application, b
rowser, monitor, or window.
...this type is used for the displaysurface property in the constraints and settings objects, and has the possible values application, b
rowser, monitor, and window.
Selection.rangeCount - Web APIs
gecko b
rowsers allow multiple selections across table cells.
...select text in the b
rowser to see it change.
...in gecko b
rowsers, you can select multiple ranges across table cells by holding down ctrl while dragging with the mouse.
Using server-sent events - Web APIs
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 b
rowser and is set to a very low number (6).
...this limit is per b
rowser + 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).
...if this is specified, an event will be dispatched on the b
rowser to the listener for the specified event name; the website source code should use addeventlistener() to listen for named events.
Touch.clientY - Web APIs
the touch.clienty read-only property returns the y coordinate of the touch point relative to the b
rowser's viewport, not including any scroll offset.
...the touch.clientx property is the horizontal coordinate of a touch point relative to the b
rowser's viewport excluding any scroll offset.
... the touch.clienty property is the vertical coordinate of the touch point relative to the b
rowser's viewport excluding any scroll offset .
TouchEvent - Web APIs
note: the rate at which touchmove events is sent is b
rowser-specific, and may also vary depending on the capability of the user's hardware.
...there are several possible reasons why this might happen (and the exact reasons will vary from device to device, as well as b
rowser to b
rowser): an event of some kind occurred that canceled the touch; this might happen if a modal alert pops up during the interaction.
... the touch point has left the document window and moved into the b
rowser's ui area, a plug-in, or other external content.
Multi-touch interaction - Web APIs
it also calls preventdefault() to keep the b
rowser from applying further event handling (for example, mouse event emulation).
... function start_handler(ev) { // if the user makes simultaneous touches, the b
rowser will fire a // separate touchstart event for each touch point.
... function move_handler(ev) { // note: if the user makes more than one "simultaneous" touches, most b
rowsers // fire at least one touchmove event and some will fire several touchmoves.
URL - Web APIs
if a b
rowser doesn't yet support the url() constructor, you can access a url object using the window interface's window.url property.
... be sure to check to see if any of your target b
rowsers require this to be prefixed.
... static methods createobjecturl() returns a domstring containing a unique blob url, that is a url with blob: as its scheme, followed by an opaque string uniquely identifying the object in the b
rowser.
URLUtilsReadOnly.origin - Web APIs
for url using file: scheme, the value is b
rowser dependant.
... b
rowser 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/b
rowser-compat-data and send us a pull request.
WebGLRenderingContext.isContextLost() - Web APIs
examples include: two or more pages are using the gpu, but together place too high a demand on the gpu, so the b
rowser tells the two contexts that they've lost the connection, then selects one of the two to restore access for.
... another page running in the user's b
rowser performs an operation using the gpu that takes too long, causing hte b
rowser to decide to reset the gpu in order to break the stall.
... this would cause every webgl context to be lost throughout the entire b
rowser.
WebGLRenderingContext.pixelStorei() - Web APIs
glenum gl.b
rowser_default_webgl gl.b
rowser_default_webgl, gl.none webgl when using a webgl 2 context, the following values are available additionally: constant description type default value allowed values (for param) specified in gl.pack_row_length number of pixels in a row.
... glint 0 0 to infinity opengl es 3.0 gl.pack_skip_
rows number of
rows of pixel locations skipped before the first pixel is written into memory glint 0 0 to infinity opengl es 3.0 gl.unpack_row_length number of pixels in a row.
... glint 0 0 to infinity opengl es 3.0 gl.unpack_image_height image height used for reading pixel data from memory glint 0 0 to infinity opengl es 3.0 gl.unpack_skip_pixels number of pixel images skipped before the first pixel is read from memory glint 0 0 to infinity opengl es 3.0 gl.unpack_skip_
rows number of
rows of pixel locations skipped before the first pixel is read from memory glint 0 0 to infinity opengl es 3.0 gl.unpack_skip_images number of pixel images skipped before the first pixel is read from memory glint 0 0 to infinity opengl es 3.0 examples setting the pixel storage mode affects the webglrenderingcontext.readpixels() operations, as well as unpacking of textures wi...
Clearing with colors - Web APIs
--> <canvas>your b
rowser does not seem to support html5 canvas.</canvas> body { text-align : center; } canvas { display : block; width : 280px; height : 210px; margin : auto; padding : 0; border : none; background-color : black; } // run everything inside window load event handler, to make sure // dom is fully loaded and styled before trying to manipulate it, // and to not mess up the global sco...
..." + "your b
rowser or device may not support webgl."; return; } paragraph.innerhtml = "congratulations!
... your b
rowser supports webgl.
Raining rectangles - Web APIs
you missed <strong>0</strong>.</p> <canvas>your b
rowser does not seem to support html5 canvas.</canvas> body { text-align : center; } canvas { display : block; width : 280px; height : 210px; margin : auto; padding : 0; border : none; background-color : black; } button { display : block; font-size : inherit; margin : auto; padding : 0.6em; } ;(function(){ "use strict" window.addeventlistener("load", setupanimation...
...// in addition we need to remember that vertical position in // webgl increases from bottom to top, unlike in the b
rowser // window.
...h.random()]; } } function getrenderingcontext() { var canvas = document.queryselector("canvas"); canvas.width = canvas.clientwidth; canvas.height = canvas.clientheight; var gl = canvas.getcontext("webgl") || canvas.getcontext("experimental-webgl"); if (!gl) { var paragraph = document.queryselector("p"); paragraph.innerhtml = "failed to get webgl context." + "your b
rowser or device may not support webgl."; return null; } gl.viewport(0, 0, gl.drawingbufferwidth, gl.drawingbufferheight); gl.clearcolor(0.0, 0.0, 0.0, 1.0); gl.clear(gl.color_buffer_bit); return gl; } })(); the source code of this example is also available on github.
Scissor animation - Web APIs
<p>webgl animation by clearing the drawing buffer with solid color and applying scissor test.</p> <button id="animation-onoff"> press here to <strong>[verb goes here]</strong> the animation</button> <canvas>your b
rowser does not seem to support html5 canvas.</canvas> body { text-align : center; } canvas { display : block; width : 280px; height : 210px; margin : auto; padding : 0; border : none; background-color : black; } button { display : block; font-size : inherit; margin : auto; padding : 0.6em; } ;(function(){ "use strict" window.addeventlistener("load", setupanimation...
...var gl, color = getrandomcolor(), position; function setupanimation (evt) { window.removeeventlistener(evt.type, setupanimation, false); if (!(gl = getrenderingcontext())) return; gl.enable(gl.scissor_test); gl.clearcolor(color[0], color[1], color[2], 1.0); // unlike the b
rowser window, vertical position in webgl is // measured from bottom to top.
... math.random()]; } function getrenderingcontext() { var canvas = document.queryselector("canvas"); canvas.width = canvas.clientwidth; canvas.height = canvas.clientheight; var gl = canvas.getcontext("webgl") || canvas.getcontext("experimental-webgl"); if (!gl) { var paragraph = document.queryselector("p"); paragraph.innerhtml = "failed to get webgl context." + "your b
rowser or device may not support webgl."; return null; } gl.viewport(0, 0, gl.drawingbufferwidth, gl.drawingbufferheight); gl.clearcolor(0.0, 0.0, 0.0, 1.0); gl.clear(gl.color_buffer_bit); return gl; } })(); the source code of this example is also available on github.
Matrix math for the web - Web APIs
the function from above can be re-used to help out in this process: //matrixb • matrixa function multiplymatrices(matrixa, matrixb) { // slice the second matrix up into
rows let row0 = [matrixb[ 0], matrixb[ 1], matrixb[ 2], matrixb[ 3]]; let row1 = [matrixb[ 4], matrixb[ 5], matrixb[ 6], matrixb[ 7]]; let row2 = [matrixb[ 8], matrixb[ 9], matrixb[10], matrixb[11]]; let row3 = [matrixb[12], matrixb[13], matrixb[14], matrixb[15]]; // multiply each row by matrixa let result0 = multiplymatrixandpoint(matrixa, row0); let result1 = multiplymatrixandpoint(ma...
...trixa, row1); let result2 = multiplymatrixandpoint(matrixa, row2); let result3 = multiplymatrixandpoint(matrixa, row3); // turn the result
rows back into a single matrix return [ result0[0], result0[1], result0[2], result0[3], result1[0], result1[1], result1[2], result1[3], result2[0], result2[1], result2[2], result2[3], result3[0], result3[1], result3[2], result3[3] ]; } let's look at this function in action: let somematrix = [ 4, 0, 0, 0, 0, 3, 0, 0, 0, 0, 5, 0, 4, 8, 4, 1 ] let identitymatrix = [ 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1 ]; // returns a new array equivalent to somematrix let somematrixresult = multiplymatrices(identitymatrix, somematrix); important: these matrix functions are written for clarity of explanation, not for...
...bear in mind that even though the matrix is made up of 4
rows and 4 columns, it collapses into a single line of 16 values.
Getting started with WebGL - Web APIs
next » webgl enables web content to use an api based on opengl es 2.0 to perform 2d and 3d rendering in an html canvas in b
rowsers that support it without the use of plug-ins.
...your b
rowser or machine may not support it."); return; } // set clear color to black, fully opaque gl.clearcolor(0.0, 0.0, 0.0, 1.0); // clear the color buffer with specified clear color gl.clear(gl.color_buffer_bit); } window.onload = main; the first thing we do here is obtain a reference to the canvas, assigning it to a variable named canvas.
...if the b
rowser does not support webgl, getcontext() will return null in which case we display a message to the user and exit.
Lifetime of a WebRTC session - Web APIs
webrtc lets you build peer-to-peer communication of arbitrary data, audio, or video—or any combination thereof—into a b
rowser application.
... note: different b
rowsers support ice restart under different sets of conditions.
... not all b
rowsers will perform ice restart due to network congestion, for example.
The WebSocket API (WebSockets) - Web APIs
the websocket api is an advanced technology that makes it possible to open a two-way interactive communication session between the user's b
rowser and a server.
... guides writing websocket client applications writing websocket servers writing a websocket server in c# writing a websocket server in java tools humblenet: a cross-platform networking library that works in the b
rowser.
... it consists of a c wrapper around websockets and webrtc that abstracts away cross-b
rowser differences, facilitating the creation of multi-user networking functionality for games and other apps.
Advanced techniques: Creating and sequencing audio - Web APIs
creating an audio context as you should be used to by now, each web audio api app starts with an audio context: // for cross b
rowser compatibility const audiocontext = window.audiocontext || window.webkitaudiocontext; const audioctx = new audiocontext(); the "sweep" — oscillators, periodic waves, and envelopes for what we will call the "sweep" sound, that first noise you hear when you dial up, we're going to create an oscillator to generate the sound.
...a b
rowser will clamp values outside this range.
... this.dataset.playing = 'true'; } else { window.cleartimeout(timerid); this.dataset.playing = 'false'; } }) }); summary we've now got an instrument inside our b
rowser!
Attestation and Assertion - Web APIs
the attestation format contains two basic arraybuffers: clientdatajson - an arraybuffer that contains a json representation of what the b
rowser saw when being asked to authenticate.
... android safetynet -prior to android key attestation, the only option for android devices was to create android safetynet attestations fido u2f - security keys that implement the fido u2f standard use this format none - b
rowsers may prompt users whether they want a site to be allowed to see their attestation data and/or may remove attestation data from the authenticator's response if the `attestation` parameter in `navigator.credentials.create()` is set to `none` the purpose of attestation is to cryptographically prove that a newly generated key pair came from a specific device.
...an arraybuffer that contains a json representation of what the b
rowser saw when being asked to authenticate.
Window.devicePixelRatio - Web APIs
in simpler terms, this tells the b
rowser how many of the screen's actual pixels should be used to draw a single css pixel.
... working draft initial definition b
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/b
rowser-compat-data and send us a pull request.
Window.getComputedStyle() - Web APIs
th
rows typeerror if the passed object is not an element or the pseudoelt is not a valid pseudo-element selector or is ::part() or ::slotted().
...shorthand names like font will not work with most b
rowsers.
...to avoid the “css history leak” security issue, b
rowsers may lie about the computed styles for a visited link, returning values as if the user never visited the linked url.
Window.history - Web APIs
the window.history read-only property returns a reference to the history object, which provides an interface for manipulating the b
rowser session history (pages visited in the tab or frame that the current page is loaded in).
... see manipulating the b
rowser history for examples and details.
... example history.back(); // equivalent to clicking back button history.go(-1); // equivalent to history.back(); notes for top-level pages you can see the list of pages in the session history, accessible via the history object, in the b
rowser's dropdowns next to the back and forward buttons.
Window.localStorage - Web APIs
the read-only localstorage property allows you to access a storage object for the document's origin; the stored data is saved across b
rowser sessions.
...(data in a localstorage object created in a "private b
rowsing" or "incognito" session is cleared when the last "private" tab is closed.) data stored in either localstorage is specific to the protocol of the page.
...for example, the user may have their b
rowser configured to deny permission to persist data for the specified origin.
Window.name - Web APIs
gets/sets the name of the window's b
rowsing context.
... syntax string = window.name; window.name = string; example <script> // open a tab with a specific b
rowsing context name const othertab = window.open("url1", "_blank"); if (othertab) othertab.name = "other-tab"; </script> <a href="url2" target="other-tab">this link will be opened in the other tab.</a> notes the name of the window is used primarily for setting targets for hyperlinks and forms.
... b
rowsing contexts do not need to have names.
Window.navigator - Web APIs
syntax navigatorobject = window.navigator examples example #1: b
rowser detect and return a string var sb
rowser, susrag = navigator.useragent; // the order matters here, and this may report false positives for unlisted b
rowsers.
... if (susrag.indexof("firefox") > -1) { sb
rowser = "mozilla firefox"; // "mozilla/5.0 (x11; ubuntu; linux x86_64; rv:61.0) gecko/20100101 firefox/61.0" } else if (susrag.indexof("samsungb
rowser") > -1) { sb
rowser = "samsung internet"; // "mozilla/5.0 (linux; android 9; samsung sm-g955f build/ppr1.180610.011) applewebkit/537.36 (khtml, like gecko) samsungb
rowser/9.4 chrome/67.0.3396.87 mobile safari/537.36 } else if (susrag.indexof("opera") > -1 || susrag.indexof("opr") > -1) { sb
rowser = "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) { sb
rowser = "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) { sb
rowser = "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) { sb
rowser = "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) { sb
rowser = "apple safari"; // "mozilla/5.0 (iphone; cpu iphone os 11_4 like mac os x) applewebkit/605.1.15 (khtml, like gecko) version/11.0 mobile/15e148 safari/604.1 980x1306" } else { sb
rowser = "unknown"; } alert("you are using: " + sb
rowser); s...
Window.onmozbeforepaint - Web APIs
although it may still work in some b
rowsers, its use is discouraged since it could be removed at any time.
... notes this event fires immediately before the b
rowser window is repainted, if the event has been requested by one or more scripts calling window.mozrequestanimationframe().
...this time is the same for all animations being run in the same b
rowser window, including those using the window.mozrequestanimationframe() method, css transitions, and smil animations.
window.postMessage() - Web APIs
secure shared memory messaging if postmessage() th
rows when used with sharedarraybuffer objects, you might need to make sure you cross-site isolated your site properly.
...ss-origin-opener-policy: same-origin cross-origin-embedder-policy: require-corp to check if cross origin isolation has been successful, you can test against the crossoriginisolated property available to window and worker contexts: if (crossoriginisolated) { // post sharedarraybuffer } else { // do something else } see also planned changes to shared memory which is starting to roll out to b
rowsers (firefox 79, for example).
... as with any asynchronously-dispatched script (timeouts, user-generated events), it is not possible for the caller of postmessage to detect when an event handler listening for events sent by postmessage th
rows an exception.
Window.print() - Web APIs
in most b
rowsers, this method will block while the print dialog is open.
... living standard b
rowser 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/b
rowser-compat-data and send us a pull request.
window.requestIdleCallback() - Web APIs
the window.requestidlecallback() method queues a function to be called during a b
rowser's idle periods.
... b
rowser 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/b
rowser-compat-data and send us a pull request.
Window.screenX - Web APIs
the window.screenx read-only property returns the horizontal distance, in css pixels, of the left border of the user's b
rowser viewport to the left side of the screen.
... note: an alias of screenx was implemented across modern b
rowsers in more recent times — window.screenleft.
... syntax leftwindowpos = window.screenx returns a number equal to the number of css pixels from the left edge of the b
rowser viewport to the left edge of the screen.
Window.screenY - Web APIs
the window.screeny read-only property returns the vertical distance, in css pixels, of the top border of the user's b
rowser viewport to the top edge of the screen.
... note: an alias of screeny was implemented across modern b
rowsers in more recent times — window.screentop.
... syntax topwindowpos = window.screeny returns a number equal to the number of css pixels from the top edge of the b
rowser viewport to the top edge of the screen.
Window.stop() - Web APIs
the window.stop() stops further resource loading in the current b
rowsing context, equivalent to the stop button in the b
rowser.
... recommendation b
rowser 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/b
rowser-compat-data and send us a pull request.
WindowEventHandlers.onbeforeunload - Web APIs
note: to combat unwanted pop-ups, some b
rowsers don't display prompts created in beforeunload event handlers unless the page has been interacted with.
... window.addeventlistener('beforeunload', function (e) { // cancel the event e.preventdefault(); // if you prevent default behavior in mozilla firefox prompt will always be shown // chrome requires returnvalue to be set e.returnvalue = ''; }); guarantee the b
rowser unload by removing the returnvalue property of the event window.addeventlistener('beforeunload', function (e) { // the absence of a returnvalue property on the event will guarantee the b
rowser unload happens delete e['returnvalue']; }); notes when your page uses javascript to render content, the javascript may stop when leaving and then navigating back to the page.
... you can bind to window.onbeforeunload to prevent the b
rowser from fully caching the page.
XMLHttpRequest - Web APIs
event handlers onreadystatechange as a property of the xmlhttprequest instance is supported in all b
rowsers.
... since then, a number of additional event handlers have been implemented in various b
rowsers (onload, onerror, onprogress, etc.).
... more recent b
rowsers, including firefox, also support listening to the xmlhttprequest events via standard addeventlistener() apis in addition to setting on* properties to a handler function.
Using the link role - Accessibility
this technique demonstrates how to use the link role and describes the effect it has on b
rowsers and assistive technology.
... opening a page using the open() method counts as being a popup, and certain b
rowsers may issue a warning when you try to activate it, or make you explicitly agree to allowing popups form the domain it exists on.
...e.target : e.srcelement; if (ref) { window.open(ref.getattribute('data-href'), '_blank'); } } } spanelem.addeventlistener('click', navigatelink); spanelem.addeventlistener('keydown', navigatelink); result notes if pressing the link triggers an action but does not change b
rowser focus or navigate to a new page, you might wish to consider using the button role instead of the link role.
::-webkit-scrollbar - CSS: Cascading Style Sheets
::-webkit-scrollbar is only available in blink- and webkit-based b
rowsers (e.g., chrome, edge, opera, safari, all b
rowsers on ios, and others).
... css scrollbar selectors you can use the following pseudo elements to customize various parts of the scrollbar for webkit b
rowsers: ::-webkit-scrollbar — the entire scrollbar.
... ::-webkit-scrollbar-button — the buttons on the scrollbar (ar
rows pointing upwards and downwards).
:defined - CSS: Cascading Style Sheets
this includes any standard element built in to the b
rowser, and custom elements that have been successfully defined (i.e.
... living standard b
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/b
rowser-compat-data and send us a pull request.
:empty - CSS: Cascading Style Sheets
note: in selectors level 4 the :empty pseudo-class was changed to act like :-moz-only-whitespace, but no b
rowser currently supports this yet.
...--></div> <div class="box">i will be pink.</div> <div class="box"> <!-- i will be pink in older b
rowsers because of the whitespace around this comment.
... --> </div> <div class="box"> <p><!-- i will be pink in all b
rowsers because of the non-collapsible whitespace and elements around this comment.
@charset - CSS: Cascading Style Sheets
as there are several ways to define the character encoding of a style sheet, the b
rowser will try the following methods in the following order (and stop as soon as one yields a result) : the value of the unicode byte-order character placed at the beginning of the file.
... recommendation initial definition b
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/b
rowser-compat-data and send us a pull request.
-webkit-transform-2d - CSS: Cascading Style Sheets
syntax -webkit-transform-2d is a boolean css media feature whose value is true if the b
rowser supports -webkit prefixed css 2d transforms.
... values true the b
rowser supports the 2d css transforms with the -webkit prefix.
... false the 2d css transforms prefixed with -webkit are not supported by the b
rowser.
-webkit-transform-3d - CSS: Cascading Style Sheets
syntax -webkit-transform-3d is a boolean css media feature whose value is true if the b
rowser supports -webkit prefixed css 3d transforms.
... values true the b
rowser supports the 3d css transforms with the -webkit prefix.
... false the 3d css transforms prefixed with -webkit are not supported by the b
rowser.
-webkit-transition - CSS: Cascading Style Sheets
the -webkit-transition boolean css media feature is a chrome extension whose value is true if the b
rowsing context supports css transitions.
... it was never supported in b
rowsers not based on webkit or blink.
... note: you should not use this media feature; it was never specified, has never been widely implemented, and has been removed from all b
rowsers.
display-mode - CSS: Cascading Style Sheets
both apply to the top-level b
rowsing context and any child b
rowsing contexts.
...the elements will vary by b
rowser.
... b
rowser b
rowser the application opens in a conventional b
rowser tab or new window, depending on the b
rowser and platform.
@media - CSS: Cascading Style Sheets
both em and px are valid units, but em works better if the user changes the b
rowser text size.
... because of this potential, a b
rowser may opt to fudge the returned values in some manner in order to prevent them from being used to precisely identify a computer.
... a b
rowser might also offer additional measures in this area; for example, if firefox's "resist fingerprinting" setting is enabled, many media queries report default values rather than values representing the actual device state.
Handling content breaks in multicol - CSS: Cascading Style Sheets
to some extent your use of fragmentation is always a suggestion to the b
rowser, to control breaks in this way if it is possible.
... in addition to the above, b
rowser support for these properties is a little patchy.
... the compatibility data charts on the individual property pages here on mdn can help you see which b
rowsers support which features.
Spanning and Balancing Columns - CSS: Cascading Style Sheets
note the spanning and balancing functionality covered in this guide is not as well supported across b
rowsers as the functionality covered in the previous two sections in this guide.
... note that column balancing is not supported by all b
rowsers.
... check that you are getting the sort of effect that you expect in the b
rowsers you support.
Basic concepts of flexbox - CSS: Cascading Style Sheets
this can be contrasted with the two-dimensional model of css grid layout, which controls columns and
rows together.
... if your main axis is column or column-reverse then the cross axis runs along the
rows.
...the initial value of this property is auto — in this case the b
rowser looks to see if the items have a size.
Mastering Wrapping of Flex Items - CSS: Cascading Style Sheets
there is however the ability to wrap flex items onto new lines, creating new
rows if flex-direction is row and new columns if flex-direction is column.
...so the b
rowser needs to re-do the wrapping behaviour to account for the new space that the collapsed item has left in the inline direction.
... if this causes a problem for your layout it may require a rethinking of the structure, for example putting each row into a separate flex container in order that they can’t shift
rows.
CSS Grid Layout and Accessibility - CSS: Cascading Style Sheets
in the introduction to that section are details of what the specification expects b
rowsers to do when the content is visually reordered using grid layout.
... * {box-sizing: border-box;} .wrapper { border: 2px solid #f76707; border-radius: 5px; background-color: #fff4e6; } .wrapper > div { border: 2px solid #ffa94d; border-radius: 5px; background-color: #ffd8a8; padding: 1em; color: #d9480f; } .wrapper { display: grid; grid-template-columns: repeat(3, 1fr); grid-auto-
rows: 100px; } .box1 { grid-column: 1; grid-row: 2; } <div class="wrapper"> <div class="box box1"><a href="">one</a></div> <div class="box box2"><a href="">two</a></div> <div class="box box3"><a href="">three</a></div> <div class="box box4"><a href="">four</a></div> <div class="box box5"><a href="">five</a></div> </div> the specification says that in this scenario, if box 1 reall...
...adrian roselli has also posted regarding tab order in various b
rowsers – although this was prior to grid support being fully implemented in firefox.
Realizing common layouts using CSS Grid Layout - CSS: Cascading Style Sheets
i have not defined any column or row tracks but this layout dictates a single column, and
rows will be created as needed for each of the items in the implicit grid.
...you could always begin to use grid in this way for prototyping, even if you can’t rely on it fully in production due to the b
rowsers that visit your site.
...with css grid layout, we can place things into
rows, with no danger of them rising up into the row above if it is left empty.
Basic concepts of Logical Properties and Values - CSS: Cascading Style Sheets
the below diagram shows the inline and block directions in a horizontal writing mode: this diagram shows block and inline in a vertical writing mode: b
rowser support logical properties and values can be thought of as a couple of groups in terms of current b
rowser support.
...these mapped properties are starting to see good b
rowser support, and if you look at the individual pages for the properties in the reference here on mdn you will see that edge is the only modern b
rowser currently missing these.
... testing for b
rowser support you can test for support of logical properties and values using feature queries.
Using CSS transitions - CSS: Cascading Style Sheets
animations that involve transitioning between two states are often called implicit transitions as the states in between the start and final states are implicitly defined by the b
rowser.
...using animations with auto may lead to unpredictable results, depending on the b
rowser and its version, and should be avoided.
... before we look at code snippets, you might want to take a look at the live demo (assuming your b
rowser supports transitions).
Questions about CSS - CSS: Cascading Style Sheets
css gives more control over the appearance of a web page to the page creator than to the b
rowser designer or the viewer.
... an imported style sheet, using the css @import notation to automatically import and merge an external style sheet with the current style sheet style attributes specified by the viewer to the b
rowser the default style sheet assumed by the b
rowser in general, the web page creator's style sheet takes precedence, but it's recommended that b
rowsers provide ways for the viewer to override the style attributes in some respects.
... since it's likely that different b
rowsers will choose to implement css1 somewhat differently, the web page creator must test the page with different b
rowsers.
Card - CSS: Cascading Style Sheets
when setting up the single column grid i use the following: .card { display: grid; grid-template-
rows: max-content 200px 1fr; } the heading track is set to max-content, which prevents it from stretching.
... if the track does have a footer it will be auto-sized, as
rows created in the implicit grid are auto-sized by default.
... for the overall layout you could use flexbox, however this will result in cards stretching over the final flex row where there are fewer than can fit in the
rows above.
Sticky footers - CSS: Cascading Style Sheets
we then create a single column grid layout with three
rows, one row for each part of our layout.
...the 1fr track will take up all available space and so g
rows to fill the gap.
... alternate method if you need compatibility with b
rowsers that do not support grid layout you can also use flexbox to create a sticky footer.
Privacy and the :visited selector - CSS: Cascading Style Sheets
before about 2010, the css :visited selector allowed websites to uncover a user's b
rowsing history and figure out what sites the user had visited.
... to mitigate this problem, b
rowsers have limited the amount of information that can be obtained from visited links.
... little white lies to preserve users' privacy, firefox and other b
rowsers will lie to web applications under certain circumstances: the window.getcomputedstyle method, and similar functions such as element.queryselector, will always return values indicating that a user has never visited any of the links on a page.
background-position-x - CSS: Cascading Style Sheets
(some b
rowsers allow assigning the right edge for offset).
... b
rowser 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/b
rowser-compat-data and send us a pull request.
background-position-y - CSS: Cascading Style Sheets
(some b
rowsers allow assigning the bottom edge for offset).
... b
rowser 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/b
rowser-compat-data and send us a pull request.
box-flex - CSS: Cascading Style Sheets
the -moz-box-flex and -webkit-box-flex css properties specify how a -moz-box or -webkit-box g
rows to fill the box that contains it, in the direction of the containing box's layout.
...if it is greater than 0, the box g
rows to fill a proportion of the available space.
... if only one content element has nonzero flex, then it g
rows to fill the available space.
column-gap (grid-column-gap) - CSS: Cascading Style Sheets
however, in order to support b
rowsers that implemented grid-column-gap and not column-gap for grid, you will need to use the prefixed property.
... values normal the b
rowser's default spacing is used between columns.
... css #flexbox { display: flex; height: 100px; column-gap: 20px; } #flexbox > div { border: 1px solid green; background-color: lime; flex: auto; } result grid layout html <div id="grid"> <div></div> <div></div> <div></div> </div> css #grid { grid-column-gap: 20px; } #grid { display: grid; height: 100px; grid-template-columns: repeat(3, 1fr); grid-template-
rows: 100px; column-gap: 20px; } #grid > div { border: 1px solid green; background-color: lime; } result multi-column layout html <p class="content-box"> this is some multi-column text with a 40px column gap created with the css `column-gap` property.
contain - CSS: Cascading Style Sheets
this allows the b
rowser to recalculate layout, style, paint, size, or any combination of them for a limited area of the dom and not the entire page, leading to obvious performance benefits.
...if the containing box is offscreen, the b
rowser does not need to paint its contained elements — these must also be offscreen as they are contained completely by that box.
...graphic.jpg" alt="photo"> <p>more content here.</p> </article> img { float: left; border: 3px solid black; } article { border: 1px solid black; } as you can see, because of the way floats work, the first image ends up inside the area of the second article: fixing with contain if we give each article the contain property with a value of content, when new elements are inserted the b
rowser understands it only needs to recalculate the containing element's subtree, and not anything outside it: <h1>my blog</h1> <article> <h2>heading of a nice article</h2> <p>content here.</p> <img src="i-just-showed-up.jpg" alt="social"> </article> <article> <h2>another heading of another article</h2> <img src="graphic.jpg" alt="photo"> <p>more content here.</p> </article> img { fl...
cross-fade() - CSS: Cascading Style Sheets
the original syntax, which has been implemented in some b
rowsers, 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 b
rowsers.
... accessibility concerns b
rowsers do not provide any special information on background images to assistive technology.
direction - CSS: Cascading Style Sheets
unlike the dir attribute in html, the direction property is not inherited from table columns into table cells, since css inheritance follows the document tree, and table cells are inside of
rows but not inside of columns.
... b
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/b
rowser-compat-data and send us a pull request.
Adapting to the new two-value syntax of display - CSS: Cascading Style Sheets
ed then the specification explains that the outer value should be set to block: "if a <display-inside> value is specified but <display-outside> is omitted, the element’s outer display type defaults to block—except for ruby, which defaults to inline." finally, we have some legacy pre-composed inline-level values of: inline-block inline-table inline-flex inline-grid if a supporting b
rowser comes across these as single values then it treats them the same as the two-value versions: inline flow-root inline table inline flex inline grid so all of the current situations are neatly covered, meaning that we maintain compatibility of existing and new sites that use the single values, while allowing the spec to evolve.
...other b
rowsers do not yet implement the two-value versions.
...if you'd like to contribute to the data, please check out https://github.com/mdn/b
rowser-compat-data and send us a pull request.
<display-box> - CSS: Cascading Style Sheets
due to a bug in b
rowsers this will currently remove the element from the accessibility tree — screen readers will not look at what's inside.
... accessibility concerns current implementations in most b
rowsers will remove from the accessibility tree any element with a display value of contents.
... this will cause the element — and in some b
rowser versions, its descendant elements — to no longer be announced by screen reading technology.
element() - CSS: Cascading Style Sheets
on gecko b
rowsers, you can use the non-standard document.mozsetimageelement() method to change the element being used as the background for a given css background element.
... b
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/b
rowser-compat-data and send us a pull request.
env() - CSS: Cascading Style Sheets
to tell the b
rowser to use the whole available space on the screen, and so enabling us to use the env() variables, we need to add a new viewport meta value: <meta name="viewport" content="viewport-fit=cover" /> body { padding: env(safe-area-inset-top, 20px) env(safe-area-inset-right, 20px) env(safe-area-inset-bottom, 20px) env(safe-area-inset-left, 20px); } in addition, unlike custom propertie...
... originally provided by the ios b
rowser to allow developers to place their content in a safe area of the viewport, the safe-area-inset-* values defined in the specification can be used to help ensure content is visible even to viewers using non‑rectangular displays.
... <p> if the <code>env()</code> function is supported in your b
rowser, this paragraph’s text will have 50px of padding between it and the left border — but not the top, right and bottom.
filter - CSS: Cascading Style Sheets
this function is similar to the more established box-shadow property; the difference is that with filters, some b
rowsers provide hardware acceleration for better performance.
...if not specified, the color used depends on the b
rowser - it is usually the value of the <color> property, but note that safari currently paints a transparent shadow in this case.
...this function is similar to the more established opacity property; the difference is that with filters, some b
rowsers provide hardware acceleration for better performance.
font-language-override - CSS: Cascading Style Sheets
/* keyword value */ font-language-override: normal; /* <string> values */ font-language-override: "eng"; /* use english glyphs */ font-language-override: "trk"; /* use turkish glyphs */ /* global values */ font-language-override: initial; font-language-override: inherit; font-language-override: unset; by default, html's lang attribute tells b
rowsers to display glyphs designed specifically for that language.
... values normal tells the b
rowser to use font glyphs that are appropriate for the language specified by the lang attribute.
... <string> tells the b
rowser to use font glyphs that are appropriate for the language specified by the string.
font-stretch - CSS: Cascading Style Sheets
however, note that the <percentage> syntax is not yet supported by all b
rowsers: check the b
rowser compatibility table for details.
...st-letter and ::first-line.inheritedyescomputed valueas specifiedanimation typea font stretch formal syntax <font-stretch-absolute>where <font-stretch-absolute> = normal | ultra-condensed | extra-condensed | condensed | semi-condensed | semi-expanded | expanded | extra-expanded | ultra-expanded | <percentage> examples setting font stretch percentages note that this example will only work in b
rowsers that support <percentage> values.
... note: the font-stretch property was initially defined in css 2, but dropped in css 2.1 due to the lack of b
rowser implementation.
font-variant-caps - CSS: Cascading Style Sheets
if these are not present, the b
rowser synthesizes them from the uppercase glyphs.
... candidate recommendation initial definition b
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/b
rowser-compat-data and send us a pull request.
<integer> - CSS: Cascading Style Sheets
opera 12.1 supports values up to 215-1, ie up to 220-1, and other b
rowsers even higher.
... b
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/b
rowser-compat-data and send us a pull request.
margin - CSS: Cascading Style Sheets
auto the b
rowser selects a suitable margin to use.
...: 30px margin */ /* left: 5px margin */ margin: 2em auto; /* top and bottom: 2em margin */ /* box is horizontally centered */ margin: auto; /* top and bottom: 0 margin */ /* box is horizontally centered */ notes horizontal centering to center something horizontally in modern b
rowsers, you can use display: flex; justify-content: center; .
... however, in older b
rowsers like ie8-9 that do not support flexible box layout, these are not available.
max-height - CSS: Cascading Style Sheets
auto the b
rowser will calculate and select a max-height for the specified element.
... b
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/b
rowser-compat-data and send us a pull request.
outline-width - CSS: Cascading Style Sheets
typically equivalent to 1px in desktop b
rowsers (including firefox).
...typically equivalent to 3px in desktop b
rowsers (including firefox).
...typically equivalent to 5px in desktop b
rowsers (including firefox).
outline - CSS: Cascading Style Sheets
a notable exception is input elements, which are given default styling by b
rowsers.
... accessibility concerns assigning outline a value of 0 or none will remove the b
rowser's default focus style.
... how to design useful and usable focus indicators wcag 2.1: understanding success criterion 2.4.7: focus visible formal definition initial valueas each of the properties of the shorthand:outline-color: invert, for b
rowsers supporting it, currentcolor for the otheroutline-style: noneoutline-width: mediumapplies toall elementsinheritednocomputed valueas each of the properties of the shorthand:outline-color: for the keyword invert, the computed value is invert.
overflow-block - CSS: Cascading Style Sheets
b
rowsers display scrollbars whether or not any content is actually clipped.
...desktop b
rowsers provide scrollbars if content overflows.
... </div> </li> <li><code>overflow-block:auto</code> — on most b
rowser, equivalent to <code>scroll</code> <div id="div4"> lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
overflow-inline - CSS: Cascading Style Sheets
b
rowsers display scrollbars whether or not any content is actually clipped.
...desktop b
rowsers provide scrollbars if content overflows.
...ode>overflow-inline:scroll</code> — always adds a scrollbar <div id="div2"> abcdefghijklmopqrstuvwxyzabcdefghijklmopqrstuvwxyz </div> </li> <li><code>overflow-inline:visible</code> — displays the text outside the box if needed <div id="div3"> abcdefghijklmopqrstuvwxyzabcdefghijklmopqrstuvwxyz </div> </li> <li><code>overflow-inline:auto</code> — on most b
rowsers, equivalent to <code>scroll</code> <div id="div4"> abcdefghijklmopqrstuvwxyzabcdefghijklmopqrstuvwxyz </div> </li> </ul> css #div1, #div2, #div3, #div4 { border: 1px solid black; width: 250px; margin-bottom: 12px; } #div1 { overflow-inline: hidden;} #div2 { overflow-inline: scroll;} #div3 { overflow-inline: visible;} #div4 { overflow-inline: auto;} result spec...
overflow-x - CSS: Cascading Style Sheets
b
rowsers display scrollbars whether or not any content is actually clipped.
...desktop b
rowsers provide scrollbars if content overflows.
...</li> <li><code>overflow-x:scroll</code> — always adds a scrollbar <div id="div2"> abcdefghijklmopqrstuvwxyzabcdefghijklmopqrstuvwxyz </div> </li> <li><code>overflow-x:visible</code> — displays the text outside the box if needed <div id="div3"> abcdefghijklmopqrstuvwxyzabcdefghijklmopqrstuvwxyz </div> </li> <li><code>overflow-x:auto</code> — on most b
rowsers, equivalent to <code>scroll</code> <div id="div4"> abcdefghijklmopqrstuvwxyzabcdefghijklmopqrstuvwxyz </div> </li> </ul> css #div1, #div2, #div3, #div4 { border: 1px solid black; width: 250px; margin-bottom: 12px; } #div1 { overflow-x: hidden;} #div2 { overflow-x: scroll;} #div3 { overflow-x: visible;} #div4 { overflow-x: auto;} result specifications ...
overflow-y - CSS: Cascading Style Sheets
b
rowsers display scrollbars whether or not any content is actually clipped.
...desktop b
rowsers provide scrollbars if content overflows.
... </div> </li> <li><code>overflow-y:auto</code> — on most b
rowser, equivalent to <code>scroll</code> <div id="div4"> lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
overflow - CSS: Cascading Style Sheets
b
rowsers always display scrollbars whether or not any content is actually clipped, preventing scrollbars from appearing or disappearing as content changes.
...desktop b
rowsers provide scrollbars if content overflows.
...only supported in webkit-based (e.g., safari) and blink-based (e.g., chrome or opera) b
rowsers.
overscroll-behavior - CSS: Cascading Style Sheets
the overscroll-behavior css property sets what a b
rowser does when reaching the boundary of a scrolling area.
... /* keyword values */ overscroll-behavior: auto; /* default */ overscroll-behavior: contain; overscroll-behavior: none; /* two values */ overscroll-behavior: auto contain; /* global values */ overscroll-behavior: inherit; overscroll-behavior: initial; overscroll-behavior: unset; by default, mobile b
rowsers tend to provide a "bounce" effect or even a page refresh when the top or bottom of a page (or other scroll area) is reached.
...you can use overscroll-behavior to get rid of unwanted scroll chaining and the b
rowser's facebook/twitter app-inspired "pull to refresh"-type behavior.
repeat() - CSS: Cascading Style Sheets
the repeat() css function represents a repeated fragment of the track list, allowing a large number of columns or
rows that exhibit a recurring pattern to be written in a more compact form.
... this function can be used in the css grid properties grid-template-columns and grid-template-
rows.
...treating each track as its maximal track sizing function (each independant value used to define grid-template-
rows or grid-template-columns), if that is definite.
revert - CSS: Cascading Style Sheets
the only difference is for properties that have values set by the b
rowser or by custom stylesheets created by users (set on the b
rowser side).
...revert will revert to bold because this is a default value for headers in most b
rowsers.
... h3 { font-weight: normal; color: blue; border-bottom: 1px solid grey; } <h3>this will have custom styles</h3> <p>just some text</p> <h3 style="all: revert">this should be reverted to b
rowser/user defaults</h3> <p>just some text</p> revert on a parent reverting effectively removes the value for the element you select with some rule and only for that element.
table-layout - CSS: Cascading Style Sheets
the table-layout css property sets the algorithm used to lay out <table> cells,
rows, and columns.
... syntax /* keyword values */ table-layout: auto; table-layout: fixed; /* global values */ table-layout: inherit; table-layout: initial; table-layout: unset; values auto by default, most b
rowsers use an automatic table layout algorithm.
...cells in subsequent
rows do not affect column widths.
text-overflow - CSS: Cascading Style Sheets
to clip at the transition between characters you can specify text-overflow as an empty string, if that is supported in your target b
rowsers: text-overflow: '';.
...llipsis | <string> ]{1,2} examples css p { width: 200px; border: 1px solid; padding: 2px 5px; /* both of the following are required for text-overflow */ white-space: nowrap; overflow: hidden; } .overflow-visible { white-space: initial; } .overflow-clip { text-overflow: clip; } .overflow-ellipsis { text-overflow: ellipsis; } .overflow-string { /* not supported in most b
rowsers, see the 'b
rowser compatibility' section below */ text-overflow: " [..]"; } html <p class="overflow-visible">lorem ipsum dolor sit amet, consectetur adipisicing elit.</p> <p class="overflow-clip">lorem ipsum dolor sit amet, consectetur adipisicing elit.</p> <p class="overflow-ellipsis">lorem ipsum dolor sit amet, consectetur adipisicing elit.</p> <p class="overflow-string">lorem ipsu...
...as some not-listed-at-risk features needed to be removed, the spec was demoted to the working draft level, explaining why b
rowsers implemented this property unprefixed, though not at the cr state.
Getting Started - Developer guides
then, mozilla, safari, and other b
rowsers followed, implementing an xmlhttprequest object that supported the methods and properties of microsoft's original activex object.
...keep the method all-capitals as per the http standard, otherwise some b
rowsers (like firefox) might not process the request.
... note 2: if you do not set header cache-control: no-cache the b
rowser will cache the response and never re-submit the request, making debugging challenging.
Block formatting context - Developer guides
anonymous table cells implicitly created by the elements with display: table, table-row, table-row-group, table-header-group, table-footer-group (which is the default for html tables, table
rows, table bodies, table headers, and table footers, respectively), or inline-table.
... the problem with using overflow to create a new bfc is that the overflow property is meant for telling the b
rowser how you want to deal with overflowing content.
... the value name of flow-root makes sense when you understand you are creating something that acts like the root element (<html> element in b
rowser) in terms of how it creates a new context for the flow layout inside it.
Challenge solutions - Developer guides
solution one way to do this is to put comment delimiters around the rule for .carrot: /* .carrot { color: orange; } */ text styles big initial letters challenge without changing anything else, make all six initial letters twice the size in the b
rowser's default serif font.
...then refresh your b
rowser to see if you were correct.
... solution move the position of the :hover pseudo-class from a specific petal, to all petals #inner-petals { --segment-fill-fill-hover: pink; } /* non-standard way for some older b
rowsers */ #inner-petals:hover .segment-fill { fill: pink; stroke: none; } ...
Mouse gesture events - Developer guides
note: these gesture events are available to add-ons and other b
rowser chrome code, but are never sent to regular web page content.
... note: this event is sent whenever the movement of the user's fingers exceeds the number of pixels indicated by the b
rowser.gesture.pinch.threshold preference.
... note: this event is sent whenever the movement of the user's fingers exceeds the number of pixels indicated by the b
rowser.gesture.pinch.threshold preference.
Constraint validation - Developer guides
even though far fewer invalid form requests are to be expected, invalid ones can still be sent by non-compliant b
rowsers (for instance, b
rowsers without html5 and without javascript) or by bad people trying to trick your web application.
... here is the html part: <label for="fs">select a file smaller than 75 kb : </label> <input type="file" id="fs"> this displays: the javascript reads the file selected, uses the file.size() method to get its size, compares it to the (hard coded) limit, and calls the constraint api to inform the b
rowser if there is a violation: function checkfilesize() { var fs = document.getelementbyid("fs"); var files = fs.files; // if there is (at least) one file selected if (files.length > 0) { if (files[0].size > 75 * 1024) { // check the constraint fs.setcustomvalidity("the selected file must not be larger than 75 kb"); return; } } // no custom constraint violation ...
...note: setting a custom validity message on fieldset elements will not prevent form submission in most b
rowsers.
Separate sites for mobile and desktop - Developer guides
in a nutshell, this technique uses server-side logic to solve all three goals of mobile web development at once — if the user’s b
rowser looks like it’s on a phone, you serve them mobile content, formatted for their phone and optimized for speed.
...every time a new b
rowser comes out, you must adjust your algorithm to accommodate it.
...this is because the default b
rowsers on some feature-phones do not support the same markup that you would use to code a website targeted at the desktop, but instead understand formats like xhtml-mp or the older wml.
User input and controls - Developer guides
implement controls pointer lock in some cases, typically game development, you might need to access mouse events even when the cursor goes past the boundary of the b
rowser or screen: the pointer_lock_api gives you full control of the pointing device.
...bear in mind that many b
rowsers still implement this with a vendor prefix, so you will probably need to fork your code something like this: var elem = document.getelementbyid("myvideo"); if (elem.requestfullscreen) { elem.requestfullscreen(); } else if (elem.msrequestfullscreen) { elem.msrequestfullscreen(); } else if (elem.mozrequestfullscreen) { elem.mozrequestfullscreen(); } else if (elem.webkitrequestfullscreen) {...
...it will only work on a b
rowser that supports touch events.
DASH Adaptive Streaming for HTML 5 Video - HTML: Hypertext Markup Language
b
rowser support firefox 21 includes an implementation of dash for html5 webm video which is turned off by default.
... using dash - client side you'll want to modify your web page to point to the dash manifest first, instead of directly to a particular video file: <video> <source src="movie.mpd"> <source src="movie.webm"> your b
rowser does not support the video tag.
...if dash is supported by the b
rowser, your video will now stream adaptively.
<abbr>: The Abbreviation element - HTML: Hypertext Markup Language
this text is often presented by b
rowsers as a tooltip when the mouse cursor is hovered over the element.
... default styling the purpose of this element is purely for the convenience of the author and all b
rowsers display it inline (display: inline) by default, though its default styling varies from one b
rowser to another: some b
rowsers, like internet explorer, do not style it differently than a <span> element.
... a few b
rowsers 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.
<dl>: The Description List element - HTML: Hypertext Markup Language
examples single term and description <dl> <dt>firefox</dt> <dd> a free, open source, cross-platform, graphical web b
rowser developed by the mozilla corporation and hundreds of volunteers.
... </dd> <!-- other terms and descriptions --> </dl> multiple terms, single description <dl> <dt>firefox</dt> <dt>mozilla firefox</dt> <dt>fx</dt> <dd> a free, open source, cross-platform, graphical web b
rowser developed by the mozilla corporation and hundreds of volunteers.
... </dd> <!-- other terms and descriptions --> </dl> single term, multiple descriptions <dl> <dt>firefox</dt> <dd> a free, open source, cross-platform, graphical web b
rowser developed by the mozilla corporation and hundreds of volunteers.
<keygen> - HTML: Hypertext Markup Language
(note that only a subset of the curves named there may actually be supported in any particular b
rowser.) if the keyparams parameter string is not a recognized curve name string, then a curve is chosen according to the user's chosen key strength (low, medium, high), using the curve named "secp384r1" for high, and the curve named "secp256r1" for medium keys.
...the b
rowser presents several possible key strengths.
...if the user's b
rowser is configured to support cryptographic hardware (e.g.
<listing> - HTML: Hypertext Markup Language
it is deprecated since html 3.2 and was neither implemented by all b
rowsers, nor in a consistent way.
... b
rowser 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/b
rowser-compat-data and send us a pull request.
<noembed>: The Embed Fallback element (Obsolete) - HTML: Hypertext Markup Language
the <noembed> element is an obsolete, non-standard way to provide alternative, or "fallback", content for b
rowsers that do not support the <embed> element or do not support the type of embedded content an author wishes to use.
... while this element currently still works in many b
rowsers, it is obsolete and should not be used.
... examples the message inside <noembed> tag will appear only when your b
rowser does not support <embed> tag.
<object> - HTML: Hypertext Markup Language
the html <object> element represents an external resource, which can be treated as an image, a nested b
rowsing context, or a resource to be handled by a plugin.
...no percentages) name the name of valid b
rowsing context (html5), or the name of the control (html 4).
... standbyhtml 4 onlyobsolete since html5 a message that the b
rowser can show while loading the object's implementation and data.
<q>: The Inline Quotation element - HTML: Hypertext Markup Language
most modern b
rowsers implement this by surrounding the text in quotation marks.
... implicit aria role no corresponding role permitted aria roles any dom interface htmlquoteelement usage note: most modern b
rowsers will automatically add quotation marks around text inside a <q> element.
... a style rule may be needed to add quotation marks in older b
rowsers.
spellcheck - HTML: Hypertext Markup Language
if this attribute is not set, its default value is element-type and b
rowser-defined.
... this attribute is merely a hint for the b
rowser: b
rowsers are not required to check for spelling errors.
... typically non-editable elements are not checked for spelling errors, even if the spellcheck attribute is set to true and the b
rowser supports spellchecking.
HTML: Hypertext Markup Language
html uses "markup" to annotate text, images, and other content for display in a web b
rowser.
... preloading content with rel="preload" the preload value of the <link> element's rel attribute allows you to write declarative fetch requests in your html <head>, specifying resources that your pages will need very soon after loading, which you therefore want to start preloading early in the lifecycle of a page load, before the b
rowser's main rendering machinery kicks in.
... html element reference b
rowse a list of all html elements.
HTTP authentication - HTTP
authentication of cross-origin images a potential security hole recently been fixed by b
rowsers is authentication of cross-site images.
... character encoding of http authentication b
rowsers use utf-8 encoding for usernames and passwords.
... firefox once used iso-8859-1, but changed to utf-8 for parity with other b
rowsers and to avoid potential problems as described in bug 1419658.
Choosing between www and non-www URLs - HTTP
this will redirect the b
rowser trying to access the non-canonical urls to their canonical equivalent.
...in the previous example, http://www.example.org/whaddup would serve the same content as http://example.org/whaddup, but with an additional <link> element in the head: <link href="http://example.org/whaddup" rel="canonical"> unlike the previous case, b
rowser history will consider non-www and www urls as independent entries.
...it is good advice to do this since you can't predict which url users will type in their b
rowser's url bar.
Basics of HTTP - HTTP
resource urls resource urls, those prefixed with the resource scheme are used by firefox and firefox b
rowser extensions to load resources internally, but is also available to some sites the b
rowser connects to as well.
... flow of an http session this fundamental article describes a typical http session: what happens under the hood when you click on a link in your b
rowser.
... content negotiation http introduces a set of headers, starting with accept as a way for a b
rowser to announce the format, language, or encoding it prefers.
Cross-Origin Resource Policy (CORP) - HTTP
as this policy is expressed via a response header, the actual request is not prevented—rather, the b
rowser prevents the result from being leaked by stripping the response body.
... cross-origin resource policy is an opt-in response header which can protect any resource; there is no need for b
rowsers to sniff mime types.
... cross-origin-resource-policy: same-site | same-origin | cross-origin during a cross-origin resource policy check, if the header is set, the b
rowser will deny no-cors requests issued from a different origin/site.
Access-Control-Allow-Origin - HTTP
header type response header forbidden header name no syntax access-control-allow-origin: * access-control-allow-origin: <origin> access-control-allow-origin: null directives * for requests without credentials, the literal value "*" can be specified, as a wildcard; the value tells b
rowsers to allow requesting code from any origin to access the resource.
...the "null" value for the acao header should therefore be avoided." examples a response that tells the b
rowser to allow code from any origin to access a resource will include the following: access-control-allow-origin: * a response that tells the b
rowser to allow requesting code from the origin https://developer.mozilla.org to access a resource will include the following: access-control-allow-origin: https://developer.mozilla.org limiting the possible access-control-allow-origin values to a set of a...
... cors and caching if the server sends a response with an access-control-allow-origin value that is an explicit origin (rather than the "*" wildcard), then the response should also include a vary response header with the value origin — to indicate to b
rowsers that server responses can differ based on the value of the origin request header.
CSP: child-src - HTTP
the http content-security-policy (csp) child-src directive defines the valid sources for web workers and nested b
rowsing contexts loaded using elements such as <frame> and <iframe>.
...some b
rowsers specifically exclude blob and filesystem from source directives.
...specifying nonce makes a modern b
rowser ignore 'unsafe-inline' which could still be set for older b
rowsers without nonce support.
CSP: connect-src - HTTP
note: connect-src 'self' does not resolve to websocket schemas in all b
rowsers, more info: https://github.com/w3c/webappsec-csp/issues/7 csp version 1 directive type fetch directive default-src fallback yes.
...some b
rowsers specifically exclude blob and filesystem from source directives.
...specifying nonce makes a modern b
rowser ignore 'unsafe-inline' which could still be set for older b
rowsers without nonce support.
CSP: form-action - HTTP
whether form-action should block redirects after a form submission is debated and b
rowser implementations of this aspect are inconsistent (e.g.
...some b
rowsers specifically exclude blob and filesystem from source directives.
...specifying nonce makes a modern b
rowser ignore 'unsafe-inline' which could still be set for older b
rowsers without nonce support.
CSP: frame-src - HTTP
the http content-security-policy (csp) frame-src directive specifies valid sources for nested b
rowsing contexts loading using elements such as <frame> and <iframe>.
...some b
rowsers specifically exclude blob and filesystem from source directives.
...specifying nonce makes a modern b
rowser ignore 'unsafe-inline' which could still be set for older b
rowsers without nonce support.
CSP: script-src - HTTP
some b
rowsers specifically exclude blob and filesystem from source directives.
...specifying nonce makes a modern b
rowser ignore 'unsafe-inline' which could still be set for older b
rowsers without nonce support.
... the policy: script-src 'unsafe-inline' https: 'nonce-abcdefg' 'strict-dynamic' will act like 'unsafe-inline' https: in b
rowsers that support csp1, https: 'nonce-abcdefg' in b
rowsers that support csp2, and 'nonce-abcdefg' 'strict-dynamic' in b
rowsers that support csp3.
Public-Key-Pins-Report-Only - HTTP
the http public-key-pins-report-only response header was used to send reports of pinning violation to the report-uri specified in the header but, unlike public-key-pins still allows b
rowsers to connect to the server if the pinning is violated.
... the header is silently ignored in modern b
rowsers as support for hpkp has been removed.
...some b
rowsers might allow other hashing algorithms than sha-256 in the future.
Public-Key-Pins - HTTP
the http public-key-pins response header used to associate a specific cryptographic public key with a certain web server to decrease the risk of mitm attacks with forged certificates, however, it has been removed from modern b
rowsers and is no longer supported.
...some b
rowsers might allow other hashing algorithms than sha-256 in the future.
... max-age=<expire-time> the time, in seconds, that the b
rowser should remember that this site is only to be accessed using one of the defined keys.
Server-Timing - HTTP
database read/write, cpu time, file system access, etc.) in the developer tools in the user's b
rowser or in the performanceservertiming interface.
... performanceservertiming interface in addition to having server-timing header metrics appear in the developer tools of the b
rowser, the performanceservertiming interface enables tools to automatically collect and process metrics from javascript.
...the interface is only available in secure contexts (https) in some b
rowsers.
HTTP Messages - HTTP
web developers, or webmasters, rarely craft these textual http messages themselves: software, a web b
rowser, proxy, or web server, perform this action.
... they provide http messages through config files (for proxies or servers), apis (for b
rowsers), or other interfaces.
...no changes are needed in the apis used by web developers to utilize http frames; when available in both the b
rowser and the server, http/2 is switched on and used.
Network Error Logging - HTTP
this experimental header allows web sites and applications to opt-in to receive reports about failed (and, if desired, successful) network fetches from supporting b
rowsers.
... usage web applications opt in to this behaviour with the nel header, which is a json-encoded object: nel: { "report_to": "nel", "max_age": 31556952 } an origin considered secure by the b
rowser is required.
...psed_time": 18, "method": "post", "phase": "dns", "protocol": "http/1.1", "referrer": "https://example.com/previous-page", "sampling_fraction": 1, "server_ip": "", "status_code": 0, "type": "dns.name_not_resolved", "url": "https://example-host.com/" } } the type of the network error may be one of the following pre-defined values from the specification, but b
rowsers can add and send their own error types: dns.unreachable the user's dns server is unreachable dns.name_not_resolved the user's dns server responded but was unable to resolve an ip address for the requested uri.
HTTP
it was designed for communication between web b
rowsers and web servers, but it can also be used for other purposes.
... reference b
rowse through detailed http reference documentation.
... redbot tools to check your cache-related headers how b
rowsers work a very comprehensive article on b
rowser internals and request flow through http protocol.
CSS Houdini
houdini is a set of low-level apis that exposes parts of the css engine, giving developers the power to extend css by hooking into the styling and layout process of a b
rowser’s rendering engine.
... houdini is a group of apis that give developers direct access to the css object model (cssom), enabling developers to write code the b
rowser can parse as css, thereby creating new css features without waiting for them to be implemented natively in b
rowsers.
...b
rowsers parse the cssom — including layout, paint, and composite processes — before applying any style updates found in scripts.
Control flow and error handling - JavaScript
the following code th
rows several exceptions of varying types: throw 'error2'; // string type throw 42; // number type throw true; // boolean type throw {tostring: function() { return "i'm an object!"; } }; note: you can specify an object when you throw an exception.
...if any statement within the try block (or in a function called from within the try block) th
rows an exception, control immediately shifts to the catch block.
... for example, the following code th
rows an exception.
Memory Management - JavaScript
if the dom element holds a large amount of data (illustrated in the above example with the "lotsofdata" property), the memory consumed by this data will never be released and can lead to memory related issues such as the b
rowser becoming increasingly slower.
... as of 2012, all modern b
rowsers ship a mark-and-sweep garbage-collector.
... 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 b
rowser environment.
Functions - JavaScript
for example: var y = function x() {}; alert(x); // th
rows an error the function name also appears when the function is serialized via function's tostring method.
...historically, this was left unspecified, and some b
rowsers would define zero whether the block executed or not.
... in strict mode, all b
rowsers that support es2015 handle this the same way: zero is defined only if shoulddefinezero is true, and only in the scope of the if-block.
Date - JavaScript
note: parsing of strings with date.parse is strongly discouraged due to b
rowser differences and inconsistencies.
... examples several ways to create a date object the following examples show several ways to create javascript dates: note: parsing of date strings with the date constructor (and date.parse, they are equivalent) is strongly discouraged due to b
rowser differences and inconsistencies.
...end.gettime() - start.gettime() // elapsed time in milliseconds // to test a function and get back its return function printelapsedtime(ftest) { let nstarttime = date.now(), vreturn = ftest(), nendtime = date.now() console.log(`elapsed time: ${ string(nendtime - nstarttime) } milliseconds`) return vreturn } let yourfunctionreturn = printelapsedtime(yourfunction) note: in b
rowsers that support the web performance api's high-resolution time feature, performance.now() can provide more reliable and precise measurements of elapsed time than date.now().
Object.preventExtensions() - JavaScript
object.preventextensions(empty); object.isextensible(empty); // === false // object.defineproperty th
rows when adding // a new property to a non-extensible object.
... var nonextensible = { removable: true }; object.preventextensions(nonextensible); object.defineproperty(nonextensible, 'new', { value: 8675309 }); // th
rows a typeerror // in strict mode, attempting to add new properties // to a non-extensible object th
rows a typeerror.
... function fail() { 'use strict'; // th
rows a typeerror nonextensible.newproperty = 'fail'; } fail(); a non-extensible object's prototype is immutable: var fixed = object.preventextensions({}); // th
rows a 'typeerror'.
Object.seal() - JavaScript
object.defineproperty(obj, 'foo', { get: function() { return 'g'; } }); // th
rows a typeerror // now any changes, other than to property values, // will fail.
...function fail() { 'use strict'; delete obj.foo; // th
rows a typeerror obj.sparky = 'arf'; // th
rows a typeerror } fail(); // attempted additions through // object.defineproperty will also throw.
... object.defineproperty(obj, 'ohai', { value: 17 }); // th
rows a typeerror object.defineproperty(obj, 'foo', { value: 'eit' }); // changes existing property value non-object coercion in es5, if the argument to this method is not an object (a primitive), then it will cause a typeerror.
Promise.prototype.then() - JavaScript
if it is not a function, it is internally replaced with a "thrower" function (it th
rows an error it received as argument).
... th
rows an error, the promise returned by then gets rejected with the thrown error as its value.
... var p2 = new promise(function(resolve, reject) { resolve(1); }); p2.then(function(value) { console.log(value); // 1 return value + 1; }).then(function(value) { console.log(value + ' - a synchronous value works'); // 2 - a synchronous value works }); p2.then(function(value) { console.log(value); // 1 }); a then call will return a rejected promise if the function th
rows an error or returns a rejected promise.
handler.setPrototypeOf() - JavaScript
approach 1: returning false this approach means that any mutating operation that th
rows an exception on failure to mutate, must create the exception itself.
... const handlerreturnsfalse = { setprototypeof(target, newproto) { return false; } }; const newproto = {}, target = {}; const p1 = new proxy(target, handlerreturnsfalse); object.setprototypeof(p1, newproto); // th
rows a typeerror reflect.setprototypeof(p1, newproto); // returns false approach 2: throwing an exception the latter approach will cause any operation that attempts to mutate, to throw.
... const handlerth
rows = { setprototypeof(target, newproto) { throw new error('custom error'); } }; const newproto = {}, target = {}; const p2 = new proxy(target, handlerth
rows); object.setprototypeof(p2, newproto); // th
rows new error("custom error") reflect.setprototypeof(p2, newproto); // th
rows new error("custom error") specifications specification ecmascript (ecma-262)the definition of '[[setprototypeof]]' in that specification.
String.prototype.localeCompare() - JavaScript
negative and positive integer results vary between b
rowsers (as well as between b
rowser versions) because the w3c specification only mandates negative and positive values.
... some b
rowsers may return -2 or 2, or even some other negative or positive value.
... let items = ['réservé', 'premier', 'cliché', 'communiqué', 'café', 'adieu']; items.sort( (a, b) => a.localecompare(b, 'fr', {ignorepunctuation: true})); // ['adieu', 'café', 'cliché', 'communiqué', 'premier', 'réservé'] check b
rowser support for extended arguments the locales and options arguments are not supported in all b
rowsers yet.
WebAssembly.Module() constructor - JavaScript
a webassembly.module() constructor creates a new module object containing stateless webassembly code that has already been compiled by the b
rowser and can be efficiently shared with workers, and instantiated multiple times.
... b
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/b
rowser-compat-data and send us a pull request.
WebAssembly.Module - JavaScript
a webassembly.module object contains stateless webassembly code that has already been compiled by the b
rowser — this can be efficiently shared with workers, and instantiated multiple times.
... b
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/b
rowser-compat-data and send us a pull request.
WebAssembly - JavaScript
webassembly.module() contains stateless webassembly code that has already been compiled by the b
rowser and can be efficiently shared with workers, and instantiated multiple times.
... b
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/b
rowser-compat-data and send us a pull request.
undefined - JavaScript
in modern b
rowsers (javascript 1.8.5 / firefox 4+), undefined is a non-configurable, non-writable property, per the ecmascript 5 specification.
... // x has not been declared before if (typeof x === 'undefined') { // evaluates to true without errors // these statements execute } if (x === undefined) { // th
rows a referenceerror } however, there is another alternative.
... var x; if (x === void 0) { // these statements execute } // y has not been declared before if (y === void 0) { // th
rows uncaught referenceerror: y is not defined } specifications specification ecmascript (ecma-262)the definition of 'undefined' in that specification.
typeof - JavaScript
the only known b
rowser to have actually taken advantage of this is old internet explorer (see below).
...let idata = 99; typeof idata + ' wisen'; // 'number wisen' typeof (idata + ' wisen'); // 'string' regular expressions callable regular expressions were a non-standard addition in some b
rowsers.
... typeof undeclaredvariable === 'undefined'; typeof newletvariable; // referenceerror typeof newconstvariable; // referenceerror typeof newclass; // referenceerror let newletvariable; const newconstvariable = 'hello'; class newclass{}; exceptions all current b
rowsers expose a non-standard host object document.all with type undefined.
MathML attribute reference - MathML
unimplemented equal
rows <mtable> a boolean value indicating whether to force all
rows to have the same total height.
...
rowspacing <mtable> specifies the space between table
rows.
...
rowspan <mtd> a non-negative integer value that indicates on how many
rows does the cell extend.
Handling media support issues in web content - Web media technologies
there is a drawback, however: because there are so many to choose from, with so many different kinds of licenses and design principles involved, each web b
rowser developer is left to its own devices when deciding which media file types and codecs to support.
... this places a small, but reasonably easily overcome, burden on the web developer: to properly handle the situation when the user's b
rowser can't handle a particular type of media.
... <img src="/images/stafff-photo-huge-progressive.jpg" alt="staff photo, taken in january of 1972"> when using a progressive image, the data is stored in such a way that the b
rowser is able to render a low-quality representation of the image as soon as possible, then update the image as it loads—or after it's finished loading—to present it in full quality.
Using images in HTML - Web media technologies
the b
rowser considers each child <source> element and chooses the best match among them.
... image file type and format guide a guide to the various image file types commonly supported by web b
rowsers including details about their individual use cases, capabilities, and compatibility factors.
... mapping the width and height attributes of media container elements to their aspect-ratio this changes how b
rowsers load images so their aspect ratios are calculated by the b
rowser early on and can later be used to correct the display size of an image before it's loaded.
Web media technologies
this includes recommendations for what formats to use for what kinds of content, best practices including how to provide fallbacks and how to prioritize media types, and also includes general b
rowser support information for each media container and codec.
...to give users control over this, many b
rowsers now provide forms of autoplay blocking.
... this article is a guide to autoplay, with tips on when and how to use it and how to work with b
rowsers to handle autoplay blocking gracefully.
Recommended Web Performance Timings: How long is too long? - Web Performance
a second should be considered a rule in the maximum amount of time to indicate to a user that the request for new content was made and will load, such as the b
rowser displaying the page title and the background color of the page displaying.
...as noted in the description of the critical rendering path, when received, b
rowsers immediately start processing the html, rendering the content as it is received rather than waiting for additional assets to load.
...there are different suggested times for initially loading the page versus loading additional assets, responding to user interaction, and ensuring smooth animations: idling goal b
rowsers are single threaded (though background threads are supported for web workers).
Performance Monitoring: RUM vs synthetic monitoring - Web Performance
it is done in a controlled environment where variable like geography, network, device, b
rowser, and cached status are predetermined.
...in real user monitoring, the b
rowsers of real users report back performance metrics experienced.
... unlike synthetic monitoring, rum captures the performance of actual users regardless of device, b
rowser, network or geographic location.
Understanding latency - Web Performance
latency can be measured one way, for example, the amount of time it takes to send a request for resources, or the length of the entire round-trip from the b
rowser’s request for a resource to the moment when the requested resource arrives at the b
rowser.
...different b
rowser developer tools have different preset options, the characteristics emulated include download speed, upload speed, and minimum latency, or the minimum amount of type it takes to send a packet of data.
...if all connections are in use, the b
rowser can't download more resources until a connection is released, meaning those requests and resources are blocked.
cursor - SVG: Scalable Vector Graphics
this attribute behaves exactly like the css cursor property except that if the b
rowser supports the <cursor> element, you should be able to use it with the <funciri> notation.
... elements the following elements can use the cursor attribute container elements » graphics elements » b
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/b
rowser-compat-data and send us a pull request.
fill-opacity - SVG: Scalable Vector Graphics
="250" cy="50" r="40" fill-opacity="50%" /> <!-- fill opacity as a css property --> <circle cx="350" cy="50" r="40" style="fill-opacity: .25;" /> </svg> usage notes value [0-1] | <percentage> default value 1 animatable yes note: svg2 introduces percentage values for fill-opacity, however, it is not widely supported yet (see b
rowser compatibility below) as a consequence, it is best practices to set opacity with a value in the range [0-1].
... b
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/b
rowser-compat-data and send us a pull request.
rx - SVG: Scalable Vector Graphics
the way the value of the rx attribute is interpreted depend on both the ry attribute and the width of the rectangle: if a properly specified value is provided for rx but not for ry (or the opposite), then the b
rowser will consider the missing value equal to the defined one.
... if neither rx nor ry has a properly specified value, then the b
rowser will draw a rectangle with square corners.
... if rx is greater than half of the width of the rectangle, then the b
rowser will consider the value for rx as half of the width of the rectangle.
ry - SVG: Scalable Vector Graphics
the way the value of the ry attribute is interpreted depend on both the rx attribute and the width of the rectangle: if a properly specified value is provided for ry but not for rx (or the opposite), then the b
rowser will consider the missing value equal to the defined one.
... if neither ry nor rx has a properly specified value, then the b
rowser will draw a rectangle with square corners.
... if ry is greater than half of the width of the rectangle, then the b
rowser will consider the value for ry as half of the width of the rectangle.
stroke-opacity - SVG: Scalable Vector Graphics
n" stroke-opacity="50%" /> <!-- stroke opacity as a css property --> <circle cx="35" cy="5" r="4" stroke="green" style="stroke-opacity: .3;" /> </svg> usage notes value [0-1] | <percentage> default value 1 animatable yes note: svg2 introduces percentage values for stroke-opacity, however, it is not widely supported yet (see b
rowser compatibility below) as a consequence, it is best practices to set opacity with a value in the range [0-1].
... b
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/b
rowser-compat-data and send us a pull request.
<use> - SVG: Scalable Vector Graphics
for security reasons, b
rowsers may apply the same-origin policy on use elements and may refuse to load a cross-origin url in the href attribute.
...however, xlink:href can still be required in practice for cross-b
rowser compatibility (see the compatibility table below).
...ia-errormessage, aria-expanded, aria-flowto, aria-grabbed, aria-haspopup, aria-hidden, aria-invalid, aria-keyshortcuts, aria-label, aria-labelledby, aria-level, aria-live, aria-modal, aria-multiline, aria-multiselectable, aria-orientation, aria-owns, aria-placeholder, aria-posinset, aria-pressed, aria-readonly, aria-relevant, aria-required, aria-roledescription, aria-rowcount, aria-rowindex, aria-
rowspan, aria-selected, aria-setsize, aria-sort, aria-valuemax, aria-valuemin, aria-valuenow, aria-valuetext, role xlink attributes xlink:href, xlink:title usage notes categoriesgraphics element, graphics referencing element, structural elementpermitted contentany number of the following elements, in any order:animation elementsdescriptive elements specifications specification stat...
Scripting - SVG: Scalable Vector Graphics
one can override default b
rowser behaviors with the evt.preventdefault( ) method, add eventlisteners to objects with the syntax element.addeventlistener(event, function, usecapture), and set element properties with syntax svgelement.style.setproperty("fill-opacity", "0.0", "").
...or if you want to use the backspace key in your code, you want to override the b
rowser's default behavior when the backspace key is pressed, which is to go back to the previous page.
... setproperty has three parameters the function svgelement.style.setproperty("fill-opacity", "0.0") th
rows a domexception - syntax err in mozilla.
Getting started - SVG: Scalable Vector Graphics
svg files on the web can be displayed directly in the b
rowser or embedded in html files via several methods: if the html is xhtml and is delivered as type application/xhtml+xml, the svg can be directly embedded in the xml source.
... if the html is html5, and the b
rowser is a conforming html5 b
rowser, the svg can also be directly embedded.
...with this method, replacement technologies can be implemented for b
rowsers which normally can't process svg.
Introduction - SVG: Scalable Vector Graphics
svg is supported by all major b
rowsers.
... svg is supported in all modern b
rowsers and even a couple versions back in some cases.
... a fairly complete b
rowser support table can be found on can i use.
SVG In HTML Introduction - SVG: Scalable Vector Graphics
(another style rule makes an error message appear.) this approach has the following points in its favor: we have taken a regular html form that could have been part of an existing web site, and added an attractive, interactive background the approach is backwards compatible to b
rowsers that do not support svg; simply, no background appears in them it's very simple and performs very well the picture dynamically sizes itself to the required size in an intelligent way we can have declarative style rules applying to both html and svg the same script manipulates both html and svg the document is entirely standards-based to add a linked image with dom methods to an embedde...
...(for inline svg to work in both firefox and internet explorer it is necessary to serve documents with a different content-type to each b
rowser.
... for this reason, if you're behind a proxy server that caches the page, the example wont work in the second b
rowser you load it in because it will receive the wrong content-type.) ...
Certificate Transparency - Web security
b
rowser vendors and root store maintainers are also empowered to make more informed decisions regarding problematic cas that they may decide to distrust.
... b
rowser requirements google chrome requires ct log inclusion for all certificates issues with a notbefore date of after 30 april 2018.
... the expect-ct header can be used to request that a b
rowser always enforces the requirement for certificate transparency (e.g.
Using shadow DOM - Web Components
note that the shadow dom is not a new thing by any means — b
rowsers have used it for a long time to encapsulate the inner structure of an element.
... think for example of a <video> element, with the default b
rowser controls exposed.
... many modern b
rowsers implement an optimization for <style> tags either cloned from a common node or that have identical text, to allow them to share a single backing stylesheet.
Using templates and slots - Web Components
this was possible before, but it is made a lot easier by the html <template> element (which is well-supported in modern b
rowsers).
... so for example: <template id="my-paragraph"> <style> p { color: white; background-color: #666; padding: 5px; } </style> <p>my paragraph</p> </template> now we can use it by just adding it to our html document: <my-paragraph></my-paragraph> note: templates are well-supported in b
rowsers; the shadow dom api is supported by default in firefox (version 63 onwards), chrome, opera, safari, and edge (starting with version 79).
... 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 text</slot></p> if the slot's content isn't defined when the element is included in the markup, or if the b
rowser doesn't support slots, <my-paragraph> just contains the fallback content "my default text".
SDK and XUL Comparison - Archive of obsolete content
security if they're not carefully designed, firefox add-ons can open the b
rowser to attack by malicious web pages.
... advantages of xul-based add-ons user interface flexibility xul overlays offer a great deal of options for building a ui and integrating it into the b
rowser.
Working with Events - Archive of obsolete content
objects emit events on state changes that might be of interest to add-on code, such as b
rowser windows opening, pages loading, network requests completing, and mouse clicks.
...many event emitters may emit more than one type of event: for example, a b
rowser window might emit both open and close events.
page-mod - Archive of obsolete content
private windows if your add-on has not opted into private b
rowsing, then your page-mods will not attach content scripts to documents loaded into private windows, even if their urls match the pattern you have specified.
... to learn more about private windows, how to opt into private b
rowsing, and how to support private b
rowsing, refer to the documentation for the private-b
rowsing module.
self - Archive of obsolete content
loadreason this property contains of the following strings describing the reason your add-on was loaded: install enable startup upgrade downgrade isprivateb
rowsingsupported this property indicates whether or not the add-on supports private b
rowsing.
... it comes from the private-b
rowsing key in the add-on's package.json file.
simple-storage - Archive of obsolete content
for example: ss.storage.mylist = [ /* some long array */ ]; ss.on("overquota", function () { while (ss.quotausage > 1) ss.storage.mylist.pop(); }); private b
rowsing if your storage is related to your users' web history, personal information, or other sensitive data, your add-on should respect private b
rowsing.
... to read about how to opt into private b
rowsing mode and how to use the sdk to avoid storing user data associated with private windows, refer to the documentation for the private-b
rowsing module.
console - Archive of obsolete content
if the add-on has been installed in firefox, then the messages appear in the b
rowser console.
... if you're developing your add-on using the extension auto-installer, then the add-on is installed in firefox, meaning that messages will appear in the b
rowser console.
Adding a Button to the Toolbar - Archive of obsolete content
the button is added to the toolbar at the top of the b
rowser window: you can't set the initial location for the button, but the user can move it using the b
rowser's customization feature.
...if you specify a collection of icons in different sizes the b
rowser will automatically choose the best fit for the screen resolution and the place in the b
rowser ui that hosts the button.
Creating annotations - Archive of obsolete content
because cfx run doesn't preserve b
rowsing history, if you want to play along it's worth taking a note of the url.
...tp://www.w3.org/tr/xhtml1/dtd/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"> <head> <title>annotation</title> <style type="text/css" media="all"> body { font: 100% arial, helvetica, sans-serif; background-color: #f5f5f5; } textarea { width: 180px; height: 180px; margin: 10px; padding: 0px; } </style> </head> <body> <textarea
rows='10' cols='20' id='annotation-box'> </textarea> </body> </html> save this inside data/editor as annotation-editor.html.
Overview - Archive of obsolete content
because we are recording potentially sensitive information, we want to prevent the user creating annotations when in private b
rowsing mode.
... the simplest way to do this is to omit the "private-b
rowsing" key from the add-on's "package.json" file.
Unit Testing - Archive of obsolete content
in its place create a file called test-base64.js with the following contents: var base64 = require("../base64"); exports["test atob"] = function(assert) { assert.ok(base64.atob("agvsbg8=") == "hello", "atob works"); } exports["test btoa"] = function(assert) { assert.ok(base64.btoa("hello") == "agvsbg8=", "btoa works"); } exports["test empty string"] = function(assert) { assert.th
rows(function() { base64.atob(); }, "empty string check works"); } require("sdk/test").run(exports); note that with jpm we must give the exact relative path to the base64.js module.
... the second function tests the module's error-handling code by passing an empty string into atob() and using assert.th
rows() to check that the expected exception is raised.
Bootstrapped extensions - Archive of obsolete content
this is done using a special script file that's included in the extension that contains functions the b
rowser calls to command the extension to install, uninstall, start up, and shut down.
... bootstrap entry points the bootstrap.js script should contain several specific functions, which are called by the b
rowser to manage the extension.
Alerts and Notifications - Archive of obsolete content
var message = 'another pop-up blocked'; var box = gb
rowser.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://b
rowser/skin/info.png', priority, buttons); } ...
Autocomplete - Archive of obsolete content
first, declare a panel with the "autocomplete" type, like so: <panel id="popup_autocomplete" type="autocomplete" noautofocus="true" /> now set the autocompletepopup attribute of your <b
rowser> element to the id of the panel you just declared: <b
rowser id="my_b
rowser" ...
... autocompletepopup="popup_autocomplete" /> finally, make sure that the value of the b
rowser.formfill.enable pref is set to true.
Bookmarks - Archive of obsolete content
firefox 2 and earlier creating a new bookmark var win = myb
rowser.contentwindow; // get the bookmarks service const bmsvc = components.classes["@mozilla.org/b
rowser/bookmarks-service;1"] .getservice(components.interfaces.nsibookmarksservice); // create the bookmark bmsvc.createbookmarkincontainer(win.document.title, // bookmark name win.location.href.tostring(), // uri of the bookmark null, // shortcut win.document.title, // description win.document.characterset, // charset null, // postdata bookmarksservice.getbookmarkstoolbarfolder(), // bookmark folder ...
... initiating the bookmarks service as is the case with nearly all interfaces, before you can use the bookmarks service, you need to get access to it: var bmsvc = components.classes["@mozilla.org/b
rowser/nav-bookmarks-service;1"] .getservice(components.interfaces.nsinavbookmarksservice); creating a bookmark folder creating a new bookmark folder is done using the nsinavbookmarksservice.createfolder() method.
Examples and demos from articles - Archive of obsolete content
for a full compatibility code, see also our crossb
rowser possible solution for image preview.
...it guides you through the basic features of the language with practical examples that you can try for yourself on your own computer and illustrates the standard features of css that work in modern b
rowsers.
JavaScript Debugger Service - Archive of obsolete content
although it may still work in some b
rowsers, its use is discouraged since it could be removed at any time.
... in firefox versions prior to gecko 33 (firefox 33 / thunderbird 33 / seamonkey 2.30), the javascript debugger service (or simply jsd) used to be an xpcom component that allows the tracking of javascript while it was being executed in the b
rowser.
Post data to window - Archive of obsolete content
preprocessing post data the apostdata argument of the (global) loaduri(), opendialog(), and (tab)b
rowser.loaduriwithflags() methods expects the post data in the form of an nsiinputstream (because they eventually call nsiwebnavigation.loaduri()) while post data can be created using nsimimeinputstream.
... posting data to the current tab there is a convenience method in global scope (in firefox, chrome://b
rowser/content/b
rowser.js): loaduri(auri, areferrer, apostdata, aallowthirdpartyfixup); posting data to a new window window.opendialog('chrome://b
rowser/content', '_blank', 'all,dialog=no', auri, aflags, areferrer, apostdata); ...
Preferences - Archive of obsolete content
using preference observers changes a user makes to your extension's preferences, such as through an options dialog, may not take effect until the b
rowser is restarted (e.g., if you have initialized local variables when the b
rowser loads).
...this technique will work no matter how or where the preferences are changed: in another b
rowser window, directly in the about:config interface, or even by another extension.
Rosetta - Archive of obsolete content
hence, if you are going to use another scripting language you might expect that most of the b
rowsers will not recognize it.
...nevertheless, the increasing computational power of modern b
rowsers together with the introduction of typed arrays in ecmascript allow us, in theory, to build full virtual machines in pure ecmascript.
Scrollbar - Archive of obsolete content
scrollbars inside b
rowser elements will be styled to.
... example xul window: <?xml version="1.0"?> <?xml-stylesheet href="chrome://global/skin/" type="text/css"?> <window id="samplewindow" width="320" height="240" xmlns="http://www.mozilla.org/keymaster/gat...re.is.only.xul"> <hbox flex="1"> <b
rowser type="content" src="http://mozilla.org" flex="1"/> <scrollbar orient="vertical"/> </hbox> </window> ...
Creating custom Firefox extensions with the Mozilla build system - Archive of obsolete content
if you are using firefox as your regular b
rowser (and if you're not, why not!?), you might be annoyed by the fact that you have to close regular firefox before running your custom-built version.
...for our simple extension example, this file might look something like this: myextension.jar: % content myextension %content/ % locale myextension en-us %locale/ % skin myextension classic/1.0 %skin/classic/ % overlay chrome://b
rowser/content/b
rowser.xul chrome://myextension/content/myextensionoverlay.xul content/myextensionoverlay.js (content/myextensionoverlay.js) content/myextensionoverlay.xul (content/myextensionoverlay.xul) locale/myextension.dtd (locale/myextension.dtd) locale/myextension.properties (locale/myextension.properties) skin/classic/myextension.css (skin/classic/myextensi...
How to convert an overlay extension to restartless - Archive of obsolete content
need clearing here services.obs.notifyobservers(null, "chrome-flush-caches", null); } function install(data,reason) { } function uninstall(data,reason) { } function loadintowindow(window) { /* call/move your ui construction function here */ } function unloadfromwindow(window) { /* call/move your ui tear down function here */ } function foreachopenwindow(todo) // apply a function to all open b
rowser windows { var windows = services.wm.getenumerator("navigator:b
rowser"); while (windows.hasmoreelements()) todo(windows.getnext().queryinterface(components.interfaces.nsidomwindow)); } var windowlistener = { onopenwindow: function(xulwindow) { var window = xulwindow.queryinterface(components.interfaces.nsiinterfacerequestor) .getinter...
...face(components.interfaces.nsidomwindow); function onwindowload() { window.removeeventlistener("load",onwindowload); if (window.document.documentelement.getattribute("windowtype") == "navigator:b
rowser") loadintowindow(window); } window.addeventlistener("load",onwindowload); }, onclosewindow: function(xulwindow) { }, onwindowtitlechange: function(xulwindow, newtitle) { } }; as mentioned above, components.utils.unload() will not work properly if the jsm file it is unloading is in a jar.
Inline options - Archive of obsolete content
ch with a different type attribute: type attribute displayed as preference stored as bool checkbox boolean boolint checkbox integer (use the attributes on and off to specify what values to store) integer textbox integer string textbox string color colorpicker string (in the #123456 format) file b
rowse button and label string directory b
rowse button and label string menulist menulist dependent on the menu item values radio radio buttons dependent on the radio values control button no pref stored the pref attribute should have the full name of the preference to be stored.
...so like for the type="file", once a user b
rowses and picks a file, when it updates the label it will trigger the oninputchanged attribute.
Adding sidebars - Archive of obsolete content
it is in reality a hierarchical table view, so its content is defined in terms of
rows and columns.
....label;" flex="3" /> </treecols> <treechildren> <treeitem> <treerow> <treecell label="peter" /> <treecell label="hey, what's up?" /> </treerow> </treeitem> <treeitem> <treerow> <treecell label="john"/> <treecell label="good evening, how are you doing?" /> </treerow> </treeitem> </treechildren> </tree> the text in the
rows of the tree is hardcoded because we wouldn't generally use text from locale files.
Getting Started with Firefox Extensions - Archive of obsolete content
firefox provides a very rich and flexible architecture that allows extension developers to add advanced features, customize the user's experience, and completely replace and remove parts of the b
rowser.
... you should see the following directory structure: xulschoolhello1 chrome.manifest install.rdf content b
rowseroverlay.xul b
rowseroverlay.js skin b
rowseroverlay.css locale en-us b
rowseroverlay.dtd b
rowseroverlay.properties that's lots of files for something so simple!
Handling Preferences - Archive of obsolete content
this is how we do it: openpreferences : function() { if (null == this._preferenceswindow || this._preferenceswindow.closed) { let instantapply = application.prefs.get("b
rowser.preferences.instantapply"); let features = "chrome,titlebar,toolbar,centerscreen" + (instantapply.value ?
...they are heavily stylized in the firefox preferences window, so you should include the same css file that is included in it (chrome://b
rowser/skin/preferences/preferences.css).
XPCOM Objects - Archive of obsolete content
it shows the relationships between components and interfaces, but it's more of a source b
rowser than a documentation reference.
... attributes must have the same names as their idl counterparts, and that the queryinterface method is implemented: queryinterface : function(aiid) { if (!aiid.equals(ci.xsihellocounter) && !aiid.equals(ci.nsisupports)) { throw cr.ns_error_no_interface; } return this; } the method is very simple, it validates that the caller is requesting a supported interface, otherwise it th
rows an exception.
Supporting search suggestions in search plugins - Archive of obsolete content
when the b
rowser wants to fetch possible matches for a search term, it then sends an http get request to the url specified by the <url> element.
...these can be any additional information the search engine might want to return to be displayed by the b
rowser, such as the number of results available for that search.
MozOrientation - Archive of obsolete content
an event that is repeatedly fired on the window as accelerator data is provided to the b
rowser.
...beta, and evt.alpha // according to dev.w3.org/geo/api/spec-source-orientation } window.addeventlistener('deviceorientation', orientationhandler, false); window.addeventlistener('mozorientation', orientationhandler, false); example window.addeventlistener("mozorientation", dofunc, true); the example below simply displays the raw accelerometer data in the b
rowser window as the events arrive.
Install.js - Archive of obsolete content
// check if extension is already installed in profile if (file.exists(install.getfolder(profiledir, jarname))) { if (!this.silentinstall) { install.alert('updating existing profile install of ' + this.extfullname + ' to version ' + this.extversion + '.'); } this.profileinstall = true; } else if (!this.silentinstall) { // ask user for install location, profile or b
rowser dir?
... this.profileinstall = install.confirm('install ' + this.extfullname + ' ' + this.extversion + ' to your profile directory (ok) or your b
rowser directory (cancel)?'); } // init install var dispname = this.extfullname + ' ' + this.extversion; var regname = '/' + this.extauthor + '/' + this.extshortname; install.initinstall(dispname, regname, this.extversion); // find directory to install into var installpath; if (this.profileinstall) installpath = profiledir; else installpath = install.getfolder('chrome'); // add jar file install.addfile(null, 'chrome/' + jarname, installpath, null); // register chrome var jarpath = install.getfolder(installpath, jarname); var installtype = this.profileinstall ?
MMgc - Archive of obsolete content
cting goals to achieve in selecting the marking time slice: maintain the frame rate make sure the collector gets to the sweep stage soon enough to avoid too much heap expansion if we don't maintain the frame rate the movie will appear to pause and if we don't mark fast enough the mutator could get ahread of the collector and allocate memory so fast that the collection never finishes and memory g
rows unbounded.
...it would take a lot of player instances running simultaneously to exhaust the 2gb address space of the b
rowser process.
No Proxy For configuration - Archive of obsolete content
overview as b
rowsers rapidly grew in popularity in the mid-90's, many network administrators added proxy servers.
...proxy connections that fail return an error "the proxy server you have configured cannot be found", so configure your b
rowser to use a non-existent http proxy (hostname: "imaginary", port "80").
Automated testing tips and tricks - Archive of obsolete content
todo: check example code in to the tree somewhere how to quit the b
rowser 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 ${profi...
...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("b
rowser.dom.window.dump.enabled", true); to profiledir/user.js how to execute test code with chrome privileges using a chrome doc - see sbtests.xul in http://people.mozilla.com/~davel/scripts/ for an example firefox-bin -p sbtestprofile -chrome chrome://sbtests/content/ above code calls the quit function in quit.js to exit after test is finished how to detect con...
Bookmark Keywords - Archive of obsolete content
to file this bookmark open the "bookmarks" menu in the b
rowser and select "add bookmark," or by of use the keyboard equivalent (e.g., <tt>cmd-d</tt> on macintosh).
... with that done, all you have to do in the future is type <tt>bz</tt> followed by a space and the bug's number into mozilla's address bar, and the b
rowser will jump right to the bug with that number.
Conclusion - Archive of obsolete content
to test it, try installing the extension on a fresh copy of mozilla by loading the file in your mozilla b
rowser (this works whether you load it from the web or from your local hard drive via a file:/// url).
...for example, you need to change chrome://navigator/content/navigator.xul to chrome://b
rowser/content/b
rowser.xul.
Creating a Microsummary - Archive of obsolete content
ers to be able to install it from http://people.mozilla.com/~myk/micro...ial/index.html, we might add the following code to the index.html page: <button onclick="window.sidebar.addmicrosummarygenerator('http://people.mozilla.com/~myk/microsummaries/tutorial/sfx-generator.xml')">install the spread firefox home page microsummary!</button> clicking that button will generate a javascript error on b
rowsers that don't support microsummaries, however, so to improve the experience for those users, we should check to see if the user is using a microsummaries-enabled b
rowser and display an explanatory message if not.
... we might do so via the following code: <script> const warning = "sorry, you need a microsummary-enabled b
rowser like firefox 2.0 to install and use microsummary generators."; function addgenerator(url) { if (typeof window.sidebar == "object" && typeof window.sidebar.addmicrosummarygenerator == "function") window.sidebar.addmicrosummarygenerator(url); else alert(warning); } </script> <button onclick="addgenerator('http://people.mozilla.com/~myk/microsummaries/tutorial/sfx-generator.xml')">install the spread firefox home page microsummary!</button> note that due to bug 341283, addmicrosummarygenerator() will not accept a relative url.
Embedding FAQ - Archive of obsolete content
here is the code : import org.eclipse.swt.swt; import org.eclipse.swt.b
rowser.mozillab
rowser; import org.eclipse.swt.b
rowser.progressevent; import org.eclipse.swt.b
rowser.progresslistener; import org.eclipse.swt.widgets.display; import org.eclipse.swt.widgets.shell; import org.mozilla.xpcom.nsidomdocument; public class test { public static void main(string args[]) { display display = new display(); shell shell = new shell(display)...
...; final mozillab
rowser b
rowser = new mozillab
rowser(shell,wt.border); b
rowser.seturl("http://www.google.com"); b
rowser.addprogresslistener(new progresslistener() { public void changed(progressevent event) { } public void completed(progressevent event) { nsidomdocument doc = b
rowser.getdocument(); system.out.println(doc); } }); while (!shell.isdisposed()) { if (!display.readanddispatch()) { display.sleep(); } } } how to map a javascript function to a c++ fu...
Error Console - Archive of obsolete content
use the web console instead, for web content, or the b
rowser console for chrome content.
... to bring up error console from within a b
rowser or mail window, use the function tojavascriptconsole().
Code snippets - Archive of obsolete content
for each (let client in tabsengine.getallclients()) { for each (let tab in client.tabs) { let url = tab.urlhistory[0]; // load the tab via the tabbed b
rowser api.
... mainwindow.gb
rowser.addtab(url); } } partially corrupt a server components.utils.import("resource://services-sync/main.js"); components.utils.import("resource://services-sync/resource.js"); function deletepath(path) { let resource = new resource(weave.service.storageurl + path); resource.setheader("x-confirm-delete", "1"); return resource.delete(); } // delete meta/global: deletepath("meta/global"); // delete keys: deletepath("crypto/keys"); // delete server: deletepath(""); corrupt a single engine on the server let engine = "bookmarks"; components.utils.import("resource://services-sync/main.js"); components.utils.import("resource://services-sync/resource.js"); components.utils.import("resource://services-sync/util.js"); let r = new resource(weave.service.storageurl + "meta/...
CRMF Request object - Archive of obsolete content
though some b
rowsers may still support it, it is in the process of being dropped.
... warning: the features mentioned in this article are deleted proprietary mozilla extensions, and are not supported in any other b
rowser.
generateCRMFRequest() - Archive of obsolete content
though some b
rowsers may still support it, it is in the process of being dropped.
... warning: the features mentioned in this article are deleted proprietary mozilla extensions, and are not supported in any other b
rowser.
importUserCertificates - Archive of obsolete content
though some b
rowsers may still support it, it is in the process of being dropped.
... warning: the features mentioned in this article are deleted proprietary mozilla extensions, and are not supported in any other b
rowser.
popChallengeResponse - Archive of obsolete content
though some b
rowsers may still support it, it is in the process of being dropped.
... warning: the features mentioned in this article are deleted proprietary mozilla extensions, and are not supported in any other b
rowser.
slideBar - Archive of obsolete content
about status: in development instantiation: jetpack.future.import('slidebar') last update: v0.6 summary: slidebar is a reinvention of the old sidebar feature of b
rowsers.
... they allow quick access to a wide range of both temporary and permanent information at the side of your b
rowser window.
slideBar - Archive of obsolete content
slidebar is a reinvention of the old sidebar features of b
rowsers.
... they allow quick access to a wide range of both temporary and permanent information at the side of your b
rowser window.
UI - Archive of obsolete content
menu accessing, modifying, and creating menus in the b
rowser slidebar ui mechanism for displaying jetpack content in a slide-out animated vertical column toolbar including entries and access elements into the toolbar panel a movable, expandable, and custom styled content element to display jetpack content tabs adding events and interacting with b
rowser tabs and their contained documents statusbar low-level functions and basic calls notifications a system for alertin...
...g users via provided ui mechanisms selection interacting with user-selected content window mitigates and eases interactions between different b
rowser windows ...
Makefile.mozextension.2 - Archive of obsolete content
real_install: $(cp) chrome/$(project).jar ~/.mozilla/default/32p27fdr.slt/chrome/ #################################### ###### define chrome_manifest content $(project) content/ overlay chrome://b
rowser/content/b
rowser.xul chrome://$(project)/content/overlay.xul locale $(project) en-us locale/ skin $(project) classic/1.0 skin/ style chrome://global/content/customizetoolbar.xul chrome://$(project)/skin/overlay.css endef export chrome_manifest chrome.manifest: @echo generating $(project)/chrome.manifest @echo "$$chrome_manifest" > $(project)/chrome.manifest ###### #firefox {ec8030f7-c20...
...a-464f-9b0e-13a3a9e97384} #thunderbird {3550f703-e582-4d05-9a08-453d09bdfdc6} #nvu {136c295a-4a5a-41cf-bf24-5cee526720d5} #mozilla suite {86c18b42-e466-45a9-ae7a-9b95ba6f5640} #seamonkey {92650c4d-4b8e-4d2a-b7eb-24ecf4f6b63a} #sunbird {718e30fb-e89b-41dd-9da7-e25a45638b28} #netscape b
rowser {3db10fab-e461-4c80-8b97-957ad5f8ea47} ###### define install_rdf <rdf xmlns="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:em="http://www.mozilla.org/2004/em-rdf#"> <description about="urn:mozilla:install-manifest"> <id>$(project_id)</id> <name>$(project_name)</name> <version>$(project_version)</version> <description>$(project_desc)</description> <creator>$(project_author)</creator> <contributor>here is a place for you who helped me</contributor> <homepageurl>http://$(project).mozdev.org/</ho...
Microsummary XML grammar reference - Archive of obsolete content
if the <update> element does not include an interval attribute, firefox applies the interval specified by the b
rowser.microsummary.updateinterval preference.
... notes: regardless of the absolute or conditional update interval specified by this element, firefox will never update microsummaries more frequently than once per minute; because firefox checks for expired microsummaries every 15 seconds, it is possible for a microsummary update to begin up to 15 seconds later than its interval indicates; firefox respects the b
rowser cache when updating microsummaries, so it will not reload a page to update its microsummary if the cache contains a fresh copy of the page.
New Security Model for Web Services - Archive of obsolete content
more-complex access lists could be created to try to establish, with finer granularity, which domains are to be accessible or permitted from which other domains, but this requires extensive management which at best is quite error-prone for the end user and easily opens holes in a firewall that do not directly hurt the user who reconfigured his b
rowser to try to access some external service but hurts the owners of other services behind the firewall.
...but the big problem with this is that the typical b
rowser user really does not either understand or pay the consequences if he inadvertently opens a hole in his company's firewall.
Plug-n-Hack Get Involved - Archive of obsolete content
while this project has been started by the mozilla security team and has been validated with firefox and owasp zap, this is an open project and we welcome involvement from anyone, especially people working on other b
rowsers and security tools.
... if you would like to add pnh support to a b
rowser or tool, or even get involved in onward pnh development, then please get in touch and we will give you whatever assistance we can.
Plug-n-Hack Phase2 - Archive of obsolete content
the next phase of plug-n-hack (pnh) is still being planned but is intended to allow b
rowsers to advertise their capabilities to security tools.
... this will allow the tools to obtain information directly from the b
rowser, and even use the b
rowser as an extension of the tool.
BlogPosts - Archive of obsolete content
just b
rowsing: mozilla prism update thanscorner: mozilla prism - webrunner with pazzaz mozilla prism - a revolution in web apps thanscorner: mozilla webrunner 0.7 site specific b
rowsers webrunner using webrunner webrunner + gears = offline desktop reader webrunner 0.5 webrunner 0.5 - mac support webrunner 0.5 - linux install webrunner, google reader, and google notebook distraction free gtd - 32+ web app files for online todo lists mozilla webrunner: a one-window, tabless b
rowser with no url bar webrunner becomes prism - a mozilla labs project mozilla labs: prism alex faaborg: prism mozilla prism: bringing web apps to the desktop everyone should use site specific b
rowsers mozilla prism portable (spanish) prism, l'avenir des applications web selon mozilla (french) mozilla prism : bundle...
... custom google reader + talk (french) just b
rowsing: site-specific b
rowsers ...
Configuration - Archive of obsolete content
the file must be located in the web app home directory: splashscreen.html include uris that should be opened in the web app, rather than in the default b
rowser.
...separate multiple uris with commas: *google.com, *yahoo.com exclude urls that should be opened in the default b
rowser, rather than in the web app.
Safely loading URIs - Archive of obsolete content
for example, loading some file: uris can hang the b
rowser or even crash the operating system in some cases.
...by passing the string to something that loads it in a <b
rowser> or <iframe>), you must call checkloaduristr to be secure.
Table Layout Strategy - Archive of obsolete content
poor mans choice is leave the first cell auto and specify 100%on the second one (this works cross-b
rowser) <tbody></tbody>foobar <table width="200px" border> <tbody> <tr><td>foo</td><td width="100%">bar</td></tr> </tbody> </table> the conflict free solution, the column should have the minimum width.
... so we specify it (this breaks in some other b
rowsers) <col width="0*"><col><tbody></tbody>foobar <table border width="200px"> <col width="0*"><col> <tbody> <tr><td>foo</td><td>bar</td></tr> </tbody> </table> this shrink wrapping width has usually the suffix 0proportional effective columns <tbody></tbody>foobarbazzap <table width="200px" border> <tbody> <tr><td>foo</td><td colspan="2" width="120px">bar</td></tr> <tr><td>baz</td><td>zap</td></tr> </tbody> </table> the colspan here is bogus, so the third column should not get any width.
Venkman - Archive of obsolete content
it aims to provide a powerful javascript debugging environment for mozilla based b
rowsers namely firefox, netscape 7.x/9.x and seamonkey.
... note that it is not included in the gecko-based b
rowsers such as k-meleon, galeon and netscape 8.x.
Anonymous Content - Archive of obsolete content
for example, the html file upload control appears in most b
rowsers as a composite widget consisting of a text field and a button.
... <xbl:binding id="fileuploadcontrol"> <xbl:content> <html:input type="text" xbl:inherits="value"/> <html:input type="button" value="b
rowse..."/> </xbl:content> </xbl:binding> each entry in the inherits list can either simply list an attribute (such as value in the example above), or it can specify an = separated pair consisting of the attribute on the anonymous content that should be tied to the attribute on the bound element.
Elements - Archive of obsolete content
firefox 2) it is impossible to attach bindings to table sub-elements (
rows, cells etc.) you can attach binding only to the table element itself.
...the following xul display types may be used: b
rowser, button, checkbox, description, editor, grippy, iframe, image, label, menu, menuitem, menubar, progressmeter, radio, resizer, scrollbar, scrollbox, spacer, splitter, titlebar, treechildren and treecol.
XBL - Archive of obsolete content
xbl 2.0 (w3c candidate recommendation) was developed to address problems found in xbl 1.0 and to allow for implementations in a broader range of web b
rowsers.
... custom xul elements with xbl from the xul school tutorial for add-on developers xbl chapter of "rapid application development with mozilla" xbl 2.0 primer (draft) xbl 2.0 cross-b
rowser implementation in javascript more xbl resources...
XML in Mozilla - Archive of obsolete content
testing and qa we have a lot of testcases linked to from the b
rowser standards compliance qa page.
...we'd really like to get tests that can be run automatically (this would require knowledge of web development; document.load() and/or xml extras might be needed), but probably most of the bugs we get have just been found by normal people trying to do something that works in some other b
rowser and does not work in mozilla.
Mac stub installer - Archive of obsolete content
once you have the mac installer built and ready to debug you may want to debug the xpinstall engine in the context of the installer rather than in the context of the b
rowser.
...note that there are two macro strings in the .jsts: $version$ which is replaced at packages time with the b
rowser version.
execute - Archive of obsolete content
file.execute() executes an installed file (such as a b
rowser) after it has been installed, and is typically placed at the end of an install script and outside of the main install block.
...if you do not set this flag and launch an executable that is not a part of the installation, you will raise an error when you restart the b
rowser.
SVG And Canvas In Mozilla - Archive of obsolete content
presentation view online download summary today's web b
rowsers offer somewhat limited graphics capabilities to web developers.
...to realize this potential in web applications, b
rowsers must expose rich new graphics apis to web content.
XTech 2005 Presentations - Archive of obsolete content
rich web: svg and canvas in mozilla - robert o'callahan today's web b
rowsers offer somewhat limited graphics capabilities to web developers.
...to realize this potential in web applications, b
rowsers must expose rich new graphics apis to web content.
buttons - Archive of obsolete content
warning: if the accept and cancel buttons are actually shown is system dependent and is mainly controlled by the value of the boolean preference b
rowser.preferences.instantapply.
... the default setting of b
rowser.preferences.instantapply currently is true on linux and mac os and false on windows (which however might or might not change soon, see bug 738797 and bug 1037225).
clicktoscroll - Archive of obsolete content
« xul reference home clicktoscroll type: boolean clicktoscroll, if true, the ar
rows must be clicked to scroll the scrollbox content.
... if false, the mouse must be hovered over the ar
rows to scroll automatically.
homepage - Archive of obsolete content
« xul reference home homepage type: url this attribute allows you to set a homepage for the b
rowser element.
... it does not have any correlation with the user's b
rowser homepage; instead it is a convenient property to hold a home page.
primary - Archive of obsolete content
« xul reference home primary type: boolean if set to true, the treecol will have indentation and twisties drawn to the left of it to indicate the hierarchy level of the
rows.
... if no column has the primary attribute set to true, the tree may still contain nested
rows, although no indication will be given to the user.
reserved - Archive of obsolete content
example here, the command to open a new b
rowser window is reserved: <command id="cmd_newnavigator" oncommand="openb
rowserwindow()" reserved="true"/> if the keyboard shortcut for that is accel-t, then this code will not work as expected, as compared to when it is run from web content: document.addeventlistener("keydown", handlekey, true); function handlekey(event) { // listen for the "new tab" shortcut if (event.metakey && (event.key ...
...== "t")) { // log a message console.log("intercepted accel-t"); // prevent the default b
rowser action event.preventdefault(); event.stoppropagation(); } } currently, this event handler as coded above runs and logs the message, but the default behavior persists.
seltype - Archive of obsolete content
(default 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.
smoothscroll - Archive of obsolete content
« xul reference home smoothscroll type: boolean true initially enables smooth scrolling for the corresponding ar
rowscrollbox, false disables it.
... currently, smooth scrolling supports horizontal ar
rowscrollboxes only.
windowtype - Archive of obsolete content
this might be used, for example, to distinguish between a b
rowser window and an editor window.
... values for window type as found on mxr: http://mxr.mozilla.org/mozilla-release/search?string=windowtype navigator:b
rowser - looks like if window has gb
rowser it has this window type devtools:scratchpad - scratchpad windows navigator:view-source - the view source windows ...
Attribute (XUL) - Archive of obsolete content
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 linkedpanel max maxheight maxlength maxpos max
rows maxwidth member menu menuactive min minheight minresultsforpopup minwidth mode modifiers mousethrough movetoclick multiline multiple name negate newlines next noautofocus noautohide noinitialfocus nomatch norestorefocus object observes onbeforeaccept onbookmarkgroup onchange onclick onclosetab oncommand oncommandupdate ondialogaccept ondialogcancel ondialogclos...
...vert ontextreverted onunload onwizardback onwizardcancel onwizardfinish onwizardnext open ordinal orient pack pageid pageincrement pagestep parent parsetype persist persistence phase pickertooltiptext placeholder popup position predicate preference preference-editable primary priority properties querytype readonly ref rel removeelement resizeafter resizebefore
rows screenx screeny searchbutton searchsessions searchlabel selected selectedindex seltype setfocus showcaret showcommentcolumn showpopup size sizemode sizetopopup smoothscroll sort sortactive sortdirection sortresource sortresource2 spellcheck src state statedatasource statusbar statustext style subject substate suppressonselect tabindex tabscrolling targets templa...
Deprecated and defunct markup - Archive of obsolete content
elements <actions> (listed here by mistake or was it a container tag?) typo for <action> --neil 03 march 2011 <autorepeatbutton> (action occurs repeatedly on mouse hover--used to construct other elements; used in <ar
rowscrollbox> and large drop-down menus) so, not deprecated?
...colgroup> (former name for <treecols> <treecolpicker> (internal use only; part of xbl for <tree>) <treefoot> (old/experimental and unsupported xul tags) <treeindentation> (old/experimental and unsupported xul tags) was a part of the old <tree> that predated <outliner> that was not converted to <listbox>--neil 03 march 2011 <treeicon> (old/experimental and unsupported xul tags) <tree
rows> (internal use only; part of xbl for <tree>) attributes @debug="true" provided struts and springs around boxes to facilitate identification of flex issues but does not seem to work now you need a special debug_layout build --neil 03 march 2011 references xul element reference by neal deakin rapid application development with mozilla, by nigel mcfarlane ...
List of commands - Archive of obsolete content
tcharprevious cmd_selectcharnext cmd_beginline cmd_endline cmd_selectbeginline cmd_selectendline cmd_wordprevious cmd_wordnext cmd_selectwordprevious cmd_selectwordnext cmd_scrollpageup cmd_scrollpagedown cmd_scrolllineup cmd_scrolllinedown cmd_movepageup cmd_movepagedown cmd_selectpageup cmd_selectpagedown other commands the following list other commands (prefixed by cmd_ or b
rowser:) which have not been categorized here yet (though they are in the alphabetical list below): http://lxr.mozilla.org/seamonkey/sou...baroverlay.xul http://lxr.mozilla.org/seamonkey/sou...t/navigator.js http://lxr.mozilla.org/seamonkey/sou...toroverlay.xul http://lxr.mozilla.org/seamonkey/sou...onaltoolbar.js http://lxr.mozilla.org/seamonkey/sou...rceoverlay.xul http://lxr.mozilla.org/sea...
...sou...oomoverlay.xul http://lxr.mozilla.org/seamonkey/sou...toroverlay.xul http://lxr.mozilla.org/seamonkey/sou...ark.properties http://lxr.mozilla.org/seamonkey/sou...kmarks-temp.js http://lxr.mozilla.org/seamonkey/sou.../bookmarks.xml http://lxr.mozilla.org/seamonkey/sou...rksoverlay.xul http://lxr.mozilla.org/seamonkey/sou...okmarkstree.js list of commands (listed alphabetically) b
rowser:addbookmark b
rowser:addbookmarkas b
rowser:addgroupmarkas b
rowser:back b
rowser:editpage b
rowser:find b
rowser:findagain b
rowser:findprev b
rowser:forward b
rowser:home b
rowser:managebookmark b
rowser:open b
rowser:openfile b
rowser:print b
rowser:printpreview b
rowser:savepage b
rowser:searchinternet b
rowser:sendpage b
rowser:uploadfile cmd_bm_copy cmd_bm_cut cmd_bm_delete cmd_bm_exp...
addTabsProgressListener - Archive of obsolete content
« xul reference home addtabsprogresslistener( listener ) return type: no return value add a progress listener to the b
rowser which will monitor loaded documents in all tabs in the tabbed b
rowser.
... the progress listener should be based on the nsiwebprogresslistener interface with an additional "b
rowser" argument as the first argument of every method, which is the b
rowser (not <tabb
rowser> = gb
rowser) where the event occurred.
removeTab - Archive of obsolete content
if only one tab is displayed, this method does nothing (unless the preference b
rowser.tabs.closewindowwithlasttab is true, in which case the window containing the tab is closed).
... if b
rowser.tabs.autohide is true, the row of tabs will collapse if only one tab remains.
Extensions - Archive of obsolete content
modifying the context menu an extension may wish to modify the context menu associated with the b
rowser area.
... in firefox, the b
rowser area that displays web pages has only one context menu.
smoothScroll - Archive of obsolete content
« xul reference smoothscroll type: boolean can be set to enable or disable smooth scrolling for the corresponding ar
rowscrollbox.
...currently, smooth scrolling supports horizontal ar
rowscrollboxes only.
Adding Methods to XBL-defined Elements - Archive of obsolete content
methods are the functions of objects, such as window interface's open() method loads the specified resource into the b
rowsing 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 b
rowsing context.">window.open().
Focus and Selection - Archive of obsolete content
suppose you wanted to move the focus from where it currently is, to the next place the b
rowser thinks it should be.
...you can do this anywhere you have a xul b
rowser document by simply: document.commanddispatcher.advancefocus(); in fact, the commanddispatcher simply implements the nsidomxulcommanddispatcher interface.
Manipulating Lists - Archive of obsolete content
list scrolling if there are more
rows in the listbox than can be displayed, a scroll bar will appear to allow the user to scroll the list.
...compare the effect of both functions at different scroll positions in this example: example 5 : source view <button label="scrolltoindex" oncommand="document.getelementbyid('thelist').scrolltoindex(4);"/> <button label="ensureindexisvisible" oncommand="document.getelementbyid('thelist').ensureindexisvisible(4);"/> <listbox id="thelist"
rows="5"> <listitem label="1"/> <listitem label="2"/> <listitem label="3"/> <listitem label="4"/> <listitem label="5"/> <listitem label="6"/> <listitem label="7"/> <listitem label="8"/> <listitem label="9"/> <listitem label="10"/> <listitem label="11"/> <listitem label="12"/> </listbox> next, we'll look at xul box objects.
XPCOM Examples - Archive of obsolete content
try this example by opening a number of b
rowser windows and you'll see that they are all listed on the menu.
... cookies next, we will get a list of cookies that have been saved in the b
rowser.
column - Archive of obsolete content
the column with the most child elements determines the number of
rows in each column.
...fore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(), removeattribute(), removeattributenode(), removeattributens(), removechild(), removeeventlistener(), replacechild(), setattribute(), setattributenode(), setattributenodens(), setattributens(), setuserdata related elements grid, columns,
rows, row ...
dialog - Archive of obsolete content
warning: if the accept and cancel buttons are actually shown is system dependent and is mainly controlled by the value of the boolean preference b
rowser.preferences.instantapply.
...the default setting of b
rowser.preferences.instantapply currently is true on linux and mac os and false on windows (which however might or might not change soon, see bug 738797 and bug 1037225).
editor - Archive of obsolete content
attributes editortype, src, type properties accessibletype, commandmanager, contentdocument, contentwindow, docshell, editingsession, editortype, webb
rowserfind, webnavigation methods geteditor, gethtmleditor, makeeditable examples this example shows how to made the editor editable by setting the designmode property of the loaded html document: <script language="javascript"> function initeditor(){ // this function is called to set up the editor var editor = document.getelementbyid("myeditor"); editor.contentdocument.designmode = 'on'...
... webb
rowserfind type: nsiwebb
rowserfind this read-only property contains an nsiwebb
rowserfind object which can be used to search for text in the document.
elements - Archive of obsolete content
a action ar
rowscrollbox b bbox binding bindings box broadcaster broadcasterset button b
rowser c checkbox caption colorpicker column columns commandset command conditions content d deck description dialog dialogheader e editor grid grippy groupbox h hbox i iframe image k key keyset l label listbox listcell listcol listcols listhead listheader listitem m member menu menubar menuitem menulist menupopup menuseparator o observes overlay p page popup popupset preference preferences prefpane prefwindow progressmeter r radio radiogroup resizer richlistbox richlistitem resizer row
rows rule s script scrollbar scrollbox scrollcorne...
...r separator spacer splitter stack statusbar statusbarpanel stringbundle stringbundleset t tab tabb
rowser tabbox tabpanel tabpanels tabs template textnode textbox titlebar toolbar toolbarbutton toolbargrippy toolbaritem toolbarpalette toolbarseparator toolbarset toolbarspacer toolbarspring toolbox tooltip tree treecell treechildren treecol treecols treeitem treerow treeseparator triple v vbox w window wizard wizardpage ...
notificationbox - Archive of obsolete content
typically the element will be a b
rowser, but any element may be used.
... also it is possible to call function with the same name (they are different) of global object gb
rowser: notifybox = gb
rowser.getnotificationbox() examples <notificationbox flex="1"> <b
rowser src="http://www.mozilla.org"/> </notificationbox> there is a more complex code available in the code snippets area.
preference - Archive of obsolete content
for example, the b
rowser's home page is set with the preference b
rowser.startup.homepage.
...for example, the b
rowser's home page is set with the preference b
rowser.startup.homepage.
row - Archive of obsolete content
« xul reference home [ examples | attributes | properties | methods | related ] a single row in a
rows element.
...isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(), removeattribute(), removeattributenode(), removeattributens(), removechild(), removeeventlistener(), replacechild(), setattribute(), setattributenode(), setattributenodens(), setattributens(), setuserdata related elements grid, columns, column,
rows.
scrollbar - Archive of obsolete content
the user can adjust the position of the scroll bar by clicking ar
rows on either end of the scroll bar or by dragging the scroll bar thumb around.
... increment type: integer the amount by which the curpos (for scroll bars) or value (for number boxes and scale) attribute changes when the ar
rows are clicked(or scales are dragged).
toolbar - Archive of obsolete content
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 b
rowsing 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 b
rowsing context.">window.open() method.
toolbarpalette - Archive of obsolete content
you can add your own custom buttons to the firefox b
rowser by using an overlay that overlays the toolbarpalette with the idb
rowsertoolbarpalette.
... examples <toolbarpalette id="b
rowsertoolbarpalette"> <toolbarbutton id="toolbarpalette-button" class="toolbarbutton-class" label="&mylabel;" tooltiptext="&mytiptext;" oncommand="somefunction()"/> </toolbarpalette> attributes inherited from xul element align, allowevents, allownegativeassertions, class, coalesceduplicatearcs, collapsed, container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, style, te...
treechildren - Archive of obsolete content
this element is also used to define container
rows in the tree.
... attributes alternatingbackground attributes alternatingbackground obsolete since gecko 2.0 type: boolean if true, the background of the tree's
rows will alternate between two colors.
treecol - Archive of obsolete content
primary type: boolean if set to true, the treecol will have indentation and twisties drawn to the left of it to indicate the hierarchy level of the
rows.
... if no column has the primary attribute set to true, the tree may still contain nested
rows, although no indication will be given to the user.
wizard - Archive of obsolete content
this might be used, for example, to distinguish between a b
rowser window and an editor window.
... values for window type as found on mxr: http://mxr.mozilla.org/mozilla-release/search?string=windowtype navigator:b
rowser - looks like if window has gb
rowser it has this window type devtools:scratchpad - scratchpad windows navigator:view-source - the view source windows properties canadvance type: boolean this property is set to true if the user can press the next button to go to the next page.
XUL - Archive of obsolete content
there is a xulrunner application containing the xul periodic table which can be opened with gecko based b
rowsers.
...s xul online live editor (copy & paste snippets from here and run them) xul explorer (a lightweight xul ide) xulexplorer (patched version of xul explorer) extension developer's extension (featuring a live xul editor) xulref sidebar firebug dom inspector spket ide, ide for xul/xbl ample sdk, (cross-b
rowser xul renderer in javascript/html) view all...
Getting started with XULRunner - Archive of obsolete content
*/ pref("b
rowser.dom.window.dump.enabled", true); pref("javascript.options.showinconsole", true); pref("javascript.options.strict", true); pref("nglayout.debug.disable_xul_cache", true); pref("nglayout.debug.disable_xul_fastload", true); xulrunner specific preferences include: toolkit.defaultchromeuri specifies the default window to open when the application is launched.
...the xul application will run instead of the firefox b
rowser that normally starts.
mozilla.dev.platform FAQ - Archive of obsolete content
q: when using xul elements <b
rowser/> and <tabb
rowser/> the javascript popup windows don't work out of the box, what needs to be implement?
... a: have the b
rowser.chromeurl preference - this should be a xul document containing a <b
rowser type="content-primary"> element in which the popup window's content should get loaded.
xbDesignMode.js - Archive of obsolete content
* * the original code is netscape cross b
rowser design mode code.
... * * contributor(s): doron rosenberg <doron@netscape.com> (original author) * * * * ***** end license block ***** */ /* xbdesignmode a javascript wrapper for b
rowsers that support designmode */ function xbdesignmode(aiframe){ this.meditordocument = null; this.miframeelement = null; // argument is a string, therefore an id if ( (typeof(aiframe) == "string") && (document.getelementbyid(aiframe).tagname.tolowercase()=="iframe") ){ this.miframeelement = document.getelementbyid(aiframe); } else if( (typeof(aiframe)=="object") && (aiframe.tagname.tolowercase() =...
2006-10-20 - Archive of obsolete content
ie7 rss reader better - say reviewers a discussion revolving around the quality of rss readers in ie7, firefox and other assorted b
rowsers.
... also a debate about which b
rowser is "beating" which to a lesser extent further in the discussion.
2006-11-03 - Archive of obsolete content
discussions google adsense plugin for firefox a user post a link to a plugin for displaying "adsense earning" within the status bar of the b
rowser without logging into google.
... xml in firefox is a major problem a user draws attention to what they think is a bug, but the developers say it's proper b
rowser behaviour.
2006-11-04 - Archive of obsolete content
discussions adsense plugin for firefox a user post a link to a plugin for displaying "adsense earning" within the status bar of the b
rowser without logging into google.
... in firefox is a major problem a user draws attention to what they think is a bug, but the developers say it's propwer b
rowser behaviour.
2006-10-27 - Archive of obsolete content
./configure --prefix=/export/home/alex/thunderbird --enable-application=b
rowser --disable-tests --disable-debug -disable-auto-deps --disable-freetype2 -enable-official-branding --enable-default-toolkit=gtk2 --enable-optimize=-xo5 --enable-static --disable-shared --enable-xft --enable-svg the build tools that he used to build firefox 2 are listed in his posting along with the error that he receives when he tries to build it.
...the owner of the site probably b
rowsed on the releases/2.0 dir on the ftp and got the releases, which is kind of unpolite.
2006-11-10 - Archive of obsolete content
summary: mozilla.dev.builds - november 4th to november 10th 2006 b
rowser buttons november 4th: mojr wants to know if firefox has a similar feature that the new ie 6 has built in.
... build problem firefox 2.0 on fc3 november 10th: vin downloaded the latest firefox 2 rc3 and tried to build it on fc3 with the following options: ./configure --enable-application=b
rowser --prefix=$prefix --enable-extensions=default,spatialnavigation then he tried running "make" and received the following error: /usr/bin/ld: testtarray.o(.text+0x2237): unresolvable relocation against symbol `nstarray_base::semptyhdr' /usr/bin/ld: final link failed: nonrepresentable section on output collect2: ld returned 1 exit status gmake[3]: *** [testtarray] error 1 gmake[3]: leaving dire...
2006-10-20 - Archive of obsolete content
started wed, oct 18 2006 9:38 am - a xulrunner developer, frank, discusses his desire to make xul/b
rowser based applications.
... he wants to be able to build applications that will run inside the b
rowser.
2006-11-17 - Archive of obsolete content
summary: mozilla.dev.platform - november 11th - november 17th, 2006 announcements no announcements this week traffic xulrunner: <b
rowser> not allowing javascript popup windows b notes that when using xul elements <b
rowser/> and <tabb
rowser/> the javascript popup windows don't work out of the box and asks what needs to be implement.
... boaz discuses the evolution of web b
rowsers towards a more "application mode" whereas a web b
rowser is loaded for the sole purpose of running a given website.
NPAnyCallbackStruct - Archive of obsolete content
at the time the plug-in is called, the b
rowser has already opened the file and written postscript for other parts of the page.
... when the plug-in is done, it should leave the file open, as the b
rowser can continue to write additional postscript data to the file.
NPFullPrint - Archive of obsolete content
mac os: thprint ms windows: printer's device context description the npp_print function passes the plug-in a pointer to an npprint object (previously allocated by the b
rowser).
...if you want an embedded plug-in to simply render its area of the page, set pluginprinted to false and return immediately; the b
rowser calls npp_print again with the npembedprint substructure of npprint.
NPN_InvalidateRect - Archive of obsolete content
« gecko plugin api reference « b
rowser side plug-in api summary invalidates the specified portion of the plugin's drawing area, adding it to the region that needs to be redrawn when the plugin next repaints its contents.
...the b
rowser redraws invalid areas of the document and any windowless plug-ins at regularly timed intervals.
NPN_InvalidateRegion - Archive of obsolete content
« gecko plugin api reference « b
rowser side plug-in api summary invalidates the specified drawing region prior to repainting or refreshing a windowless plug-in.
...the b
rowser redraws invalid areas of the document and windowless plug-ins at regularly timed intervals.
NPN_PostURL - Archive of obsolete content
if you specify _new or _blank, the response data is written to a new b
rowser window.
... for http urls only, the b
rowser resolves this method as the http server method post, which transmits data to the server.
NPN_SetValueForURL - Archive of obsolete content
« gecko plugin api reference « b
rowser side plug-in api summary allows a plugin to change the stored information associated with a url, in particular its cookies.
... description this entry point is designed to allow plugins to affect the cookies sent by the b
rowser back to the server.
NPP_DestroyStream - Archive of obsolete content
description the b
rowser calls the npp_destroystream function when a data stream sent to the plug-in is finished, either because it has completed successfully or terminated abnormally.
... after this, the b
rowser deletes the npstream object.
NPP_GetValue - Archive of obsolete content
« gecko plugin api reference « plug-in side plug-in api summary allows the b
rowser to query the plug-in for information.
... variable variable for which the b
rowser (caller) would like a value.
NPP_SetWindow - Archive of obsolete content
description the b
rowser calls npp_setwindow after creating the instance to allow drawing to begin.
... for windowed plug-ins on windows and unix, the window parameter contains a handle to a subwindow of the b
rowser window hierarchy.
NPPrintCallbackStruct - Archive of obsolete content
at the time the plug-in is called, the b
rowser has already opened the file and written postscript for other parts of the page.
... when the plug-in is done, it should leave the file open, so the b
rowser can continue to write additional postscript data to the file.
NP_Port - Archive of obsolete content
description on mac os, the window field of an npwindow structure points to an np_port object, which is allocated by the b
rowser.
...since the port is shared between the plug-in and other plug-ins and the b
rowser, the plug-in should always do the following: draw only within the area designated by the npwindow.
NPAPI plug-in side API - Archive of obsolete content
this chapter describes methods in the plug-in api that are available from the plug-in object; these allow plug-ins to interact with the b
rowser.
... the names of all of these methods begin with npp_ to indicate that they are implemented by the plug-in and called by the b
rowser.
Writing a plugin for Mac OS X - Archive of obsolete content
some symbols must be visible as standard c symbols so the b
rowser can find them, which means they need to be prefixed by an underscore, and must not have the c++ obfuscation that is generated by the c++ compiler.
... if you want to implement your plugin in c++ or objective-c++, you need to tell the compiler to export them in c format by using extern "c" in the header, like this: #pragma gcc visibility push(default) extern "c" { nperror np_initialize(npnetscapefuncs *b
rowserfuncs); nperror np_getentrypoints(nppluginfuncs *pluginfuncs); void np_shutdown(void); } #pragma gcc visibility pop you can check to be sure your symbols are visible and in standard c format by using the nm utility provided among the mac os x developer tools: [user@foo mymac] nm basicplugin ...
contents.rdf - Archive of obsolete content
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_theme:b
rowser"/> <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.
...--> <rdf:description chrome:skinversion="1.5" about="urn:mozilla:skin:my_theme:b
rowser"/> <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"/> <rdf:description chrome:skinversion="1.5" about="urn:mozilla:skin:my_theme:mozapps"/> <rdf:description chrome:skinversion="1.5" about="urn:mozilla:skin:my_theme:help"/> </rdf:rdf> ...
Making sure your theme works with RTL locales - Archive of obsolete content
that means that text that had a left margin will have a right margin instead (or -moz-margin-start), ar
rows that pointed right will have to point left and vice versa, and so on.
... */ #a > #b > #c { /* normal rules */ } #a[chromedir="rtl"] > #b > #c { /* rtl rules */ } tip: sometimes, like in the back and forward ar
rows, you don't really need new versions of the images.
Scratchpad - Archive of obsolete content
running scratchpad in the b
rowser context you can run scratchpad in the context of the b
rowser as a whole rather than a specific web page.
...once you've done this, the environment menu has a b
rowser option; once that's selected, your scope is the entire b
rowser rather than just the page content, as you will see from examining some globals: window /* [object chromewindow] */ gb
rowser /* [object xulelement] */ the scratchpad execution context is set to b
rowser when a snippet file has // -sp-context: b
rowser on the first line.
-ms-scrollbar-3dlight-color - Archive of obsolete content
the -ms-scrollbar-3dlight-color css property is a microsoft extension specifying the color of the top and left edges of the scroll box and scroll ar
rows of a scroll bar.
... initial valuedepends on user agentapplies toall elementsinheritedyescomputed valueas specifiedanimation typediscrete syntax values <color> the color of the top and left edges of the scroll box and scroll ar
rows of the scroll bar.
-ms-scrollbar-arrow-color - Archive of obsolete content
initial valuebuttontextapplies toall elementsinheritedyescomputed valueas specifiedanimation typediscrete syntax values <color> the color of the scroll ar
rows of the scroll bar.
...)where <alpha-value> = <number> | <percentage><hue> = <number> | <angle> examples the following example shows how to use -ms-scrollbar-arrow-color and -ms-scrollbar-face-color to display a scroll bar with a blue scroll box and ar
rows, and a scroll bar with a green scroll box and ar
rows.
-ms-scrollbar-highlight-color - Archive of obsolete content
the -ms-scrollbar-highlight-color css property is a microsoft extension that specifies the color of the slider tray, the top and left edges of the scroll box, and the scroll ar
rows of a scroll bar.
... initial valuethreedhighlightapplies toall elementsinheritedyescomputed valueas specifiedanimation typediscrete syntax values <color> the color of the slider tray, the top and left edges of the scroll box, and the scroll ar
rows of a scroll bar.
-ms-scrollbar-shadow-color - Archive of obsolete content
the -ms-scrollbar-shadow-color css property is a microsoft extension that specifies the color of the bottom and right edges of the scroll box and scroll ar
rows of a scroll bar.
... initial valuethreeddarkshadowapplies toall elementsinheritedyescomputed valueas specifiedanimation typediscrete syntax values <color> the color of the bottom and right edges of the scroll box and scroll ar
rows of a scroll bar.
::-ms-fill-upper - Archive of obsolete content
b
rowser compatibility historically supported in internet explorer and edge before version 79.
... see also ::-ms-fill-lower ::-ms-track ::-ms-thumb ::-moz-range-progress css-tricks: styling cross-b
rowser compatible range inputs with css quirksmode: styling and scripting sliders ...
Processing XML with E4X - Archive of obsolete content
compatibility issues prior to widespread b
rowser support for the <script> element, it was common for javascript embedded in a page to be surrounded by html comment tags to prevent <script> unaware b
rowsers from displaying javascript code to the user.
...they support javascript's regular dot and [] notation, but instead of accessing object properties e4x overloads these operators to access the element's children: var person = <person> <name>bob smith</name> <likes> <os>linux</os> <b
rowser>firefox</b
rowser> <language>javascript</language> <language>python</language> </likes> </person>; alert(person.name); // bob smith alert(person['name']); // bob smith alert(person.likes.b
rowser); // firefox alert(person['likes'].b
rowser); // firefox if you access something with more than one matching element, you get back an xmllist: alert(person.likes.language.length()); // 2 a...
E4X - Archive of obsolete content
although it may still work in some b
rowsers, its use is discouraged since it could be removed at any time.
... note: in gecko 1.8 based b
rowsers such as firefox 1.5, e4x is already partially enabled for web page authors.
Iterator - Archive of obsolete content
it th
rows stopiteration if there are no more items.
... examples iterating over properties of an object var a = { x: 10, y: 20, }; var iter = iterator(a); console.log(iter.next()); // ["x", 10] console.log(iter.next()); // ["y", 20] console.log(iter.next()); // th
rows stopiteration iterating over properties of an object with legacy destructuring for-in statement var a = { x: 10, y: 20, }; for (var [name, value] in iterator(a)) { console.log(name, value); // x 10 // y 20 } iterating with for-of var a = { x: 10, y: 20, }; for (var [name, value] of iterator(a)) { // @@iterator is used console.log(name, value); // x 10 // y 20 } iterates over property name var a = { x: 10, y: 20, }; for (var name in iterator(a, true)) { console.log(name); // x ...
ArrayBuffer.transfer() - Archive of obsolete content
ill then the value is still 40 buf2.bytelength; // 80 new int32array(buf2)[0]; // 42 var buf3 = arraybuffer.transfer(buf2, 0); buf2.bytelength; // 0 but if you use the polyfill then the value is still 80 buf3.bytelength; // 0 polyfill you can partially work around this by inserting the following code at the beginning of your scripts, allowing use of much of the functionality of transfer() in b
rowsers that do not natively support it.
... this is not the exact equivalent of this api because b
rowsers that natively support it are be able to internally use the c++ function realloc() which extends the length of the memory and only copies it to a new location as-needed as opposed to the following pollyfill which always copies the whole thing to a new space of memory, but this function transfers data from one arraybuffer to another arraybuffer.
Old Proxy API - Archive of obsolete content
if fix() returns undefined, the call th
rows a typeerror exception.
... example: var incompletehandler = {get:function(myproxy, name){ alert('property ' + name + ' accessed.'); return 1; } }; var p = proxy.create(incompletehandler); var q = p.blabla; // alerts 'property blabla accessed' and 1 is assigned to q p.azerty = "trying to set a property"; // th
rows an error since neither the set trap or the fundamental trap used in the set trap are implemented no-op forwarding proxy in this example, we are using a native javascript object to which our proxy will forward all operations that are applied to it.
Server-Side JavaScript - Archive of obsolete content
sounds obvious, but for at least the first twelve years of the web's evolution, developers have pretty much had to use different languages on the server from those available in the b
rowser, leading to segregated teams, disparate and inconsistent know-how, and plenty of server-side string manipulation gymnastics to generate html or ajax pages.
...some, like aptana with the open source jaxer server actually embed the entire mozilla firefox b
rowser engine (including spidermonkey) within a web server to enable server-side ajax and server-side dom access in addition to server-side execution of javascript.
Styling the Amazing Netscape Fish Cam Page - Archive of obsolete content
unfortunately, a few b
rowsers don't get this right, and end up flowing the cards as a single vertical column instead of putting the fish side by side.
... ...or it would have been, except in some b
rowsers the heading was drawn over the floated image, in contradiction to the css specification.
Building Mozilla XForms - Archive of obsolete content
$topsrcdir/b
rowser/config/mozconfig mk_add_options moz_co_project=b
rowser mk_add_options moz_objdir=@topsrcdir@/obj-@config_guess@ #mk_add_options autoconf=autoconf2.13 # possibly needed #mk_add_options moz_make_flags=-jn # (optional) replace n with the number of parallel build processes (e.g.
...$topsrcdir/b
rowser/config/mozconfig mk_add_options moz_co_project=b
rowser mk_add_options moz_objdir=@topsrcdir@/obj-@config_guess@ ac_add_options --enable-extensions="default,xforms" ac_add_options --enable-debug ac_add_options --disable-optimize ac_add_options --disable-tests building now that you have everything ready, you can rebuild mozilla with the same command you used before to build firefox without xforms.
Correctly Using Titles With External Stylesheets - Archive of obsolete content
therefore, any link to a stylesheet that includes a title attribute cannot be persistent, and is likely to be ignored by the web b
rowser.
...thus, when the document is loaded, the b
rowser will use all of the persistent stylesheets and one preferred stylesheet (but remember, there should only be one preferred stylesheet).
Fixing Incorrectly Sized List Item Markers - Archive of obsolete content
the problem in affected b
rowsers, list item markers will very often appear to be too big compared to the text in the list item itself.
...the following rule is derived from mozilla's html.css file: *|*:-moz-list-bullet, *|*:-moz-list-number {font-size: 1em;} this rule tells gecko-based b
rowsers to use the computed value of font-size for the marker's parent, which is the list item itself.
RDF in Mozilla FAQ - Archive of obsolete content
some examples of datasources that exist today are "b
rowser bookmarks", "b
rowser global history", "imap mail accounts", "nntp news servers", and "rdf/xml files".
...statements about the same rdf resource can then be intermingled: for example, the "last visit date" of a particular website comes from the "b
rowser global history" datasource, and the "shortcut keyword" that you can type to reach that website comes from the "b
rowser bookmarks" datasource.
Web Standards - Archive of obsolete content
sites developed along these lines will continue to function correctly as traditional desktop b
rowsers evolve, and as new internet devices come to market.
...this article covers common issues associated with migrating applications to the open source mozilla-based b
rowser.
Obsolete: XPCOM-based scripting for NPAPI plugins - Archive of obsolete content
it does not cover netscape 6 and 6.01 introduction plugins that used to take advantage of being scriptable via liveconnect in 4.x netscape b
rowsers lost this possibility in the new world.
...we leverage some of these ideas to help you make your netscape communicator 4.x plugins exposed to javascript in mozilla based b
rowsers.
Game promotion - Game development
grow your fanbase by talking to them, sharing tips, offering discounts, giving away prizes in competitions, or just complaining at the weather or buggy b
rowser you have to deal with.
...you can also sell a full version of the game from inside your b
rowser demo version, which will be a great move considering high competition, some developers even manage to make full b
rowser versions.
GLSL Shaders - Game development
you should: make sure you are using a modern b
rowser with good webgl support, such as the latest firefox or chrome.
...save and load index.html in your b
rowser — you should see a blue cube.
Desktop gamepad controls - Game development
the gamepad api gives you the ability to connect a gamepad to your computer and detect pressed buttons directly from the javascript code thanks to the b
rowsers implementing such feature.
... api status, b
rowser and hardware support the gamepad api is still in working draft status, although b
rowser support is already quite good — around 63% global coverage, according to caniuse.com.
Tiles and tilemaps overview - Game development
rendering static tilemaps is easy, and can be done with a nested loop iterating over columns and
rows.
... a high-level algorithm could be: for (var column = 0; column < map.columns; column++) { for (var row = 0; row < map.
rows; row++) { var tile = map.gettile(column, row); var x = column * map.tilesize; var y = row * map.tilesize; drawtile(tile, x, y); } } you can read more about this and see an example implementation in square tilemaps implementation: static maps.
Techniques for game development - Game development
optimizing startup performance how to make sure your game starts up quickly, smoothly, and without appearing to lock up the user's b
rowser or device.
...web-based audio is maturing fast, but there are still many b
rowser differences to negotiate.
Finishing up - Game development
requestanimationframe helps the b
rowser render the game better than the fixed framerate we currently have implemented using setinterval().
...bottom of the draw() function (just before the closing curly brace), add in the following line, which causes the draw() function to call itself over and over again: requestanimationframe(draw); the draw() function is now getting executed again and again within a requestanimationframe() loop, but instead of the fixed 10 milliseconds frame rate, we are giving control of the framerate back to the b
rowser.
Client hints - MDN Web Docs Glossary: Definitions of Web-related terms
in the second example, the server gives the b
rowser the hints by setting the accept-ch meta tag.
... basically, with the client hints header, the developer or application can tell the b
rowser to advertise information about itself to the server, such as the device pixel ratio, the viewport width, and the display width.
Code splitting - MDN Web Docs Glossary: Definitions of Web-related terms
as an application g
rows in complexity or is simply maintained, css and javascripts files or bundles grow in byte size, especially as the number and size of included third-party libraries increases.
... code splitting is a feature supported by bundlers like webpack and b
rowserify which can create multiple bundles that can be dynamically loaded at runtime.
Effective connection type - MDN Web Docs Glossary: Definitions of Web-related terms
effective connection type (ect) refers to the measured network performance, returning a cellular connection type, like 3g, even if the actual connection is tethered broadband or wifi, based on the time between the b
rowser requesting a page and effective type of the connection.
...to see your effective connection type, open the console of the developer tools of a supporting b
rowser and enter the following: navigator.connection.effectivetype; see also: network information api networkinformation networkinformation.effectivetype ...
First contentful paint - MDN Web Docs Glossary: Definitions of Web-related terms
first contentful paint (fcp) is when the b
rowser renders the first bit of content from the dom, providing the first feedback to the user that the page is actually loading.
... the first contentful paint time stamp is when the b
rowser first rendered any text, image (including background images), non-white canvas or svg.
First input delay - MDN Web Docs Glossary: Definitions of Web-related terms
when they click a link, tap on a button, or use a custom, javascript-powered control) to the time when the b
rowser is actually able to respond to that interaction.
... it is the length of time, in milliseconds, between the first user interaction on a web page and the b
rowser’s response to that interaction.
Grid container - MDN Web Docs Glossary: Definitions of Web-related terms
the direct children can now lay themselves out on any explicit grid defined using grid-template-columns and grid-template-
rows, or on the implicit grid created when an item is placed outside of the explicit grid.
... learn more property reference grid-template-columns grid-template-
rows grid-auto-columns grid-auto-
rows grid grid-template further reading css grid layout guide: basic concepts of grid layout ...
HSTS - MDN Web Docs Glossary: Definitions of Web-related terms
http strict transport security lets a web site inform the b
rowser that it should never load the site using http and should automatically convert all attempts to access the site using http to https requests instead.
... in other words, it tells the b
rowser that changing the protocol from http to https in a url works (and is more secure) and asks the b
rowser to do it for every request.
Progressive Enhancement - MDN Web Docs Glossary: Definitions of Web-related terms
progressive enhancement is a design philosophy that provides a baseline of essential content and functionality to as many users as possible, while delivering the best possible experience only to users of the most modern b
rowsers that can run all the required code.
... feature detection is generally used to determine whether b
rowsers can handle more modern functionality, while polyfills are often used to add missing features with javascript.
TCP handshake - MDN Web Docs Glossary: Definitions of Web-related terms
the three message mechanism is designed so that two computers that want to pass information back and forth to each other can negotiate the parameters of the connection before transmitting data such as http b
rowser requests.
... the host, generally the b
rowser, sends a tcp synchronize packet to the server.
Web performance - MDN Web Docs Glossary: Definitions of Web-related terms
web performance is the objective time from when a request for content is made until the requested content is displayed in the user's b
rowser, objective render times, and the subjective user experience of load time and runtime.
... objectively, it is measurable time, in milliseconds, it takes for the web page or web application to be downloaded, painted in the user's web b
rowser, and become responsive and interactive.
MDN Web Docs Glossary: Definitions of Web-related terms
attribute b bandwidth base64 baseline beacon bézier curve bidi bigint blink block block (css) block (scripting) block cipher mode of operation boolean boot2gecko bootstrap bounding box breadcrumb brotli b
rowser b
rowsing context buffer c cache cacheable caldav call stack callback function canonical order canvas card sorting carddav caret cdn certificate authority certified challenge-response authentication character character e...
...tive navigation directive netscape navigator network throttling nntp node node (dom) node (networking) node.js non-normative normative null nullish value number o object object reference oop opengl openssl opera b
rowser operand operator origin ota owasp p p2p pac packet page load time page prediction parameter parent object parse parser pdf perceived performance percent-encoding php pixel placeholder names pl...
Assessment: Accessibility troubleshooting - Learn web development
the <audio> player isn't accessible to those using older b
rowsers that don't support html5 audio.
... the table the data table is not currently very accessible — it is hard for screenreader users to associate data
rows and columns together, and the table also has no kind of summary to make it clear what it shows.
Accessibility - Learn web development
to help you achieve this, this module will cover general best practices (which are demonstrated throughout the html, css, and javascript topics), cross b
rowser testing, and some tips on enforcing accessibility from the start.
...wai-aria is a technology that can help with such problems by adding in further semantics that b
rowsers and assistive technologies can recognize and use to let users know what is going on.
Backgrounds and borders - Learn web development
you can also use keywords: cover — the b
rowser will make the image just large enough so that it completely covers the box area while still retaining its aspect ratio.
... contain — the b
rowser will make the image the right size to fit inside the box.
Attribute selectors - Learn web development
this flag tells the b
rowser to match ascii characters case-insensitively.
... note: there is also a newer value s, which will force case-sensitive matching in contexts where matching is normally case-insensitive, however this is less well supported in b
rowsers and isn't very useful in an html context.
How does the Internet work? - Learn web development
internet and the web as you might notice, when we b
rowse the web with a web b
rowser, we usually use the domain name to reach a website.
...among those computers, some computers (called web servers) can send messages intelligible to web b
rowsers.
How to structure a web form - Learn web development
many assistive technologies and b
rowser plugins can discover <form> elements and implement special hooks to make them easier to use.
...the last one is an <input> element of type date, for entering the expiration date of the card; this one will come up with a date picker widget in supporting b
rowsers, and fall back to a normal text input in non-supporting b
rowsers.
Your first form - Learn web development
basic form styling now that you have finished writing your form's html code, try saving it and looking at it in a b
rowser.
...the names are important on both the client- and server-side; they tell the b
rowser which name to give each piece of data and, on the server side, they let the server handle each piece of data by name.
HTML basics - Learn web development
if they overlap as shown above, then your web b
rowser will try to make the best guess at what you were trying to say, which can lead to unexpected results.
...this sets the title of your page, which is the title that appears in the b
rowser tab the page is loaded in.
Publishing your website - Learn web development
using a web-based ide such as codepen there are a number of web apps that emulate a website development environment, allowing you to enter html, css and javascript, and then display the result of that code as a website — all in one b
rowser tab.
... navigate your b
rowser to username.github.io to see your website online.
Add a hitmap on top of an image - Learn web development
text links (perhaps styled with css) are preferable to image maps for several reasons: text links are lightweight, maintainable, often more seo-friendly, and support accessibility needs (e.g., screen readers, text-only b
rowsers, translation services).
... <map name="example-map-1"> <area shape="circle" coords="200,250,25" href="page-2.html" alt="circle example" /> <area shape="rect" coords="10, 5, 20, 15" href="page-3.html" alt="rectangle example" /> </map> step 3: make sure it works for everybody you aren’t done until you test image maps rigorously on many b
rowsers and devices.
Introduction to HTML - Learn web development
metadata in html the head of an html document is the part that is not displayed in the web b
rowser when the page is loaded.
... html text fundamentals one of html's main jobs is to give text meaning (also known as semantics), so that the b
rowser knows how to display it correctly.
Mozilla splash page - Learn web development
in each case (except one — which one is inherently responsive?) we want the b
rowser to serve the 120px wide version when the viewport width is 500px wide or less, or the 400px wide version otherwise.
... note: to properly test the srcset/sizes examples, you'll need to upload your site to a server (using github pages is an easy and free solution), then from there you can test whether they are working properly using b
rowser developer tools such as the firefox network monitor.
HTML Tables - Learn web development
guides this module contains the following articles: html table basics this article gets you started with html tables, covering the very basics such as
rows and cells, headings, making cells span multiple columns and
rows, and how to group together all the cells in a column for styling purposes.
... html table advanced features and accessibility this module looks at some more advanced features of html tables — such as captions/summaries and grouping your
rows into table head, body and footer sections — as well as looking at the accessibility of tables for visually impaired users.
Asynchronous JavaScript - Learn web development
guides general asynchronous programming concepts in this article we'll run through a number of important concepts relating to asynchronous programming, and how this looks in web b
rowsers and javascript.
... making asynchronous programming easier with async and await promises can be somewhat complex to set up and understand, and so modern b
rowsers have implemented async functions and the await operator.
Arrays - Learn web development
as in previous articles, let's learn about the real basics of arrays by entering some examples into b
rowser developer console.
... for each item, print it out to the b
rowser console with console.log().
Silly story generator - Learn web development
go to the page containing the raw text and keep this open in a separate b
rowser tab somewhere.
...the following for example turns the background of the <html> element red — so the entire b
rowser window should go red if the javascript is applied properly: document.queryselector('html').style.backgroundcolor = 'red'; math.round() is a built-in javascript method that simply rounds the result of a calculation to the nearest whole number.
Test your skills: Object-oriented JavaScript - Learn web development
note: in the examples below, if there is an error in your code it will be outputted into the results panel on the page, to help you try to figure out the answer (or into the b
rowser's javascript console, in the case of the downloadable version).
... call your calcperimeter() method on the instance, to see whether it logs the calculation result to the b
rowser devtools' console as expected.
JavaScript — Dynamic client-side scripting - Learn web development
introducing javascript objects in javascript, most things are objects, from core javascript features like strings and arrays to the b
rowser apis built on top of javascript.
... client-side web apis when writing client-side javascript for web sites or applications, you won't go very far before you start to use apis — interfaces for manipulating different aspects of the b
rowser and operating system the site is running on, or even data from other web sites or services.
Measuring performance - Learn web development
the performanceobserver api can be used to observe performance measurement events and it can notify you of new performance entries as they are recorded in the b
rowser's performance timeline.
... network tools most b
rowsers have tools available that you can use to run against loaded pages and determine how they are performing.
The "why" of web performance - Learn web development
web performance refers to how quickly site content loads and renders in a web b
rowser, and how well it responds to user interaction.
...the site will be very slow to load—if it loads at all—with blocking scripts possibly timing out, and adverse cpu impact causing b
rowser crashes if it does load.
Web performance - Learn web development
this article introduces the components of performance, from web page loading and rendering, including how your content makes it into your users b
rowser to be viewed, to what groups of people we need to consider when thinking about performance, how do users perceive performance?
... mobile performance with web access on mobile devices being so popular, and all mobile platforms having fully-fledged web b
rowsers, but possibly limited bandwidth, cpu and battery life, it is important to consider the performance of your web content on these platforms.
Server-side website programming first steps - Learn web development
client-server overview now that you know the purpose and potential benefits of server-side programming, we're going to examine in detail what happens when a server receives a "dynamic request" from a b
rowser.
... server-side web frameworks the last article showed you what a server-side web application needs to do in order to respond to requests from a web b
rowser.
Getting started with Ember - Learn web development
automated testing environment that runs your tests in the b
rowser, allowing you to test like a user.
...(1) | 12ms the development server launches at http://localhost:4200, which you can visit in your b
rowser to check out what your work looks like so far.
Ember interactivity: Events, classes and state - Learn web development
coming back to our b
rowser tab with the app running, we can type whatever we want, and when we hit enter we'll be greeted with an alert message telling us exactly what we typed.
...replace it with the following: this.todos.add(text); if we try this out in the todo app in our b
rowser (npm start, go to localhost:4200), it will look like nothing happens after hitting the enter key (although the fact that the app builds without any errors is a good sign).
Deployment and next steps - Learn web development
css: css => { css.write('public/build/bundle.css'); } }), later on in the same file you'll also see how rollup minimizes our scripts in production mode and launches a local server in development mode: // in dev mode, call `npm run start` once // the bundle has been generated !production && serve(), // watch the `public` directory and refresh the // b
rowser on changes when not in production !production && livereload('public'), // if we're building for production (npm run build // instead of npm run dev), minify production && terser() ], there are many plugins for rollup that allow you to customize its behavior.
... once it has finished deploying, go to the "production" url in your b
rowser, and you'll see the app deployed!
Working with Svelte stores - Learn web development
'completed' : 'active'}` todos[i] = { ...todos[i], ...todo } } add the following reactive block beneath the block that starts with let filter = 'all': $: { if (filter === 'all') $alert = 'b
rowsing all todos' else if (filter === 'active') $alert = 'b
rowsing active todos' else if (filter === 'completed') $alert = 'b
rowsing completed todos' } and finally for now, update the const checkalltodos and const removecompletedtodos blocks as follows: const checkalltodos = (completed) => { todos = todos.map(t => ({...t, completed})) $alert = `${completed ?
...create a few todos and then close the b
rowser.
Command line crash course - Learn web development
this is exactly the same as you would see with urls in your web b
rowser.
...if you enter it in a new b
rowser tab, you’ll (eventually) get redirected to /docs/web/api/windoworworkerglobalscope/fetch.
Index
678 make money from b
rowser extensions guide, monetization, webextensions, distribution while users can download b
rowser extensions for firefox free of cost from addons.mozilla.org (amo), this doesn’t mean you can’t make money from b
rowser extensions, and to a more limited extent themes.
... 686 theme concepts theme, add-on themes developed using the webextensions api in firefox enable you to change the look of the b
rowser by adding images to the header area of the firefox b
rowser; this is the area behind the menu bar, toolbars, address bar, search bar, and tab strip.
Benchmarking
any performance metrics gathered by such builds are largely unrelated to what would be found in a release b
rowser.
...the poisoning can be disabled by setting the environment variable jsgc_disable_poisoning=1 before starting the b
rowser.
Debugging a hang on OS X (Archived)
when it's done parsing the data, click the "show text report" button; a new window will open with a couple of
rows with stacktraces for all the threads in the sampled application.
... when it's done parsing the data, you should now have a couple of
rows with stacktraces for all the threads in the sampled application.
Index
171 tracking protection privacy, private b
rowsing, blocking, tracking starting in version 42, firefox desktop and firefox for android include built-in tracking protection.
... in private b
rowsing windows (tabs, in firefox for android), firefox will block content loaded from domains that track users across sites.
Frame script environment
the frame script's global is a contentframemessagemanager, giving it the following environment: content the dom window of the content loaded in the b
rowser.
... may be null (see below) docshell the nsidocshell associated with the b
rowser.
Limitations of frame scripts
examples of apis add-on authors should avoid in frame scripts: nsifileinputstream nsifileoutputstream constructing a file from a string or nsifile (but file objects can be sent via message manager) htmlinputelement.mozsetfilenamearray (alternative: mozsetfilearray) xul and b
rowser ui anything that tries to touch the b
rowser ui or anything to do with xul is likely to not work in the content process.
...the target property of the object passed into the message handler in the chrome process is the xul <b
rowser> receiving the message, and you can get the chrome window from that (note: i'm not really sure how...).
Firefox and the "about" protocol
when opening a new tab about:performance displays memory and performance information about firefox subprocesses/add-ons/tabs about:plugins displays information about installed plugins about:policies lists out the firefox for enterprise policies about:preferences firefox settings (also available through firefox menu > options) about:privateb
rowsing start page when opening a private window about:profiles display and manage firefox profiles about:protections privacy protections report consisting of enhanced tracking protection, firefox monitor and firefox lockwise data about:restartrequired a page users are sent to when firefox requires a restart due to an update about:reader indicates a w...
...on mark) > troubleshooting information) about:sync-log displays a synchronization protocol related to the sync feature about:telemetry displays telemetry data collected and sent to mozilla while firefox is running (in case the user enabled telemetry) about:url-classifier displays the status of the url classifier services that firefox uses (for example for safe b
rowsing) 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.
HTMLIFrameElement.addNextPaintListener()
the addnextpaintlistener() method of the htmliframeelement is used to define a handler to listen for the next mozafterpaint event coming from the b
rowser <iframe>.
... examples var b
rowser = document.queryselector('iframe'); function onnextpaint() { console.log("paint has occured"); } b
rowser.addnextpaintlistener(onnextpaint); specification not part of any specification.
HTMLIFrameElement.getCanGoBack()
the getcangoback() method of the htmliframeelement interface is used to indicate whether it's possible to go back in the navigation history of the b
rowser <iframe>.
... example function canmovebwd() { b
rowser.getcangoback().then(function(result) { if (result) { back.disabled = false; console.log("it's possible to navigate the history backward."); } else { back.disabled = true; console.log("it's not possible to navigate the history backward."); } }); } specification not part of any specification.
HTMLIFrameElement.getCanGoForward()
the getcangoforward() method of the htmliframeelement is used to indicate whether it's possible to go forward in the navigation history of the b
rowser <iframe>.
... example function canmovefwd() { b
rowser.getcangoforward().then(function(result) { if (result) { fwd.disabled = false; console.log("it's possible to navigate the history forward."); } else { fwd.disabled = true; console.log("it's not possible to navigate the history forward."); } }); } specification not part of any specification.
HTMLIFrameElement.getManifest()
the getmanifest() method of the htmliframeelement interface retrieves the manifest of an app loaded in the b
rowser <iframe> and returns it as json.
... examples var b
rowser = document.queryselector('iframe'); b
rowser.addeventlistener('mozb
rowserloadend',function() { var request = b
rowser.getmanifest().then(function(json) { console.log(json); }); }); specification not part of any specification.
HTMLIFrameElement.getScreenshot()
it won't wait more than 2000ms (this delay is defined by the gecko dom.b
rowserelement.maxscreenshotdelayms preference).
... examples var b
rowser = document.queryselector('iframe'); var request = b
rowser.getscreenshot(100, 100); request.onsuccess = function() { var blob = request.result; var url = url.createobjecturl(blob); } specification not part of any specification.
HTMLIFrameElement.getVolume()
the getvolume() method of the htmliframeelement gets the current volume of the b
rowser <iframe>.
... example callback version: var b
rowser = document.queryselector('iframe'); var request = b
rowser.getvolume(); request.onsuccess = function() { console.log('the current b
rowser volume is ' + request.result); } promise version: var b
rowser = document.queryselector('iframe'); b
rowser.getvolume().then(function(volume) { console.log('the current b
rowser volume is ' + volume); }); specification not part of any specification.
HTMLIFrameElement.mute()
the mute() method of the htmliframeelement mute any audio playing in the b
rowser <iframe>.
... example var b
rowser = document.queryselector('iframe'); b
rowser.mute(); specification not in a specification.
HTMLIFrameElement.reload()
parameters hardreload optional a boolean that indicates whether all the resources to reload must be revalidated (true) or may be taken directly from the b
rowser cache (false).
... examples stopreload.addeventlistener('touchend',function() { if(stopreload.textcontent === 'x') { b
rowser.stop(); } else { b
rowser.reload(); } }); specification not part of any specification.
HTMLIFrameElement.setVolume()
the setvolume() method of the htmliframeelement sets the current volume of the b
rowser <iframe>.
... example var b
rowser = document.queryselector('iframe'); b
rowser.setvolume(0.5); specification not part of any specification.
HTMLIFrameElement.unmute()
the unmute() method of the htmliframeelement unmutes any audio playing in the b
rowser <iframe>.
... example var b
rowser = document.queryselector('iframe'); b
rowser.unmute(); specification not part of any specification.
HTMLIFrameElement.zoom()
the zoom() method of the htmliframeelement interface changes the zoom factor of the b
rowser <iframe>'s content.
... examples var b
rowser = document.queryselector('iframe'); var zoomfactor = 1; zoomin.addeventlistener('touchend',function() { zoomfactor += 0.1; b
rowser.zoom(zoomfactor); }); zoomout.addeventlistener('touchend',function() { zoomfactor -= 0.1; b
rowser.zoom(zoomfactor); }); specification not part of any specification.
Embedding the editor
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 b
rowser via nsiwebb
rowser, but instead having an editable document.
...(this would be analogous to the nsiwebnavigation interface used for a b
rowser.) when we have one editor per docshell, loading a frameset document, or a page with an <iframe> in composer, will instantiate more than one low-level editor.
Embedding Mozilla
that means you can embed a web b
rowser inside a third-party application, open channels and streams through the network backend, walk through the dom and so on.
... roll your own b
rowser - an embedding howto a quick introduction to embedding mozilla.
Gecko
gecko is used in many applications, including a few b
rowsers such as firefox and seamonkey (for a complete list, please refer to wikipedia's article on gecko).
... documentation chrome this page contains information specific to b
rowser chrome (not google chrome) code running in gecko.
How to get a stacktrace with WinDbg
once the b
rowser crashes, you will see an error (such as "access violation") in the windbg command window.
...once the b
rowser has crashed or been stopped, continue with the steps below.
How to Report a Hung Firefox
another way to trigger a crash in a hung tab is to run the following script in the b
rowser console (opened after selecting the hung tab): let wm = cc["@mozilla.org/appshell/window-mediator;1"].
... getservice(ci.nsiwindowmediator); let win = wm.getmostrecentwindow("navigator:b
rowser"); let b
rowser = win.gb
rowser.selectedb
rowser; if (b
rowser.isremoteb
rowser) { b
rowser.messagemanager.loadframescript('data:,let appinfo = components.classes["@mozilla.org/xre/app-info;1"];if (appinfo && appinfo.getservice(components.interfaces.nsixulruntime).processtype != components.interfaces.nsixulruntime.process_type_default) {components.utils.import("resource://gre/modules/ctypes.jsm");var zero = new ctypes.intptr_t(8);var badptr = ctypes.cast(zero, ctypes.pointertype(ctypes.int32_t));var crash = badptr.contents;}', true); } other techniques on os x if you use a nightly build (>= firefox 16), you can use activity monitor's "sample process" feature to generate a sample.
Implementing Download Resuming
(todo: document what webb
rowserpersist/exthandler do).
... note: in versions of firefox prior to 3.0 alpha 7, nsiwebb
rowserpersist cannot append to existing files (as opposed to overwriting them), and is therefore not usable for this task (see bug 129921).
Log.jsm
the log.jsm javascript code module (formerly named log4moz.js) provides a log4j style api for logging log messages to various endpoints, such as the b
rowser console or a file on disk.
...// use dots to create a hierarchy, this way you can later change // the log level of sets of loggers under some common root let log = log.repository.getlogger("myextension.myclass"); log.level = log.level.debug; // a console appender logs to the b
rowser console.
Translation phase
these are the mozilla application projects that are localized using the l10n tools above: firefox the award-winning firefox® web b
rowser has security, speed and new features that will change the way you use the web.
... seamonkey seamonkey® is the all-in-one application formerly known as the "mozilla application suite", containing a web b
rowser, a mail and newsgroups client, an html editor, web development tools, and an irc chat client.
Localization technical reviews
defines.inc the file for each app (like b
rowser/defines.inc) contains the names of all contributors that a localization team would like to credit the work to.
... check for bad migration of access keys in the past, it was common to find broken access keys for safari and camino in b
rowser/chrome/b
rowser/migration/migration.dtd.
Basics
a n n ] [ x1 x2 x3 : xn ] in mozilla, mathml runs inside the main b
rowser.
... so it responds to other b
rowser operations such as the zoom (try view -> text zoom), and you can do links a 2 + b 2 = c 2 , apply stylistic effects a 2 + b 2 = c 2 , or use color a 2 + b 2 = c 2 in very strange ways p(x) q(x) = a0 + a1x + a2 x2 + ...
Fonts for Mozilla 2.0's MathML engine
mozilla has general support for the common delimiters and ar
rows that have the necessary unicode assignments.
...finally, include the mathml-fonts/resource/mathml.css style sheet in your web pages, for example by adding the following rule to the default style sheet of your web site: @import url('/path/to/resource/mathml.css'); b
rowsers have default font-families in their user agent stylesheets.
Mozilla MathML Status
mtable - columnspacing,
rowspacing, framespacing implemented.
... mtable - equal
rows, equalcolumns not implemented.
Mozilla DOM Hacking Guide
other b
rowsers allow the history object to be used like an array, e.g.
...it is the name of the javascript object that will be available in the b
rowser through the dom.
Mozilla Web Services Security Model
please do not depend on anything in it being correct for security.) to prevent the b
rowser from being used as a tool for web sites to obtain priveleges that belong to the b
rowser's user (such as being behind a firewall or getting the benefits of the user's cookies), web b
rowsers restrict what web pages can do when accessing things in other domains.
... the delegate element a delegate element means that the b
rowser should delegate the access control to a web-scripts-access.xml file in the directory that the service is in.
Mozilla Development Tools
mxr you can b
rowse the up-to-the-minute latest version of the source code online through a massively-hyperlinked source code b
rowser (based on lxr) that lets you cross-reference function and variable names.
... bugzilla bugzilla is where developers can report bugs in the mozilla source releases, and b
rowse an online database of already-reported bugs.
Refcount tracing and balancing
warning: you should never use this without xpcom_mem_log_classes and/or xpcom_mem_log_objects, because without some filtering the logging will be completely useless due to how slow the b
rowser will run and how large the logs it produces will be.
...for example: env xpcom_mem_log_classes=nsdocshell xpcom_mem_refcnt_log=./refcounts.log ./mach run this will log the addref and release calls only for instances of nsdocshell while running the b
rowser using mach, to a file refcounts.log.
Debugging out-of-memory problems
out-of-memory exceptions from js setting memory.dump_reports_on_oom in about:config to true will cause the b
rowser to automatically write about:memory dumps to a temp file printed to the b
rowser console (note: not web console) when an oom crash is encountered.
... out-of-memory crashes in some cases, running out of memory causes the b
rowser to crash.
Firefox Sync
firefox sync synchronizes state and configuration data used by the b
rowser, such as bookmarks, history, preferences, bookmarks, and so forth among all your devices.
... the exact types of information synced is user-configurable in the b
rowser's preferences or options page.
Midas editor module security preferences
to enable these functions, you must modify your b
rowser preferences.
... warning: changing these preferences can leave your b
rowser insecure, especially if you grant permission to untrusted sites.
NSS_3.12_release_notes.html
ereference before null check in devutil.c bug 353912: misc klocwork bugs in lib/ckfw bug 354008: klocwork bugs in freebl bug 359331: modutil -changepw strict shutdown failure bug 373367: verify ocsp response signature in libpkix without decoding and reencoding bug 390542: libpkix fails to validate a chain that consists only of one self issued, trusted cert bug 390728: pkix_pl_ocsprequest_create th
rows an error if it was not able to get aia location bug 397825: libpkix: ifdef code that uses user object types bug 397832: libpkix leaks memory if a macro calls a function that returns an error bug 402727: functions responsible for creating an object leak if subsequent function code produces an error bug 402731: pkix_pl_pk11certstore_crlquery will crash if fails to acquire dp cache.
... bug 406647: libpkix does not use user defined revocation checkers bug 407064: pkix_pl_ldapcertstore_buildcrllist should not fail if a crl fails to be decoded bug 421216: libpkix test nss_thread leaks a test certificate bug 301259: signtool usage message is unhelpful bug 389781: nss should be built size-optimized in b
rowser builds on linux, windows, and mac bug 90426: use of obsolete typedefs in public nss headers bug 113323: the first argument to pk11_findcertfromnickname should be const.
PKCS11 module installation
choose "b
rowse..." to find the location of the pkcs #11 module on your local computer, and choose "ok" when done.
... provisioning pkcs #11 modules using the pkcs11 api starting with firefox 58, extensions can use the pkcs11 b
rowser extension api to enumerate pkcs #11 modules and make them accessible to the b
rowser as sources of keys and certificates.
NSS Tools modutil
enabling fips compliance this example enables fips 140-2 compliance in communicator's internal module: modutil -dbdir "c:\databases" -fips true the security module database tool displays a warning: warning: performing this operation while the b
rowser is running could causecorruption of your security databases.
... if the b
rowser is currently running,you should exit b
rowser before continuing this operation.
Shumway
the simple method is to install the shumway extension (or run a b
rowser version with shumway included and enabled) and b
rowse to your flash content with adobe flash player set "ask to activate" or "never activate" in firefox's add-ons menu (this will be listed as "shockwave flash" under the plugins tab).
...from the main page for shumway at github, click on "issues" and b
rowse the outstanding issues for similar bugs to contribute to.
Creating JavaScript tests
jstests run in both the shell and the b
rowser (although you can specify that the test should be run in only one of the two locations).
... it's also a good sanity check to run each new test against an unpatched shell or b
rowser.
Index
420 js_objectisdate date, jsapi reference, javascript, spidermonkey js_objectisdate() can be used to check if you are dealing with a date object, or a date object used across compartments (or windows or sites, in the b
rowser embedding).
... 489 js_th
rowstopiteration jsapi reference, spidermonkey js_th
rowstopiteration th
rows the appropriate stopiteration object for the function currently executing in cx.
JS_GetGlobalObject
although it may still work in some b
rowsers, its use is discouraged since it could be removed at any time.
...spidermonkey supports applications that have multiple global objects, such as the various window objects in a web b
rowser.
JS_SetThreadStackLimit
although it may still work in some b
rowsers, its use is discouraged since it could be removed at any time.
... description js_setthreadstacklimit sets the maximum (if stack g
rows upward) or minimum (downward) legal stack byte address in limitaddr for the thread or process stack used by cx.
JS_ValueToString
although it may still work in some b
rowsers, its use is discouraged since it could be removed at any time.
...this happens, for example, if v is an object and v.tostring() th
rows an exception.
Parser API
interface th
rowstatement <: statement { type: "th
rowstatement"; argument: expression; } a throw statement.
... th
rowstatement(arg[, loc]) arg: customexpression loc: sourcelocation returns: customstatement callback to produce a custom throw statement node.
SpiderMonkey 1.8
the main difference is that js_reportallocationoverflow th
rows an exception which the application may catch.
... js_th
rowstopiteration th
rows the appropriate stopiteration exception object for the given context.
Pinning violation reports
it allows site operators to specify who can issue valid certificates for them, rather than accepting any one of the hundreds of built-in root certificates that ship with your b
rowser.
... if a site makes use of key pinning, and your b
rowser sees a certificate chain for that site which does not match the pin, firefox will reject the connection and display an error page.
History Service Design
objectives the primary objectives of the new history service implementation in places are: improve access to b
rowsing history allow association of useful metadata with urls flexible query system for both end-users and add-ons developers clean architecture for ease of code reuse and maintainability the most known and visible feature of history are views.
...history service provides the basics to create such adaptive search paths, allowing for a better b
rowsing experience through a common interface.
Using the Places annotation service
uri's are easier to use for services that want to annotate a web page loaded in the b
rowser, while id's are easier to use for services already working with the places database.
... creating the annotation service the annotation contract id is @mozilla.org/b
rowser/annotation-service;1 var annotationservice = components.classes["@mozilla.org/b
rowser/annotation-service;1"] .getservice(components.interfaces.nsiannotationservice); note that the annotation service is not thread-safe.
extIApplication
windows readonly attribute nsivariant an array of b
rowser windows within the application.
... activewindow readonly attribute fueliwindow the currently active b
rowser window.
XPCOM changes in Gecko 2.0
once that's done, the extensions can then be loaded by simply reading their manifests, loading their components, and continuing the startup process, all without having to restart the b
rowser.
...miscellaneous xpcnativewrapper changes using the delete operator on "expando" properties of an xpcnativewrapper no longer th
rows a security exception.
Components.Constructor
for example: var binaryinputstream = components.constructor("@mozilla.org/binaryinputstream;1"); var bis = new binaryinputstream(); print(bis.tostring()); // "[xpconnect wrapped nsisupports]" try { // someinputstream is an existing nsiinputstream // th
rows because bis hasn't been qi'd to nsibinaryinputstream bis.setinputstream(someinputstream); } catch (e) { bis.queryinterface(components.interfaces.nsibinaryinputstream); bis.setinputstream(someinputstream); // succeeds now } if two arguments are given, the created instance will be nsisupports.queryinterface()'d to the xpcom interface whose name is the second argument: var binaryinputstream...
...the arguments used with the initialization method are the arguments passed to the components.constructor()-created function when called: var binaryinputstream = components.constructor("@mozilla.org/binaryinputstream;1", "nsibinaryinputstream", "setinputstream"); try { // th
rows, because number of arguments isn't equal to the number of // arguments nsibinaryinputstream.setinputstream takes var bis = new binaryinputstream(); } catch (e) { // someinputstream is an existing nsiinputstream bis = new binaryinputstream(someinputstream); // succeeds var bytes = bis.readbytearray(somenumberofbytes); // succeeds } compare instance creation from base principles with in...
mozIAsyncHistory
1.0 66 introduced gecko 24.0 inherits from: nsisupports last changed in gecko 24.0 (firefox 24.0 / thunderbird 24.0 / seamonkey 2.21) implemented by: @mozilla.org/b
rowser/history;1 as a service: var asynchistory = components.classes["@mozilla.org/b
rowser/history;1"] .getservice(components.interfaces.moziasynchistory); method overview void getplacesinfo(in jsval aplaceidentifiers, in mozivisitinfocallback acallback); void isurivisited(in nsiuri auri, in mozivisitedstatuscallback acallback); void updateplaces(in moziplaceinfo, [optional] in mozivisitinfocallback acallback); me...
... note that this lets you add to history even in private b
rowsing mode; if that's not desired you can first check whether the window is in private b
rowsing mode.
mozIRegistry
which explains how this information came to be associated with the notion of a "registry." someday (i hope) this page will be properly titled so that everybody knows it is the place to come to in order to find out how they are supposed to link together the various xpcom components that together form the mozilla b
rowser.
...it will also facilitate building a b
rowser-based application that will allow people to display and edit its contents.
mozIStorageService
if this method th
rows ns_error_file_corrupted, it's recommended that you call mozistorageservice.backupdatabasefile() to back up the database so that user data is not lost (although we have no way of recovering this data yet).
...if this method th
rows ns_error_file_corrupted, it's recommended that you call mozistorageservice.backupdatabasefile() to back up the database so that user data is not lost (although we have no way of recovering this data yet).
nsIAccessibleProvider
for example now it is used by <xul:iframe>, <xul:b
rowser> and <xul:editor>.
...00001024 xullistheader 0x00001025 xullistitem 0x0000100c xulmenubar 0x0000100d xulmenuitem 0x0000100e xulmenupopup 0x0000100f xulmenuseparator 0x00001010 xulpane 0x00001011 xulprogressmeter 0x00001012 xulscale 0x00001013 xulstatusbar 0x00001014 xulradiobutton 0x00001015 xulradiogroup 0x00001016 xultab 0x00001017 the single tab in a dialog or tabb
rowser/editor interface.
nsIAccessibleTableCell
rowextent long return the number of
rows occupied by this accessible cell.
... the result differs from 1 if the specified cell spans multiple
rows.
nsIAccessibleTreeCache
although it may still work in some b
rowsers, its use is discouraged since it could be removed at any time.
...acount the number of treeitem accessibles to invalidate, the number sign specifies whether
rows have been inserted (plus) or removed (minus) treeviewchanged() invalidates children created for the previous tree view.
nsIClipboardDragDropHooks
return value true indicates to the operating system that if a drop does happen on this b
rowser, it will be accepted.
...onpasteordrop() provide an alternative action to the built-in behavior when something is dropped on the b
rowser or in an editor.
nsIContainerBoxObject
1.0 66 introduced gecko 1.9 inherits from: nsisupports last changed in gecko 1.9 (firefox 3) the boxobject belonging to a xul b
rowser, editor or iframe element implements this interface.
...the b
rowser.xml, editor.xml and general.xml bindings use this property to gain access to other properties such as webnavigation, contentdocument and contentwindow.
nsIContentFrameMessageManager
examples once you obtain the conten frame messge manager, you can send messages to listeners who registered with services.mm.addmessagelistener get content message manager from b
rowser this could would run in a nsidomwindow scope.
... var acfmm = gb
rowser.selectedb
rowser._docshell.queryinterface(ci.nsiinterfacerequestor).getinterface(ci.nsicontentframemessagemanager); get content message manager from content window window here is a html window or any window inside a tab, this code would run from a framescript.
nsIDOMChromeWindow
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 b
rowserdomwindow nsib
rowserdomwindow the related nsib
rowserdomwindow instance which provides access to yet another layer of utility functions by chrome script.
... it will be null for domwindows not corresponding to b
rowsers.
nsIDOMNSHTMLDocument
return value this method is not supported and always th
rows an exception.
... return value this method is not supported and always th
rows an exception.
nsIFileView
methods setdirectory() set the directory to be b
rowsed.
... void setdirectory( in nsifile directory ); parameters directory the directory to be b
rowsed.
nsILivemarkService
implemented by: @mozilla.org/b
rowser/livemark-service;2.
... to use this service, use: var livemarkservice = components.classes["@mozilla.org/b
rowser/livemark-service;2"] .getservice(components.interfaces.nsilivemarkservice); method overview long long createlivemark(in long long folder, in astring name, in nsiuri siteuri, in nsiuri feeduri, in long index); long long createlivemarkfolderonly(in long long folder, in astring name, in nsiuri siteuri, in nsiuri feeduri, in long index); nsiuri getfeeduri(in long long container); long long getlivemarkidforfeeduri(in nsiuri afeeduri); nsiuri getsiteuri(in long long container); boolean islivemark(in long long folder); void reloadalllivemarks(); void reloadlivemarkfolder(in long long folderid); void setfe...
nsILocalFileMac
although it may still work in some b
rowsers, its use is discouraged since it could be removed at any time.
...although it may still work in some b
rowsers, its use is discouraged since it could be removed at any time.
nsIMessageBroadcaster
th
rows ns_error_not_initialized if the sender is not initialized.
...th
rows ns_error_failure when the message receiver cannot be found.
nsIMessageSender
th
rows ns_error_not_initialized if the sender is not initialized.
...th
rows ns_error_failure when the message receiver cannot be found.
nsINavHistoryContainerResultNode
2.1) method overview nsinavhistoryresultnode findnodebydetails(in autf8string auristring, in prtime atime, in long long aitemid, in boolean arecursive); nsinavhistoryresultnode getchild(in unsigned long aindex); unsigned long getchildindex(in nsinavhistoryresultnode anode); attributes attribute type description childcount unsigned long the number of child nodes; accessing this th
rows an ns_error_not_available exception of containeropen is false.
...accessing this th
rows an exception if the node isn't a dynamic container.
nsISHEntry
inherits from: nsihistoryentry last changed in gecko 6.0 (firefox 6.0 / thunderbird 6.0 / seamonkey 2.3) implemented by: @mozilla.org/b
rowser/session-history-entry;1.
... to create an instance, use: var shentry = components.classes["@mozilla.org/b
rowser/session-history-entry;1"] .createinstance(components.interfaces.nsishentry); method overview void addchildshell(in nsidocshelltreeitem shell); nsidocshelltreeitem childshellat(in long index); void clearchildshells(); nsishentry clone(); void create(in nsiuri uri, in astring title, in nsiinputstream inputstream, in nsilayouthistorystate layouthistorystate, in nsisupports cachekey, in acstring contenttype, in nsisupports owner, in unsigned long long docshellid, in boolean dynamiccreation); native code only!
nsISyncMessageSender
th
rows ns_error_not_initialized if the sender is not initialized.
...th
rows ns_error_failure when the message receiver cannot be found.
nsITaggingService
1.0 66 introduced gecko 1.9 inherits from: nsisupports last changed in gecko 2.0 (firefox 4 / thunderbird 3.3 / seamonkey 2.1) implemented by: @mozilla.org/b
rowser/tagging-service;1.
... to use this service, use: var taggingsvc = components.classes["@mozilla.org/b
rowser/tagging-service;1"] .getservice(components.interfaces.nsitaggingservice); method overview void taguri(in nsiuri auri, in nsivariant atags); void untaguri(in nsiuri auri, in nsivariant atags); nsivariant geturisfortag(in astring atag); nsivariant gettagsforuri(in nsiuri auri, [optional] out unsigned long length, [retval, array, size_is(length)] out wstring atags); attributes attribute type description alltags nsivariant retrieves all tags used to tag uris in the data-base (sorted by name).
nsIVersionComparator
a and b are two version being compared, and the return value is smaller than 0, then a < b equals 0 then version, then a==b is bigger than 0, then a > b example function compareversions(a,b) { var x = services.vc.compare(a,b); if(x == 0) return a + "==" + b; else if(x > 0) return a + ">" + b; return a + "<" + b; } dump(compareversions("1.0pre", "1.0")); example - compare current b
rowser version this example here uses nsixulappinfo component to get the version of the b
rowser that the code is running in.
... see here: nsixulappinfo components.utils.import("resource://gre/modules/services.jsm"); var curentb
rowserversion = services.appinfo.platformversion; //example: '31.*' var comparetothisversion = '25.*'; var compareresult = services.vc.compare(curentb
rowserversion, comparetothisversion); if (compareresult == -1) { //currentb
rowserversion is less than '25.*' (comparetothisversion) } else if (compareresult == 0) { //currentb
rowserversion is '25.*' (comparetothisversion) } else if (compareresult == 1) { //currentb
rowserversion is greater than '25.*' (comparetothisversion) } else { //will never get here as services.vc.compare only returns -1, 0, or 1 } see also toolkit version format ...
nsIWindowsShellService
b
rowser/components/shell/public/nsiwindowsshellservice.idlscriptable please add a summary to this article.
... shortcutmaintenance() provides the shell service an opportunity to do some win7+ shortcut maintenance needed on initial startup of the b
rowser.
nsIZipWriter
recursively add all contents of a directory to zip file this example below can be copied and pasted into your scratchpad, set the environment to "b
rowser" and can run.
...but note that if dir doesnt exist zw.open th
rows problems //var path = fp.file.path; //returns c:\users\3k2kyc1\documents\prefs\prefs var xpi = fu.file(dir.path + '\\' + dir.leafname + '.zip'); zw.open(xpi, pr.pr_rdwr | pr.pr_create_file | pr.pr_truncate); //pr_truncate overwrites if file exists //pr_create_file creates file if it dne //pr_rdwr opens for reading and writing //recursviely add all var dirarr = [dir]; //adds...
XUL Overlays
when plug-ins, b
rowser extensions, or other applications provide new ui elements to the b
rowser, these elements should be defined in overlay files.
...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 b
rowser.
Testing Mozilla code
asan nightly projectthe asan nightly project involves building a firefox nightly b
rowser with the popular addresssanitizer tool and enhancing it with remote crash reporting capabilities for any errors detected.clang static analysisthis document is split in two parts.
...this type of coverage is only concerned with hit counts for lines and branches.the valgrind test jobthe valgrind test job builds the b
rowser and runs it under valgrind, which can detect various common memory-related errors.
Thunderbird Configuration Files
there are three files you should know about: userchrome.css used to change the appearance of the b
rowser.
...just b
rowse to c:\documents and settings\[user name]\application data\thunderbird\profiles\ on windows xp/2000 or c:\users\[user name]\appdata\roaming\thunderbird\profiles\ on windows vista, and the rest should be obvious.
Using Mozilla code in other projects
you can embed gecko, the layout engine used by firefox to process web pages, as a b
rowser within your own application.
... embedding mozilla for information on embedding a web b
rowser into your own application see embedding mozilla.
Blocking By Domain - Plugins
criteria in order to improve firefox security and performance, there are two major categories of sites mozilla may choose to add to plugin domain blocking: sites commonly embedded in a 3rd-party context web sites which are commonly embedded into other sites using iframes can have a large impact on b
rowser security and also cause many sites to show plugin activation prompts.
...in order to improve site performance and reduce the number of plugin prompts that users see, popular sites that show unnecessary plugin prompts or slow the b
rowser down with unnecessary plugins will be added to the plugin block list.
DOM Inspector - Firefox Developer Tools
the dom inspector (also known as domi) is a developer tool used to inspect, b
rowse, and edit the document object model of documents - usually web pages or xul windows.
...(thunderbird users b
rowsing amo in firefox should save the installation link, or visit the dom inspector for thunderbird page.) thunderbird 2 dom inspector for thunderbird 2 is available from thunderbird add-ons.
Access debugging in add-ons - Firefox Developer Tools
the following items are accessible in the context of chrome://b
rowser/content/debugger.xul (or, in version 23 beta, chrome://b
rowser/content/devtools/debugger.xul): window.addeventlistener("debugger:editorloaded") - called when the read-only script panel loaded.
... window.addeventlistener("debugger:editorunloaded") relevant files: chrome://b
rowser/content/devtools/debugger-controller.js chrome://b
rowser/content/devtools/debugger-toolbar.js chrome://b
rowser/content/devtools/debugger-view.js chrome://b
rowser/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.
Source map errors - Firefox Developer Tools
source maps are json files providing a way to associate transformed sources, as seen by the b
rowser, with their original sources, as written by the developer.
... the fix here is to make sure the file is being served and is accessible to the b
rowser invalid source map the source map data can be invalid — either simply not a json file at all, or with an incorrect structure.
Debugger.Object - Firefox Developer Tools
for example, a web b
rowser might provide host annotations for global objects to distinguish top-level windows, iframes, and internal javascript scopes.
... unless otherwise specified, these methods are not invocation functions; if a call would cause debuggee code to run (say, because it gets or sets an accessor property whose handler is debuggee code, or because the referent is a proxy whose traps are debuggee code), the call th
rows a debugger.debuggeewouldrun exception.
Deprecated tools - Firefox Developer Tools
description webide allowed you to connect the firefox developer tools to remote b
rowsers, such as firefox for android.
...features that are planned but not ported yet: remote b
rowser screenshots and edit remote b
rowser configuration.
Inspecting web sockets - Firefox Developer Tools
sent displays only messages sent by the b
rowser (by default, except control messages).
...this filter can be combined with the others, to display, for example, only messages for control frames sent by the b
rowser.
Network request details - Firefox Developer Tools
the b
rowser imposes a limit on the number of simultaneous connections that can be made to a single server.
...if all connections are in use, the b
rowser can't download more resources until a connection is released.
Network request list - Firefox Developer Tools
or you might see a red circle with a diagonal slash for responses that were blocked by the b
rowser or the server.
... blocking specific urls if you want to view your page as it would look without a resource (e.g., if it were blocked by the b
rowser or an extension), you can block requests matching patterns you specify.
Edit fonts - Firefox Developer Tools
this tool contains several useful features for viewing and manipulating fonts applied to any document loaded in the b
rowser including inspection of all fonts applied to the page, and precise adjustment of variable font axis values.
... they are applied to the element as part of the b
rowser's default styling (times new roman for most b
rowsers), and no author-defined font has been supplied.
Examine and edit HTML - Firefox Developer Tools
usually this white space seems to have no effect and no visual output, but in fact, when a b
rowser parses html it will automatically generate anonymous text nodes for elements not contained in a node.
... if these auto generated text nodes are inline level, b
rowsers will give them a non-zero width and height.
Work with animations - Firefox Developer Tools
if you click the icon, it enlarges and changes to color, and the name of the b
rowser appears.
...hovering over these selectors, we can see that those elements are, respectively, the b
rowser name "firefox developer edition" and the b
rowser icon.
Remote Debugging - Firefox Developer Tools
you can use the firefox developer tools on your desktop to debug web sites and web apps running in other b
rowsers or runtimes.
... the other b
rowser might be on the same device as the tools themselves or on a different device, such as a phone connected over usb.
Taking screenshots - Firefox Developer Tools
the screenshot is saved to your b
rowser's "downloads" directory: taking a screenshot of an element to take a screenshot of a single element in the page, activate the context menu on that element in the inspector's html pane, and select "screenshot node".
... the screenshot is saved to the b
rowser's "downloads" directory: copying screenshots to the clipboard from firefox 53, you can also copy the screenshot to the clipboard.
Toolbox - Firefox Developer Tools
docking mode by default, the toolbox appears docked to the bottom of the b
rowser window, but you can also dock it to the right-hand side of the window, or make it a standalone window, using buttons in the toolbar.
...or from the page take a screenshot of the entire page: take a screenshot of the complete web page and saves it in your downloads directory toggle rulers for the page measure a portion of the page: measure a part of the website by selecting areas within the page toolbox controls finally there's a row of buttons to: close the window toggle the window between attached to the bottom of the b
rowser window, and attached to the side of the b
rowser window toggle the window between standalone and attached to the b
rowser window access developer tool settings settings see the separate page on the developer tools settings.
AbstractRange - Web APIs
first, after your page is loaded, the b
rowser simply isn't thinking in terms of html.
...rather than having to negotiate the dom figuring out what your global offset refers to, the user agent (b
rowser) can instead go directly to the node indicated by the starting position and start from there, working its way forward until it reaches the given offset into the ending node.
AddressErrors - Web APIs
request.onshippingaddresschange = handleaddresschange; // call show() to trigger the b
rowser's payment flow.
... note: if you have content blocking features enabled in your b
rowser, the example may not work inline below.
Ambient Light Events - Web APIs
light events when the light sensor of a device detects a change in the light level, it notifies the b
rowser of that change.
... when the b
rowser gets such a notification, it fires a devicelightevent event that provides information about the exact light intensity (in lux units).
AnalyserNode.AnalyserNode() - Web APIs
b
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/b
rowser-compat-data and send us a pull request.
Animation.persist() - Web APIs
the persist() method of the web animations api's animation interface explicitly persists an animation, when it would otherwise be removed due to the b
rowser's automatically removing filling animations behavior.
...for this reason, modern b
rowsers automatically remove overriding forward filling animations.
Animation.replaceState - Web APIs
the value can be one of: active: the initial value of the animation's replace state; when the animation has been removed by the b
rowser's automatically removing filling animations behavior.
...for this reason, modern b
rowsers automatically remove overriding forward filling animations.
Animation - Web APIs
animation.persist() explicitly persists an animation, when it would otherwise be removed due to the b
rowser's automatically removing filling animations behavior.
...for this reason, modern b
rowsers have implemented the part of the web animations spec that automatically removes overriding forward filling animations, unless the developer explicitly specifies to keep them.
AudioBuffer() - Web APIs
b
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/b
rowser-compat-data and send us a pull request.
AudioBufferSourceNode.AudioBufferSourceNode() - Web APIs
b
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/b
rowser-compat-data and send us a pull request.
AudioContext.getOutputTimestamp() - Web APIs
b
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/b
rowser-compat-data and send us a pull request.
AudioParam.cancelAndHoldAtTime() - Web APIs
b
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/b
rowser-compat-data and send us a pull request.
AudioWorkletProcessor.process - Web APIs
if the combination of the return value and the state of the node causes the b
rowser to decide to stop the node, process() will not be called again.
... returning true forces the web audio api to keep the node alive, while returning false allows the b
rowser to terminate the node if it is neither generating new audio data nor receiving data through its inputs that it is processing.
BaseAudioContext.createConstantSource() - Web APIs
b
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/b
rowser-compat-data and send us a pull request.
BaseAudioContext.currentTime - Web APIs
syntax var curtime = baseaudiocontext.currenttime; example var audiocontext = window.audiocontext || window.webkitaudiocontext; var audioctx = new audiocontext(); // older webkit/blink b
rowsers require a prefix ...
... console.log(audioctx.currenttime); reduced time precision to offer protection against timing attacks and fingerprinting, the precision of audioctx.currenttime might get rounded depending on b
rowser settings.
BaseAudioContext.sampleRate - Web APIs
try entering audioctx.samplerate into your b
rowser console.
... var audiocontext = window.audiocontext || window.webkitaudiocontext; var audioctx = new audiocontext(); // older webkit/blink b
rowsers require a prefix ...
BasicCardRequest.supportedNetworks - Web APIs
b
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/b
rowser-compat-data and send us a pull request.
BiquadFilterNode() - Web APIs
b
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/b
rowser-compat-data and send us a pull request.
BlobEvent.timecode - Web APIs
b
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/b
rowser-compat-data and send us a pull request.
BluetoothCharacteristicProperties - Web APIs
b
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/b
rowser-compat-data and send us a pull request.
characteristic - Web APIs
b
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/b
rowser-compat-data and send us a pull request.
uuid - Web APIs
b
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/b
rowser-compat-data and send us a pull request.
value - Web APIs
b
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/b
rowser-compat-data and send us a pull request.
writeValue() - Web APIs
b
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/b
rowser-compat-data and send us a pull request.
Broadcast Channel API - Web APIs
the broadcast channel api allows basic communication between b
rowsing contexts (that is, windows, tabs, frames, or iframes) and workers on the same origin.
... the messaging protocol is not defined and the different b
rowsing contexts need to implement it themselves; there is no negotiation nor requirement from the specification.
ByteLengthQueuingStrategy - Web APIs
b
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/b
rowser-compat-data and send us a pull request.
CSS.supports() - Web APIs
the css.supports() method returns a boolean value indicating if the b
rowser supports a given css feature, or not.
... return value true if the b
rowser supports the rule, otherwise false.
CSSPseudoElement - Web APIs
examples basic example using element.pseudo using pseudo-elements, most modern b
rowsers will automatically add quotation marks around text inside a <q> element.
... (a style rule may be needed to add quotation marks in older b
rowsers.) the example below demonstrates the basic properties of the csspseudoelement object representing the opening quotation mark.
CSSStyleSheet - Web APIs
notes in some b
rowsers, if a stylesheet is loaded from a different domain, accessing cssrules results in securityerror.
... a cssstylesheet object is created and inserted into the document's document.stylesheets list automatically by the b
rowser, when a stylesheet is loaded for a document.
Managing screen orientation - Web APIs
this lets content adjust its layout using css, based on whether the b
rowser window is in landscape mode (that is, its width is greater than its height) or portrait mode (its height is greater than its width).
...stick on the left */ @media screen and (orientation: landscape) { #toolbar { position: fixed; width: 2.65em; height: 100%; } p { margin-left: 2em; } li + li { margin-top: .5em; } } and here's the result portrait landscape note: the orientation media query actually applies based on the orientation of the b
rowser window (or iframe) not the orientation of the device.
Using the CSS Painting API - Web APIs
.fancy { background-image: paint(headerhighlight); } putting it together we can then add the fancy class to any element on the page to add a yellow box as a background: <h1 class="fancy">my cool header</h1> the following example will look like the image above in b
rowsers supporting the css painting api.
... in b
rowsers that support the css paint api, the example below should appear like the image above.
CSS Properties and Values API - Web APIs
interfaces css.registerproperty defines how a b
rowser should parse a css custom properties.
... @property defines how a b
rowser should parse a css custom properties.
Cache.match() - Web APIs
a catch() clause is triggered when the call to fetch() th
rows an exception.
...if no fetch handlers call event.respondwith(), the request will be handled by the b
rowser as if there were no service worker involvement.
CanvasRenderingContext2D.drawWindow() - Web APIs
top-level b
rowsed documents are usually not transparent because the user's background-color preference is applied, but iframes are transparent if the page doesn't set a background.
... it is usually a bad idea to use any background other than pure white "rgb(255,255,255)" or transparent, as this is what all b
rowsers do, and many websites expect that transparent parts of their interface will be drawn on white background.
Drawing shapes with canvas - Web APIs
the two for loops are for looping through the
rows and columns of arcs.
...to simplify the code and to improve performance, the path2d object, available in recent versions of b
rowsers, lets you cache or record these drawing commands.
Finale - Web APIs
more examples and tutorials there are a variety of demos and further explanations about canvas on these sites: codepen.io front end developer playground & code editor in the b
rowser.
...new technologies are constantly arriving to make it possible to develop better and more powerful games that can be run in any standards-compliant web b
rowser.
Hit regions and accessibility - Web APIs
</canvas> tags can be used as a fallback for b
rowsers which don't support canvas rendering.
...the api has the following three methods (which are still experimental in current web b
rowsers; check the b
rowser compatibility tables).
Optimizing canvas - Web APIs
ctx.drawimage(myimage, 0.3, 0.5); this forces the b
rowser to do extra calculations to create the anti-aliasing effect.
...this information can be used internally by the b
rowser to optimize rendering.
Clients.openWindow() - Web APIs
the openwindow() method of the clients interface creates a new top level b
rowsing context and loads a given url.
... in chrome for android, the method may instead open the url in an existing b
rowsing context provided by a standalone web app previously added to the user's home screen.
ClipboardItem() - Web APIs
note: image format support varies by b
rowser.
... see the b
rowser compatibility table for the clipboard interface.
ConstantSourceNode - Web APIs
some b
rowsers' implementations of this event handler are part of the audioscheduledsourcenode interface.
... some b
rowsers' implementations of these methods are part of the audioscheduledsourcenode interface.
ConvolverNode() - Web APIs
b
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/b
rowser-compat-data and send us a pull request.
CountQueuingStrategy - Web APIs
b
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/b
rowser-compat-data and send us a pull request.
CrashReportBody - Web APIs
a crash report is generated when a document becomes unusable due to the b
rowser (or one of its processes) crashing.
...current possible reasons are: oom: the b
rowser ran out of memory.
DOMException() - Web APIs
b
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/b
rowser-compat-data and send us a pull request.
DOMException.code - Web APIs
candidate recommendation b
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/b
rowser-compat-data and send us a pull request.
DOMException.message - Web APIs
candidate recommendation b
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/b
rowser-compat-data and send us a pull request.
DOMRectReadOnly.fromRect() - Web APIs
b
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/b
rowser-compat-data and send us a pull request.
DataTransfer.files - Web APIs
this feature can be used to drag files from a user's desktop to the b
rowser.
... example there are two live examples of this interface: firefox only: http://jsfiddle.net/9c2ef/ all b
rowsers: https://jsbin.com/hiqasek/ specifications specification status comment html living standardthe definition of 'files' in that specification.
DedicatedWorkerGlobalScope - Web APIs
workerlocation is a specific location object, mostly a subset of the location for b
rowsing scopes, but adapted to workers.
...workernavigator is a specific navigator object, mostly a subset of the navigator for b
rowsing scopes, but adapted to workers.
DelayNode() - Web APIs
b
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/b
rowser-compat-data and send us a pull request.
DeprecationReportBody - Web APIs
anticipatedremoval a date object (rendered as a string) representing the date when the feature is expected to be removed from the current b
rowser.
...this typically matches the message a b
rowser will display in its devtools console when a deprecated feature is used, if one is available.
Detecting device orientation - Web APIs
orientation example this example will work on any b
rowser supporting the deviceorientation event and running on a device able to detect its orientation.
...0; y += 90; // 10 is 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 b
rowsers.
DisplayMediaStreamConstraints.video - Web APIs
the value may be a single one of the following strings, or an array of them to allow the b
rowser flexibility in deciding what to do about the cursor.
... b
rowser the stream contains the contents of a single b
rowser tab selected by the user.
Document.createDocumentFragment() - Web APIs
you can also use the documentfragment constructor to create a new fragment: let fragment = new documentfragment(); example this example creates a list of major web b
rowsers 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 b
rowsers = ['firefox', 'chrome', 'opera', 'safari', 'internet explorer']; b
rowsers.foreach(function(b
rowser) { var li = document.createelement('li'); li.textcontent = b
rowser; fragment.appendchild(li); }); element.appendchild(fragment); result specifications specification status comment domthe definition of 'document.createdocumentfragment()' in that specification.
Document.createElementNS() - Web APIs
for backwards compatibility with previous versions of the custom elements specification, some b
rowsers will allow you to pass a string here instead of an object, where the string's value is the custom element's tag name.
...custom elements are an experimental feature only available in some b
rowsers.
Document.fonts - Web APIs
working draft initial definition b
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/b
rowser-compat-data and send us a pull request.
Document.forms - Web APIs
b
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/b
rowser-compat-data and send us a pull request.
Document.ononline - Web APIs
the document.online event is fired on the <body> of each page when the b
rowser switches between online and offline mode.
... window.navigator.online returns boolean true if the b
rowser is online and false if it is definitely offline (disconnected from the network).
DocumentFragment.querySelector() - Web APIs
b
rowser 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/b
rowser-compat-data and send us a pull request.
DocumentOrShadowRoot.getSelection() - Web APIs
b
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/b
rowser-compat-data and send us a pull request.
DocumentTimeline.DocumentTimeline() - Web APIs
the documenttimeline() constructor of the web animations api creates a new instance of the documenttimeline object associated with the active document of the current b
rowsing context.
...currently the only supported option is the origintime member which specifies the zero time for the documenttimeline as a real number of milliseconds relative to the navigationstart moment of the active document for the current b
rowsing context.
Using the W3C DOM Level 1 Core - Web APIs
due to the ubiquity of the dom, this api is supported in all major b
rowsers, including mozilla firefox and microsoft internet explorer, and serves as a base for scripting on the web.
...for example, the following document <html> <head> <title>my document</title> </head> <body> <h1>header</h1> <p>paragraph</p> </body> </html> has a dom tree that looks like this: (note that, although the above tree is similar to the above document's dom tree, it's not identical, as the actual dom tree preserves whitespace.) when a web b
rowser parses an html document, it builds a dom tree and then uses it to display the document.
DynamicsCompressorNode() - Web APIs
b
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/b
rowser-compat-data and send us a pull request.
EffectTiming.easing - Web APIs
the b
rowser flips to a different static frame when each interval is reached, rather than animating smoothly.
...the b
rowser flips to a different static frame when each interval is reached, rather than animating smoothly.
Element.accessKey - Web APIs
the element.accesskey property is seldom used because of its multiple conflicts with already present key bindings in b
rowsers.
... to work around this, b
rowsers implement accesskey behavior if the keys are pressed with other "qualifying" keys (such as alt + accesskey).
Element.animate() - Web APIs
document.getelementbyid("tunnel").animate([ // keyframes { transform: 'translatey(0px)' }, { transform: 'translatey(-300px)' } ], { // timing options duration: 1000, iterations: infinity }); implicit to/from keyframes in newer b
rowser versions, you are able to set a beginning or end state for an animation only (i.e.
... a single keyframe), and the b
rowser will infer the other end of the animation if it is able to.
Element.computedStyleMap() - Web APIs
ues, adding a <dt> and <dd> for each for (const [prop, val] of allcomputedstyles) { // properties const cssproperty = document.createelement('dt'); cssproperty.appendchild(document.createtextnode(prop)); styleslist.appendchild(cssproperty); // values const cssvalue = document.createelement('dd'); cssvalue.appendchild(document.createtextnode(val)); styleslist.appendchild(cssvalue); } in b
rowsers that support computedstylemap(), you'll see a list of all the css properties and values.
... in other b
rowsers you'll just see a link.
Element.getBoundingClientRect() - Web APIs
cross-b
rowser fallback scripts requiring high cross-b
rowser compatibility can use window.pagexoffset and window.pageyoffset instead of window.scrollx and window.scrolly.
... working draft initial definition notes the returned domrect object can be modified in modern b
rowsers.
Element.matches() - Web APIs
polyfill for b
rowsers that do not support element.matches() or element.matchesselector(), but include support for document.queryselectorall(), a polyfill exists: if (!element.prototype.matches) { element.prototype.matches = element.prototype.matchesselector || element.prototype.mozmatchesselector || element.prototype.msmatchesselector || element.prototype.omatchesselector || element...
....prototype.webkitmatchesselector || function(s) { var matches = (this.document || this.ownerdocument).queryselectorall(s), i = matches.length; while (--i >= 0 && matches.item(i) !== this) {} return i > -1; }; } however, given the practicality of supporting older b
rowsers, the following should suffice for most (if not all) practical cases (i.e.
Element.namespaceURI - Web APIs
if the namespaceuri returns the xul namespace and the localname returns "b
rowser", then the node is understood to be a xul <b
rowser/>.
... if (element.localname == "b
rowser" && element.namespaceuri == "http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul") { // this is a xul b
rowser } notes this is not a computed value that is the result of a namespace lookup based on an examination of the namespace declarations in scope.
Element.requestFullscreen() - Web APIs
check b
rowser compatibility in fullscreen for specifics on when each b
rowser made this change.
...the default value is "auto", which indicates that the b
rowser should decide what to do.
Element.scroll() - Web APIs
b
rowser 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/b
rowser-compat-data and send us a pull request.
Element.scrollIntoViewIfNeeded() - Web APIs
the element.scrollintoviewifneeded() method scrolls the current element into the visible area of the b
rowser window if it's not already within the visible area of the b
rowser window.
... if the element is already within the visible area of the b
rowser window, then no scrolling takes place.
Element.scrollTo() - Web APIs
b
rowser 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/b
rowser-compat-data and send us a pull request.
Element.setCapture() - Web APIs
warning: this interface never had much cross-b
rowser support and you probably looking for element.setpointercapture instead, from the pointer events api.
...tyle> <script type="text/javascript"> function init() { var btn = document.getelementbyid("mybutton"); if (btn.setcapture) { btn.addeventlistener("mousedown", mousedown, false); btn.addeventlistener("mouseup", mouseup, false); } else { document.getelementbyid("output").innerhtml = "sorry, there appears to be no setcapture support on this b
rowser"; } } function mousedown(e) { e.target.setcapture(); e.target.addeventlistener("mousemove", mousemoved, false); } function mouseup(e) { e.target.removeeventlistener("mousemove", mousemoved, false); } function mousemoved(e) { var output = document.getelementbyid("output"); output.innerhtml = "position: " + e.clientx + ", " + e.client...
Element.slot - Web APIs
living standard b
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/b
rowser-compat-data and send us a pull request.
Event.cancelable - Web APIs
most b
rowser-native events that can be canceled are the ones that result from the user interacting with the page.
... example for example, b
rowser vendors are proposing that the wheel event can only be canceled the first time the listener is called — any following wheel events cannot be canceled.
Event.initEvent() - Web APIs
b
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/b
rowser-compat-data and send us a pull request.
FederatedCredential.protocol - Web APIs
b
rowser 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/b
rowser-compat-data and send us a pull request.
FederatedCredential.provider - Web APIs
b
rowser 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/b
rowser-compat-data and send us a pull request.
FetchEvent.navigationPreload - Web APIs
b
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/b
rowser-compat-data and send us a pull request.
Using files from web applications - Web APIs
if you want to use the dom file api from extensions or other b
rowser chrome code, you can; however, note there are some additional features to be aware of.
...they can be used to display embedded pdf files or any other resources that can be displayed by the b
rowser.
File.webkitRelativePath - Web APIs
b
rowser 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/b
rowser-compat-data and send us a pull request.
FileList - Web APIs
living standard b
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/b
rowser-compat-data and send us a pull request.
FileReader.readAsDataURL() - Web APIs
review = document.queryselector('img'); const file = document.queryselector('input[type=file]').files[0]; const reader = new filereader(); reader.addeventlistener("load", function () { // convert image file to base64 string preview.src = reader.result; }, false); if (file) { reader.readasdataurl(file); } } live result example reading multiple files html <input id="b
rowse" type="file" onchange="previewfiles()" multiple> <div id="preview"></div> javascript function previewfiles() { var preview = document.queryselector('#preview'); var files = document.queryselector('input[type=file]').files; function readandpreview(file) { // make sure `file.name` matches our extensions criteria if ( /\.(jpe?g|png|gif)$/i.test(file.name) ) { var reader =...
...for a full compatibility code you can see our crossb
rowser possible solution for image preview.
FileSystem.name - Web APIs
b
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/b
rowser-compat-data and send us a pull request.
FileSystem.root - Web APIs
b
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/b
rowser-compat-data and send us a pull request.
FileSystemDirectoryEntry.createReader() - Web APIs
b
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/b
rowser-compat-data and send us a pull request.
FileSystemDirectoryEntry.getDirectory() - Web APIs
b
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/b
rowser-compat-data and send us a pull request.
FileSystemDirectoryEntry.getFile() - Web APIs
b
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/b
rowser-compat-data and send us a pull request.
FileSystemEntry.filesystem - Web APIs
b
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/b
rowser-compat-data and send us a pull request.
FileSystemEntry.fullPath - Web APIs
b
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/b
rowser-compat-data and send us a pull request.
FileSystemEntry.getParent() - Web APIs
b
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/b
rowser-compat-data and send us a pull request.
FileSystemEntry.isDirectory - Web APIs
b
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/b
rowser-compat-data and send us a pull request.
FileSystemEntry.isFile - Web APIs
b
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/b
rowser-compat-data and send us a pull request.
FileSystemEntry.name - Web APIs
b
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/b
rowser-compat-data and send us a pull request.
FileSystemFileEntry.file() - Web APIs
b
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/b
rowser-compat-data and send us a pull request.
FileSystemFlags.create - Web APIs
b
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/b
rowser-compat-data and send us a pull request.
FileSystemFlags.exclusive - Web APIs
b
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/b
rowser-compat-data and send us a pull request.
FileSystemFlags - Web APIs
b
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/b
rowser-compat-data and send us a pull request.
FontFaceSetLoadEvent.FontFaceSetLoadEvent() - Web APIs
b
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/b
rowser-compat-data and send us a pull request.
FontFaceSetLoadEvent.fontfaces - Web APIs
b
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/b
rowser-compat-data and send us a pull request.
FontFaceSetLoadEvent - Web APIs
b
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/b
rowser-compat-data and send us a pull request.
FullscreenOptions - Web APIs
properties navigationuioptional a string controlling whether or not to keep b
rowser user interface elements visible while the element is in full-screen mode.
... the default, "auto", lets the b
rowser make this decision.
GainNode() - Web APIs
b
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/b
rowser-compat-data and send us a pull request.
Gamepad.mapping - Web APIs
the gamepad.mapping property of the gamepad interface returns a string indicating whether the b
rowser has remapped the controls on the device to a known layout.
...if the b
rowser is able to map controls on the device to that layout the mapping property will be set to the string standard.
GlobalEventHandlers.onanimationcancel - Web APIs
in b
rowsers that support animationcancel, the event is fired and this handler is called.
... result assembled together, you get this: if your b
rowser supports animationcancel, hiding the box using the button will cause a message to be displayed about the event.
GlobalEventHandlers.onauxclick - Web APIs
note: b
rowser vendors are implementing this property as part of a plan to improve compatibility with regards to button behaviors.
...historically, click has generally fired for the click of any device input button, although with b
rowser behavior being somewhat inconsistent.
HTMLAnchorElement.download - Web APIs
the htmlanchorelement.download property is a domstring indicating that the linked resource is intended to be downloaded rather than displayed in the b
rowser.
...if the name is not a valid file name in the underlying os, the b
rowser will adjust it.
HTMLAnchorElement.referrerPolicy - Web APIs
b
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/b
rowser-compat-data and send us a pull request.
HTMLAnchorElement - Web APIs
htmlanchorelement.download is a domstring indicating that the linked resource is intended to be downloaded rather than displayed in the b
rowser.
...if the name is not a valid filename of the underlying os, b
rowser will adapt it.
HTMLAreaElement.referrerPolicy - Web APIs
b
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/b
rowser-compat-data and send us a pull request.
HTMLBaseFontElement - Web APIs
the document text in the default style is rendered in the first font face that the client's b
rowser supports.
... if no font listed is installed on the local system, the b
rowser typically defaults to the proportional or fixed-width font for that system.
HTMLButtonElement - Web APIs
htmlbuttonelement.formmethod is a domstring reflecting the http method that the b
rowser uses to submit the form.
... with gecko-based b
rowser, use the :-moz-submit-invalid pseudo-class to style submit buttons based on the validation of a form.
HTMLCanvasElement - Web APIs
this is only supported in mozilla-based b
rowsers; use the standardized canvas.getcontext('2d', { alpha: false }) instead.
...this context is only available on b
rowsers that implement webgl.
inert - Web APIs
the boolean inert attribute, when present, may make the b
rowser "ignore" the element from assistive technologies, page search and text selection.
... polyfills currently, b
rowser support is lacking.
HTMLElement.offsetParent - Web APIs
working draft b
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/b
rowser-compat-data and send us a pull request.
HTMLFontElement.face - Web APIs
the document text, in the default style, is rendered as the first font face that the client's b
rowser supports.
... if no font listed is installed on the local system, the b
rowser typically defaults to the proportional or fixed-width font for that system.
HTMLIFrameElement.allowPaymentRequest - Web APIs
living standard b
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/b
rowser-compat-data and send us a pull request.
HTMLIFrameElement.csp - Web APIs
b
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/b
rowser-compat-data and send us a pull request.
HTMLIFrameElement.referrerPolicy - Web APIs
living standard b
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/b
rowser-compat-data and send us a pull request.
HTMLIFrameElement.src - Web APIs
living standard b
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/b
rowser-compat-data and send us a pull request.
HTMLImageElement.align - Web APIs
recommendation b
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/b
rowser-compat-data and send us a pull request.
HTMLImageElement.border - Web APIs
recommendation b
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/b
rowser-compat-data and send us a pull request.
HTMLImageElement.complete - Web APIs
unknown b
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/b
rowser-compat-data and send us a pull request.
HTMLImageElement.crossOrigin - Web APIs
unknown b
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/b
rowser-compat-data and send us a pull request.
HTMLImageElement.height - Web APIs
living standard b
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/b
rowser-compat-data and send us a pull request.
HTMLImageElement.hspace - Web APIs
b
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/b
rowser-compat-data and send us a pull request.
HTMLImageElement.longDesc - Web APIs
b
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/b
rowser-compat-data and send us a pull request.
HTMLImageElement.lowSrc - Web APIs
b
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/b
rowser-compat-data and send us a pull request.
HTMLImageElement.name - Web APIs
recommendation provides additional details not available in the html 5 b
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/b
rowser-compat-data and send us a pull request.
HTMLImageElement.naturalHeight - Web APIs
living standard b
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/b
rowser-compat-data and send us a pull request.
HTMLImageElement.naturalWidth - Web APIs
living standard b
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/b
rowser-compat-data and send us a pull request.
HTMLImageElement.referrerPolicy - Web APIs
b
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/b
rowser-compat-data and send us a pull request.
HTMLImageElement.useMap - Web APIs
living standard b
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/b
rowser-compat-data and send us a pull request.
HTMLImageElement.vspace - Web APIs
b
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/b
rowser-compat-data and send us a pull request.
HTMLImageElement.width - Web APIs
living standard b
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/b
rowser-compat-data and send us a pull request.
HTMLInputElement.setSelectionRange() - Web APIs
optionally, in newer b
rowser versions, you can specify the direction in which selection should be considered to have occurred.
...chrome, starting from version 33, th
rows an exception while accessing those properties and method on the rest of input types.
HTMLLinkElement.as - Web APIs
b
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/b
rowser-compat-data and send us a pull request.
HTMLMediaElement.autoplay - Web APIs
for a much more in-depth look at autoplay, autoplay blocking, and how to respond whena autoplay is blocked by the user's b
rowser, see our article autoplay guide for media and web audio apis.
... note: some b
rowsers offer users the ability to override autoplay in order to prevent disruptive audio or video from playing without permission or in the background.
HTMLMediaElement.controlsList - Web APIs
specifications specification status comment controls list api: solution outline b
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/b
rowser-compat-data and send us a pull request.
HTMLMediaElement.currentTime - Web APIs
for media without a known duration—such as media being streamed live—it's possible that the b
rowser may not be able to obtain parts of the media that have expired from the media buffer.
... example var video = document.createelement('video'); console.log(video.currenttime); usage notes reduced time precision to offer protection against timing attacks and fingerprinting, b
rowsers may round or otherwise adjust the value returned by currenttime.
HTMLMediaElement.onencrypted - Web APIs
b
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/b
rowser-compat-data and send us a pull request.
HTMLMediaElement.onwaitingforkey - Web APIs
b
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/b
rowser-compat-data and send us a pull request.
HTMLMediaElement.setMediaKeys() - Web APIs
b
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/b
rowser-compat-data and send us a pull request.
HTMLElement.focus() - Web APIs
this object may contain the following property: preventscroll optional a boolean value indicating whether or not the b
rowser should scroll the document to bring the newly-focused element into view.
... a value of false for preventscroll (the default) means that the b
rowser will scroll the element into view after focusing it.
HTMLScriptElement.referrerPolicy - Web APIs
living standard b
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/b
rowser-compat-data and send us a pull request.
HTMLSelectElement.add() - Web APIs
it th
rows a domerror of the type hierarchyrequesterror if the passed item is an ancestor of the htmlselectelement and no longer th
rows if the before parameter is not found.
... obsolete the method now th
rows an not_found_err exception if the item of the before parameter is not a child of this element.
HTMLSlotElement.assignedElements() - Web APIs
living standard b
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/b
rowser-compat-data and send us a pull request.
HTMLSlotElement.name - Web APIs
living standard b
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/b
rowser-compat-data and send us a pull request.
HTMLTableElement.insertRow() - Web APIs
if index is -1 or equal to the number of
rows, the row is appended as the last row.
... if index is greater than the number of
rows, an indexsizeerror exception will result.
HTMLVideoElement - Web APIs
the list of supported media formats varies from one b
rowser to the other.
... you should either provide your video in a single format that all the relevant b
rowsers supports, or provide multiple video sources in enough different formats that all the b
rowsers you need to support are covered.
Using microtasks in JavaScript with queueMicrotask() - Web APIs
this event loop may be either the b
rowser's main event loop or the event loop driving a web worker.
...they're a highly specialized feature of modern b
rowser-based javascript development, allowing you to schedule code to jump in front of other things in the long set of things waiting to happen on the user's computer.
Recommended Drag Types - Web APIs
caution: all methods and properties in this document with a moz prefix, such as mozsetdataat(), will only work with gecko-based b
rowsers.
...for example: event.datatransfer.setdata("text/plain", "this is text to drag"); dragging text in textboxes and selections on web pages is done automatically by the b
rowser, so you do not need to handle it yourself.
Headers.getAll() - Web APIs
although it may still work in some b
rowsers, its use is discouraged since it could be removed at any time.
...if the given name is not the name of an http header, this method th
rows a typeerror.
History.scrollRestoration - Web APIs
b
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/b
rowser-compat-data and send us a pull request.
IDBCursor.advance() - Web APIs
recommendation b
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/b
rowser-compat-data and send us a pull request.
IDBCursor.continue() - Web APIs
recommendation b
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/b
rowser-compat-data and send us a pull request.
IDBCursor.delete() - Web APIs
recommendation b
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/b
rowser-compat-data and send us a pull request.
IDBCursor.direction - Web APIs
recommendation b
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/b
rowser-compat-data and send us a pull request.
IDBCursor.key - Web APIs
recommendation b
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/b
rowser-compat-data and send us a pull request.
IDBCursor.primaryKey - Web APIs
recommendation b
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/b
rowser-compat-data and send us a pull request.
IDBCursor.request - Web APIs
b
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/b
rowser-compat-data and send us a pull request.
IDBCursor.update() - Web APIs
recommendation b
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/b
rowser-compat-data and send us a pull request.
IDBCursorWithValue.value - Web APIs
recommendation b
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/b
rowser-compat-data and send us a pull request.
IDBCursorWithValue - Web APIs
recommendation b
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/b
rowser-compat-data and send us a pull request.
IDBDatabase.close() - Web APIs
recommendation b
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/b
rowser-compat-data and send us a pull request.
IDBDatabase.name - Web APIs
recommendation b
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/b
rowser-compat-data and send us a pull request.
IDBDatabase.objectStoreNames - Web APIs
recommendation b
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/b
rowser-compat-data and send us a pull request.
IDBDatabase.onabort - Web APIs
recommendation b
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/b
rowser-compat-data and send us a pull request.
IDBDatabase.onclose - Web APIs
recommendation b
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/b
rowser-compat-data and send us a pull request.
IDBDatabase.onerror - Web APIs
recommendation b
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/b
rowser-compat-data and send us a pull request.
IDBDatabase.version - Web APIs
recommendation b
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/b
rowser-compat-data and send us a pull request.
IDBDatabase - Web APIs
recommendation b
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/b
rowser-compat-data and send us a pull request.
IDBFactory.deleteDatabase() - Web APIs
b
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/b
rowser-compat-data and send us a pull request.
IDBFactory - Web APIs
recommendation b
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/b
rowser-compat-data and send us a pull request.
IDBIndex.count() - Web APIs
recommendation b
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/b
rowser-compat-data and send us a pull request.
IDBIndex.getAllKeys() - Web APIs
if this value is null or missing, the b
rowser will use an unbound key range.
...if this value exceeds the number of records in the query, the b
rowser will only retrieve the first item.
IDBIndex.keyPath - Web APIs
recommendation b
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/b
rowser-compat-data and send us a pull request.
IDBIndex.multiEntry - Web APIs
recommendation b
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/b
rowser-compat-data and send us a pull request.
IDBIndex.name - Web APIs
recommendation b
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/b
rowser-compat-data and send us a pull request.
IDBIndex.objectStore - Web APIs
recommendation b
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/b
rowser-compat-data and send us a pull request.
IDBIndex.openCursor() - Web APIs
recommendation b
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/b
rowser-compat-data and send us a pull request.
IDBIndex.openKeyCursor() - Web APIs
recommendation b
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/b
rowser-compat-data and send us a pull request.
IDBIndex.unique - Web APIs
recommendation b
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/b
rowser-compat-data and send us a pull request.
IDBKeyRange.bound() - Web APIs
recommendation b
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/b
rowser-compat-data and send us a pull request.
IDBKeyRange.lower - Web APIs
recommendation b
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/b
rowser-compat-data and send us a pull request.
IDBKeyRange.lowerBound() - Web APIs
recommendation b
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/b
rowser-compat-data and send us a pull request.
IDBKeyRange.lowerOpen - Web APIs
recommendation b
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/b
rowser-compat-data and send us a pull request.
IDBKeyRange.only() - Web APIs
recommendation b
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/b
rowser-compat-data and send us a pull request.
IDBKeyRange.upper - Web APIs
recommendation b
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/b
rowser-compat-data and send us a pull request.
IDBKeyRange.upperBound() - Web APIs
recommendation b
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/b
rowser-compat-data and send us a pull request.
IDBKeyRange.upperOpen - Web APIs
recommendation b
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/b
rowser-compat-data and send us a pull request.
IDBKeyRange - Web APIs
b
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/b
rowser-compat-data and send us a pull request.
IDBObjectStore.add() - Web APIs
recommendation b
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/b
rowser-compat-data and send us a pull request.
IDBObjectStore.autoIncrement - Web APIs
recommendation b
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/b
rowser-compat-data and send us a pull request.
IDBObjectStore.clear() - Web APIs
recommendation b
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/b
rowser-compat-data and send us a pull request.
IDBObjectStore.count() - Web APIs
recommendation b
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/b
rowser-compat-data and send us a pull request.
IDBObjectStore.delete() - Web APIs
recommendation b
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/b
rowser-compat-data and send us a pull request.
IDBObjectStore.get() - Web APIs
recommendation b
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/b
rowser-compat-data and send us a pull request.
IDBObjectStore.getKey() - Web APIs
recommendation initial definition b
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/b
rowser-compat-data and send us a pull request.
IDBObjectStore.index() - Web APIs
recommendation b
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/b
rowser-compat-data and send us a pull request.
IDBObjectStore.indexNames - Web APIs
recommendation b
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/b
rowser-compat-data and send us a pull request.
IDBObjectStore.keyPath - Web APIs
recommendation b
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/b
rowser-compat-data and send us a pull request.
IDBObjectStore.name - Web APIs
recommendation b
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/b
rowser-compat-data and send us a pull request.
IDBObjectStore.openCursor() - Web APIs
recommendation b
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/b
rowser-compat-data and send us a pull request.
IDBObjectStore.put() - Web APIs
recommendation b
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/b
rowser-compat-data and send us a pull request.
IDBObjectStore.transaction - Web APIs
recommendation b
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/b
rowser-compat-data and send us a pull request.
IDBObjectStore - Web APIs
recommendation b
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/b
rowser-compat-data and send us a pull request.
IDBOpenDBRequest.onupgradeneeded - Web APIs
recommendation b
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/b
rowser-compat-data and send us a pull request.
IDBRequest.error - Web APIs
recommendation b
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/b
rowser-compat-data and send us a pull request.
IDBRequest.onerror - Web APIs
recommendation b
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/b
rowser-compat-data and send us a pull request.
IDBRequest.onsuccess - Web APIs
recommendation b
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/b
rowser-compat-data and send us a pull request.
IDBRequest.readyState - Web APIs
recommendation b
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/b
rowser-compat-data and send us a pull request.
IDBRequest.result - Web APIs
recommendation b
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/b
rowser-compat-data and send us a pull request.
IDBRequest.source - Web APIs
recommendation b
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/b
rowser-compat-data and send us a pull request.
IDBRequest.transaction - Web APIs
recommendation b
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/b
rowser-compat-data and send us a pull request.
IDBTransaction.objectStoreNames - Web APIs
recommendation b
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/b
rowser-compat-data and send us a pull request.
IDBTransaction.abort() - Web APIs
recommendation b
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/b
rowser-compat-data and send us a pull request.
IDBTransaction.db - Web APIs
recommendation b
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/b
rowser-compat-data and send us a pull request.
IDBTransaction.error - Web APIs
recommendation b
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/b
rowser-compat-data and send us a pull request.
IDBTransaction.mode - Web APIs
recommendation b
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/b
rowser-compat-data and send us a pull request.
IDBTransaction.objectStore() - Web APIs
recommendation b
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/b
rowser-compat-data and send us a pull request.
IDBTransaction.onabort - Web APIs
recommendation b
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/b
rowser-compat-data and send us a pull request.
IDBTransaction.onerror - Web APIs
recommendation b
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/b
rowser-compat-data and send us a pull request.
IDBTransaction - Web APIs
recommendation b
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/b
rowser-compat-data and send us a pull request.
IDBVersionChangeEvent.newVersion - Web APIs
recommendation b
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/b
rowser-compat-data and send us a pull request.
IDBVersionChangeEvent.oldVersion - Web APIs
recommendation b
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/b
rowser-compat-data and send us a pull request.
IDBVersionChangeEvent - Web APIs
warning: while this property is still implemented in older b
rowsers, the latest specification replaces it with the oldversion and newversion attributes.
... see the compatibility table to know what b
rowsers support them.
IIRFilterNode() - Web APIs
b
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/b
rowser-compat-data and send us a pull request.
ImageCapture.takePhoto() - Web APIs
b
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/b
rowser-compat-data and send us a pull request.
Checking when a deadline is due - Web APIs
on b
rowsers that support type="number", you get a nice little up and down arrow number picker.
...this step is mainly for b
rowsers that don't support html form validation (i have used the required attribute in my html to force validation, in those that do.) else { var newitem = [ { tasktitle: title.value, hours : hours.value, minutes : minutes.value, day : day.value, month : month.value, year : year.value, notified : "no" } ]; ...
InputEvent.dataTransfer - Web APIs
b
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/b
rowser-compat-data and send us a pull request.
InputEvent.getTargetRanges() - Web APIs
b
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/b
rowser-compat-data and send us a pull request.
KeyboardEvent.initKeyEvent() - Web APIs
this method is based on early drafts of document object model (dom) level 2 events specification and is implemented in gecko-based b
rowsers; other b
rowsers implemented keyboardevent.initkeyboardevent based on early drafts of document object model (dom) level 3 events specification.
... favor the modern constructor structure as the only cross-b
rowser way of building events.
KeyboardEvent.key - Web APIs
html <div class="fx"> <div> <textarea
rows="5" name="test-target" id="test-target"></textarea> <button type="button" name="btn-clear-console" id="btn-clear-console">clear console</button> </div> <div class="flex"> <pre id="console-log"></pre> </div> </div> css .fx { -webkit-display: flex; display: flex; margin-left: -20px; margin-right: -20px; } .fx > div { padding-left: 20px; padding-right: 20px; } .fx > di...
...entlistener('input', (e) => { logmessage(`key "${e.data}" input [event: input]`); }); textarea.addeventlistener('keyup', (e) => { logmessage(`key "${e.key}" released [event: keyup]`); }); btnclearconsole.addeventlistener('click', (e) => { let child = consolelog.firstchild; while (child) { consolelog.removechild(child); child = consolelog.firstchild; } }); result note: on b
rowsers that don't fully implement the inputevent interface which is used for the beforeinput and input events, you may get incorrect output on those lines of the log output.
KeyframeEffect.setKeyframes() - Web APIs
implicit to/from keyframes in newer b
rowser versions, you are able to set a beginning or end state for an animation only (i.e.
... a single keyframe), and the b
rowser will infer the other end of the animation if it is able to.
LargestContentfulPaint - Web APIs
// catch errors since some b
rowsers throw when using the new `type` option.
... addeventlistener('visibilitychange', function fn() { if (lcp && document.visibilitystate === 'hidden') { console.log('lcp:', lcp); removeeventlistener('visibilitychange', fn, true); } }, true); } catch (e) { // do nothing if the b
rowser doesn't support this api.
LayoutShift - Web APIs
// catch errors since some b
rowsers throw when using the new `type` option.
... observer.takerecords(); observer.disconnect(); console.log('cls:', cumulativelayoutshiftscore); } }); } catch (e) { // do nothing if the b
rowser doesn't support this api.
Long Tasks API - Web APIs
work the b
rowser does between different turns of the event loop that exceeds 50 ms.
... culprit b
rowsing context container the "culprit b
rowsing context container", or "the container" for short, is the top level page, iframe, embed or object that the task occurred within.
MediaCapabilities - Web APIs
the mediacapabilities interface of the media capabilities api provides information about the decoding abilities of the device, system and b
rowser.
... the api can be used to query the b
rowser about the decoding abilities of the device based on codecs, profile, resolution, and bitrates.
MediaDeviceInfo.kind - Web APIs
b
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/b
rowser-compat-data and send us a pull request.
MediaDevices.getSupportedConstraints() - Web APIs
example this example outputs a list of the constraints supported by your b
rowser.
... html <p>the following media constraints are supported by your b
rowser:</p> <ul id="constraintlist"> </ul> css body { font: 15px arial, sans-serif; } javascript let constraintlist = document.getelementbyid("constraintlist"); let supportedconstraints = navigator.mediadevices.getsupportedconstraints(); for (let constraint in supportedconstraints) { if (supportedconstraints.hasownproperty(constraint)) { let elem = document.createelement("li"); elem.innerhtml = "<code>" + constraint + "</code>"; constraintlist.appendchild(elem); } } result specifications specification status comment media capture and streamsthe definition of 'getsupportedconstraints()' in that specification.
MediaDevices - Web APIs
example 'use strict'; // put variables in global scope to make them available to the b
rowser console.
...ryselector('#errormsg'); navigator.mediadevices.getusermedia(constraints) .then(function(stream) { var videotracks = stream.getvideotracks(); console.log('got stream with constraints:', constraints); console.log('using video device: ' + videotracks[0].label); stream.onremovetrack = function() { console.log('stream ended'); }; window.stream = stream; // make variable available to b
rowser console video.srcobject = stream; }) .catch(function(error) { if (error.name === 'constraintnotsatisfiederror') { errormsg('the resolution ' + constraints.video.width.exact + 'x' + constraints.video.height.exact + ' px is not supported by your device.'); } else if (error.name === 'permissiondeniederror') { errormsg('permissions have not been granted to use your camera and ...
MediaKeyMessageEvent() - Web APIs
b
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/b
rowser-compat-data and send us a pull request.
MediaKeyStatusMap.entries() - Web APIs
b
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/b
rowser-compat-data and send us a pull request.
MediaKeyStatusMap.forEach() - Web APIs
b
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/b
rowser-compat-data and send us a pull request.
MediaKeyStatusMap.get() - Web APIs
b
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/b
rowser-compat-data and send us a pull request.
MediaKeyStatusMap.has() - Web APIs
b
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/b
rowser-compat-data and send us a pull request.
MediaKeyStatusMap.keys() - Web APIs
b
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/b
rowser-compat-data and send us a pull request.
MediaKeyStatusMap.size - Web APIs
b
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/b
rowser-compat-data and send us a pull request.
MediaKeyStatusMap.values() - Web APIs
b
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/b
rowser-compat-data and send us a pull request.
MediaMetadata.album - Web APIs
b
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/b
rowser-compat-data and send us a pull request.
MediaMetadata.artist - Web APIs
b
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/b
rowser-compat-data and send us a pull request.
MediaMetadata.artwork - Web APIs
b
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/b
rowser-compat-data and send us a pull request.
MediaMetadata.title - Web APIs
b
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/b
rowser-compat-data and send us a pull request.
MediaMetadata - Web APIs
b
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/b
rowser-compat-data and send us a pull request.
MediaPositionState.duration - Web APIs
for example, a b
rowser might use this information along with the position property and the navigator.mediasession.playbackstate, as well as the session's metadata to provide an integrated common user interface showing the currently playing media as well as standard pause, play, forward, reverse, and other controls.
... example in this example, an app performing a live stream provides information to the b
rowser by preparing a mediapositionstate object and submitting it by calling navigator.mediasession.setpositionstate().
MediaRecorder.audioBitsPerSecond - Web APIs
b
rowser 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/b
rowser-compat-data and send us a pull request.
MediaRecorder.mimeType - Web APIs
the mimetype read-only property returns the mime media type that was specified when creating the mediarecorder object, or, if none was specified, which was chosen by the b
rowser.
...see our media type and format guide for information about container and codec support across b
rowsers.
Media Session action types - Web APIs
this lets the b
rowser know it can take steps to optimize repeated operations, and is likely to result in improved performance.
... description a media session action may be generated by any media session action source; these sources include anything from ui widgets within the b
rowser itself to media control keys on the user's keyboard to buttons on the user's headset or earbuds.
MediaSessionActionDetails - Web APIs
this lets the b
rowser know it can take steps to optimize repeated operations, and is likely to result in improved performance.
... description a media session action may be generated by any media session action source; these sources include anything from ui widgets within the b
rowser itself to media control keys on the user's keyboard to buttons on the user's headset or earbuds.
MediaSource.isTypeSupported() - Web APIs
syntax var isitsupported = mediasource.istypesupported(mimetype); parameters mimetype the mime media type that you want to test support for in the current b
rowser.
... return value a boolean which is true if the b
rowser feels that it can probably play media of the specified type.
MediaStream.getTracks() - Web APIs
b
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/b
rowser-compat-data and send us a pull request.
MediaStream.id - Web APIs
b
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/b
rowser-compat-data and send us a pull request.
MediaStreamAudioSourceNode - Web APIs
as such, you can't easily rely on the order matching between any two b
rowsers or b
rowser versions.
...r.connect(audioctx.destination); // get new mouse pointer coordinates when mouse is moved // then set new gain value range.oninput = function() { biquadfilter.gain.value = range.value; } }) .catch(function(err) { console.log('the following gum error occured: ' + err); }); } else { console.log('getusermedia not supported on your b
rowser!'); } // dump script to pre element pre.innerhtml = myscript.innerhtml; note: as a consequence of calling createmediastreamsource(), audio playback from the media stream will be re-routed into the processing graph of the audiocontext.
MediaTrackConstraints.displaySurface - Web APIs
however, typically this is unnecessary since b
rowsers will simply ignore any constraints they're unfamiliar with.
...this value does not affect the list of display sources in the b
rowser's user interface.
MediaTrackSupportedConstraints.autoGainControl - Web APIs
the autogaincontrol constraint indicates whether or not the b
rowser offers the ability to automatically control the gain (volume) on media tracks; this obviously is contingent on whether or not the individual device supports automatic gain control as well; it's typically a feature provided by microphones.
... example this example simply displays whether or not your b
rowser supports the autogaincontrol constraint.
MediaTrackSupportedConstraints.cursor - Web APIs
it adds the cursor constraint only if it is known to be supported by the b
rowser.
... async function capturewithcursor() { let supportedconstraints = navigator.mediadevices.getsupportedconstraints(); let displaymediaoptions = { video: { displaysurface: "b
rowser" }, audio: false; }; if (supportedconstraints.cursor) { displaymediaoptions.video.cursor = "always"; } try { videoelem.srcobject = await navigator.mediadevices.getdisplaymedia(displaymediaoptions); } catch(err) { /* handle the error */ } } specifications specification status comment screen capturethe definition of 'mediatracksupportedconstraints.cursor' in that specification.
MediaTrackSupportedConstraints.frameRate - Web APIs
example this simple example looks to see if your b
rowser supports constraining the frame rate when requesting video tracks.
... javascript let result = document.getelementbyid("result"); if (navigator.mediadevices.getsupportedconstraints().framerate) { result.innerhtml = "supported!"; } else { result.innerhtml = "not supported!"; } html <div id="result"> </div> css #result { font: 14px "arial", sans-serif; } result the output, showing if your b
rowser supports the framerate constraint, is: while this example is trivial, you can replace the simple output of "supported" vs.
MediaTrackSupportedConstraints.noiseSuppression - Web APIs
the noisesuppression constraint indicates whether or not the b
rowser offers the ability to automatically control the gain (volume) on media tracks; this obviously is contingent on whether or not the individual device supports automatic gain control as well.
... example this example simply displays whether or not your b
rowser supports the noisesuppression constraint.
Media Source API - Web APIs
creating assets that work with mse in modern b
rowsers is a laborious process, taking significant time, computing power, and energy.
...while b
rowser support for the various media containers with mse is spotty, usage of the h.264 video codec, aac audio codec, and mp4 container format is a common baseline.
MessagePort.postMessage() - Web APIs
the postmessage() method of the messageport interface sends a message from the port, and optionally, transfers ownership of objects to other b
rowsing contexts.
... transferlist optional transferable objects to be transferred — these objects have their ownership transferred to the receiving b
rowsing context, so are no longer usable by the sending b
rowsing context.
MimeTypeArray - Web APIs
the mimetypearray interface returns an array of mimetype instances, each of which contains information about a supported b
rowser plugins.
...} else { // notify the user that flash is being deprecated and they // should upgrade their b
rowser.
NavigationPreloadManager - Web APIs
b
rowser 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/b
rowser-compat-data and send us a pull request.
Using Navigation Timing - Web APIs
unlike other tools or libraries, the navigation timing api lets you gather information that only the b
rowser can provide at a level of accuracy much improved over other techniques.
...performance.navigation.type indicates what kind of load operation took place: a navigation, a reload, or a shift through the b
rowser's history.
Navigator.buildID - Web APIs
returns the build identifier of the b
rowser.
... in modern b
rowsers this property now returns a fixed timestamp as a privacy measure, e.g.
Navigator.getBattery() - Web APIs
note: in some b
rowsers access to this feature is controlled by feature-policy directive battery.
... notallowederror note: no user agent currently th
rows this exception, but the specification describes the following behaviors: this document is not allowed to use this feature.
Navigator.oscpu - Web APIs
syntax oscpuinfo = navigator.oscpu value a domstring providing a string which identifies the operating system on which the b
rowser is running.
... or macos version x.y linux 64-bit (32-bit build) output of uname -s plus "i686 on x86_64" linux output of uname -sm x.y refers to the version of the operating system example function osinfo() { alert(window.navigator.oscpu); } osinfo(); // alerts "windows nt 6.0" for example usage notes unless your code is privileged (chrome or at least has the universalb
rowserread privilege), it may get the value of the general.oscpu.override preference instead of the true platform.
navigator.hardwareConcurrency - Web APIs
the b
rowser may, however, choose to report a lower number of logical cores in order to represent more accurately the number of workers that can run at once, so don't treat this as an absolute measurement of the number of cores in the user's system.
... examples in this example, one worker is created for each logical processor reported by the b
rowser and a record is created which includes a reference to the new worker as well as a boolean value indicating whether or not we're using that worker yet; these objects are, in turn, stored into an array for later use.
NavigatorID.appCodeName - Web APIs
the value of the navigatorid.appcodename property is always "mozilla", in any b
rowser.
...all b
rowsers return "mozilla" as the value of this property.
NavigatorID.product - Web APIs
the value of the navigatorid.product property is always "gecko", in any b
rowser.
...all b
rowsers return "gecko" as the value of this property.
NavigatorOnLine - Web APIs
the navigatoronline interface contains methods and properties related to the connectivity status of the b
rowser.
... navigatoronline.online read only returns a boolean indicating whether the b
rowser is working online.
NavigatorPlugins.javaEnabled() - Web APIs
this method indicates whether the current b
rowser is java-enabled or not.
... syntax result = window.navigator.javaenabled() example if (window.navigator.javaenabled()) { // b
rowser has java } notes the return value for this method indicates whether the preference that controls java is on or off - not whether the b
rowser offers java support in general.
NavigatorPlugins.mimeTypes - Web APIs
returns a mimetypearray object, which contains a list of mimetype objects representing the mime types recognized by the b
rowser.
... note: named properties of mimetypearray objects are no longer enumerable in the latest b
rowser versions.
NavigatorStorage.storage - Web APIs
the navigatorstorage.storage read-only property returns the singleton storagemanager object used to access the overall storage capabilities of the b
rowser for the current site or app.
... the returned object lets you examine and configure persistence of data stores and learn approximately how much more space your b
rowser has available for local storage use.
Node.baseURI - Web APIs
the base url is used to resolve relative urls when the b
rowser needs to obtain an absolute url, for example when processing the html <img> element's src attribute or xml xlink:href attribute.
... details the base url of a document the base url of a document defaults to the document's address (as displayed by the b
rowser and available in window.location), but it can be changed: when an html <base> tag is found in the document when the document is new (created dynamically) see the base urls section of the html living standard for details.
Node.namespaceURI - Web APIs
if the namespaceuri returns the xul namespace and the localname returns "b
rowser", then the node is understood to be a xul <b
rowser/>.
... if (node.localname == "b
rowser" && node.namespaceuri == "http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul") { // this is a xul b
rowser } notes this is not a computed value that is the result of a namespace lookup based on an examination of the namespace declarations in scope.
NodeIterator.nextNode() - Web APIs
in old b
rowsers, as specified in old versions of the specifications, the method may th
rows the invalid_state_err domexception if this method is called after the nodeiterator.detach()method.
... recent b
rowsers never throw.
NodeIterator.previousNode() - Web APIs
in old b
rowsers, as specified in old versions of the specifications, the method may th
rows the invalid_state_err domexception if this method is called after the nodeiterator.detach()method.
... recent b
rowsers never throw.
NodeList - Web APIs
however, some older b
rowsers have not implemented nodelist.foreach() nor array.from().
... for...of loops will loop over nodelist objects correctly: const list = document.queryselectorall('input[type=checkbox]'); for (let checkbox of list) { checkbox.checked = true; } recent b
rowsers also support iterator methods (foreach()) as well as entries(), values(), and keys().
NonDocumentTypeChildNode.nextElementSibling - Web APIs
b
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/b
rowser-compat-data and send us a pull request.
Notification.dir - Web APIs
possible values are: auto: adopts the b
rowser's language setting behaviour (the default.) ltr: left to right.
... note: most b
rowsers seem to ignore explicit ltr and rtl settings, and just go with the b
rowser-wide setting.
Notification.onclick - Web APIs
}; the default behavior is to move the focus to the viewport of the notification's related b
rowsing context.
... examples in the following example, we use an onclick handler to open a webpage in a new tab (specified by the inclusion of the '_blank' parameter) once a notification is clicked: notification.onclick = function(event) { event.preventdefault(); // prevent the b
rowser from focusing the notification's tab window.open('http://www.mozilla.org', '_blank'); } specifications specification status comment notifications apithe definition of 'onclick' in that specification.
Notifications API - Web APIs
these are outside the top-level b
rowsing context viewport, so therefore can be displayed even when the user has switched tabs or moved to a different app.
...this should be done in response to a user gesture, such as clicking a button, for example: btn.addeventlistener('click', function() { let promise = notification.requestpermission(); // wait for permission }) this is not only best practice — you should not be spamming users with notifications they didn't agree to — but going forward b
rowsers will explicitly disallow notifications not triggered in response to a user gesture.
OVR_multiview2 - Web APIs
for more information, see also: multiview on webxr three.js multiview demo multiview in babylon.js optimizing virtual reality: understanding multiview multiview webgl rendering for oculus b
rowser 6.0+ webgl extensions are available using the webglrenderingcontext.getextension() method.
...however, the oculus b
rowser (6+) also supports multisampling using the oculus_multiview extension.
OfflineAudioCompletionEvent.renderedBuffer - Web APIs
b
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/b
rowser-compat-data and send us a pull request.
PasswordCredential - Web APIs
in supporting b
rowsers, an instance of this class may be passed the credential from the init object for global fetch.
... <form id="form" method="post"> <input type="text" name="id" autocomplete="username" /> <input type="password" name="password" autocomplete="current-password" /> <input type="hidden" name="csrf_token" value="*****" /> </form> then, a reference to this form element, using it to create a passwordcredential object, and storing it in the b
rowser's password system.
PaymentAddress.toJSON() - Web APIs
b
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/b
rowser-compat-data and send us a pull request.
PaymentAddress - Web APIs
obsolete properties the following properties are obsolete and should no longer be used, but may still be present in some b
rowser versions.
... // call show() to trigger the b
rowser's payment flow.
PaymentRequest.abort() - Web APIs
b
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/b
rowser-compat-data and send us a pull request.
PaymentRequest.onshippingaddresschange - Web APIs
b
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/b
rowser-compat-data and send us a pull request.
PaymentRequest.onshippingoptionchange - Web APIs
b
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/b
rowser-compat-data and send us a pull request.
PaymentRequest.shippingAddress - Web APIs
b
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/b
rowser-compat-data and send us a pull request.
PaymentRequest.shippingOption - Web APIs
b
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/b
rowser-compat-data and send us a pull request.
PaymentRequest.shippingType - Web APIs
b
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/b
rowser-compat-data and send us a pull request.
PaymentRequest.show() - Web APIs
note: in reality, despite the fact that the specification says this can't be done, some b
rowsers, including firefox, support multiple active payment requests at a time.
...the promise is resolved when the user accepts the payment request (such as by clicking a "pay" button in the b
rowser's payment sheet).
PaymentResponse.details - Web APIs
b
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/b
rowser-compat-data and send us a pull request.
PaymentResponse.payerEmail - Web APIs
b
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/b
rowser-compat-data and send us a pull request.
PaymentRequest.payerName - Web APIs
b
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/b
rowser-compat-data and send us a pull request.
PaymentResponse.requestId - Web APIs
b
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/b
rowser-compat-data and send us a pull request.
PaymentResponse.shippingAddress - Web APIs
b
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/b
rowser-compat-data and send us a pull request.
PaymentResponse.shippingOption - Web APIs
b
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/b
rowser-compat-data and send us a pull request.
Payment processing concepts - Web APIs
this is currently supported only by chrome and chromium-based b
rowsers.
...in addition, the payment handler api can be used to establish support for additional payment method providers, in b
rowsers that support it.
Using the Payment Request API - Web APIs
the payment request api provides a b
rowser-based method of connecting users and their preferred payment systems and platforms to merchants that they want to pay for goods and services.
... detecting availability of the payment request api you can effectively detect support for the payment request api by checking if the user's b
rowser supports paymentrequest, i.e.
performance.measure() - Web APIs
the measure() method creates a named timestamp in the b
rowser's performance entry buffer between marks, the navigation start time, or the current time.
... return value void example the following example shows how measure() is used to create a new measure performance entry in the b
rowser's performance entry buffer.
Performance.timeOrigin - Web APIs
recommendation b
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/b
rowser-compat-data and send us a pull request.
PerformanceEventTiming - Web APIs
(navigator.sendbeacon && navigator.sendbeacon('/analytics', body)) || fetch('/analytics', {body, method: 'post', keepalive: true}); } // use a try/catch instead of feature detecting `first-input` // support, since some b
rowsers throw when using the new `type` option.
... po.observe({ type: 'first-input', buffered: true, }); } catch (e) { // do nothing if the b
rowser doesn't support this api.
PerformanceLongTaskTiming.attribution - Web APIs
b
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/b
rowser-compat-data and send us a pull request.
PerformanceLongTaskTiming - Web APIs
b
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/b
rowser-compat-data and send us a pull request.
PerformanceNavigationTiming.redirectCount - Web APIs
the redirectcount property returns a timestamp representing the number of redirects since the last non-redirect navigation under the current b
rowsing context.
... syntax perfentry.redirectcount; return value a number representing the number of redirects since the last non-redirect navigation under the current b
rowsing context.
PerformanceResourceTiming.domainLookupEnd - Web APIs
the domainlookupend read-only property returns the timestamp immediately after the b
rowser finishes the domain name lookup for the resource.
... syntax resource.domainlookupend; return value a domhighrestimestamp representing the time immediately after the b
rowser finishes the domain name lookup for the resource.
PerformanceResourceTiming.domainLookupStart - Web APIs
the domainlookupstart read-only property returns the timestamp immediately before the b
rowser starts the domain name lookup for the resource.
... syntax resource.domainlookupstart; return value a domhighrestimestamp immediately before the b
rowser starts the domain name lookup for the resource.
PerformanceResourceTiming.fetchStart - Web APIs
the fetchstart read-only property represents a timestamp immediately before the b
rowser starts to fetch the resource.
... syntax resource.fetchstart; return value a domhighrestimestamp immediately before the b
rowser starts to fetch the resource.
PerformanceResourceTiming.responseEnd - Web APIs
the responseend read-only property returns a timestamp immediately after the b
rowser receives the last byte of the resource or immediately before the transport connection is closed, whichever comes first.
... syntax resource.responseend; return value a domhighrestimestamp immediately after the b
rowser receives the last byte of the resource or immediately before the transport connection is closed, whichever comes first.
PerformanceResourceTiming.responseStart - Web APIs
the responsestart read-only property returns a timestamp immediately after the b
rowser receives the first byte of the response from the server, cache, or local resource.
... syntax resource.responsestart; return value a domhighrestimestamp immediately after the b
rowser receives the first byte of the response from the server.
PerformanceResourceTiming.secureConnectionStart - Web APIs
the secureconnectionstart read-only property returns a timestamp immediately before the b
rowser starts the handshake process to secure the current connection.
... syntax resource.secureconnectionstart; return value if the resource is fetched over a secure connection, a domhighrestimestamp immediately before the b
rowser starts the handshake process to secure the current connection.
Using the Performance API - Web APIs
however, if the b
rowser is unable to provide a time value accurate to 5 microseconds (because of hardware or software constraints, for example), the b
rowser can represent the value as a time in milliseconds accurate to a millisecond.
...rhtml += "<p>peformance.navigation = " + json.stringify(navigation) + "</p>"; } } specifications the interfaces described in this document are defined in the high resolution time standard which has two levels: high-resolution time level 2; editors draft; work in progress high-resolution time; w3c recommendation 17 december 2012 interoperability as shown in the performance interface's b
rowser compatibility table, most of the performance interfaces are broadly implemented by desktop b
rowsers.
Permissions.query() - Web APIs
an up-to-date list of permission names can be found in the spec under the permissionname enum, but bear in mind that the actual permissions supported by b
rowsers is currently much smaller than this.
... uservisibleonly: (push only, not supported in firefox — see the b
rowser support section below) indicates whether you want to show a notification for every message or be able to send silent push notifications.
PhotoCapabilities.fillLightMode - Web APIs
b
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/b
rowser-compat-data and send us a pull request.
PhotoCapabilities.imageHeight - Web APIs
b
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/b
rowser-compat-data and send us a pull request.
imageWidth - Web APIs
b
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/b
rowser-compat-data and send us a pull request.
PhotoCapabilities.redEyeReduction - Web APIs
b
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/b
rowser-compat-data and send us a pull request.
PhotoCapabilities - Web APIs
b
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/b
rowser-compat-data and send us a pull request.
Plugin - Web APIs
the plugin interface provides information about a b
rowser plugin.
... note: own properties of plugin objects are no longer enumerable in the latest b
rowser versions.
PointerEvent.getCoalescedEvents() - Web APIs
b
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/b
rowser-compat-data and send us a pull request.
PointerEvent.pointerType - Web APIs
if the device type cannot be detected by the b
rowser, the value can be an empty string ("").
... if the b
rowser supports pointer device types other than those listed above, the value should be vendor-prefixed to avoid conflicting names for different types of devices.
Multi-touch interaction - Web APIs
function pointermove_handler(ev) { // note: if the user makes more than one "simultaneous" touch, most b
rowsers // fire at least one pointermove event and some will fire several pointermoves.
... to prevent the b
rowser's default touch behavior from overriding this application's pointer handling, the touch-action property is applied to the <body> element.
PopStateEvent - Web APIs
the popstate event is only triggered by doing a b
rowser action such as a clicking on the back button (or calling history.back() in javascript).
... note: b
rowsers used to handle the popstate event differently on page load, but now they behave the same.
Proximity Events - Web APIs
proximity events when the device proximity sensor detects a change between the device and an object, it notifies the b
rowser of that change.
... when the b
rowser gets such a notification, it fires a deviceproximityevent for any change, and a userproximityevent event in the case of a more rough change.
PublicKeyCredential.getClientExtensionResults() - Web APIs
note: extensions are optional and different b
rowsers may recognize different extensions.
... all extensions are optional for the client to process them: if a b
rowser does not know of a given extension, that will not cause any failure.
PublicKeyCredentialCreationOptions.extensions - Web APIs
note: extensions are optional and different b
rowsers may recognize different extensions.
... all extensions are optional for the client to process them: if a b
rowser does not know a given extension, that will not cause any failure, the extension simply will not be processed.
PublicKeyCredentialRequestOptions.extensions - Web APIs
note: extensions are optional and different b
rowsers may recognize different extensions.
... all extensions are optional for the client to process them: if a b
rowser does not know a given extension, that will not cause any failure, the extension simply will not be processed.
PushEvent.PushEvent() - Web APIs
example var datainit = { data : 'some sample text' } var mypushevent = new pushevent('push', datainit); mypushevent.data.text(); // should return 'some sample text' b
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/b
rowser-compat-data and send us a pull request.
PushEvent.data - Web APIs
b
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/b
rowser-compat-data and send us a pull request.
PushEvent - Web APIs
b
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/b
rowser-compat-data and send us a pull request.
PushManager.hasPermission() - Web APIs
b
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/b
rowser-compat-data and send us a pull request.
PushManager.subscribe() - Web APIs
note: this parameter is required in some b
rowsers like chrome and edge.
...calls should be done in response to a user gesture, such as clicking a button, for example: btn.addeventlistener('click', function() { serviceworkerregistration.pushmanager.subscribe(options) .then(function(pushsubscription) { // handle subscription }); }) this is not only best practice — you should not be spamming users with notifications they didn't agree to — but going forward b
rowsers will explicitly disallow notifications not triggered in response to a user gesture.
PushManager.supportedContentEncodings - Web APIs
b
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/b
rowser-compat-data and send us a pull request.
PushMessageData.arrayBuffer() - Web APIs
b
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/b
rowser-compat-data and send us a pull request.
PushMessageData.blob() - Web APIs
b
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/b
rowser-compat-data and send us a pull request.
PushMessageData.json() - Web APIs
b
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/b
rowser-compat-data and send us a pull request.
PushMessageData.text() - Web APIs
b
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/b
rowser-compat-data and send us a pull request.
PushRegistrationManager - Web APIs
b
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/b
rowser-compat-data and send us a pull request.
PushSubscription.expirationTime - Web APIs
b
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/b
rowser-compat-data and send us a pull request.
PushSubscription.getKey() - Web APIs
b
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/b
rowser-compat-data and send us a pull request.
PushSubscription.options - Web APIs
b
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/b
rowser-compat-data and send us a pull request.
PushSubscription.subscriptionId - Web APIs
syntax var subid = pushsubscription.subscriptionid; specifications specification status comment push api working draft initial definition b
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/b
rowser-compat-data and send us a pull request.
RTCConfiguration.bundlePolicy - Web APIs
all current major b
rowsers are bundle compatible.
... let config = { iceservers: [ { urls: [ "stun:stun.example.com" ] }, ], bundlepolicy: "max-compat" }; let pc = new rtcpeerconnection(config); specifications specification status comment webrtc 1.0: real-time communication between b
rowsersthe definition of 'rtcconfiguration.bundlepolicy' in that specification.
RTCConfiguration.iceTransportPolicy - Web APIs
the agent—or the b
rowser itself—may still perform some form of ip filtering on the incoming candidates for reasons including privacy and security, as well as to simply limit the number of candidates.
... let config = { iceservers: [ { urls: [ "stun:stun.example.com" ] }, ], icetransportpolicy: "relay" }; let pc = new rtcpeerconnection(config); specifications specification status comment webrtc 1.0: real-time communication between b
rowsersthe definition of 'rtccandidate.icetransportpolicy' in that specification.
RTCConfiguration - Web APIs
all b
rowser implementations are bundle-aware.
... username: "louis@mozilla.com", credential: "webrtcdemo" }, { urls: ["stun:stun.example.com", "stun:stun-1.example.com"] }] }; var pc = new rtcpeerconnection(configuration); specifications specification status comment webrtc 1.0: real-time communication between b
rowsersthe definition of 'rtcconfiguration' in that specification.
RTCDTMFSender.insertDTMF() - Web APIs
the b
rowser will enforce a minimum value of 30 ms (that is, if you specify a lower value, 30 ms will be used instead); the default is 70 ms.
... example tbd specifications specification status comment webrtc 1.0: real-time communication between b
rowsersthe definition of 'rtcdtmfsender.insertdtmf()' in that specification.
RTCDataChannel.id - Web APIs
each rtcpeerconnection can therefore have up to a theoretical maximum of 65,534 data channels on it, although the actual maximum may vary from b
rowser to b
rowser.
... example var pc = new rtcpeerconnection(); var dc = pc.createdatachannel("my channel"); console.log("channel id: " + dc.id); specifications specification status comment webrtc 1.0: real-time communication between b
rowsersthe definition of 'rtcdatachannel.id' in that specification.
RTCDataChannel.onerror - Web APIs
syntax rtcdatachannel.onerror = function; value a function which the b
rowser will call to handle the error event when it occurs on the data channel.
...*/ specifications specification status comment webrtc 1.0: real-time communication between b
rowsersthe definition of 'rtcdatachannel.onerror' in that specification.
RTCDataChannel.onmessage - Web APIs
syntax rtcdatachannel.onmessage = function; value a function which the b
rowser will call to handle the message event.
... let pc = new rtcpeerconnection(); let dc = pc.createdatachannel(); dc.onmessage = function(event) { var el = document.createelement("p"); var txtnode = document.createtextnode(event.data); el.appendchild(txtnode); receivebox.appendchild(el); } specifications specification status comment webrtc 1.0: real-time communication between b
rowsersthe definition of 'rtcdatachannel.onmessage' in that specification.
RTCDataChannel.onopen - Web APIs
syntax rtcdatachannel.onopen = function; value a function which the b
rowser will call to handle the open event.
...nection.createdatachannel("message channel"); dc.onopen = function(event) { let messagebox = document.getelementbyid("messagebox"); let sendbutton = document.getelementbyid("sendbutton"); messagebox.disabled = false; messagebox.focus(); sendbutton.disabled = false; } specifications specification status comment webrtc 1.0: real-time communication between b
rowsersthe definition of 'rtcdatachannel.onopen' in that specification.
RTCDataChannel.readyState - Web APIs
constant description "connecting" the user agent (b
rowser) is in the process of creating the underlying data transport; that is, whatever network level connection is used to link the two peers together is in the process of being set up.
...attempt to send while connection closed."); break; } } specifications specification status comment webrtc 1.0: real-time communication between b
rowsersthe definition of 'rtcdatachannel.readystate' in that specification.
RTCIceCandidateStats.networkType - Web APIs
unknown the user's b
rowser is unable or unwilling to identify the underlying connection technology used by the described connection.
... this may be because the b
rowser isn't able to determine the network type for some reason or it may be intentionally getting obscured for security reasons, such as to avoid device fingerprinting.
RTCIceServer.url - Web APIs
it was removed from the specification in june 2013 but is still broadly used in older examples and books, so we include documentation here to help adapt old code to new b
rowsers.
... this property has been removed from the specification; while it's still supported by many b
rowsers, it should no longer be used.
RTCPeerConnection.addIceCandidate() - Web APIs
when a web site or app using rtcpeerconnection receives a new ice candidate from the remote peer over its signaling channel, it delivers the newly-received candidate to the b
rowser's ice agent by calling rtcpeerconnection.addicecandidate().
... specifications specification status comment webrtc 1.0: real-time communication between b
rowsersthe definition of 'rtcpeerconnection.addicecandidate()' in that specification.
RTCPeerConnection.addStream() - Web APIs
if you are relying on the chrome behavior, note that other b
rowsers do not have it.
...was added to: stream.removetrack(track); if (pc.removetrack) { pc.removetrack(pc.getsenders().find(sender => sender.track == track)); } else { // if you have code listening for negotiationneeded events: settimeout(() => pc.dispatchevent(new event('negotiationneeded'))); } specifications specification status comment webrtc 1.0: real-time communication between b
rowsersthe definition of 'rtcpeerconnection.addstream()' in that specification.
RTCPeerConnection: addstream event - Web APIs
examples this example looks to determine if the user's b
rowser supports the track event.
... if (pc.addtrack !== undefined) { pc.ontrack = ev => { ev.streams.foreach(stream => doaddstream(stream)); } } else { pc.onaddstream = ev => { doaddstream(ev.stream); } } this calls a function doaddstream() once for each stream being added to the rtcpeerconnection, regardless of whether the b
rowser sends addstream or track.
RTCPeerConnection.canTrickleIceCandidates - Web APIs
a webrtc b
rowser will always support trickle ice.
...n); } }); }); }) .then(answer => sendanswertopeer(answer)) // signaling message .catch(e => handleerror(e)); pc.addeventlistener('icecandidate', e => { if (pc.cantrickleicecandidates) { sendcandidatetopeer(e.candidate); // signaling message } }); specifications specification status comment webrtc 1.0: real-time communication between b
rowsersthe definition of 'rtcpeerconnection.cantrickleicecandidates' in that specification.
RTCPeerConnection.close() - Web APIs
make sure that you delete all references to the previous rtcpeerconnection before attempting to create a new one that connects to the same remote peer, as not doing so might result in some errors depending on the b
rowser.
...dc.onmessage = function (event) { console.log("received: " + event.data); pc.close(); // we decided to close after the first received message }; dc.onopen = function () { console.log("datachannel open"); }; dc.onclose = function () { console.log("datachannel close"); }; specifications specification status comment webrtc 1.0: real-time communication between b
rowsersthe definition of 'rtcpeerconnection.close()' in that specification.
RTCPeerConnection.createAnswer() - Web APIs
the answer contains information about any media already attached to the session, codecs and options supported by the b
rowser, and any ice candidates already gathered.
... specifications specification status comment webrtc 1.0: real-time communication between b
rowsersthe definition of 'createanswer()' in that specification.
RTCPeerConnection.createOffer() - Web APIs
the sdp offer includes information about any mediastreamtracks already attached to the webrtc session, codec, and options supported by the b
rowser, and any candidates already gathered by the ice agent, for the purpose of being sent over the signaling channel to a potential peer to request a connection or to update the configuration of an existing connection.
... specifications specification status comment webrtc 1.0: real-time communication between b
rowsersthe definition of 'createoffer()' in that specification.
RTCPeerConnection.onconnectionstatechange - Web APIs
syntax rtcpeerconnection.onconnectionstatechange = eventhandler; value a function which is called by the b
rowser when the connectionstatechange event occurs on the rtcpeerconnection.
...cted": // the connection has become fully connected break; case "disconnected": case "failed": // one or more transports has terminated unexpectedly or in an error break; case "closed": // the connection has been closed break; } } specifications specification status comment webrtc 1.0: real-time communication between b
rowsersthe definition of 'rtcpeerconnection.onconnectionstatechange' in that specification.
RTCPeerConnection.onicecandidate - Web APIs
this lets the ice agent perform negotiation with the remote peer without the b
rowser itself needing to know any specifics about the technology being used for signaling; simply implement this method to use whatever messaging technology you choose to send the ice candidate to the remote peer.
... specifications specification status comment webrtc 1.0: real-time communication between b
rowsersthe definition of 'rtcpeerconnection.onicecandidate' in that specification.
RTCPeerConnection.setLocalDescription() - Web APIs
type of the description parameter the description is of type rtcsessiondescriptioninit, which is a serialized version of a rtcsessiondescription b
rowser object.
... specifications specification status comment webrtc 1.0: real-time communication between b
rowsersthe definition of 'rtcpeerconnection.setlocaldescription()' in that specification.
RTCPeerConnectionIceErrorEvent - Web APIs
if communication with the stun or turn server couldn't be established at all, this string will be a b
rowser-specific string explaining the error.
... examples tbd specifications specification status comment webrtc 1.0: real-time communication between b
rowsersthe definition of 'rtcpeerconnectioniceerrorevent' in that specification.
RTCRtpCapabilities - Web APIs
its properties are: the b
rowser will only report distinct capability combinations separately.
... specifications specification status comment webrtc 1.0: real-time communication between b
rowsersthe definition of 'rtcrtpcapabilities' in that specification.
RTCRtpStreamStats - Web APIs
check the b
rowser compatibility table to know if and when the name change was implemented in specific b
rowsers.
...see b
rowser compatibility in rtcrtpstreamstats.kind to determine when b
rowsers made the transition.
RTCRtpTransceiver.setCodecPreferences() - Web APIs
if any unsupported codecs are listed, the b
rowser will throw an invalidaccesserror exception when you call this method.
... var availsendcodecs = transceiver.sender.getcapabilities("video").codecs; var availreceivecodecs = transceiver.receiver.getcapabilities("video").codecs; specifications specification status comment webrtc 1.0: real-time communication between b
rowsersthe definition of 'rtcrtptransceiver.setcodecpreferences()' in that specification.
Range.compareNode() - Web APIs
although it may still work in some b
rowsers, its use is discouraged since it could be removed at any time.
... warning: this method has been removed from gecko 1.9 (firefox 3) and will not exist in future versions of firefox, which was the only b
rowser implementing it; you should switch to range.compareboundarypoints() as soon as possible.
ReadableStream - Web APIs
examples in the following example, an artificial response is created to stream html fragments fetched from another resource to the b
rowser.
... if (done) { // tell the b
rowser that we have finished sending data controller.close(); return; } // get the data and send it to the b
rowser via the controller controller.enqueue(value); push(); }); }; push(); } }); return new response(stream, { headers: { "content-type": "text/html" } }); }); specifications specificatio...
ReadableStreamDefaultReader - Web APIs
examples in the following example, an artifical response is created to stream html fragments fetched from another resource to the b
rowser.
... if (done) { // tell the b
rowser that we have finished sending data controller.close(); return; } // get the data and send it to the b
rowser via the controller controller.enqueue(value); push(); }); }; push(); } }); return new response(stream, { headers: { "content-type": "text/html" } }); }); specifications specificatio...
SVGAElement.target - Web APIs
recommendation b
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/b
rowser-compat-data and send us a pull request.
SVGAnimatedAngle - Web APIs
b
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/b
rowser-compat-data and send us a pull request.
SVGAnimatedBoolean - Web APIs
b
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/b
rowser-compat-data and send us a pull request.
SVGAnimatedEnumeration - Web APIs
b
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/b
rowser-compat-data and send us a pull request.
SVGAnimatedInteger - Web APIs
b
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/b
rowser-compat-data and send us a pull request.
SVGAnimatedLength - Web APIs
b
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/b
rowser-compat-data and send us a pull request.
SVGAnimatedLengthList - Web APIs
b
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/b
rowser-compat-data and send us a pull request.
SVGAnimatedNumber - Web APIs
b
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/b
rowser-compat-data and send us a pull request.
SVGAnimatedNumberList - Web APIs
b
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/b
rowser-compat-data and send us a pull request.
SVGAnimatedPoints - Web APIs
b
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/b
rowser-compat-data and send us a pull request.
SVGAnimatedPreserveAspectRatio - Web APIs
b
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/b
rowser-compat-data and send us a pull request.
SVGAnimatedRect - Web APIs
b
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/b
rowser-compat-data and send us a pull request.
SVGAnimatedString.animVal - Web APIs
syntax var = object.animval specifications specification status comment scalable vector graphics (svg) 1.1 (second edition) recommendation scalable vector graphics (svg) 2 candidate recommendation b
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/b
rowser-compat-data and send us a pull request.
SVGAnimatedTransformList - Web APIs
b
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/b
rowser-compat-data and send us a pull request.
SVGCircleElement - Web APIs
recommendation initial definition b
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/b
rowser-compat-data and send us a pull request.
SVGLength - Web APIs
b
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/b
rowser-compat-data and send us a pull request.
SVGLengthList - Web APIs
b
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/b
rowser-compat-data and send us a pull request.
SVGNumberList - Web APIs
b
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/b
rowser-compat-data and send us a pull request.
SVGPathElement - Web APIs
svgpathelement.gettotallength() returns a float representing the computed value for the total length of the path using the b
rowser's distance-along-a-path algorithm, as a distance in the current user coordinate system.
... svgpathelement.getpointatlength() returns an svgpoint representing the x and y coordinates in user space utilizing the b
rowser's distance-along-a-path algorithm.
SVGPreserveAspectRatio - Web APIs
b
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/b
rowser-compat-data and send us a pull request.
SVGSVGElement - Web APIs
when the b
rowser is actually rendering the content, then the position and size values represent the actual values when rendering.
...when the b
rowser actually knows the physical size of a "screen unit", this float attribute will express that information; otherwise, user agents will provide a suitable default value (such as .28mm).
SVGStylable - Web APIs
b
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/b
rowser-compat-data and send us a pull request.
SVGTransform - Web APIs
b
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/b
rowser-compat-data and send us a pull request.
SVGTransformable - Web APIs
b
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/b
rowser-compat-data and send us a pull request.
ScreenOrientation.angle - Web APIs
b
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/b
rowser-compat-data and send us a pull request.
ScreenOrientation.lock() - Web APIs
b
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/b
rowser-compat-data and send us a pull request.
ScreenOrientation.onchange - Web APIs
b
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/b
rowser-compat-data and send us a pull request.
ScreenOrientation.type - Web APIs
b
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/b
rowser-compat-data and send us a pull request.
ScreenOrientation.unlock() - Web APIs
b
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/b
rowser-compat-data and send us a pull request.
ScreenOrientation - Web APIs
b
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/b
rowser-compat-data and send us a pull request.
Screen Orientation API - Web APIs
b
rowser 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/b
rowser-compat-data and send us a pull request.
Selection.extend() - Web APIs
working draft current b
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/b
rowser-compat-data and send us a pull request.
Selection.removeAllRanges() - Web APIs
working draft current b
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/b
rowser-compat-data and send us a pull request.
Selection.removeRange() - Web APIs
working draft current b
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/b
rowser-compat-data and send us a pull request.
Selection.toString() - Web APIs
working draft current b
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/b
rowser-compat-data and send us a pull request.
ServiceWorker - Web APIs
multiple b
rowsing contexts (e.g.
... }); } else { // the current b
rowser doesn't support service workers.
ServiceWorkerRegistration.navigationPreload - Web APIs
b
rowser 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/b
rowser-compat-data and send us a pull request.
ServiceWorkerRegistration - Web APIs
the b
rowser maintains a persistent list of active serviceworkerregistration objects.
... examples in this example, the code first checks whether the b
rowser supports service workers and if so registers one.
ShadowRoot - Web APIs
note that this is currently only implemented by chrome; other b
rowsers still implement them on the document interface.
...note that this is currently only implemented by chrome; other b
rowsers still implement them on the document interface.
SharedWorker() - Web APIs
note: there is disagreement among b
rowser manufacturers about whether a data uri is of the same origin or not.
... although gecko 10.0 (firefox 10.0 / thunderbird 10.0 / seamonkey 2.7) and later accept data uris, that's not the case in all other b
rowsers.
SharedWorker - Web APIs
the sharedworker interface represents a specific kind of worker that can be accessed from several b
rowsing contexts, such as several windows, iframes or even workers.
... note: if sharedworker can be accessed from several b
rowsing contexts, all those b
rowsing contexts must share the exact same origin (same protocol, host and port).
SharedWorkerGlobalScope.applicationCache - Web APIs
b
rowser 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/b
rowser-compat-data and send us a pull request.
SharedWorkerGlobalScope.onconnect - Web APIs
living standard b
rowser 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/b
rowser-compat-data and send us a pull request.
SharedWorkerGlobalScope - Web APIs
workerlocation is a specific location object, mostly a subset of the location for b
rowsing scopes, but adapted to workers.
...workernavigator is a specific navigator object, mostly a subset of the navigator for b
rowsing scopes, but adapted to workers.
Slottable: assignedSlot - Web APIs
b
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/b
rowser-compat-data and send us a pull request.
Slottable - Web APIs
b
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/b
rowser-compat-data and send us a pull request.
StereoPannerNode.StereoPannerNode() - Web APIs
b
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/b
rowser-compat-data and send us a pull request.
Storage.setItem() - Web APIs
particularly, in mobile safari (since ios 5) it always th
rows when the user enters private mode.
... (safari sets the quota to 0 bytes in private mode, unlike other b
rowsers, which allow storage in private mode using separate data containers.) hence developers should make sure to always catch possible exceptions from setitem().
StorageManager.persist() - Web APIs
b
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/b
rowser-compat-data and send us a pull request.
Using the Storage Access API - Web APIs
usage notes the storage access api is designed to allow embedded content to request access to storage that would otherwise be blocked when a user’s b
rowser is set to block all third-party cookies.
...this is particularly true for document.cookie access, as b
rowsers will often return an empty cookie jar when third-party cookies are blocked.
TaskAttributionTiming.containerId - Web APIs
b
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/b
rowser-compat-data and send us a pull request.
TaskAttributionTiming.containerType - Web APIs
b
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/b
rowser-compat-data and send us a pull request.
HTMLSlotElement.assignedSlot - Web APIs
living standard b
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/b
rowser-compat-data and send us a pull request.
Touch.clientX - Web APIs
the touch.clientx property is the horizontal coordinate of a touch point relative to the b
rowser's viewport excluding any scroll offset.
... the touch.clienty property is the vertical coordinate of the touch point relative to the b
rowser's viewport excluding any scroll offset .
Touch - Web APIs
touch.clientx read only returns the x coordinate of the touch point relative to the left edge of the b
rowser viewport, not including any scroll offset.
... touch.clienty read only returns the y coordinate of the touch point relative to the top edge of the b
rowser viewport, not including any scroll offset.
URL.createObjectURL() - Web APIs
b
rowsers will release object urls automatically when the document is unloaded; however, for optimal performance and memory usage, if there are safe times when you can explicitly unload them, you should do so.
...this is no longer necessary, and b
rowsers are removing support for doing this.
URLUtilsReadOnly.hash - Web APIs
b
rowser 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/b
rowser-compat-data and send us a pull request.
URLUtilsReadOnly.host - Web APIs
b
rowser 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/b
rowser-compat-data and send us a pull request.
URLUtilsReadOnly.hostname - Web APIs
b
rowser 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/b
rowser-compat-data and send us a pull request.
URLUtilsReadOnly.href - Web APIs
b
rowser 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/b
rowser-compat-data and send us a pull request.
URLUtilsReadOnly.pathname - Web APIs
b
rowser 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/b
rowser-compat-data and send us a pull request.
URLUtilsReadOnly.port - Web APIs
b
rowser 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/b
rowser-compat-data and send us a pull request.
URLUtilsReadOnly.protocol - Web APIs
b
rowser 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/b
rowser-compat-data and send us a pull request.
URLUtilsReadOnly.search - Web APIs
b
rowser 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/b
rowser-compat-data and send us a pull request.
URLUtilsReadOnly.toString() - Web APIs
syntax string = object.tostring(); examples // in a web worker, on the page https://developer.mozilla.org/urlutilsreadonly.href var result = window.self.tostring(); // returns:'https://developer.mozilla.org/urlutilsreadonly.href' b
rowser 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/b
rowser-compat-data and send us a pull request.
URLUtilsReadOnly - Web APIs
b
rowser 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/b
rowser-compat-data and send us a pull request.
VideoPlaybackQuality.creationTime - Web APIs
the read-only creationtime property on the videoplaybackquality interface reports the number of milliseconds since the b
rowsing context was created this quality sample was recorded.
... syntax value = videoplaybackquality.creationtime; value a domhighrestimestamp object which indicates the number of milliseconds that elapased between the time the b
rowsing context was created and the time at which this sample of the video quality was obtained.
WEBGL_debug_renderer_info - Web APIs
depending on the privacy settings of the b
rowser, this extension might only be available to privileged contexts.
... availability: depending on the privacy settings of the b
rowser, this extension might only be available to privileged contexts or not work at all.
WaveShaperNode.WaveShaperNode() - Web APIs
b
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/b
rowser-compat-data and send us a pull request.
A basic 2D WebGL animation example - Web APIs
your b
rowser doesn't support canvas!
...that's done here by calling requestanimationframe(), which asks that a callback function be executed the next time the b
rowser is ready to update the screen.
Basic scissoring - Web APIs
<p>result of of scissoring.</p> <canvas>your b
rowser does not seem to support html5 canvas.</canvas> body { text-align : center; } canvas { display : block; width : 280px; height : 210px; margin : auto; padding : 0; border : none; background-color : black; } window.addeventlistener("load", function setupwebgl (evt) { "use strict" window.removeeventlistener(evt.type, setupwebgl, false); var paragraph = document.querys...
..." + "your b
rowser or device may not support webgl."; return; } gl.viewport(0, 0, gl.drawingbufferwidth, gl.drawingbufferheight); // enable scissoring operation and define the position and // size of the scissoring area.
Boilerplate 1 - Web APIs
]</button> <canvas>your b
rowser does not seem to support html5 canvas.</canvas> css body { text-align : center; } canvas { display : block; width : 280px; height : 210px; margin : auto; padding : 0; border : none; background-color : black; } button { display : block; font-size : inherit; margin : auto; padding : 0.6em; } javascript function getrenderingcontext() { var canvas = document.quer...
...yselector("canvas"); canvas.width = canvas.clientwidth; canvas.height = canvas.clientheight; var gl = canvas.getcontext("webgl") || canvas.getcontext("experimental-webgl"); if (!gl) { var paragraph = document.queryselector("p"); paragraph.innerhtml = "failed to get webgl context." + "your b
rowser or device may not support webgl."; return null; } gl.viewport(0, 0, gl.drawingbufferwidth, gl.drawingbufferheight); gl.clearcolor(0.0, 0.0, 0.0, 1.0); gl.clear(gl.color_buffer_bit); return gl; } the source code of this example is also available on github.
Clearing by clicking - Web APIs
<p>a very simple webgl program that still shows some color and user interaction.</p> <p>you can repeatedly click the empty canvas or the button below to change color.</p> <canvas id="canvas-view">your b
rowser does not seem to support html5 canvas.</canvas> <button id="color-switcher">press here to switch color</button> body { text-align : center; } canvas { display : block; width : 280px; height : 210px; margin : auto; padding : 0; border : none; background-color : black; } button { display : inline-block; font-size : inherit; margin : auto; padding : 0.6em; } window.
... if (!gl) { gl = canvas.getcontext("webgl") || canvas.getcontext("experimental-webgl"); if (!gl) { alert("failed to get webgl context.\n" + "your b
rowser or device may not support webgl."); return; } gl.viewport(0, 0, gl.drawingbufferwidth, gl.drawingbufferheight); } // get a random color value using a helper function.
Color masking - Web APIs
<p>tinting the displayed colors with color masking.</p> <canvas>your b
rowser does not seem to support html5 canvas.</canvas> <button id="red-toggle">on</button> <button id="green-toggle">on</button> <button id="blue-toggle">on</button> body { text-align : center; } canvas { display : block; width : 280px; height : 210px; margin : auto; padding : 0; border : none; background-color : black; } button { display : inline-block; font-family : serif; ...
... blue; } window.addeventlistener("load", function setupanimation (evt) { "use strict" window.removeeventlistener(evt.type, setupanimation, false); var canvas = document.queryselector("canvas"); var gl = canvas.getcontext("webgl") || canvas.getcontext("experimental-webgl"); if (!gl) { document.queryselector("p").innerhtml = "failed to get webgl context." + "your b
rowser or device may not support webgl."; return; } gl.viewport(0, 0, gl.drawingbufferwidth, gl.drawingbufferheight); var timer = setinterval(drawanimation, 1000); var mask = [true, true, true]; var redtoggle = document.queryselector("#red-toggle"), greentoggle = document.queryselector("#green-toggle"), bluetoggle = document.queryselector("#blue-toggle"); redtoggle.addeve...
Hello vertex attributes - Web APIs
click on the canvas to change the horizontal position of the square.</p> <canvas>your b
rowser does not seem to support html5 canvas.</canvas> body { text-align : center; } canvas { width : 280px; height : 210px; margin : auto; padding : 0; border : none; background-color : black; } button { display : block; font-size : inherit; margin : auto; padding : 0.6em; } <script type="x-shader/x-vertex" id="vertex-shader"> #version 100 precision highp float; attrib...
...rogram(program); } function getrenderingcontext() { var canvas = document.queryselector("canvas"); canvas.width = canvas.clientwidth; canvas.height = canvas.clientheight; var gl = canvas.getcontext("webgl") || canvas.getcontext("experimental-webgl"); if (!gl) { var paragraph = document.queryselector("p"); paragraph.innerhtml = "failed to get webgl context." + "your b
rowser or device may not support webgl."; return null; } gl.viewport(0, 0, gl.drawingbufferwidth, gl.drawingbufferheight); gl.clearcolor(0.0, 0.0, 0.0, 1.0); gl.clear(gl.color_buffer_bit); return gl; } })(); the source code of this example is also available on github.
Simple color animation - Web APIs
<p>a simple webgl program that shows color animation.</p> <p>you can click the button below to toggle the color animation on or off.</p> <canvas id="canvas-view">your b
rowser does not seem to support html5 canvas.</canvas> <button id="animation-onoff"> press here to <strong>[verb goes here]</strong> the animation </button> body { text-align : center; } canvas { display : block; width : 280px; height : 210px; margin : auto; padding : 0; border : none; background-color : black; } button { display : inline-block; font-size : inherit; mar...
... stopanimation({type: "click"}); var gl; function drawanimation () { if (!gl) { var canvas = document.getelementbyid("canvas-view"); gl = canvas.getcontext("webgl") ||canvas.getcontext("experimental-webgl"); if (!gl) { clearinterval(timer); alert("failed to get webgl context.\n" + "your b
rowser or device may not support webgl."); return; } gl.viewport(0, 0, gl.drawingbufferwidth, gl.drawingbufferheight); } // get a random color value using a helper function.
Textures from code - Web APIs
simple demonstration of procedural texturing</p> <canvas>your b
rowser does not seem to support html5 canvas.</canvas> body { text-align : center; } canvas { width : 280px; height : 210px; margin : auto; padding : 0; border : none; background-color : black; } button { display : block; font-size : inherit; margin : auto; padding : 0.6em; } <script type="x-shader/x-vertex" id="vertex-shader"> #version 100 precision highp float; attrib...
...rogram(program); } function getrenderingcontext() { var canvas = document.queryselector("canvas"); canvas.width = canvas.clientwidth; canvas.height = canvas.clientheight; var gl = canvas.getcontext("webgl") || canvas.getcontext("experimental-webgl"); if (!gl) { var paragraph = document.queryselector("p"); paragraph.innerhtml = "failed to get webgl context." + "your b
rowser or device may not support webgl."; return null; } gl.viewport(0, 0, gl.drawingbufferwidth, gl.drawingbufferheight); gl.clearcolor(0.0, 0.0, 0.0, 1.0); gl.clear(gl.color_buffer_bit); return gl; } })(); the source code of this example is also available on github.
WebGL constants - Web APIs
samples 0x80a9 sample_coverage_value 0x80aa sample_coverage_invert 0x80ab compressed_texture_formats 0x86a3 vendor 0x1f00 renderer 0x1f01 version 0x1f02 implementation_color_read_type 0x8b9a implementation_color_read_format 0x8b9b b
rowser_default_webgl 0x9244 buffers constants passed to webglrenderingcontext.bufferdata(), webglrenderingcontext.buffersubdata(), webglrenderingcontext.bindbuffer(), or webglrenderingcontext.getbufferparameter().
... constant name value description read_buffer 0x0c02 unpack_row_length 0x0cf2 unpack_skip_
rows 0x0cf3 unpack_skip_pixels 0x0cf4 pack_row_length 0x0d02 pack_skip_
rows 0x0d03 pack_skip_pixels 0x0d04 texture_binding_3d 0x806a unpack_skip_images 0x806d unpack_image_height 0x806e max_3d_texture_size 0x8073 max_elements_vertices 0x80e8 ...
WebGL tutorial - Web APIs
webgl enables web content to use an api based on opengl es 2.0 to perform 3d rendering in an html <canvas> in b
rowsers that support it without the use of plug-ins.
...the <canvas> element and webgl are not supported in some older b
rowsers, but are supported in recent versions of all major b
rowsers.
WebRTC connectivity - Web APIs
see the individual articles on these properties and methods for more specifics, and codecs used by webrtc for information about codecs supported by webrtc and which are compatible with which b
rowsers.
...not all b
rowsers support ice over tcp, however.
Writing WebSocket client applications - Web APIs
the b
rowser may also output to its console a more descriptive error message as well as a closing code as defined in rfc 6455, section 7.4 through the closeevent.
...most b
rowsers now only allow secure websocket connections, and no longer support using them in insecure contexts.
Fundamentals of WebXR - Web APIs
as b
rowser developers built support for webvr and allowed developers to experiment, it became clear that in order to finish an api for virtual environments on the web, it would make more sense to start a new specification than to try to "fix" webvr.
...the former, specified by the session mode string inline, presents the rendered scene within the context of a document in a web b
rowser, and doesn't require special xr hardware to view.
Geometry and reference spaces in WebXR - Web APIs
all of this is the b
rowser's responsibility to handle, providing consistent behavior regardless of how capable each of the underlying reference spaces are.
...if the estimated floor level is non-zero, the b
rowser is expected to round it such a way as to avoid fingerprinting (likely to the nearest centimeter).
Inputs and input sources - Web APIs
the b
rowser delivers pointerdown events corresponding to the action.
... when the action is completed, the b
rowser deletes the transient input source, and any appropriate pointerup events are sent.
Keyframe Formats - Web APIs
implicit to/from keyframes in newer b
rowser versions, you are able to set a beginning or end state for an animation only (i.e.
... a single keyframe), and the b
rowser will infer the other end of the animation if it is able to.
Web audio spatialization basics - Web APIs
the boombox sits inside a room (defined by the edges of the b
rowser viewport), and in this demo, we can move and rotate it with the provided controls.
... note: there are slight differences in the way the audio spatialization sounds across different b
rowsers.
Web Crypto API - Web APIs
interfaces some b
rowsers implemented an interface called crypto without having it well defined or being cryptographically sound.
... in order to avoid confusion, methods and properties of this interface have been removed from b
rowsers implementing the web crypto api, and all web crypto api methods are available on a new interface: subtlecrypto.
The structured clone algorithm - Web APIs
things that don't work with structured clone function objects cannot be duplicated by the structured clone algorithm; attempting to th
rows a data_clone_err exception.
... cloning dom nodes likewise th
rows a data_clone_err exception.
Web Workers API - Web APIs
serviceworkers essentially act as proxy servers that sit between web applications, the b
rowser, and the network (when available).
... sharedworker represents a specific kind of worker that can be accessed from several b
rowsing contexts, being several windows, iframes or even workers.
window.cancelIdleCallback() - Web APIs
b
rowser 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/b
rowser-compat-data and send us a pull request.
Window.console - Web APIs
the window.console property returns a reference to the console object, which provides methods for logging information to the b
rowser's console.
... currently there are many implementation differences among b
rowsers, but work is being done to bring them together and make them more consistent with one another.
Window.customElements - Web APIs
b
rowser 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/b
rowser-compat-data and send us a pull request.
Window.event - Web APIs
b
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/b
rowser-compat-data and send us a pull request.
Window: message event - Web APIs
the message event is fired on a window object when the window receives a message, for example from a call to window.postmessage() from another b
rowsing context.
... bubbles no cancelable no interface messageevent event handler property onmessage examples suppose a script sends a message to a different b
rowsing context, such as another <iframe>, using code like this: const targetframe = window.top.frames[1]; const targetorigin = 'https://example.org'; const windowmessagebutton = document.queryselector('#window-message'); windowmessagebutton.addeventlistener('click', () => { targetframe.postmessage('hello there', targetorigin); }); the receiver can listen for the message using addeventlistener() with code like this: window.addeventlistener('message', (event) => { console.log(`received message: ${event.data}`); }); alternatively the listener could use the onmessage event handler property:...
Window.ondragdrop - Web APIs
removed in firefox 50, and never implemented in any other b
rowser.
...note how event.stoppropagation(); prevents the b
rowser from loading the dropped tab, link or file.
Obsolete features - Web APIs
personalbar obsolete since gecko 76 if this feature is on, then the new secondary window renders the personal toolbar in netscape 6.x, netscape 7.x and mozilla b
rowser.
...in addition to the personal toolbar, mozilla b
rowser will render the site navigation bar if such toolbar is visible, present in the parent window.
Window.outerWidth - Web APIs
window.outerwidth read-only property returns the width of the outside of the b
rowser window.
... it represents the width of the whole b
rowser window including sidebar (if expanded), window chrome and window resizing borders/handles.
Window: pagehide event - Web APIs
the pagehide event is sent to a window when the b
rowser hides the current page in the process of presenting a different page from the session's history.
... for example, when the user clicks the b
rowser's back button, the current page receives a pagehide event before the previous page is shown.
Window: pageshow event - Web APIs
the pageshow event is sent to a window when the b
rowser displays the window's document due to navigation.
... this includes: initially loading the page navigating to the page from another page in the same window or tab restoring a frozen page on mobile oses returning to the page using the b
rowser's forward or back buttons during the initial page load, the pageshow event fires after the load event.
Window.prompt() - Web APIs
living standard b
rowser 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/b
rowser-compat-data and send us a pull request.
Window: resize event - Web APIs
bubbles no cancelable no interface uievent event handler property onresize in some earlier b
rowsers it was possible to register resize event handlers on any html element.
... <p>resize the b
rowser window to fire the <code>resize</code> event.</p> <p>window height: <span id="height"></span></p> <p>window width: <span id="width"></span></p> const heightoutput = document.queryselector('#height'); const widthoutput = document.queryselector('#width'); function reportwindowsize() { heightoutput.textcontent = window.innerheight; widthoutput.textcontent = window.innerwidth; } window.onres...
Window.restore() - Web APIs
this method is currently not working, but you can use: window.moveto(window.screenx, window.screeny); b
rowser 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/b
rowser-compat-data and send us a pull request.
Window.screenLeft - Web APIs
the window.screenleft read-only property returns the horizontal distance, in css pixels, from the left border of the user's b
rowser viewport to the left side of the screen.
... syntax leftwindowpos = window.screenleft returns a number equal to the number of css pixels from the left edge of the b
rowser viewport to the left edge of the screen.
Window.screenTop - Web APIs
the window.screentop read-only property returns the vertical distance, in css pixels, from the top border of the user's b
rowser viewport to the top side of the screen.
... syntax topwindowpos = window.screentop returns a number equal to the number of css pixels from the top edge of the b
rowser viewport to the top edge of the screen.
Window.scroll() - Web APIs
b
rowser 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/b
rowser-compat-data and send us a pull request.
Window.scrollBy() - Web APIs
b
rowser 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/b
rowser-compat-data and send us a pull request.
Window.scrollX - Web APIs
this value is subpixel precise in modern b
rowsers, meaning that it isn't necessarily a whole number.
... if (window.scrollx > 400) { window.scroll(0,0); } notes the pagexoffset property is an alias for the scrollx property: window.pagexoffset == window.scrollx; // always true for cross-b
rowser compatibility, use window.pagexoffset instead of window.scrollx.
Window.scrollY - Web APIs
this value is subpixel precise in modern b
rowsers, meaning that it isn't necessarily a whole number.
... the pageyoffset property is an alias for the scrolly property: window.pageyoffset === window.scrolly; // always true for cross-b
rowser compatibility, use window.pageyoffset instead of window.scrolly.
WindowOrWorkerGlobalScope.atob() - Web APIs
exceptions domexception (name: invalidcharactererror) th
rows if encodeddata is not valid base64.
... example const encodeddata = window.btoa('hello, world'); // encode a string const decodeddata = window.atob(encodeddata); // decode the string polyfill you can use a polifill from https://github.com/maxart2501/base64-js/blob/master/base64.js for b
rowsers that don't support it.
WindowProxy - Web APIs
a windowproxy object exists in every b
rowsing context.
...when a b
rowsing context is navigated, the window object its windowproxy wraps is changed.
Worker() - Web APIs
note: that there is a disagreement among b
rowser manufacturers about whether a data uri is of the same origin or not.
... though gecko 10.0 (firefox 10.0 / thunderbird 10.0 / seamonkey 2.7) and later accept data uris, that's not the case in all other b
rowsers.
WorkerNavigator.permissions - Web APIs
b
rowser 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/b
rowser-compat-data and send us a pull request.
WritableStream - Web APIs
b
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/b
rowser-compat-data and send us a pull request.
WritableStreamDefaultWriter.ready - Web APIs
b
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/b
rowser-compat-data and send us a pull request.
Using XMLHttpRequest in IE6 - Web APIs
however, in ie7 and other b
rowsers xmlhttprequest is a native javascript object.
... in all modern b
rowsers, you can create a new xmlhttprequest object using the following code: var request = new xmlhttprequest() however, if you need to also support internet explorer 6 and older, you need to extend your code like this: if (window.xmlhttprequest) { //firefox, opera, ie7, and other b
rowsers will use the native object var request = new xmlhttprequest(); } else { //ie 5 and 6 will use the activex control var request = new activexobject("microsoft.xmlhttp"); } see also using xmlhttprequest ...
XRBoundedReferenceSpace.boundsGeometry - Web APIs
the specification recommends that b
rowsers shift the points to the nearest 5 centimeters (while avoiding going outside the physical limitations of the hardware).
...the b
rowser, however, should provide appropriate warnings to the user about any risks (such as the risk that they might run into a physical wall if they keep moving).
XRReferenceSpace - Web APIs
reset the reset event is sent to an xrreferencespace object when the b
rowser detects a discontinuity has occurred wherein the tracked object's origin relative to the user's environment or location.
...if the estimated floor level is non-zero, the b
rowser is expected to round it such a way as to avoid fingerprinting (likely to the nearest centimeter).
XSLT Basic Example - Web APIs
basic example this first example demonstrates the basics of setting up an xslt transformation in a b
rowser.
...rsion="1.0"?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/xsl/transform"> <xsl:output method="text"/> <xsl:template match="/"> article - <xsl:value-of select="/article/title"/> authors: <xsl:apply-templates select="/article/authors/author"/> </xsl:template> <xsl:template match="author"> - <xsl:value-of select="." /> </xsl:template> </xsl:stylesheet> b
rowser output : article - my article authors: - mr.
msGetRegionContent - Web APIs
this proprietary method is specific to internet explorer b
rowser.
...if an element is not a region, this method th
rows a domexception with the invalidaccesserror error code.
ARIA live regions - Accessibility
advanced live regions (tbd: more granular information on the support of the individual attributes with combinations of os/b
rowser/at).
...in windows eyes supports live regions since version 8.0 "for use outside of b
rowse mode for microsoft internet explorer and mozilla firefox".
Using the alert role - Accessibility
description this technique demonstrates how to use the alert role and describes the effect it has on b
rowsers and assistive technology.
...when this role is added to an element, the b
rowser will send out an accessible alert event to assistive technology products which can then notify the user about it.
Using the group role - Accessibility
description this technique demonstrates how to use the group role and describes the effect it has on b
rowsers and assistive technology.
...when the role is added to an element, the b
rowser will send out an accessible group event to assistive technology products which can then notify the user about it.
Using the log role - Accessibility
description this technique demonstrates how to use the log role and describes the effect it has on b
rowsers and assistive technology.
...when this role is added to an element, the b
rowser will send out an accessible log event to assistive technology products which can then notify the user about it.
Using the slider role - Accessibility
this technique demonstrates how to use the slider role and describes the effect it has on b
rowsers and assistive technology.
...arrow keys should operate as follows (localization for right-to-left languages should reverse the direction of the ar
rows): key(s) action right and up ar
rows increase the selected value left and down ar
rows decrease the selected value page up and page down optionally increase and decrease the value by a set amount (e.g.
Using the status role - Accessibility
description this technique demonstrates how to use the status role and describes the effect it has on b
rowsers and assistive technology.
...when the role is added to an element, the b
rowser will send out an accessible status event to assistive technology products which can then notify the user about it.
Using ARIA: Roles, states, and properties - Accessibility
addition of aria semantics only exposes extra information to a b
rowser's accessibility api, and does not affect a page's dom.
...etext live region attributes aria-live aria-relevant aria-atomic aria-busy drag & drop attributes aria-dropeffect aria-dragged relationship attributes aria-activedescendant aria-colcount aria-colindex aria-colspan aria-controls aria-describedby aria-details aria-errormessage aria-flowto aria-labelledby aria-owns aria-posinset aria-rowcount aria-rowindex aria-
rowspan aria-setsize microsoftedge-specific properties x-ms-aria-flowfrom ...
ARIA: Complementary role - Accessibility
added benefits certain technologies such as b
rowser extensions can generate lists of all landmark roles present on a page, allowing non-screen reader users to also quickly identify and navigate to large sections of the document.
... landmarks b
rowser extension specifications specification status accessible rich internet applications (wai-aria) 1.1the definition of 'aria: complementary role' in that specification.
ARIA: contentinfo role - Accessibility
added benefits certain technologies such as b
rowser extensions can generate lists of all landmark roles present on a page, allowing non-screen reader users to also quickly identify and navigate to large sections of the document.
... landmarks b
rowser extension specifications specification status accessible rich internet applications (wai-aria) 1.1the definition of 'contentinfo landmark role' in that specification.
ARIA: feed role - Accessibility
a feed enables screen readers to use the b
rowse mode reading cursor to both read and scroll through a stream of rich content that may continue scrolling infinitely by loading more content as the user reads.
...if the addition of articles occupies the main b
rowser thread, make sure to set aria-busy="true" on the feed itself, and make sure to set it back to false when processing ends, or the user may not see the updates.
ARIA: form role - Accessibility
added benefits certain technologies such as b
rowser extensions can generate lists of all landmark roles present on a page, allowing non-screen reader users to also quickly identify and navigate to large sections of the document.
... landmarks b
rowser extension specifications specification status accessible rich internet applications (wai-aria) 1.1the definition of 'aria form role' in that specification.
ARIA: Main role - Accessibility
<body> <a href="#main-content">skip to main content</a> <!-- navigation and header content --> <div id="main-content" role="main"> <!-- main page content --> </div> </body> webaim: "skip navigation" links added benefits certain technologies such as b
rowser extensions can generate lists of all landmark roles present on a page, allowing non-screen reader users to also quickly identify and navigate to large sections of the document.
... landmarks b
rowser extension specifications specification status accessible rich internet applications (wai-aria) 1.1the definition of 'aria navigtion role' in that specification.
ARIA: Navigation Role - Accessibility
added benefits certain technologies such as b
rowser extensions can generate lists of all landmark roles present on a page, allowing non-screen reader users to also quickly identify and navigate to large sections of the document.
... landmarks b
rowser extension specifications specification status accessible rich internet applications (wai-aria) 1.1the definition of 'aria navigtion role' in that specification.
ARIA: Region role - Accessibility
added benefits certain technologies such as b
rowser extensions can generate lists of all landmark roles present on a page, allowing non-screen reader users to also quickly identify and navigate to large sections of the document.
... landmarks b
rowser extension specifications specification status accessible rich internet applications (wai-aria) 1.1the definition of 'aria region role' in that specification.
ARIA: search role - Accessibility
added benefits certain technologies such as b
rowser extensions can generate lists of all landmark roles present on a page, allowing non-screen reader users to also quickly identify and navigate to large sections of the document.
... landmarks b
rowser extension specifications specification status accessible rich internet applications (wai-aria) 1.1the definition of 'aria search role' in that specification.
ARIA: textbox role - Accessibility
description when an element has the textbox role, the b
rowser sends an accessible textbox event to assistive technologies, which can then notify the user about it.
...before using this technique, ensure that the b
rowsers you need to target currently support it.
Alerts - Accessibility
e" aria-required="true"/> <br /> <label for="email">e-mail address (required):</label> <input name="email" id="email" aria-required="true"/> <br /> <label for="website">website (optional):</label> <input name="website" id="website"/> </fieldset> <label for="message">please enter your message (required):</label> <br /> <textarea name="message" id="message"
rows="5" cols="80" aria-required="true"></textarea> <br /> <input type="submit" name="submit" value="send message"/> <input type="reset" name="reset" value="reset form"/> </form> checking for validity and notifying the user form validations consists of several steps: checking if the e-mail address or entered name are valid.
...if this were a real live form, and the site was being visited by a b
rowser that does not yet support aria, we’d still want to give an indication that this is a required field.
Accessibility and Spacial Patterns - Accessibility
they can be parallel, radial, curved or straight, and may be formed by
rows of repeating elements.
... see also mdn accessibiltity: what users can do to b
rowse more safely web accessibiltity for seizures and physical reactions web accessibility: understanding colors and luminance braille part 3: a step-by-step guide to typesetting ada braille correctly in adobe illustrator spatial math in brailleblaster (4 of 5) government literature nasa: designing with blue math spatial reasoning: why math talk is about more than numbers scie...
An overview of accessible web applications and widgets - Accessibility
aria attributes are interpreted automatically by the b
rowser and translated to the operating system's native accessibility apis.
...--> <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 b
rowsers, including firefox, safari, opera, chrome, and internet explorer, and many assistive technologies.
Cognitive accessibility - Accessibility
don't alter or remove the b
rowser's default :focus styling, unless you're making focus even more obvious.
...similarly, don't change defaults like the b
rowser's back button.
Keyboard - Accessibility
in such a case, focusing the nested document is the only way of returning assistive technology to a non-interactive state (often called "b
rowse mode").
... standard focusable elements such as links and input fields are given special styling by the b
rowser by default, so you might not need to specify focus styling for such elements, unless you want the focus styling to be more distinctive.
Robust - Accessibility
b
rowsers), but also with future ones too.
... success criteria how to conform to the criteria practical resource 4.1.1 parsing (a) content should be well-formed so it can be parsed successfully by b
rowsers and other user agents such as screenreaders.
-webkit-print-color-adjust - CSS: Cascading Style Sheets
the -webkit-print-color-adjust property is a non-standard css extension that can be used to force printing of background colors and images in b
rowsers based on the webkit engine.
... background colors and images are only printed if the user explicitly allows it in their b
rowser's print settings dialog.
:-webkit-autofill - CSS: Cascading Style Sheets
the :-webkit-autofill css pseudo-class matches when an <input> element has its value autofilled by the b
rowser.
... note: the user agent style sheets of many b
rowsers use !important in their :-webkit-autofill style declarations, making them non-overrideable by webpages without resorting to javascript hacks.
::first-letter (:first-letter) - CSS: Cascading Style Sheets
(this is poorly supported by b
rowsers; see the b
rowser compatibility table below.) a combination of the ::before pseudo-element and the content property may inject some text at the beginning of the element.
...b
rowsers also accept :first-letter, introduced in css2.
::slotted() - CSS: Cascading Style Sheets
b
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/b
rowser-compat-data and send us a pull request.
:focus-visible - CSS: Cascading Style Sheets
(many b
rowsers show a “focus ring” by default in this case.) this selector is useful to provide a different focus indicator based on the user’s input modality (mouse vs.
... <custom-button tabindex="0" role="button">click me</custom-button> custom-button { display: inline-block; margin: 10px; } custom-button:focus { /* provide a fallback style for b
rowsers that don't support :focus-visible */ outline: none; background: lightgrey; } custom-button:focus:not(:focus-visible) { /* remove the focus indicator on mouse-focus for b
rowsers that do support :focus-visible */ background: transparent; } custom-button:focus-visible { /* draw a very noticeable focus style for keyboard-focus on b
rowsers that do support :focus-visi...
:host-context() - CSS: Cascading Style Sheets
b
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/b
rowser-compat-data and send us a pull request.
:host - CSS: Cascading Style Sheets
b
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/b
rowser-compat-data and send us a pull request.
:nth-child() - CSS: Cascading Style Sheets
'='<attr-modifier> = i | s examples example selectors tr:nth-child(odd) or tr:nth-child(2n+1) represents the odd
rows of an html table: 1, 3, 5, etc.
... tr:nth-child(even) or tr:nth-child(2n) represents the even
rows of an html table: 2, 4, 6, etc.
:nth-last-child() - CSS: Cascading Style Sheets
'='<attr-modifier> = i | s examples example selectors tr:nth-last-child(odd) or tr:nth-last-child(2n+1) represents the odd
rows of an html table: 1, 3, 5, etc., counting from the end.
... tr:nth-last-child(even) or tr:nth-last-child(2n) represents the even
rows of an html table: 2, 4, 6, etc., counting from the end.
:read-only - CSS: Cascading Style Sheets
b
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/b
rowser-compat-data and send us a pull request.
:read-write - CSS: Cascading Style Sheets
b
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/b
rowser-compat-data and send us a pull request.
:scope - CSS: Cascading Style Sheets
b
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/b
rowser-compat-data and send us a pull request.
:where() - CSS: Cascading Style Sheets
b
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/b
rowser-compat-data and send us a pull request.
@font-feature-values - CSS: Cascading Style Sheets
b
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/b
rowser-compat-data and send us a pull request.
-moz-device-pixel-ratio - CSS: Cascading Style Sheets
media: media/visual accepts min/max prefixes: yes examples basic compatibility example -moz-device-pixel-ratio may be used for compatibility with firefox older than 16, and alongside -webkit-device-pixel-ratio for compatibility with webkit-based b
rowsers that do not support dppx.
... example: @media (-webkit-min-device-pixel-ratio: 2), /* webkit-based b
rowsers */ (min--moz-device-pixel-ratio: 2), /* older firefox b
rowsers (prior to firefox 16) */ (min-resolution: 2dppx), /* the standard way */ (min-resolution: 192dpi) /* dppx fallback */ note: see this csswg article for compatibility good practices regarding resolution and dppx.
At-rules - CSS: Cascading Style Sheets
/* general structure */ @identifier (rule); /* example: tells b
rowser to use utf-8 character set */ @charset "utf-8"; there are several at-rules, designated by their identifiers, each with a different syntax: @charset — defines the character set used by the style sheet.
... @supports — a conditional group rule that will apply its content if the b
rowser meets the criteria of the given condition.
Coordinate systems - CSS: Cascading Style Sheets
client the "client" coordinate system uses as its origin the top-left corner of the viewport or b
rowsing context in which the event occurred.
... on a desktop computer, for example, the mouseevent.clientx and mouseevent.clienty properties indicate the position of the mouse cursor at the moment the event occurred, relative to the top-left corner of the b
rowser window.
Border-radius generator - CSS: Cascading Style Sheets
=============== */ .group:before, .group:after { content: ""; display: table; } .group:after { clear:both; } .group { zoom: 1; /* for ie 6/7 (trigger haslayout) */ } /* grid column setup * ========================================================================== */ .col { display: block; float:left; margin: 1% 0 1% 1.6%; } .col:first-child { margin-left: 0; } /* all b
rowsers except ie6 and lower */ /* * ui component */ .ui-input-slider-container { height: 20px; margin: 10px 0; font-family: "segoe ui", arial, helvetica, sans-serif; -moz-user-select: none; user-select: none; } .ui-input-slider-container * { float: left; height: 100%; line-height: 100%; } /* input slider */ .ui-input-slider > input { margin: 0; padding: 0; width: 50px; text-align:...
... center; -moz-box-sizing: border-box; -webkit-box-sizing: border-box; box-sizing: border-box; } .ui-input-slider-info { width: 90px; padding: 0px 10px 0px 0px; text-align: right; text-transform: lowercase; } .ui-input-slider-left, .ui-input-slider-right { width: 16px; cursor: pointer; background: url("https://mdn.mozillademos.org/files/5679/ar
rows.png") center left no-repeat; } .ui-input-slider-right { background: url("https://mdn.mozillademos.org/files/5679/ar
rows.png") center right no-repeat; } .ui-input-slider-name { width: 90px; padding: 0 10px 0 0; text-align: right; text-transform: lowercase; } .ui-input-slider-btn-set { width: 25px; background-color: #2c9fc9; border-radius: 5px; color: #fff; font-weight: bold; line-height: 14px; text-align: center; } .ui-inp...
Box-shadow generator - CSS: Cascading Style Sheets
=============== */ .group:before, .group:after { content: ""; display: table; } .group:after { clear:both; } .group { zoom: 1; /* for ie 6/7 (trigger haslayout) */ } /* grid column setup * ========================================================================== */ .col { display: block; float:left; margin: 1% 0 1% 1.6%; } .col:first-child { margin-left: 0; } /* all b
rowsers except ie6 and lower */ /* * ui slider */ .slidergroup { height: 20px; margin: 10px 0; font-family: "segoe ui", arial, helvetica, sans-serif; -moz-user-select: none; user-select: none; } .slidergroup * { float: left; height: 100%; line-height: 100%; } /* slider */ .ui-slider { height: 10px; width: 200px; margin: 4px 10px; display: block; border: 1px solid #999; border-radi...
...s.prototype.setwidth = function setwidth(value) { this.width = value; this.node.style.width = this.width + 'px'; outputmanager.updateproperty(this.id, 'width', this.width + 'px'); } cssclass.prototype.setheight = function setheight(value) { this.height = value; this.node.style.height = this.height + 'px'; outputmanager.updateproperty(this.id, 'height', this.height + 'px'); } // b
rowser support cssclass.prototype.setrotate = function setrotate(value) { var cssvalue = 'rotate(' + value +'deg)'; this.node.style.transform = cssvalue; this.node.style.webkittransform = cssvalue; this.node.style.mstransform = cssvalue; if (value !== 0) { if (this.rotate === 0) { outputmanager.toggleproperty(this.id, 'transform', true); outputmanager.toggleproperty(this.id, '-...
Box alignment for block, absolutely positioned and table layout - CSS: Cascading Style Sheets
this document details how the specification expects these properties to be implemented for completeness, and is likely to change as the specification and b
rowser implementations develop.
... aligning in these layout methods today as we do not currently have b
rowser support for box alignment in block layout, your options for alignment are either to use one of the existing alignment methods or, to make even a single item inside a container a flex item in order to use the alignment properties as specified in flexbox.
CSS Box Alignment - CSS: Cascading Style Sheets
baseline first baseline last baseline baseline content alignment — specifying a baseline alignment value for justify-content or align-content — works in layout methods that lay items out in
rows.
...the gap properties were originally prefixed with grid- in the grid layout specification and some b
rowsers only support these prefixed versions.
Basic Concepts of Multicol - CSS: Cascading Style Sheets
the b
rowser will then assign the correct amount of space to each column box to create the requested number of columns.
...if you declare a column-width, the b
rowser will work out how many columns of that width will fit into the multicol container and distribute any extra space equally between the columns.
Ordering Flex Items - CSS: Cascading Style Sheets
ning not to use reordering to fix issues in your source: “authors must not use order or the *-reverse values of flex-flow/flex-direction as a substitute for correct source ordering, as that can ruin the accessibility of the document.” note: for some years firefox had a bug whereby it would attempt to follow the visual order and not the source order, making it behave differently to other b
rowsers.
...especially when using newer layout methods you should ensure that your b
rowser testing includes testing the site using keyboard only, rather than a mouse or touchscreen.
OpenType font features guide - CSS: Cascading Style Sheets
they may not match exactly due to b
rowser implementation inconsistencies, but in many cases the first example will match the second.
... while more common in script typefaces, in the below example they are used to create ar
rows: position (font-variant-position) position variants are used to enable typographic superscript and subscript glyphs.
CSS Scrollbars - CSS: Cascading Style Sheets
baseline rules for scrollbar usability | adrian roselli b
rowser 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/b
rowser-compat-data and send us a pull request.
Overview of CSS Shapes - CSS: Cascading Style Sheets
if you do not have shapes support in the b
rowser, the user will see content flowing around the sides of a rectangular box as before.
... developer tools for shapes along with css shapes support in the b
rowser, firefox are shipping a shape path editor in the firefox devtools.
Comments - CSS: Cascading Style Sheets
a css comment is used to add explanatory notes to the code or to prevent the b
rowser from interpreting specific parts of the style sheet.
...however, when using the <style> element, you may use <!-- --> to hide css from older b
rowsers, although this is not recommended.
Grid wrapper - CSS: Cascading Style Sheets
using a numeric unit (pixels, ems, rems) will create a fixed maximum size for the central wrapper, whereas using percentage values or viewport units will mean this wrapper g
rows or shrinks in response to its context.
... useful fallbacks or alternative methods when using this recipe at page level it can be useful to set a max-width along with left and right auto margins to center the content horizontally: .grid { max-width: 1200px; margin: 0 auto; // horizontally centers the container } /* remove the max-width and margins if the b
rowser supports grid */ @supports (display: grid) { .grid { display: grid; /* other grid code goes here */ max-width: none; margin: 0; } } to “break out” a full-width item to the edge of the viewport you can then use this trick (courtesy of una kravets): .item { width: 100vw; margin-left: 50%; transform: translate3d(-50%, 0, 0); } this gives a good approximation of the...
Pagination - CSS: Cascading Style Sheets
alternative methods once the column-gap property has implementation in b
rowsers this could be used instead of margins to space out the items.
... we have also added some additional content that would be read by a screenreader but is hidden visually, and set the aria-hidden attribute on the paging ar
rows.
Pseudo-elements - CSS: Cascading Style Sheets
however, since this distinction was not present in older versions of the w3c spec, most b
rowsers support both syntaxes for the original pseudo-elements.
... index of standard pseudo-elements ::after (:after) ::backdrop ::before (:before) ::cue ::cue-region ::first-letter (:first-letter) ::first-line (:first-line) ::grammar-error ::marker ::part() ::placeholder ::selection ::slotted() ::spelling-error b
rowser lowest version support of internet explorer 8.0 :pseudo-element 9.0 :pseudo-element ::pseudo-element firefox (gecko) 1.0 (1.0) :pseudo-element 1.0 (1.5) :pseudo-element ::pseudo-element opera 4.0 :pseudo-element 7.0 :pseudo-element ::pseudo-element safari (webkit) 1.0 (85) :pseudo-element ::pseudo-element specifications specification status comment css level 1 r...
Specificity - CSS: Cascading Style Sheets
specificity is the means by which b
rowsers decide which css property values are the most relevant to an element and, therefore, will be applied.
... <div id="no-where-support"> ⚠️ your b
rowser doesn't support the <code><a href="/docs/web/css/:where" target="_top">:where()</a></code> pseudo-class.
Visual formatting model - CSS: Cascading Style Sheets
this includes continuous media such as a computer screen and paged media such as a book or document printed by b
rowser print functions.
... the role of the viewport in continuous media, the viewport is the viewing area of the b
rowser window.
animation-delay - CSS: Cascading Style Sheets
b
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/b
rowser-compat-data and send us a pull request.
animation-direction - CSS: Cascading Style Sheets
b
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/b
rowser-compat-data and send us a pull request.
attr() - CSS: Cascading Style Sheets
ch | em | ex | ic | lh | rlh | rem | vb | vi | vw | vh | vmin | vmax | mm | q | cm | in | pt | pc | px | deg | grad | rad | turn | ms | s | hz | khz | % examples content property html <p data-foo="hello">world</p> css [data-foo]::before { content: attr(data-foo) " "; } result <color> value html <div class="background" data-background="lime">background expected to be red if your b
rowser does not support advanced usage of attr()</div> css .background { height: 100vh; } .background { background-color: red; } .background[data-background] { background-color: attr(data-background color, red); } specifications specification status comment css values and units module level 4the definition of 'attr()' in that specification.
... these changes are experimental and may be dropped during the cr phase if b
rowser support is too small.
background-image - CSS: Cascading Style Sheets
if a specified image cannot be drawn (for example, when the file denoted by the specified uri cannot be loaded), b
rowsers handle it as they would a none value.
... accessibility concerns b
rowsers do not provide any special information on background images to assistive technology.
background-position - CSS: Cascading Style Sheets
b
rowser 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/b
rowser-compat-data and send us a pull request.
border-bottom-width - CSS: Cascading Style Sheets
b
rowser 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/b
rowser-compat-data and send us a pull request.
border-collapse - CSS: Cascading Style Sheets
formal definition initial valueseparateapplies totable and inline-table elementsinheritedyescomputed valueas specifiedanimation typediscrete formal syntax collapse | separate examples a colorful table of b
rowser engines html <table class="separate"> <caption><code>border-collapse: separate</code></caption> <tbody> <tr><th>b
rowser</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>b
rowser</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-inline-end - CSS: Cascading Style Sheets
initial valueas each of the properties of the shorthand:border-width: as each of the properties of the shorthand:border-top-width: mediumborder-right-width: mediumborder-bottom-width: mediumborder-left-width: mediumborder-style: as each of the properties of the shorthand:border-top-style: noneborder-right-style: noneborder-bottom-style: noneborder-left-style: nonecolor: varies from one b
rowser to anotherapplies toall elementsinheritednocomputed valueas each of the properties of the shorthand:border-width: as each of the properties of the shorthand:border-bottom-width: the absolute length or 0 if border-bottom-style is none or hiddenborder-left-width: the absolute length or 0 if border-left-style is none or hiddenborder-right-width: the absolute length or 0 if border-right-style is no...
...finition initial valueas each of the properties of the shorthand:border-width: as each of the properties of the shorthand:border-top-width: mediumborder-right-width: mediumborder-bottom-width: mediumborder-left-width: mediumborder-style: as each of the properties of the shorthand:border-top-style: noneborder-right-style: noneborder-bottom-style: noneborder-left-style: nonecolor: varies from one b
rowser to anotherapplies toall elementsinheritednocomputed valueas each of the properties of the shorthand:border-width: as each of the properties of the shorthand:border-bottom-width: the absolute length or 0 if border-bottom-style is none or hiddenborder-left-width: the absolute length or 0 if border-left-style is none or hiddenborder-right-width: the absolute length or 0 if border-right-style is no...
border-left-style - CSS: Cascading Style Sheets
b
rowser 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/b
rowser-compat-data and send us a pull request.
border-left - CSS: Cascading Style Sheets
recommendation initial definition b
rowser 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/b
rowser-compat-data and send us a pull request.
border-right-style - CSS: Cascading Style Sheets
b
rowser 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/b
rowser-compat-data and send us a pull request.
border-right - CSS: Cascading Style Sheets
recommendation initial definition b
rowser 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/b
rowser-compat-data and send us a pull request.
border-top - CSS: Cascading Style Sheets
recommendation initial definition b
rowser 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/b
rowser-compat-data and send us a pull request.
border - CSS: Cascading Style Sheets
b
rowser 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/b
rowser-compat-data and send us a pull request.
box-flex-group - CSS: Cascading Style Sheets
when dividing up the box's extra space, the b
rowser first considers all elements within the first flex group.
...ed valueas specifiedanimation typediscrete formal syntax <integer> examples simple usage example in the original flexbox spec, box-flex-group could be used to assign flex children to different groups to distribute flexible space between: article:nth-child(1) { -webkit-box-flex-group: 1; } article:nth-child(2) { -webkit-box-flex-group: 2; } this was only ever supported in webkit-based b
rowsers, with a prefix, and in subsequent versions of the spec this functionality does not have an equivalent.
calc() - CSS: Cascading Style Sheets
math expressions involving percentages for widths and heights on table columns, table column groups, table
rows, table row groups, and table cells in both auto and fixed layout tables may be treated as if auto had been specified.
... note: the chrome b
rowser currently won’t accept some values returned by calc() when an integer is expected.
clamp() - CSS: Cascading Style Sheets
note that using clamp() for font sizes, as in these examples, allows you to set a font-size that g
rows with the size of the viewport, but doesn't go below a minimum font-size or above a maximum font-size.
... notes math expressions involving percentages for widths and heights on table columns, table column groups, table
rows, table row groups, and table cells in both auto and fixed layout tables may be treated as if auto had been specified.
clear - CSS: Cascading Style Sheets
recommendation initial definition b
rowser 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/b
rowser-compat-data and send us a pull request.
column-count - CSS: Cascading Style Sheets
b
rowser 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/b
rowser-compat-data and send us a pull request.
conic-gradient() - CSS: Cascading Style Sheets
b
rowsers supporting conic gradients also accept percent values, with 100% equaling 360 degrees, but this is not in the specification.
... accessibility concerns b
rowsers do not provide any special information on background images to assistive technology.
empty-cells - CSS: Cascading Style Sheets
b
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/b
rowser-compat-data and send us a pull request.
flex - CSS: Cascading Style Sheets
auto the item is sized according to its width and height properties, but g
rows to absorb any extra free space in the flex container, and shrinks to its minimum size to fit the container.
...it is fully inflexible: it neither shrinks nor g
rows in relation to the flex container.
font-family - CSS: Cascading Style Sheets
the b
rowser will select the first font in the list that is installed or that can be downloaded using a @font-face at-rule.
...this lets the b
rowser select an acceptable fallback font when necessary.
font-kerning - CSS: Cascading Style Sheets
values auto the b
rowser determines whether font kerning should be used or not.
... for example, some b
rowsers will disable kerning on small fonts, since applying it could harm the readability of text.
font-smooth - CSS: Cascading Style Sheets
auto - let the b
rowser decide (uses subpixel anti-aliasing when available; this is the default) none - turn font smoothing off; display text with jagged sharp edges.
... auto - allow the b
rowser to select an optimization for font smoothing, typically grayscale.
font-style - CSS: Cascading Style Sheets
if no oblique faces are available, the b
rowser will synthesize an oblique version of the font by slanting a normal face by the specified amount.
... for the example below to work, you'll need a b
rowser that supports the css fonts level 4 syntax in which font-style: oblique can accept an <angle>.
font-synthesis - CSS: Cascading Style Sheets
the font-synthesis css property controls which missing typefaces, bold or italic, may be synthesized by the b
rowser.
...in these cases, it may be desirable to switch off the b
rowser's default font-synthesis.
font-variant-position - CSS: Cascading Style Sheets
b
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/b
rowser-compat-data and send us a pull request.
font-variant - CSS: Cascading Style Sheets
recommendation initial definition b
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/b
rowser-compat-data and send us a pull request.
gap (grid-gap) - CSS: Cascading Style Sheets
the gap css property sets the gaps (gutters) between
rows and columns.
...however, in order to support b
rowsers that implemented grid-gap and not gap for grid, you will need to use the prefixed property as in the interactive example above.
<gradient> - CSS: Cascading Style Sheets
(be aware that older b
rowsers may not use this behavior when using the transparent keyword.) examples linear gradient example a simple linear gradient.
...note that this isn't supported widely across b
rowser as of yet.
grid-template-areas - CSS: Cascading Style Sheets
multiple named cell tokens within and between
rows create a single named grid area that spans the corresponding grid cells.
...ete formal syntax none | <string>+ examples specifying named grid areas html <section id="page"> <header>header</header> <nav>navigation</nav> <main>main area</main> <footer>footer</footer> </section> css #page { display: grid; width: 100%; height: 250px; grid-template-areas: "head head" "nav main" "nav foot"; grid-template-
rows: 50px 1fr 30px; grid-template-columns: 150px 1fr; } #page > header { grid-area: head; background-color: #8ca0ff; } #page > nav { grid-area: nav; background-color: #ffa08c; } #page > main { grid-area: main; background-color: #ffff64; } #page > footer { grid-area: foot; background-color: #8cffa0; } result specifications specification status comment ...
initial - CSS: Cascading Style Sheets
b
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/b
rowser-compat-data and send us a pull request.
letter-spacing - CSS: Cascading Style Sheets
b
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/b
rowser-compat-data and send us a pull request.
mix-blend-mode - CSS: Cascading Style Sheets
candidate recommendation initial definition b
rowser 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/b
rowser-compat-data and send us a pull request.
object-fit - CSS: Cascading Style Sheets
candidate recommendation initial definition b
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/b
rowser-compat-data and send us a pull request.
object-position - CSS: Cascading Style Sheets
b
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/b
rowser-compat-data and send us a pull request.
orphans - CSS: Cascading Style Sheets
b
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/b
rowser-compat-data and send us a pull request.
outline-offset - CSS: Cascading Style Sheets
recommendation initial definition b
rowser 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/b
rowser-compat-data and send us a pull request.
overflow-anchor - CSS: Cascading Style Sheets
the overflow-anchor css property provides a way to opt out of the b
rowser's scroll anchoring behavior, which adjusts scroll position to minimize content shifts.
... scroll anchoring behavior is enabled by default in any b
rowser that supports it.
overflow-wrap - CSS: Cascading Style Sheets
the overflow-wrap css property applies to inline elements, setting whether the b
rowser should insert line breaks within an otherwise unbreakable string to prevent text from overflowing its line box.
... the property was originally a nonstandard and unprefixed microsoft extension called word-wrap, and was implemented by most b
rowsers with the same name.
paint() - CSS: Cascading Style Sheets
b
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/b
rowser-compat-data and send us a pull request.
pointer-events - CSS: Cascading Style Sheets
b
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/b
rowser-compat-data and send us a pull request.
repeating-conic-gradient() - CSS: Cascading Style Sheets
b
rowsers supporting repeating conic gradients also accept percent values, with 100% equaling 360 degrees, but this is not in the specification.
... accessibility concerns b
rowsers do not provide any special information on background images to assistive technology.
right - CSS: Cascading Style Sheets
b
rowser 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/b
rowser-compat-data and send us a pull request.
ruby-position - CSS: Cascading Style Sheets
working draft initial definition b
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/b
rowser-compat-data and send us a pull request.
<shape> - CSS: Cascading Style Sheets
b
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/b
rowser-compat-data and send us a pull request.
text-combine-upright - CSS: Cascading Style Sheets
] examples digits the digits value requires less markup than the all value when digits are being combined, but it is currently not very widely supported by b
rowsers.
... html <p lang="ja" class="exampletext">平成20年4月16日に</p> css .exampletext { writing-mode: vertical-lr; text-combine-upright: digits 2; font: 36px serif; } results screenshotlive sample all the all value requires markup around every piece of horizontal text, but it is currently supported by more b
rowsers than the digits value.
text-decoration-skip-ink - CSS: Cascading Style Sheets
auto the default — the b
rowser may interrupt underlines and overlines so that they do not touch or closely approach a glyph.
... all the b
rowser must interrupt underlines and overlines so that they do not touch or closely approach a glyph.
width - CSS: Cascading Style Sheets
auto the b
rowser will calculate and select a width for the specified element.
... mdn understanding wcag, guideline 1.4 explanations understanding success criterion 1.4.4 | understanding wcag 2.0 formal definition initial valueautoapplies toall elements but non-replaced inline elements, table
rows, and row groupsinheritednopercentagesrefer to the width of the containing blockcomputed valuea percentage or auto or the absolute lengthanimation typea length, percentage or calc(); formal syntax auto | <length> | <percentage> | min-content | max-content | fit-content(<length-percentage>)where <length-percentage> = <length> | <percentage> examples default width p.goldie { background: gold;...
writing-mode - CSS: Cascading Style Sheets
formal definition initial valuehorizontal-tbapplies toall elements except table row groups, table column groups, table
rows, and table columnsinheritedyescomputed valueas specifiedanimation typediscrete formal syntax horizontal-tb | vertical-rl | vertical-lr | sideways-rl | sideways-lr examples using multiple writing modes this example demonstrates all of the writing modes, showing each with text in various languages.
...tical-rl; -ms-writing-mode: vertical-rl; } .example.text4 span, .example.text4 { writing-mode: sideways-lr; -webkit-writing-mode: sideways-lr; -ms-writing-mode: sideways-lr; } .example.text5 span, .example.text5 { writing-mode: sideways-rl; -webkit-writing-mode: sideways-rl; -ms-writing-mode: sideways-rl; } result this image shows what the output should look like, in case your b
rowser's support for writing-mode is incomplete: specifications specification status comment css writing modes level 4the definition of 'writing-mode' in that specification.
Web Audio playbackRate explained - Developer guides
defaultplaybackrate and ratechange in addition to playbackrate, we also have a defaultplaybackrate property available, which lets us set the default playback rate: the playback rate to which the media resets; for example, if we change the source of the video, or (in some b
rowsers) when an ended event is generated.
... b
rowser 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 b
rowsers stop playing audio outside playbackrate bounds of 0.5 and 4, leaving the video playing silently.
Audio and video manipulation - Developer guides
having native audio and video in the b
rowser means we can use these data streams with technologies such as <canvas>, webgl or web audio api to modify audio and video directly, for example adding reverb/compression effects to audio, or grayscale/sepia filters to video.
...for efficiency, you should consider using requestanimationframe() instead of settimeout() when running on b
rowsers that support it.
Creating and triggering events - Developer guides
such events are commonly called synthetic events, as opposed to the events fired by the b
rowser itself.
... this constructor is supported in most modern b
rowsers (with internet explorer being the exception).
Introduction to Web development - Developer guides
html elements reference guide — a comprehensive guide to html elements with details on how b
rowsers support them css getting started with css — an absolute beginners guide to css covers basic concepts and fundamentals css reference guide — a complete guide to css with details on the level of gecko/firefox support for each.
... sitepoint a reliable reference site for learning html, css and javascript which also mentions feature support across different b
rowsers and known b
rowser bugs.
A hybrid approach - Developer guides
using user-agent detection specifically for content and not layout also allows you to have a single url for each piece of content, so that the content can adapt its layout to the user’s b
rowser.
...for example, you may not even need to adjust your content based on what actual device a user is using — just knowing whether a feature is present on their b
rowser is often good enough.
HTML attribute: required - HTML: Hypertext Markup Language
note color and range don't support required, but type color defaults to #00000, and range defaults to the midpoint between min and max -- with min and max defaulting to 0 and 100 respectively in most b
rowsers if not declared -- so always has a value.
...assistive technology should inform the user that the form control in mandatory based on the required attribute, but adding aria-required="true" doesn't hurt, in case the b
rowser / screen reader combination does not support required yet.
<embed>: The Embed External Content element - HTML: Hypertext Markup Language
this content is provided by an external application or other source of interactive content such as a b
rowser plug-in.
... keep in mind that most modern b
rowsers have deprecated and removed support for b
rowser plug-ins, so relying upon <embed> is generally not wise if you want your site to be operable on the average user's b
rowser.
<font> - HTML: Hypertext Markup Language
the document text in the default style is rendered in the first font face that the client's b
rowser supports.
... if no font listed is installed on the local system, the b
rowser typically defaults to the proportional or fixed-width font for that system.
<hgroup> - HTML: Hypertext Markup Language
it is partially implemented in most b
rowsers, though, so is unlikely to go away.
... however, given that a key purpose of the <hgroup> element is to affect how headings are displayed by the outline algorithm defined in the html specification—but the html outline algorithm is not implemented in any b
rowsers—then the <hgroup> semantics are in practice only theoretical.
<input type="button"> - HTML: Hypertext Markup Language
in this example, s is specified as the access key (you'll need to press s plus the particular modifier keys for your b
rowser/os combination; see accesskey for a useful list of those).
...on" value="button 2"> <input type="button" value="button 3"> </fieldset> const button = document.queryselector('input'); const fieldset = document.queryselector('fieldset'); button.addeventlistener('click', disablebutton); function disablebutton() { fieldset.disabled = true; window.settimeout(function() { fieldset.disabled = false; }, 2000); } note: firefox will, unlike other b
rowsers, by default, persist the dynamic disabled state of a <button> across page loads.
<main> - HTML: Hypertext Markup Language
prefer using the <main> element over declaring role="main", unless there are legacy b
rowser support concerns.
... <body> <a href="#main-content">skip to main content</a> <!-- navigation and header content --> <main id="main-content"> <!-- main page content --> </main> </body> webaim: "skip navigation" links reader mode b
rowser reader mode functionality looks for the presence of the <main> element, as well as heading and content sectioning elements when converting content into a specialized reader view.
<menu> - HTML: Hypertext Markup Language
contextmenu="popup-menu"> right-click to see the adjusted context menu </div> <menu type="context" id="popup-menu"> <menuitem>action</menuitem> <menuitem>another action</menuitem> <hr/> <menuitem>separated action</menuitem> </menu> css div { width: 300px; height: 80px; background-color: lightgreen; } result menu button menu buttons haven't been implemented in any known b
rowsers yet.
...--> <button type="menu" menu="popup-menu"> dropdown </button> <menu type="context" id="popup-menu"> <menuitem>action</menuitem> <menuitem>another action</menuitem> <hr/> <menuitem>separated action</menuitem> </menu> result toolbar toolbar menus haven't been implemented in any known b
rowsers yet.
<optgroup> - HTML: Hypertext Markup Language
often b
rowsers grey out such control and it won't receive any b
rowsing events, like mouse clicks or focus-related ones.
... label the name of the group of options, which the b
rowser can use when labeling the options in the user interface.
<pre>: The Preformatted Text element - HTML: Hypertext Markup Language
in modern b
rowser this hint is ignored and no visual effect results in its present; to achieve such an effect, use css white-space instead.
... people experiencing low vision conditions and b
rowsing with the aid of assistive technology such as a screen reader may not understand what the preformatted text characters are representing when they are read out in sequence.
<rb>: The Ruby Base element - HTML: Hypertext Markup Language
the b
rowser can then fill in the full element in the rendered version.
...in this case we don't need to include <rb> elements: <ruby> 漢 <rp>(</rp><rt>kan</rt><rp>)</rp> 字 <rp>(</rp><rt>ji</rt><rp>)</rp> </ruby> <ruby> <rb>漢<rb>字 <rp>(</rp><rt>kan<rt>ji<rp>)</rp> </ruby> body { font-size: 22px; } the output looks like so: the html above might look something like this when rendered by a b
rowser without ruby support: 漢字 (kan ji) body { font-size: 22px; } note: see the article about the <ruby> element for further examples.
<rp>: The Ruby Fallback Parenthesis element - HTML: Hypertext Markup Language
the html ruby fallback parenthesis (<rp>) element is used to provide fall-back parentheses for b
rowsers that do not support display of ruby annotations using the <ruby> element.
... <ruby> 漢 <rp>(</rp><rt>kan</rt><rp>)</rp> 字 <rp>(</rp><rt>ji</rt><rp>)</rp> </ruby> css body { font-size: 22px; } the result looks like this in your b
rowser: the html above rendered by a b
rowser without ruby support might look like this: 漢 (kan) 字 (ji) body { font-size: 22px; } see the article about the <ruby> element for further examples.
<samp>: The Sample Output element - HTML: Hypertext Markup Language
its contents are typically rendered using the b
rowser's default monospaced font (such as courier or lucida console).
... usage notes you can use a css rule to override the b
rowser's default font face for the <samp> element; however, it's possible that the b
rowser's preferences may take precedence over any css you specify.
<spacer> - HTML: Hypertext Markup Language
however, <spacer> no longer supported by any major b
rowser and the same effects can now be achieved using simple css.
... firefox, which is the descendant of netscape's b
rowsers, removed support for <spacer> in version 4.
<strong>: The Strong Importance element - HTML: Hypertext Markup Language
b
rowsers typically render the contents in bold type.
... it may help to realize that both are valid and semantic elements in html5 and that it's a coincidence that they both have the same default styling (boldface) in most b
rowsers (although some older b
rowsers actually underline <strong>).
<tt>: The Teletype Text element (obsolete) - HTML: Hypertext Markup Language
<p>enter the following at the telnet command prompt: <code>set localecho</code><br /> the telnet client should display: <tt>local echo is on</tt></p> result overriding the default font you can override the b
rowser's default font—if the b
rowser permits you to do so, which it isn't required to do—using css: css tt { font-family: "lucida console", "menlo", "monaco", "courier", monospace; } html <p>enter the following at the telnet command prompt: <code>set localecho</code><br /> the telnet client should display: <tt>local echo is on</tt></p> result usage notes the <tt> element...
... is, by default, rendered using the b
rowser's default non-proportional font.
<ul>: The Unordered List element - HTML: Hypertext Markup Language
the interpretation of this attribute depends on the user agent, and it doesn't work in all b
rowsers.
...the values defined under html3.2 and the transitional version of html 4.0/4.01 are: circle disc square a fourth bullet type has been defined in the webtv interface, but not all b
rowsers support it: triangle.
<var>: The Variable element - HTML: Hypertext Markup Language
it's typically presented using an italicized version of the current typeface, although that behavior is b
rowser-dependent.
...<var> is commonly used include: <code>: the html code element <kbd>: the html keyboard input element <samp>: the html sample output element if you encounter code that is mistakenly using <var> for style purposes rather than semantic purposes, you should either use a <span> with appropriate css or, an appropriate semantic element among the following: <em> <i> <q> default style most b
rowsers apply font-style to "italic" when rendering <var>.
dir - HTML: Hypertext Markup Language
that way, the text will display correctly even on a b
rowser that doesn't support css or has the css deactivated.
... b
rowsers might allow users to change the directionality of <input> and <textarea>s in order to assist with authoring content.
draggable - HTML: Hypertext Markup Language
the draggable global attribute is an enumerated attribute that indicates whether the element can be dragged, either with native b
rowser behavior or the html drag and drop api.
... if this attribute is not set, its default value is auto, which means drag behavior is the default b
rowser behavior: only text selections, images, and links can be dragged.
title - HTML: Hypertext Markup Language
">hovering here will show nothing.</p> </div> result accessibility concerns use of the title attribute is highly problematic for: people using touch-only devices people navigating with keyboards people navigating with assistive technology such as screen readers or magnifiers people experiencing fine motor control impairment people with cognitive concerns this is due to inconsistent b
rowser support, compounded by the additional assistive technology parsing of the b
rowser-rendered page.
... if a tooltip effect is desired, it is better to use a more accessible technique that can be accessed with the above b
rowsing methods.
Reason: CORS disabled - HTTP
a request that needs to use cors was attempted, but cors is disabled in the user's b
rowser.
... when this happens, the user needs to turn cors back on in their b
rowser.
CORS errors - HTTP
if the cors configuration isn't setup correctly, the b
rowser console will present an error like "cross-origin request blocked: the same origin policy disallows reading the remote resource at $somesite" indicating that the request was blocked due to violating the cors security rules.
...the only way to determine what specifically went wrong is to look at the b
rowser's console for details.
HTTP conditional requests - HTTP
besides the setting of the validators on the server side, this mechanism is transparent: all b
rowsers manage a cache and send such conditional requests without any special work to be done by web developers.
...once achieved, the b
rowser will serve the expected conditional requests.
Accept-Charset - HTTP
b
rowsers usually don't send this header, as the default value for each resource is usually correct and transmitting it would allow fingerprinting.
...to guarantee better privacy through less configuration-based entropy, all b
rowsers omit the accept-charset header: internet explorer 8+, safari 5+, opera 11+, firefox 10+ and chrome 27+ no longer send it.
Accept-Ranges - HTTP
in presence of an accept-ranges header, the b
rowser may try to resume an interrupted download, rather than to start it from the start again.
... none no range unit is supported, this makes the header equivalent of its own absence and is therefore rarely used, though some b
rowsers, like ie9, it is used to disable or remove the pause buttons in the download manager.
CSP: base-uri - HTTP
some b
rowsers specifically exclude blob and filesystem from source directives.
...specifying nonce makes a modern b
rowser ignore 'unsafe-inline' which could still be set for older b
rowsers without nonce support.
CSP: default-src - HTTP
some b
rowsers specifically exclude blob and filesystem from source directives.
...specifying nonce makes a modern b
rowser ignore 'unsafe-inline' which could still be set for older b
rowsers without nonce support.
CSP: font-src - HTTP
some b
rowsers specifically exclude blob and filesystem from source directives.
...specifying nonce makes a modern b
rowser ignore 'unsafe-inline' which could still be set for older b
rowsers without nonce support.
CSP: frame-ancestors - HTTP
setting this directive to 'none' is similar to x-frame-options: deny (which is also supported in older b
rowsers).
...some b
rowsers specifically exclude blob and filesystem from source directives.
CSP: img-src - HTTP
some b
rowsers specifically exclude blob and filesystem from source directives.
...specifying nonce makes a modern b
rowser ignore 'unsafe-inline' which could still be set for older b
rowsers without nonce support.
CSP: manifest-src - HTTP
some b
rowsers specifically exclude blob and filesystem from source directives.
...specifying nonce makes a modern b
rowser ignore 'unsafe-inline' which could still be set for older b
rowsers without nonce support.
CSP: media-src - HTTP
some b
rowsers specifically exclude blob and filesystem from source directives.
...specifying nonce makes a modern b
rowser ignore 'unsafe-inline' which could still be set for older b
rowsers without nonce support.
CSP: navigate-to - HTTP
some b
rowsers specifically exclude blob and filesystem from source directives.
...specifying nonce makes a modern b
rowser ignore 'unsafe-inline' which could still be set for older b
rowsers without nonce support.
CSP: object-src - HTTP
some b
rowsers specifically exclude blob and filesystem from source directives.
...specifying nonce makes a modern b
rowser ignore 'unsafe-inline' which could still be set for older b
rowsers without nonce support.
CSP: prefetch-src - HTTP
some b
rowsers specifically exclude blob and filesystem from source directives.
...specifying nonce makes a modern b
rowser ignore 'unsafe-inline' which could still be set for older b
rowsers without nonce support.
CSP: report-uri - HTTP
though the report-to directive is intended to replace the deprecated report-uri directive, report-to isn’t supported in most b
rowsers yet.
... so for compatibility with current b
rowsers while also adding forward compatibility when b
rowsers get report-to support, you can specify both report-uri and report-to: content-security-policy: ...; report-uri https://endpoint.com; report-to groupname in b
rowsers that support report-to, the report-uri directive will be ignored.
CSP: sandbox - HTTP
allow-top-navigation allows the page to navigate (load) content to the top-level b
rowsing context.
... allow-top-navigation-by-user-activation lets the resource navigate the top-level b
rowsing context, but only if initiated by a user gesture.
CSP: script-src-attr - HTTP
some b
rowsers specifically exclude blob and filesystem from source directives.
...specifying nonce makes a modern b
rowser ignore 'unsafe-inline' which could still be set for older b
rowsers without nonce support.
CSP: script-src-elem - HTTP
some b
rowsers specifically exclude blob and filesystem from source directives.
...specifying nonce makes a modern b
rowser ignore 'unsafe-inline' which could still be set for older b
rowsers without nonce support.
CSP: style-src-attr - HTTP
some b
rowsers specifically exclude blob and filesystem from source directives.
...specifying nonce makes a modern b
rowser ignore 'unsafe-inline' which could still be set for older b
rowsers without nonce support.
CSP: style-src-elem - HTTP
some b
rowsers specifically exclude blob and filesystem from source directives.
...specifying nonce makes a modern b
rowser ignore 'unsafe-inline' which could still be set for older b
rowsers without nonce support.
CSP: style-src - HTTP
some b
rowsers specifically exclude blob and filesystem from source directives.
...specifying nonce makes a modern b
rowser ignore 'unsafe-inline' which could still be set for older b
rowsers without nonce support.
CSP: worker-src - HTTP
some b
rowsers specifically exclude blob and filesystem from source directives.
...specifying nonce makes a modern b
rowser ignore 'unsafe-inline' which could still be set for older b
rowsers without nonce support.
Content-Security-Policy-Report-Only - HTTP
a b
rowser capable of enforcing csp will send the following violation report as a post request to http://example.com/_/csp-reports, when the document is visited: { "csp-report": { "document-uri": "http://example.com/signup.html", "referrer": "", "blocked-uri": "http://example.com/css/style.css", "violated-directive": "style-src cdn.example.com", "original-policy": "default-src 'none...
...for example, when the signup.html would attempt to load css from http://anothercdn.example.com/stylesheet.css, the b
rowser would not include the full path but only the origin (http://anothercdn.example.com).
Referrer-Policy - HTTP
there is effort from b
rowsers in moving to a stricter default value, namely strict-origin-when-cross-origin (see https://github.com/whatwg/fetch/pull/952), consider using this value (or a stricter one), if possible, when changing the referrer-policy.
...om/page https://example.com/otherpage https://example.com/page https://mozilla.org https://example.com/ http://example.org (no referrer) unsafe-url https://example.com/page?q=123 anywhere https://example.com/page?q=123 specifying a fallback policy if you want to specify a fallback policy in any case the desired policy hasn't got wide enough b
rowser support, use a comma-separated list with the desired policy specified last: referrer-policy: no-referrer, strict-origin-when-cross-origin in the above scenario, no-referrer will only be used if strict-origin-when-cross-origin is not supported by the b
rowser.
Proxy servers and tunneling - HTTP
forward proxies can also be anonymous proxies and allow users to hide their ip address while b
rowsing the web or using other internet services.
... proxy auto-configuration (pac) a proxy auto-configuration (pac) file is a javascript function that determines whether web b
rowser requests (http, https, and ftp) go directly to the destination or are forwarded to a web proxy server.
103 Early Hints - HTTP
syntax 103 early hints specifications specification status comments rfc 8297: 103 early hints ietf rfc initial definition b
rowser 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/b
rowser-compat-data and send us a pull request.
HTTP response status codes - HTTP
in the b
rowser, this means the url is not recognized.
...this response is used much more since some b
rowsers, like chrome, firefox 27+, or ie9, use http pre-connection mechanisms to speed up surfing.
Concurrency model and the event loop - JavaScript
the b
rowser mitigates this with the "a script is taking too long to run" dialog.
... adding messages in web b
rowsers, messages are added anytime an event occurs and there is an event listener attached to it.
Grammar and types - JavaScript
basics javascript bor
rows most of its syntax from java, c, and c++, but it has also been influenced by awk, perl, and python.
... note : trailing commas can create errors in older b
rowser versions and it is a best practice to remove them.
Using Promises - JavaScript
error propagation you might recall seeing failurecallback three times in the pyramid of doom earlier, compared to only once at the end of the promise chain: dosomething() .then(result => dosomethingelse(result)) .then(newresult => dothirdthing(newresult)) .then(finalresult => console.log(`got the final result: ${finalresult}`)) .catch(failurecallback); if there's an exception, the b
rowser will look down the chain for .catch() handlers or onrejected.
...unterminated promise chains lead to uncaught promise rejections in most b
rowsers.
About the JavaScript reference - JavaScript
the javascript language is intended to be used within some larger environment, be it a b
rowser, server-side scripts, or similar.
... for the most part, this reference attempts to be environment-agnostic and does not target a web b
rowser environment.
TypeError: can't define property "x": "obj" is not extensible - JavaScript
examples adding new properties to a non-extensible objects in strict mode, attempting to add new properties to a non-extensible object th
rows a typeerror.
... 'use strict'; var obj = {}; object.preventextensions(obj); obj.x = 'foo'; // typeerror: can't define property "x": "obj" is not extensible in both, strict mode and sloppy mode, a call to object.defineproperty() th
rows when adding a new property to a non-extensible object.
SyntaxError: "x" is a reserved identifier - JavaScript
var colorenum = { red: 0, green: 1, blue: 2 }; var list = ["potatoes", "rice", "fries"]; update older b
rowsers if you are using an older b
rowser that does not yet implement let or class, for example, you should update to a more recent b
rowser version that does support these new language features.
... "use strict"; class docarchiver {} // syntaxerror: class is a reserved identifier // (th
rows in older b
rowsers only, e.g.
Default parameters - JavaScript
this means that functions and variables declared in the function body cannot be referred to from default value parameter initializers; attempting to do so th
rows a run-time referenceerror.
... the following function will throw a referenceerror when invoked, because the default parameter value does not have access to the child scope of the function body: function f(a = go()) { // th
rows a `referenceerror` when `f` is invoked.
Array.prototype[@@iterator]() - JavaScript
examples iteration using for...of loop html <ul id="letterresult"> </ul> javascript var arr = ['a', 'b', 'c']; var earr = arr[symbol.iterator](); var letterresult = document.getelementbyid('letterresult'); // your b
rowser must support for..of loop // and let-scoped variables in for loops // const and var could also be used for (let letter of earr) { letterresult.innerhtml += "<li>" + letter + "</li>"; } result alternative iteration var arr = ['a', 'b', 'c', 'd', 'e']; var earr = arr[symbol.iterator](); console.log(earr.next().value); // a console.log(earr.next().value); // b console.log(earr.next().value)...
... function logiterable(it) { if (!(symbol.iterator in object.getprototypeof(it) /* or "symbol.iterator in object.__proto__" or "it[symbol.iterator]" */)) { console.log(it, ' is not an iterable object...'); return; } var iterator = it[symbol.iterator](); // your b
rowser must support for..of loop // and let-scoped variables in for loops // const and var could also be used for (let letter of iterator) { console.log(letter); } } // array logiterable(['a', 'b', 'c']); // a // b // c // string logiterable('abc'); // a // b // c logiterable(123); // 123 " is not an iterable object..." specifications specification ecmascript (...
Atomics.add() - JavaScript
exceptions th
rows a typeerror, if typedarray is not one of the allowed integer types.
... th
rows a rangeerror, if index is out of bounds in the typedarray.
Atomics.and() - JavaScript
exceptions th
rows a typeerror, if typedarray is not one of the allowed integer types.
... th
rows a rangeerror, if index is out of bounds in the typedarray.
Atomics.compareExchange() - JavaScript
exceptions th
rows a typeerror, if typedarray is not one of the allowed integer types.
... th
rows a rangeerror, if index is out of bounds in the typedarray.
Atomics.exchange() - JavaScript
exceptions th
rows a typeerror, if typedarray is not one of the allowed integer types.
... th
rows a rangeerror, if index is out of bounds in the typedarray.
Atomics.load() - JavaScript
exceptions th
rows a typeerror, if typedarray is not one of the allowed integer types.
... th
rows a rangeerror, if index is out of bounds in the typedarray.
Atomics.notify() - JavaScript
exceptions th
rows a typeerror, if typedarray is not a int32array.
... th
rows a rangeerror, if index is out of bounds in the typedarray.
Atomics.or() - JavaScript
exceptions th
rows a typeerror, if typedarray is not one of the allowed integer types.
... th
rows a rangeerror, if index is out of bounds in the typedarray.
Atomics.store() - JavaScript
exceptions th
rows a typeerror, if typedarray is not one of the allowed integer types.
... th
rows a rangeerror, if index is out of bounds in the typedarray.
Atomics.sub() - JavaScript
exceptions th
rows a typeerror, if typedarray is not one of the allowed integer types.
... th
rows a rangeerror, if index is out of bounds in the typedarray.
Atomics.wait() - JavaScript
exceptions th
rows a typeerror, if typedarray is not a shared int32array.
... th
rows a rangeerror, if index is out of bounds in the typedarray.
Atomics.xor() - JavaScript
exceptions th
rows a typeerror, if typedarray is not one of the allowed integer types.
... th
rows a rangeerror, if index is out of bounds in the typedarray.
Atomics - JavaScript
if waiting is not allowed in the calling agent then it th
rows an error exception.
... (most b
rowsers will not allow wait() on the b
rowser's main thread.) atomics.xor() computes a bitwise xor on the value at the specified index of the array with the provided value.
Date() constructor - JavaScript
(these formats are ietf-compliant rfc 2822 timestamps, and also strings in a version of iso8601.) note: parsing of date strings with the date constructor (and date.parse(), which works the same way) is strongly discouraged due to b
rowser differences and inconsistencies.
... examples several ways to create a date object the following examples show several ways to create javascript dates: note: parsing of date strings with the date constructor (and date.parse, they are equivalent) is strongly discouraged due to b
rowser differences and inconsistencies.
Date.prototype.getTime() - JavaScript
for example, a client b
rowser in one timezone, gettime() will be the same as a client b
rowser in any other timezone.
... reduced time precision to offer protection against timing attacks and fingerprinting, the precision of new date().gettime() might get rounded depending on b
rowser settings.
Date.parse() - JavaScript
however, invalid values in date strings not recognized as simplified iso format as defined by ecma-262 may or may not result in nan, depending on the b
rowser and values provided, e.g.: // non-iso string with invalid date values new date('23/25/2014'); will be treated as a local date of 25 november, 2015 in firefox 30 and an invalid date in safari 7.
... however, if the string is recognized as an iso format string and it contains invalid values, it will return nan in all b
rowsers compliant with es5 and later: // iso string with invalid values new date('2014-25-23').toisostring(); // th
rows "rangeerror: invalid date" in all es5-compliant b
rowsers spidermonkey's implementation-specific heuristic can be found in jsdate.cpp.
Date.prototype.toLocaleString() - JavaScript
te(date.utc(2012, 11, 12, 3, 0, 0)); // tolocalestring() without arguments depends on the // implementation, the default locale, and the default time zone console.log(date.tolocalestring()); // → "12/11/2012, 7:00:00 pm" if run in en-us locale with time zone america/los_angeles checking for support for locales and options arguments the locales and options arguments are not supported in all b
rowsers yet.
... most notably, the ie and edge b
rowsers insert bidirectional control characters around dates, so the output text will flow properly when concatenated with other text.
Error.prototype.stack - JavaScript
b
rowsers using the v8 javascript engine (such as chrome, opera 15+, android b
rowser) and ie10+, on the other hand, uses a different format (see the archived msdn error.stack docs).
... different b
rowsers set this value at different times.
Error - JavaScript
some b
rowsers include the customerror constructor in the stack trace when using es2015 classes.
...ce(this, customerror) } this.name = 'customerror' // custom debugging information this.foo = foo this.date = new date() } } try { throw new customerror('baz', 'bazmessage') } catch(e) { console.error(e.name) //customerror console.error(e.foo) //baz console.error(e.message) //bazmessage console.error(e.stack) //stacktrace } es5 custom error object all b
rowsers include the customerror constructor in the stack trace when using a prototypal declaration.
Function.prototype.apply() - JavaScript
see below for b
rowser compatibility information.
... note: many older b
rowsers—including chrome <17 and internet explorer <9—don't accept array-like objects, and will throw an exception.
Function.prototype.bind() - JavaScript
polyfill because older b
rowsers are generally also slower b
rowsers, it is far more critical than most people recognize to create performance polyfills to make the b
rowsing experience in outdated b
rowsers slightly less horrible.
...creating a bound function from the function, using the original object, neatly solves this problem: this.x = 9; // 'this' refers to global 'window' object here in a b
rowser const module = { x: 81, getx: function() { return this.x; } }; module.getx(); // returns 81 const retrievex = module.getx; retrievex(); // returns 9; the function gets invoked at the global scope // create a new function with 'this' bound to module // new programmers might confuse the // global variable 'x' with module's property 'x' const boundgetx = retrievex.bind(module); boundge...
JSON - JavaScript
consider this example where json.parse() parses the string as json and eval executes the string as javascript: let code = '"\u2028\u2029"' json.parse(code) // evaluates to "\u2028\u2029" in all engines eval(code) // th
rows a syntaxerror in old engines other differences include allowing only double-quoted strings and having no provisions for undefined or comments.
... examples example json { "b
rowsers": { "firefox": { "name": "firefox", "pref_url": "about:config", "releases": { "1": { "release_date": "2004-11-09", "status": "retired", "engine": "gecko", "engine_version": "1.7" } } } } } specifications specification ecmascript (ecma-262)the definition of 'json' in that specifica...
Math.imul() - JavaScript
multiplying two numbers stored internally as integers (which is only possible with asmjs) with imul is the only potential circumstance where math.imul may prove performant in current b
rowsers.
...unction(a, b) { var ahi = (a >>> 16) & 0xffff; var alo = a & 0xffff; var bhi = (b >>> 16) & 0xffff; var blo = b & 0xffff; // the shift by 0 fixes the sign on the high part // the final |0 converts the unsigned value into a signed value return ((alo * blo) + (((ahi * blo + alo * bhi) << 16) >>> 0) | 0); }; however, the following function is more performant because it is likely that b
rowsers in which this polyfill would be used do not optimize with an internal integer type in javascript, instead using floating points for all numbers.
Object.freeze() - JavaScript
object.isfrozen(obj); // === true // now any changes will fail obj.foo = 'quux'; // silently does nothing // silently doesn't add the property obj.quaxxor = 'the friendly duck'; // in strict mode such attempts will throw typeerrors function fail(){ 'use strict'; obj.foo = 'sparky'; // th
rows a typeerror delete obj.foo; // th
rows a typeerror delete obj.quaxxor; // returns true since attribute 'quaxxor' was never added obj.sparky = 'arf'; // th
rows a typeerror } fail(); // attempted changes through object.defineproperty; // both statements below throw a typeerror.
... a[0] = 1; // fails silently // in strict mode such attempt will throw a typeerror function fail() { "use strict" a[0] = 1; } fail(); // attempted to push a.push(2); // th
rows a typeerror the object being frozen is immutable.
Object.setPrototypeOf() - JavaScript
warning: changing the [[prototype]] of an object is, by the nature of how modern javascript engines optimize property accesses, currently a very slow operation in every b
rowser and javascript engine.
... description th
rows a typeerror exception if the object whose [[prototype]] is to be modified is non-extensible according to object.isextensible().
Promise - JavaScript
console.log(`handle rejected promise (${reason}) here.`); }); // end log.insertadjacenthtml('beforeend', thispromisecount + ') promise made (sync code terminated)'); } if ("promise" in window) { let btn = document.getelementbyid("btn"); btn.addeventlistener("click",testpromise); } else { log = document.getelementbyid('log'); log.innerhtml = "live example not available as your b
rowser doesn't support the <code>promise<code> interface."; } this example is started by clicking the button.
... (you need a b
rowser that supports promise.
Reflect.defineProperty() - JavaScript
one key difference: object.defineproperty returns the object or th
rows a typeerror if the property has not been successfully defined.
... examples using reflect.defineproperty() let obj = {} reflect.defineproperty(obj, 'x', {value: 7}) // true obj.x // 7 checking if property definition has been successful with object.defineproperty, which returns an object if successful, or th
rows a typeerror otherwise, you would use a try...catch block to catch any error that occurred while defining a property.
RegExp - JavaScript
flags in constructor starting with ecmascript 6, new regexp(/ab+c/, 'i') no longer th
rows a typeerror ("can't supply flags when constructing one regexp from another") when the first argument is a regexp and the second flags argument is present.
... extracting sub-domain name from url let url = 'http://xxx.domain.com' console.log(/[^.]+/.exec(url)[0].substr(7)) // logs 'xxx' instead of using regular expressions for parsing urls, it is usually better to use the b
rowsers built-in url parser by using the url api.
Planned changes to shared memory - JavaScript
there is standardization work ongoing that enables developers to create sharedarraybuffer objects again, but changes are needed in order to be use these across threads (i.e., postmessage() for sharedarraybuffer objects th
rows by default).
... to avoid having to check whether postmessage() th
rows, self.crossoriginisolated is being standardized (a getter that returns a boolean; true if the headers are set), available in window and worker contexts.
SharedArrayBuffer - JavaScript
depending on the system (the cpu, the os, the b
rowser) it can take a while until the change is propagated to all contexts.
...ss-origin-opener-policy: same-origin cross-origin-embedder-policy: require-corp to check if cross origin isolation has been successful, you can test against the crossoriginisolated property available to window and worker contexts: if (crossoriginisolated) { // post sharedarraybuffer } else { // do something else } see also planned changes to shared memory which is starting to roll out to b
rowsers (firefox 79, for example.) always use the new operator to create a sharedarraybuffer sharedarraybuffer constructors are required to be constructed with a new operator.
String.prototype.replace() - JavaScript
only available in b
rowser versions supporting named capturing groups.
... groups in b
rowser versions supporting named capturing groups, will be an object whose keys are the used group names, and whose values are the matched portions (undefined if not matched).
WebAssembly.CompileError() constructor - JavaScript
b
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/b
rowser-compat-data and send us a pull request.
WebAssembly.RuntimeError() constructor - JavaScript
b
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/b
rowser-compat-data and send us a pull request.
WebAssembly.RuntimeError - JavaScript
b
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/b
rowser-compat-data and send us a pull request.
WebAssembly.Table() constructor - JavaScript
b
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/b
rowser-compat-data and send us a pull request.
WebAssembly.Table.prototype.get() - JavaScript
b
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/b
rowser-compat-data and send us a pull request.
WebAssembly.Table.prototype.grow() - JavaScript
b
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/b
rowser-compat-data and send us a pull request.
WebAssembly.Table.prototype.length - JavaScript
b
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/b
rowser-compat-data and send us a pull request.
WebAssembly.Table.prototype.set() - JavaScript
b
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/b
rowser-compat-data and send us a pull request.
WebAssembly.Table - JavaScript
b
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/b
rowser-compat-data and send us a pull request.
WebAssembly.compile() - JavaScript
b
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/b
rowser-compat-data and send us a pull request.
WebAssembly.compileStreaming() - JavaScript
b
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/b
rowser-compat-data and send us a pull request.
WebAssembly.instantiate() - JavaScript
b
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/b
rowser-compat-data and send us a pull request.
WebAssembly.instantiateStreaming() - JavaScript
b
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/b
rowser-compat-data and send us a pull request.
WebAssembly.validate() - JavaScript
b
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/b
rowser-compat-data and send us a pull request.
globalThis - JavaScript
you can also use function('return this')(), but environments that disable eval(), like csp in b
rowsers, prevent use of function in this way.
... html and the windowproxy in many engines globalthis will be a reference to the actual global object, but in web b
rowsers, due to iframe and cross-window security considerations, it references a proxy around the actual global object (which you can't directly access).
parseInt() - JavaScript
ecmascript 5 clarifies that 10 (decimal) should be used, but not all b
rowsers support this yet.
...and, because older b
rowsers must be supported, always specify a radix.
Unary plus (+) - JavaScript
using the operator on bigint values th
rows a typeerror.
... examples usage with numbers const x = 1; const y = -1; console.log(+x); // 1 console.log(+y); // -1 usage with non-numbers +true // 1 +false // 0 +null // 0 +function(val){ return val } // nan +1n // th
rows typeerror: cannot convert bigint value to number specifications specification ecmascript (ecma-262)the definition of 'unary plus operator' in that specification.
async function - JavaScript
this highlights the subtle difference between return foo; and return await foo; — return foo immediately returns foo and never th
rows, even if foo is a promise that rejects.
... return await foo will wait for foo to resolve or reject if it's a promise, and th
rows before returning if it rejects.
try...catch - JavaScript
if any statement within the try-block (or in a function called from within the try-block) th
rows an exception, control is immediately shifted to the catch-block.
...of course, any new exceptions raised in the "inner" block (because the code in catch-block may do something that th
rows), will be caught by the "outer" block.
var - JavaScript
the same example as above but with a strict mode: 'use strict'; var x = 0; function f() { var x = y = 1; // th
rows a referenceerror in strict mode.
... // (th
rows a referenceerror in strict mode.) } b(); // creates z as a global variable.
JavaScript shells - JavaScript
babel repl - a b
rowser-based repl for experimenting with future javascript.
... es6console.com - an open-source javascript console to test ecmascript 2015 code inside the b
rowser.
<mfenced> - MathML
it has been removed from the latest mathml standard and modern b
rowsers no longer support it.
... examples the last separator is repeated (,) sample rendering: rendering in your b
rowser: a b c d e <math> <mfenced open="{" close="}" separators=";;,"> <mi>a</mi> <mi>b</mi> <mi>c</mi> <mi>d</mi> <mi>e</mi> </mfenced> </math> all excess is ignored (,) sample rendering: rendering in your b
rowser: a b c d e <math> <mfenced open="[" close="]" separators="||||,"> <mi>a</mi> <mi>b</mi> <mi>c</mi> <mi>d</mi> <mi>e</mi> </mfe...
<mmultiscripts> - MathML
examples using <mprescripts/> sample rendering: rendering in your b
rowser: x d c b a <math> <mmultiscripts> <mi>x</mi> <!-- base expression --> <mi>d</mi> <!-- postsubscript --> <mi>c</mi> <!-- postsuperscript --> <mprescripts /> <mi>b</mi> <!-- presubscript --> <mi>a</mi> <!-- presuperscript --> </mmultiscripts> </math> using <none/> sample rendering: rendering in your ...
...b
rowser: x c b <math> <mmultiscripts> <mi>x</mi> <!-- base expression --> <none /> <!-- postsubscript --> <mi>c</mi> <!-- postsuperscript --> <mprescripts /> <mi>b</mi> <!-- presubscript --> <none /> <!-- presuperscript --> </mmultiscripts> </math> specifications specification status comment mathml 3.0the definition of 'mmultiscripts' in that specification.
MathML
mathml reference mathml element reference details about each mathml element and compatibility information for desktop and mobile b
rowsers.
... contributors w3c math home www-math w3.org mail archive tools w3c validator mathzilla firefox add-on collection texzilla — javascript latex to mathml converter (live demo, firefox os webapp, firefox add-on, using in a web page, js program etc) latexml - convert latex documents into html+mathml web pages web equation - turn handwritten equations into mathml or latex mathjax - cross-b
rowser javascript display engine for mathematics.
Digital audio concepts - Web media technologies
you can apply a filter that nar
rows the audio bandwidth, removing any audio frequencies that you don't care about.
...this nar
rows the audio bandwidth of the sound, thereby reducing the amoung of data required to represent the signal in its compressed form.
CSS and JavaScript animation performance - Web Performance
the callback function of the method is called by the b
rowser before the next repaint on each frame.
... note: in nightly/developer edition, you should see that omta is enabled by default, so you might have to do the tests the other way around (test with it enabled first, then disable to test without omta.) summary b
rowsers are able to optimize rendering flows.
Graphic design for responsive sites - Progressive web apps (PWAs)
the downsides here are that css3 properties and svg don't work on old b
rowsers such as ie6-8 (although polyfills are available, and you could build in fallbacks), and svg isn't suitable for high detail images, such as photographs.
...these may not be supported in older b
rowsers like ie6-8, but they generally degrade gracefully, are fairly easy to write, and become much more flexible and powerful when combined with javascript and other technologies.
Applying SVG effects to HTML content - SVG: Scalable Vector Graphics
modern b
rowsers support using svg within css styles to apply graphical effects to html content.
...olor-interpolation-filters:srgb"/> </filter> </svg> the five filters are applied using the following css: p.target { filter:url(#f3); } p.target:hover { filter:url(#f5); } b.target { filter:url(#f1); } b.target:hover { filter:url(#f4); } pre.target { filter:url(#f2); } pre.target:hover { filter:url(#f3); } view this example live example: blurred text in order to blur text, webkit based b
rowsers have a (prefixed) css filter called blur (see also css filter).
SVG Conditional Processing Attributes - SVG: Scalable Vector Graphics
externalresourcesrequired requiredextensions requiredfeatures systemlanguage attributes externalresourcesrequired deprecated since svg 2 if set to true, it indicates that the b
rowser must wait for all the external resources necessary to render that element to be loaded before processing the associated element.
... value: false|true; animatable: no requiredextensions list all the b
rowser specific capabilities that must be supported by the borwser to be allowed to render the associated element.
alignment-baseline - SVG: Scalable Vector Graphics
recommendation initial definition b
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/b
rowser-compat-data and send us a pull request.
baseline-shift - SVG: Scalable Vector Graphics
recommendation initial definition b
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/b
rowser-compat-data and send us a pull request.
clip-path - SVG: Scalable Vector Graphics
b
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/b
rowser-compat-data and send us a pull request.
clip-rule - SVG: Scalable Vector Graphics
graphical elements » b
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/b
rowser-compat-data and send us a pull request.
color-interpolation-filters - SVG: Scalable Vector Graphics
recommendation initial definition b
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/b
rowser-compat-data and send us a pull request.
color-interpolation - SVG: Scalable Vector Graphics
recommendation initial definition b
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/b
rowser-compat-data and send us a pull request.
color - SVG: Scalable Vector Graphics
recommendation initial definition b
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/b
rowser-compat-data and send us a pull request.
fill-rule - SVG: Scalable Vector Graphics
e="evenodd" stroke="red" d="m110,0 h90 v90 h-90 z m130,20 h50 v50 h-50 z"/> <!-- effect of evenodd fill rule on a shape inside a shape with the path segment moving in opposite direction (one square drawn clockwise, 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> b
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/b
rowser-compat-data and send us a pull request.
fill - SVG: Scalable Vector Graphics
recommendation initial definition for shapes and texts b
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/b
rowser-compat-data and send us a pull request.
filter - SVG: Scalable Vector Graphics
recommendation initial definition b
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/b
rowser-compat-data and send us a pull request.
font-family - SVG: Scalable Vector Graphics
recommendation initial definition b
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/b
rowser-compat-data and send us a pull request.
font-style - SVG: Scalable Vector Graphics
recommendation initial definition b
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/b
rowser-compat-data and send us a pull request.
font-weight - SVG: Scalable Vector Graphics
recommendation initial definition b
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/b
rowser-compat-data and send us a pull request.
kernelUnitLength - SVG: Scalable Vector Graphics
for lighting filter primitives, it indicates the intended distance for the x and y coordinates, for <feconvolvematrix>, it indicates the intended distance between successive columns and
rows in the kernel matrix.
... three elements are using this attribute: <feconvolvematrix>, <fediffuselighting>, and <fespecularlighting> feconvolvematrix for the <feconvolvematrix>, kernelunitlength indicates the intended distance in current filter units (i.e., units as determined by the value of primitiveunits attribute) between successive columns and
rows, respectively, in the kernelmatrix.
letter-spacing - SVG: Scalable Vector Graphics
if the attribute value is a unitless number (like 128), the b
rowser processes it as a <length> in the current user coordinate system.
... if the attribute value has a unit identifier, such as .25em or 1%, then the b
rowser converts the <length> into its corresponding value in the current user coordinate system.
pointer-events - SVG: Scalable Vector Graphics
b
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/b
rowser-compat-data and send us a pull request.
shape-rendering - SVG: Scalable Vector Graphics
recommendation initial definition b
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/b
rowser-compat-data and send us a pull request.
spreadMethod - SVG: Scalable Vector Graphics
recommendation initial definition for <lineargradient> b
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/b
rowser-compat-data and send us a pull request.
stroke-dasharray - SVG: Scalable Vector Graphics
b
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/b
rowser-compat-data and send us a pull request.
stroke-dashoffset - SVG: Scalable Vector Graphics
b
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/b
rowser-compat-data and send us a pull request.
stroke-linecap - SVG: Scalable Vector Graphics
ero length path --> <path d="m3,3 h0" stroke="black" stroke-linecap="square" /> <!-- the following pink lines highlight the position of the path for each stroke --> <path d="m1,1 h4" stroke="pink" stroke-width="0.025" /> <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> b
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/b
rowser-compat-data and send us a pull request.
stroke-linejoin - SVG: Scalable Vector Graphics
#highlight" x="6" /> <use xlink:href="#highlight" x="12" /> <use xlink:href="#highlight" x="2" y="6" /> <use xlink:href="#highlight" x="8" y="6" /> </svg> usage context value arcs | bevel |miter | miter-clip | round default value miter animatable yes arcs note: the arcs value as been introduced in svg2 and it isn't widely supported yet, see b
rowser compatibility bellow for details.
...cy="5" r="0.05" fill="pink" /> <path d="m7,5 l0.75,-3 l0.75,3" stroke="pink" fill="none" stroke-width="0.025" /> <circle cx="7" cy="5" r="0.05" fill="pink" /> <circle cx="7.75" cy="2" r="0.05" fill="pink" /> <circle cx="8.5" cy="5" r="0.05" fill="pink" /> </g> </svg> miter-clip note: the miter-clip value as been introduced in svg2 and it isn't widely supported yet, see b
rowser compatibility bellow for details.
stroke-miterlimit - SVG: Scalable Vector Graphics
b
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/b
rowser-compat-data and send us a pull request.
stroke-width - SVG: Scalable Vector Graphics
b
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/b
rowser-compat-data and send us a pull request.
stroke - SVG: Scalable Vector Graphics
recommendation initial definition for shapes and texts b
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/b
rowser-compat-data and send us a pull request.
text-anchor - SVG: Scalable Vector Graphics
recommendation initial definition b
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/b
rowser-compat-data and send us a pull request.
text-rendering - SVG: Scalable Vector Graphics
recommendation initial definition b
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/b
rowser-compat-data and send us a pull request.
word-spacing - SVG: Scalable Vector Graphics
an unqualified number such as 128), the b
rowser processes the <length> as a width value in the current user coordinate system.
....25em or 1%), then the b
rowser converts the <length> into a corresponding value in the current user coordinate system.
writing-mode - SVG: Scalable Vector Graphics
recommendation initial definition b
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/b
rowser-compat-data and send us a pull request.
<foreignObject> - SVG: Scalable Vector Graphics
in the context of a b
rowser, it is most likely (x)html.
...ia-errormessage, aria-expanded, aria-flowto, aria-grabbed, aria-haspopup, aria-hidden, aria-invalid, aria-keyshortcuts, aria-label, aria-labelledby, aria-level, aria-live, aria-modal, aria-multiline, aria-multiselectable, aria-orientation, aria-owns, aria-placeholder, aria-posinset, aria-pressed, aria-readonly, aria-relevant, aria-required, aria-roledescription, aria-rowcount, aria-rowindex, aria-
rowspan, aria-selected, aria-setsize, aria-sort, aria-valuemax, aria-valuemin, aria-valuenow, aria-valuetext, role usage notes categoriesnonepermitted contentany elements or character data specifications specification status comment scalable vector graphics (svg) 2the definition of '<foreignobject>' in that specification.
<solidcolor> - SVG: Scalable Vector Graphics
note: this is an experimental technology, and not yet implemented in b
rowsers.
...--> <solidcolor id="mycolor" solid-color="gold" solid-opacity="0.8"/> <!-- lineargradient with a single color stop is a less elegant way to achieve the same effect, but it works in current b
rowsers.
<symbol> - SVG: Scalable Vector Graphics
ia-errormessage, aria-expanded, aria-flowto, aria-grabbed, aria-haspopup, aria-hidden, aria-invalid, aria-keyshortcuts, aria-label, aria-labelledby, aria-level, aria-live, aria-modal, aria-multiline, aria-multiselectable, aria-orientation, aria-owns, aria-placeholder, aria-posinset, aria-pressed, aria-readonly, aria-relevant, aria-required, aria-roledescription, aria-rowcount, aria-rowindex, aria-
rowspan, aria-selected, aria-setsize, aria-sort, aria-valuemax, aria-valuemin, aria-valuenow, aria-valuetext, role usage notes categoriescontainer element, structural elementpermitted contentany number of the following elements, in any order:animation elementsdescriptive elementsshape elementsstructural elementsgradient elements<a>, <altglyphdef>, <clippath>, <color-profile>, <cursor>, <filter>, <f...
...that means that some b
rowsers could refuse to directly display a <symbol> element even if the css display property tells otherwise.
SVG fonts - SVG: Scalable Vector Graphics
« previousnext » when svg was specified, support for web fonts was not widespread in b
rowsers.
... svg fonts are currently supported only in safari and android b
rowser.
Secure contexts - Web security
a particular document is considered to be in a secure context when it is the active document of a top-level b
rowsing context (basically, a containing window or tab) that is a secure context.
...that’s because the determination of whether or not a particular document is in a secure context is based only on considering it within the top-level b
rowsing context with which it is associated — and not whether a non-secure context happened to be used to create it.
Securing your site - Web security
privacy and the :visited selector this article discusses changes made to the getcomputedstyle() method that eliminates the ability for malicious sites to figure out the user's b
rowsing history.
... the x-frame-options response header the x-frame-options: http response header can be used to indicate whether or not a b
rowser should be allowed to render a page in a <frame>.
Using custom elements - Web Components
many modern b
rowsers implement an optimization for <style> tags either cloned from a common node or that have identical text, to allow them to share a single backing stylesheet.
...classes please note that es2015 classes cannot reliably be transpiled in babel 6 or typescript targeting legacy b
rowsers.
Transforming XML with XSLT - XSLT: Extensible Stylesheet Language Transformations
because a b
rowser provides a familiar and highly flexible interface, it is an ideal mechanism for delivering such presentation versions of xml content.
...xslt allows a stylesheet author to transform a primary xml document in two significant ways: manipulating and sorting the content, including a wholesale reordering of it if so desired, and transforming the content into a different format (and in the case of firefox, the focus is on converting it on the fly into html which can then be displayed by the b
rowser).
Caching compiled WebAssembly modules - WebAssembly
warning: experimental webassembly.module indexeddb serialization support is being removed from b
rowsers; see bug 1469395 and this spec issue.
... b
rowser support at the moment, this technique will work in firefox and edge, as they both have support for structured cloning of webassembly modules.
Exported WebAssembly functions - WebAssembly
if you load the above example in a webassembly-supporting b
rowser, and run the following lines in your console: var testfunc = othertable.get(0); typeof testfunc; you'll get the result function returned.
... if you try to call a exported wasm function that takes or returns an i64 type value, it currently th
rows an error because javascript currently has no precise way to represent an i64.
Index - WebAssembly
found 12 pages: # page tags and summary 1 webassembly landing, webassembly, wasm webassembly is a new type of code that can be run in modern web b
rowsers — it is a low-level assembly-like language with a compact binary format that runs with near-native performance and provides languages such as c/c++ with a compilation target so that they can run on the web.
... 6 converting webassembly text format to wasm webassembly, assembly, conversion, text format, wabt, wasm, wast2wasm, wat2wasm webassembly has an s-expression-based textual representation, an intermediate form designed to be exposed in text editors, b
rowser developer tools, etc.
Converting WebAssembly text format to wasm - WebAssembly
webassembly has an s-expression-based textual representation, an intermediate form designed to be exposed in text editors, b
rowser developer tools, etc.
... we need to assemble this textual representation into the assembly language the b
rowser actually reads before we can use it.
Understanding WebAssembly text format - WebAssembly
this is an intermediate form designed to be exposed in text editors, b
rowser developer tools, etc.
...although the b
rowser compiles it to something more efficient, wasm execution is defined in terms of a stack machine where the basic idea is that every type of instruction pushes and/or pops a certain number of i32/i64/f32/f64 values to/from a stack.
Using the WebAssembly JavaScript API - WebAssembly
if you save your example code now and load it a b
rowser that supports webassembly, you’ll see this in action!
...for example, to write 42 directly into the first word of linear memory, you can do this: new uint32array(memory.buffer)[0] = 42; you can then return the same value using: new uint32array(memory.buffer)[0] try this now in your demo — save what you’ve added so far, load it in your b
rowser, then try entering the above two lines in your javascript console.
Add-on Manager
t("resource://gre/modules/addonmanager.jsm"); let addonids = addonmanager.getstartupchanges(addonmanager.startup_change_disabled); if (addonids.length > 0) { // addonids is now an array of the add-on ids that have been disabled alert("note: " + addonids.length + " add-ons have been disabled."); } open add-on manager tab the add-on manager tab can be opened programatically with the function b
rowseropenaddonsmgr which is available on chrome window of "navigator:b
rowser" type.
Add-on Repository
its api provides urls that can be visited to b
rowse the repository's add-ons.
API-provided widgets
showinprivateb
rowsing whether to show the widget in private b
rowsing mode (optional, default: true) event handlers you can also define several event handlers which will be called at various stages in a widget's lifetime: event handler name description onbuild(adoc) only useful for custom widgets (and required there); a function that will be invoked with the document in which to b...
Widget Wrappers
nb: this property is writable, and will toggle all the widgets' nodes' disabled states label for api-provided widgets, the label of the widget tooltiptext for api-provided widgets, the tooltip of the widget showinprivateb
rowsing for api-provided widgets, whether the widget is visible in private b
rowsing single wrapper properties all of a wrapper's properties are read-only unless otherwise indicated.
FxAccountsOAuthClient.jsm
the fxaccountsoauthclient.jsm javascript module provides a way for b
rowser services to authenticate with the firefox accounts oauth server.
Interfacing with the Add-on Repository
installing the add-on the shownotification() routine displays a notification box offering to install the recommended add-on, if one was found, or reports an error if the search failed: shownotification: function(prompt, button, installobj) { this.install = installobj; var box = popupnotifications.show(gb
rowser.selectedb
rowser, "sample-popup", prompt, null, /* anchor id */ { label: button, accesskey: "i", callback: function() { if (popupnotifications.install) { popupnotifications.install.install(); } else { popupnotifications.remove(box); } } ...
Services.jsm
essscriptloader global parent process message manager3 prefs nsiprefbranch nsiprefbranch2 nsiprefservice preferences service prompt nsipromptservice prompt service scriptloader mozijssubscriptloader javascript subscript loader service scriptsecuritymanager nsiscriptsecuritymanager script security manager search nsib
rowsersearchservice b
rowser search service startup nsiappstartup application startup service storage mozistorageservice storage api service strings nsistringbundleservice string bundle service sysinfo nsipropertybag2 system info service telemetry nsitelemetry telemetry service tm nsithreadmanager thread manage...
Webapps.jsm
lid) getdefaultcspbylocalid: function(alocalid) getapplocalidbystoreid: function(astoreid) getappbylocalid: function(alocalid) getmanifesturlbylocalid: function(alocalid) getapplocalidbymanifesturl: function(amanifesturl) getcoreappsbasepath: function() getwebappsbasepath: function() _islaunchable: function(aapp) _notifycategoryandobservers: function(subject, topic, data, msg) registerb
rowserelementparentforapp: function(amsg, amn) receiveappmessage: function(appid, message) _clearprivatedata: function(appid, b
rowseronly, msg) _sendprogressevent: function() updatestatechanged: function appobs_update(aupdate, astate) applicationcacheavailable: function appobs_cacheavail(aapplicationcache) ...
XPCOMUtils.jsm
exceptions thrown this method th
rows an exception with the message "in generateci, don't use a component for generating classinfo" if classinfo parameter is an xpcom component.
JavaScript code modules
log.jsm (formerly log4moz) provides a log4j style api for logging, log messages to various endpoints, such as the b
rowser console or a file on disk.
Encodings for localization files
b
rowser/installer/installer.inc utf-8 toolkit/installer/unix/install.it utf-8 native windows encodings the following table lists native windows encodings, and the win_installer_charset and charset= values for each: encoding name win_installer_charset (charset.mk) charset= (windows/install.it) ansi_charset cp1252 0 baltic_charset ...
Localization content best practices
use ordered variables in string with multiple variables consider this string from /b
rowser: generalsiteidentity=this website is owned by %s\nthis has been verified by %s first thing: always add a localization comment explaining what these variables mean, even if it seems obvious.
Patching a Localization
hg diff b
rowser/chrome/b
rowser/b
rowser.dtd attach the patch to an existing bug for reference or review or create a new one if one doesn't currently exist.
Release phase
you can now visit http://hg.mozilla.org/releases/l10n-central/x-testing in your b
rowser to see the new changeset in the remote repository.
Use SQLite
ists logs (id unique, log)'); tx.executesql('insert into logs (id, log) values (1, "foobar")'); tx.executesql('insert into logs (id, log) values (2, "logmsg")'); msg = '<p>log message created and row inserted.</p>'; document.queryselector('#status').innerhtml = msg; }); db.transaction(function (tx) { tx.executesql('select * from logs', [], function (tx, results) { var len = results.
rows.length, i; msg = "<p>found
rows: " + len + "</p>"; document.queryselector('#status').innerhtml += msg; for (i = 0; i < len; i++){ msg = "<p><b>" + results.
rows.item(i).log + "</b></p>"; document.queryselector('#status').innerhtml += msg; } }, null); }); ...
Theme Packaging
theme file layout thunderbird themes are packaged in an xpi file with the following structure: theme.xpi: install.rdf preview.png icon.png chrome/ b
rowser/files communicator/files global/files mozapps/files ...
Using the Multiple Accounts API
(you may have noticed that identities 2 and 3 are shared between a few accounts...more on that later) servers servers are show in the folder pane, and in any place where the user must b
rowse or choose folders, such as the new folder dialog, search, filters, etc.
Thunderbird
thunderbird is built on the same technical platform as the firefox web b
rowser.
Add to iPhoto
of("/")+1); // build the path to download to var dest = components.classes["@mozilla.org/file/directory_service;1"] .getservice(components.interfaces.nsiproperties) .get("tmpd", components.interfaces.nsifile); dest.append(filename); dest.createunique(dest.normal_file_type, 0600); var wbp = components.classes['@mozilla.org/embedding/b
rowser/nswebb
rowserpersist;1'] .createinstance(components.interfaces.nsiwebb
rowserpersist); var ios = components.classes['@mozilla.org/network/io-service;1'] .getservice(components.interfaces.nsiioservice); var uri = ios.newuri(src, document.characterset, gb
rowser.selectedb
rowser.contentdocument.documenturiobject); wbp.persistflags &= ~components.interfaces.nsiwebb
rowser...
Declaring and Using Callbacks
if you don't, the gc might collect the relevant data structures, and the b
rowser will crash when native code attempts to invoke your callback.
UInt64
arithmetic operations const uint64 = ctypes.uint64; const int64 = ctypes.int64; function ensureuint64(aarr) { // makes elements in aarr a uint64 if it can be made, else th
rows for (var i=0; i<aarr.length; i++) { var ccon = aarr[i].constructor.name; if (ccon != 'uint64') { if (['string', 'number'].indexof(ccon) > -1) { aarr[i] = uint64(aarr[i]); } else { throw new error('invalid type at position ' + i + ' it must be a numeric string, a number, or a uint64.
Structures - Plugins
npstream represents a stream of data either produced by the b
rowser and consumed by the plug-in, or produced by the plug-in and consumed by the b
rowser.
Wait-cursor - XUL
maybe i'm missing something here, but window.setattribute(...) th
rows an error.
Inspecting web app manifests - Firefox Developer Tools
ed, you'll get the following output shown: deploying a manifest to get a manifest deployed successfully, you need to include a <link> element in the <head> of your document that points to your .webmanifest file: <link rel="manifest" href="/manifest.webmanifest"> the .webmanifest extension is recommended in the spec, and should be served with an application/manifest+json mime type, although b
rowsers generally tend to support manifests with other appropriate extensions like .json (mime type: application/json).
EXT_disjoint_timer_query.getQueryObjectEXT() - Web APIs
ext.endqueryext(ext.time_elapsed_ext); // at some point in the future, after returning control to the b
rowser var available = ext.getqueryobjectext(query, ext.query_result_available_ext); var disjoint = gl.getparameter(ext.gpu_disjoint_ext); if (available && !disjoint) { // see how much time the rendering of the object took in nanoseconds.
EffectTiming.fill - Web APIs
in order to avoid leaking memory when many filling animations overlap, the b
rowser is required to remove overlapped animations which can lead to surprising results in some cases.
Element.attributes - Web APIs
it is a namednodemap, not an array, so it has no array methods and the attr nodes' indexes may differ among b
rowsers.
Element: auxclick event - Web APIs
bubbles yes cancelable yes interface mouseevent event handler property onauxclick preventing default actions for the vast majority of b
rowsers that map middle click to opening a link in a new tab, including firefox, it is possible to cancel this behavior by calling preventdefault() from within an auxclick event handler.
Element: click event - Web APIs
this counter resets after a short interval without any clicks occurring; the specifics of how long that interval is may vary from b
rowser to b
rowser and across platforms.
Element.closest() - Web APIs
the id=div-02 var r2 = el.closest("div div"); // returns the closest ancestor which is a div in div, here it is the div-03 itself var r3 = el.closest("article > div"); // returns the closest ancestor which is a div and has a parent article, here it is the div-01 var r4 = el.closest(":not(div)"); // returns the closest ancestor which is not a div, here it is the outmost article polyfill for b
rowsers that do not support element.closest(), but carry support for element.matches() (or a prefixed equivalent, meaning ie9+), a polyfill exists: if (!element.prototype.matches) { element.prototype.matches = element.prototype.msmatchesselector || element.prototype.webkitmatchesselector; } if (!element.prototype.closest) { element.prototype.closest = function(s) { var el = this; ...
Element: compositionend event - Web APIs
{ console.log(`generated characters were: ${event.data}`); }); live example html <div class="control"> <label for="name">on macos, click in the textbox below,<br> then type <kbd>option</kbd> + <kbd>`</kbd>, then <kbd>a</kbd>:</label> <input type="text" id="example" name="example"> </div> <div class="event-log"> <label>event log:</label> <textarea readonly class="event-log-contents"
rows="8" cols="25"></textarea> <button class="clear-log">clear</button> </div> css body { padding: .2rem; display: grid; grid-template-areas: "control log"; } .control { grid-area: control; } .event-log { grid-area: log; } .event-log-contents { resize: none; } label, button { display: block; } input[type="text"] { margin: .5rem 0; } kbd { border-radius: 3px; padding: 1p...
Element: compositionstart event - Web APIs
{ console.log(`generated characters were: ${event.data}`); }); live example html <div class="control"> <label for="name">on macos, click in the textbox below,<br> then type <kbd>option</kbd> + <kbd>`</kbd>, then <kbd>a</kbd>:</label> <input type="text" id="example" name="example"> </div> <div class="event-log"> <label>event log:</label> <textarea readonly class="event-log-contents"
rows="8" cols="25"></textarea> <button class="clear-log">clear</button> </div> css body { padding: .2rem; display: grid; grid-template-areas: "control log"; } .control { grid-area: control; } .event-log { grid-area: log; } .event-log-contents { resize: none; } label, button { display: block; } input[type="text"] { margin: .5rem 0; } kbd { border-radius: 3px; padding: 1p...
Element: compositionupdate event - Web APIs
{ console.log(`generated characters were: ${event.data}`); }); live example html <div class="control"> <label for="name">on macos, click in the textbox below,<br> then type <kbd>option</kbd> + <kbd>`</kbd>, then <kbd>a</kbd>:</label> <input type="text" id="example" name="example"> </div> <div class="event-log"> <label>event log:</label> <textarea readonly class="event-log-contents"
rows="8" cols="25"></textarea> <button class="clear-log">clear</button> </div> css body { padding: .2rem; display: grid; grid-template-areas: "control log"; } .control { grid-area: control; } .event-log { grid-area: log; } .event-log-contents { resize: none; } label, button { display: block; } input[type="text"] { margin: .5rem 0; } kbd { border-radius: 3px; padding: 1p...
Element: contextmenu event - Web APIs
as a result, the first paragraph will do nothing when right-clicked, while the second paragraph will show the standard context menu offered by your b
rowser.
Element: error event - Web APIs
examples live example html <div class="controls"> <button id="img-error" type="button">generate image error</button> <img class="bad-img" /> </div> <div class="event-log"> <label>event log:</label> <textarea readonly class="event-log-contents"
rows="8" cols="30"></textarea> </div> css body { display: grid; grid-template-areas: "control log"; } .controls { grid-area: control; display: flex; align-items: center; justify-content: center; } .event-log { grid-area: log; } .event-log-contents { resize: none; } label, button { display: block; } button { height: 2rem; margin: .5rem; } img { width: 0; height: 0; }...
Element.getAttribute() - Web APIs
non-existing attributes essentially all web b
rowsers (firefox, internet explorer, recent versions of opera, safari, konqueror, and icab, as a non-exhaustive list) return null when the specified attribute does not exist on the specified element; this is what the current dom specification draft specifies.
EventTarget.removeEventListener() - Web APIs
lement.removeeventlistener("mousedown", handlemousedown, { capture: true }); // fails element.removeeventlistener("mousedown", handlemousedown, { passive: false }); // succeeds element.removeeventlistener("mousedown", handlemousedown, false); // succeeds element.removeeventlistener("mousedown", handlemousedown, true); // fails it's worth noting that some b
rowser releases have been inconsistent on this, and unless you have specific reasons otherwise, it's probably wise to use the same values used for the call to addeventlistener() when calling removeeventlistener().
ExtendableEvent.waitUntil() - Web APIs
in service workers, waituntil() tells the b
rowser that work is ongoing until the promise settles, and it shouldn't terminate the service worker if it wants that work to complete.
ExtendableEvent - Web APIs
if waituntil() is called outside of the extendableevent handler, the b
rowser should throw an invalidstateerror; note also that multiple calls will stack up, and the resulting promises will be added to the list of extend lifetime promises.
FetchEvent() - Web APIs
typically, pressing the refresh button in a b
rowser is a reload, while clicking a link and pressing the back button is not.
FetchEvent.respondWith() - Web APIs
the respondwith() method of fetchevent prevents the b
rowser's default fetch handling, and allows you to provide a promise for a response yourself.
File.fileName - Web APIs
although it may still work in some b
rowsers, its use is discouraged since it could be removed at any time.
File.lastModified - Web APIs
], 'file.bin', { lastmodified: new date(2017, 1, 1), }); console.log(filewithdate.lastmodified); //returns 1485903600000 const filewithoutdate = new file([], 'file.bin'); console.log(filewithoutdate.lastmodified); //returns current time reduced time precision to offer protection against timing attacks and fingerprinting, the precision of somefile.lastmodified might get rounded depending on b
rowser settings.
File.lastModifiedDate - Web APIs
myfileinput"); // files is a filelist object (simliar to nodelist) var files = fileinput.files; for (var i = 0; i < files.length; i++) { alert(files[i].name + " has a last modified date of " + files[i].lastmodifieddate); } reduced time precision to offer protection against timing attacks and fingerprinting, the precision of somefile.lastmodifieddate.gettime() might get rounded depending on b
rowser settings.
File.type - Web APIs
g the type of the file, for example "image/png" for png images example <input type="file" multiple onchange="showtype(this)"> function showtype(fileinput) { var files = fileinput.files; for (var i = 0; i < files.length; i++) { var name = files[i].name; var type = files[i].type; alert("filename: " + name + " , type: " + type); } } note: based on the current implementation, b
rowsers won't actually read the bytestream of a file to determine its media type.
FileError - Web APIs
don't run your app from file:// for security reasons, b
rowsers do not allow you to run your app from file://.
FormData.append() - Web APIs
note: if you specify a blob as the data to append to the formdata object, the filename that will be reported to the server in the "content-disposition" header used to vary from b
rowser to b
rowser.
FormData.set() - Web APIs
note: if you specify a blob as the data to append to the formdata object, the filename that will be reported to the server in the "content-disposition" header used to vary from b
rowser to b
rowser.
HTMLDialogElement: close event - Web APIs
ple-dialog'); dialog.addeventlistener('close', (event) => { result.textcontent = 'dialog was closed'; }); const opendialog = document.queryselector('.open-dialog'); opendialog.addeventlistener('click', () => { if (typeof dialog.showmodal === 'function') { dialog.showmodal(); result.textcontent = ''; } else { result.textcontent = 'the dialog api is not supported by this b
rowser'; } }); const closebutton = document.queryselector('.close'); closebutton.addeventlistener('click', () => { dialog.close(); }); result specifications specification status html living standardthe definition of 'close' in that specification.
HTMLElement.dir - Web APIs
b
rowsers might allow users to change the directionality of <input> and <textarea>s in order to assist with authoring content.
HTMLElement.innerText - Web APIs
html <h3>source element:</h3> <p id="source"> <style>#source { color: red; } #text { text-transform: uppercase; }</style> <span id=text>take a look at<br>how this text<br>is interpreted below.</span> <span style="display:none">hidden text</span> </p> <h3>result of textcontent:</h3> <textarea id="textcontentoutput"
rows="6" cols="30" readonly>...</textarea> <h3>result of innertext:</h3> <textarea id="innertextoutput"
rows="6" cols="30" readonly>...</textarea> javascript const source = document.getelementbyid("source"); const textcontentoutput = document.getelementbyid("textcontentoutput"); const innertextoutput = document.getelementbyid("innertextoutput"); textcontentoutput.value = source.textcontent; innerte...
HTMLElement.oncopy - Web APIs
html <h3>play with this text area:</h3> <textarea id="editor"
rows="3">try copying and pasting text into this field!</textarea> <h3>log:</h3> <p id="log"></p> javascript const log = document.getelementbyid('log'); function logcopy(event) { log.innertext = 'copy blocked!\n' + log.innertext; event.preventdefault(); } function logpaste(event) { log.innertext = 'paste blocked!\n' + log.innertext; event.preventdefault(); } const editor = document.getele...
HTMLElement.oncut - Web APIs
html <h3>play with this text area:</h3> <textarea id="editor"
rows="3">try copying and cutting the text in this field!</textarea> <h3>log:</h3> <p id="log"></p> javascript function logcopy(event) { log.innertext = 'copied!\n' + log.innertext; } function preventcut(event) { event.preventdefault(); log.innertext = 'cut blocked!\n' + log.innertext; } const editor = document.getelementbyid('editor'); const log = document.getelementbyid('log'); editor.onc...
HTMLElement.onpaste - Web APIs
html <h3>play with this text area:</h3> <textarea id="editor"
rows="3">try copying and pasting text into this field!</textarea> <h3>log:</h3> <p id="log"></p> javascript function logcopy(event) { log.innertext = 'copied!\n' + log.innertext; } function logpaste(event) { log.innertext = 'pasted!\n' + log.innertext; } const editor = document.getelementbyid('editor'); const log = document.getelementbyid('log'); editor.oncopy = logcopy; editor.onpaste = log...
HTMLFormElement.name - Web APIs
syntax var string = form.name; form.name = string; example var form1name = document.getelementbyid('form1').name; if (form1name != document.form.form1) { // b
rowser doesn't support this form of reference } specifications specification status comment html living standardthe definition of 'htmlformelement: name' in that specification.
HTMLFrameSetElement - Web APIs
htmlframesetelement.
rows is a domstring structured as a comma-seperated list specifing the height of each column inside a frameset.
HTMLHyperlinkElementUtils.origin - Web APIs
the htmlhyperlinkelementutils.origin read-only property is a usvstring containing the unicode serialization of the origin of the represented url; that is: for url using the http or https, the scheme followed by '://', followed by the domain, followed by ':', followed by the port (the default port, 80 and 443 respectively, if explicitely specified); for url using file: scheme, the value is b
rowser dependant; for url using the blob: scheme, the origin of the url following blob:.
contentDocument - Web APIs
if the iframe and the iframe's parent document are same origin, returns a document (that is, the active document in the inline frame's nested b
rowsing context), else returns null.
HTMLInputElement.select() - Web APIs
in b
rowsers where it is not supported, it is possible to replace it with a call to htmlinputelement.setselectionrange() with parameters 0 and the input's value length: <input onclick="this.select();" value="sample text" /> <!-- equivalent to --> <input onclick="this.setselectionrange(0, this.value.length);" value="sample text" /> specifications specification status comment ...
HTMLInputElement.stepDown() - Web APIs
th
rows an invalid_state_err exception: if the method is not applicable to for the current type value, if the element has no step value, if the value cannot be converted to a number, if the resulting value is above the max or below the min.
Window.personalbar - Web APIs
<!doctype html> <html> <head> <title>various dom tests</title> <script> // changing bar states on the existing window netscape.security.privilegemanager.enableprivilege("universalb
rowserwrite"); window.personalbar.visible = !window.personalbar.visible; </script> </head> <body> <p>various dom tests</p> </body> </html> notes when you load the example page above, the b
rowser displays the following dialog: to toggle the visibility of these bars, you must either sign your scripts or enable the appropriate privileges, as in the example above.
Window.pkcs11 - Web APIs
although it may still work in some b
rowsers, its use is discouraged since it could be removed at any time.
Window.resizeBy() - Web APIs
creating and resizing an external window for security reasons, it's no longer possible in firefox for a website to change the default size of a window in a b
rowser if the window wasn’t created by window.open(), or contains more than one tab.
Window.self - Web APIs
if (window.parent.frames[0] != window.self) { // this window is not the first frame in the list } furthermore, when executing in the active document of a b
rowsing context, window is a reference to the current global object and thus all of the following are equivalent: var w1 = window; var w2 = self; var w3 = window.window; var w4 = window.self; // w1, w2, w3, w4 all strictly equal, but only w2 will function in workers specifications specification status comment html living standardthe definition of 'window.self' in that speci...
Window.setImmediate() - Web APIs
this method is used to break up long running operations and run a callback function immediately after the b
rowser has completed other operations such as events and display updates.
Window.status - Web APIs
the status property of the window interface was originally intended to set the text in the status bar at the bottom of the b
rowser window.
Window.statusbar - Web APIs
<!doctype html> <html lang="en"> <head> <meta charset="utf-8" /> <title>various dom tests</title> <script> // changing bar states on the existing window netscape.security.privilegemanager.enableprivilege("universalb
rowserwrite"); window.statusbar.visible=!window.statusbar.visible; </script> </head> <body> <p>various dom tests</p> </body> </html> notes when you load the example page above, the b
rowser displays the following dialog: to toggle the visibility of these bars, you must either sign your scripts or enable the appropriate privileges, as in the example above.
Window.toolbar - Web APIs
<!doctype html> <html> <head> <title>various dom tests</title> <script> // changing bar states on the existing window netscape.security.privilegemanager.enableprivilege("universalb
rowserwrite"); window.toolbar.visible=!window.toolbar.visible; </script> </head> <body> <p>various dom tests</p> </body> </html> notes when you load the example page above, the b
rowser displays the following dialog: to toggle the visibility of these bars, you must either sign your scripts or enable the appropriate privileges, as in the example above.
WindowClient - Web APIs
the windowclient interface of the serviceworker api represents the scope of a service worker client that is a document in a b
rowsing context, controlled by an active worker.
WindowEventHandlers.onpopstate - Web APIs
the popstate event is only triggered by performing a b
rowser action, such as clicking on the back button (or calling history.back() in javascript), when navigating between two history entries for the same document.
WindowOrWorkerGlobalScope.btoa() - Web APIs
.length); for (let i = 0; i < bytes.length; i++) { bytes[i] = binary.charcodeat(i); } return string.fromcharcode(...new uint16array(bytes.buffer)); } const decoded = atob(encoded); const original = frombinary(decoded); console.log(original); // ☸☹☺☻☼☾☿ polyfill you can use a polifill from https://github.com/maxart2501/base64-js/blob/master/base64.js for b
rowsers that don't support it.
Microsoft CSS extensions - CSS: Cascading Style Sheets
-color -ms-scroll-chaining -ms-scroll-limit -ms-scroll-limit-x-max -ms-scroll-limit-x-min -ms-scroll-limit-y-max -ms-scroll-limit-y-min -ms-scroll-rails -ms-scroll-snap-points-x -ms-scroll-snap-points-y -ms-scroll-snap-x -ms-scroll-snap-y -ms-scroll-translation -ms-text-autospace -ms-touch-select -ms-wrap-flow -ms-wrap-margin -ms-wrap-through zoom pseudo-elements ::-ms-b
rowse ::-ms-check ::-ms-clear ::-ms-expand ::-ms-fill ::-ms-fill-lower ::-ms-fill-upper ::-ms-reveal ::-ms-thumb ::-ms-ticks-after ::-ms-ticks-before ::-ms-tooltip ::-ms-track ::-ms-value media features -ms-high-contrast css-related dom apis mscontentzoomfactor msgetpropertyenabled msgetregioncontent msrangecollection msregionoverflow ...
Mozilla CSS extensions - CSS: Cascading Style Sheets
tton-arrow-down button-arrow-next button-arrow-previous button-arrow-up button-bevel checkbox checkbox-container checkbox-label checkmenuitem dialog groupbox listbox menuarrow menucheckbox menuimage menuitem menuitemtext menulist menulist-button menulist-text menulist-textfield menupopup menuradio menuseparator -moz-mac-unified-toolbar -moz-win-borderless-glass -moz-win-b
rowsertabbar-toolbox -moz-win-communications-toolbox -moz-win-glass -moz-win-media-toolbox -moz-window-button-box -moz-window-button-box-maximized -moz-window-button-close -moz-window-button-maximize -moz-window-button-minimize -moz-window-button-restore -moz-window-titlebar -moz-window-titlebar-maximized progressbar progresschunk radio radio-container radio-label radiomenuitem resiz...
Linear-gradient Generator - CSS: Cascading Style Sheets
input { margin: 0; padding: 0; width: 50px; text-align: center; -moz-box-sizing: border-box; -webkit-box-sizing: border-box; box-sizing: border-box; } .ui-input-slider-info { width: 90px; padding: 0px 10px 0px 0px; text-align: right; text-transform: lowercase; line-height: inherit; } .ui-input-slider-left, .ui-input-slider-right { width: 16px; cursor: pointer; background: url("ar
rows.png") center left no-repeat; } .ui-input-slider-right { background: url("ar
rows.png") center right no-repeat; } .ui-input-slider-name { width: 90px; padding: 0 10px 0 0; text-align: right; text-transform: lowercase; } .ui-input-slider-btn-set { width: 25px; background-color: #2c9fc9; border-radius: 5px; color: #fff; font-weight: bold; line-height: 14px; text-align: center; } .ui-i...
animation-fill-mode - CSS: Cascading Style Sheets
html <p>move your mouse over the gray box!</p> <div class="demo"> <div class="g
rowsandstays">this g
rows and stays big.</div> <div class="g
rows">this just g
rows.</div> </div> css .demo { border-top: 100px solid #ccc; height: 300px; } @keyframes grow { 0% { font-size: 0; } 100% { font-size: 40px; } } .demo:hover .g
rows { animation-name: grow; animation-duration: 3s; } .demo:hover .g
rowsandstays { animation-name: grow; animation-duration: 3s; animation-fill...
border-block-start - CSS: Cascading Style Sheets
finition initial valueas each of the properties of the shorthand:border-width: as each of the properties of the shorthand:border-top-width: mediumborder-right-width: mediumborder-bottom-width: mediumborder-left-width: mediumborder-style: as each of the properties of the shorthand:border-top-style: noneborder-right-style: noneborder-bottom-style: noneborder-left-style: nonecolor: varies from one b
rowser to anotherapplies toall elementsinheritednocomputed valueas each of the properties of the shorthand:border-width: as each of the properties of the shorthand:border-bottom-width: the absolute length or 0 if border-bottom-style is none or hiddenborder-left-width: the absolute length or 0 if border-left-style is none or hiddenborder-right-width: the absolute length or 0 if border-right-style is no...
border-inline-start - CSS: Cascading Style Sheets
finition initial valueas each of the properties of the shorthand:border-width: as each of the properties of the shorthand:border-top-width: mediumborder-right-width: mediumborder-bottom-width: mediumborder-left-width: mediumborder-style: as each of the properties of the shorthand:border-top-style: noneborder-right-style: noneborder-bottom-style: noneborder-left-style: nonecolor: varies from one b
rowser to anotherapplies toall elementsinheritednocomputed valueas each of the properties of the shorthand:border-width: as each of the properties of the shorthand:border-bottom-width: the absolute length or 0 if border-bottom-style is none or hiddenborder-left-width: the absolute length or 0 if border-left-style is none or hiddenborder-right-width: the absolute length or 0 if border-right-style is no...
border-spacing - CSS: Cascading Style Sheets
when two <length> values are specified, the first value defines the horizontal spacing between cells (i.e., the space between cells in adjacent columns), and the second value defines the vertical spacing between cells (i.e., the space between cells in adjacent
rows).
color - CSS: Cascading Style Sheets
webaim: color contrast checker mdn understanding wcag, guideline 1.4 explanations understanding success criterion 1.4.3 | w3c understanding wcag 2.0 formal definition initial valuevaries from one b
rowser to anotherapplies toall elements.
<custom-ident> - CSS: Cascading Style Sheets
also, quite a few predefined values are implemented by the different b
rowsers: disc, circle, square, decimal, cjk-decimal, decimal-leading-zero, lower-roman, upper-roman, lower-greek, lower-alpha, lower-latin, upper-alpha, upper-latin, arabic-indic, armenian, bengali, cambodian, cjk-earthly-branch, cjk-heavenly-stem, cjk-ideographic, devanagari, ethiopic-numeric, georgian, gujarati, gurmukhi, hebrew, hiragana, hiragana-iroha, japanese-formal, japanese-informal, kannada,...
flex-direction - CSS: Cascading Style Sheets
t — tink source order matters | adrian roselli mdn understanding wcag, guideline 1.3 explanations understanding success criterion 1.3.2 | w3c understanding wcag 2.0 formal definition initial valuerowapplies toflex containersinheritednocomputed valueas specifiedanimation typediscrete formal syntax row | row-reverse | column | column-reverse examples reversing flex container columns and
rows html <h4>this is a column-reverse</h4> <div id="content"> <div class="box" style="background-color:red;">a</div> <div class="box" style="background-color:lightblue;">b</div> <div class="box" style="background-color:yellow;">c</div> </div> <h4>this is a row-reverse</h4> <div id="content1"> <div class="box1" style="background-color:red;">a</div> <div class="box1" style="background-color...
float - CSS: Cascading Style Sheets
table-column block table-column-group block table-cell block table-caption block table-header-group block table-footer-group block inline-flex flex inline-grid grid other unchanged note: if you're referring to this property from javascript as a member of the htmlelement.style object, modern b
rowsers support float, but in older b
rowsers you have to spell it as cssfloat, with internet explorer versions 8 and older using stylefloat.
font - CSS: Cascading Style Sheets
prefixed system font keywords b
rowsers often implement several more, prefixed, keywords: gecko implements -moz-window, -moz-document, -moz-desktop, -moz-info, -moz-dialog, -moz-button, -moz-pull-down-menu, -moz-list, and -moz-field.
grid-column-end - CSS: Cascading Style Sheets
] | [ span && [ <integer> | <custom-ident> ] ] examples setting column end for a grid item html <div class="wrapper"> <div class="box1">one</div> <div class="box2">two</div> <div class="box3">three</div> <div class="box4">four</div> <div class="box5">five</div> </div> css .wrapper { display: grid; grid-template-columns: repeat(3, 1fr); grid-auto-
rows: 100px; } .box1 { grid-column-start: 1; grid-column-end: 4; grid-row-start: 1; grid-row-end: 3; } .box2 { grid-column-start: 1; grid-row-start: 3; grid-row-end: 5; } * {box-sizing: border-box;} .wrapper { border: 2px solid #f76707; border-radius: 5px; background-color: #fff4e6; } .wrapper > div { border: 2px solid #ffa94d; border-radius: 5px; background-color: #ff...
grid-column-start - CSS: Cascading Style Sheets
] | [ span && [ <integer> | <custom-ident> ] ] examples setting column start for a grid item html <div class="wrapper"> <div class="box1">one</div> <div class="box2">two</div> <div class="box3">three</div> <div class="box4">four</div> <div class="box5">five</div> </div> css .wrapper { display: grid; grid-template-columns: repeat(3, 1fr); grid-auto-
rows: 100px; } .box1 { grid-column-start: 1; grid-column-end: 4; grid-row-start: 1; grid-row-end: 3; } .box2 { grid-column-start: 1; grid-row-start: 3; grid-row-end: 5; } * {box-sizing: border-box;} .wrapper { border: 2px solid #f76707; border-radius: 5px; background-color: #fff4e6; } .wrapper > div { border: 2px solid #ffa94d; border-radius: 5px; background-color: #ff...
grid-column - CSS: Cascading Style Sheets
] | [ span && [ <integer> | <custom-ident> ] ] examples setting grid column size and location html <div id="grid"> <div id="item1"></div> <div id="item2"></div> <div id="item3"></div> </div> css #grid { display: grid; height: 100px; grid-template-columns: repeat(6, 1fr); grid-template-
rows: 100px; } #item1 { background-color: lime; } #item2 { background-color: yellow; grid-column: 2 / 4; } #item3 { background-color: blue; grid-column: span 2 / 7; } result specifications specification status comment css grid layoutthe definition of 'grid-column' in that specification.
grid-row-end - CSS: Cascading Style Sheets
] | [ span && [ <integer> | <custom-ident> ] ] examples setting row end for a grid item html <div class="wrapper"> <div class="box1">one</div> <div class="box2">two</div> <div class="box3">three</div> <div class="box4">four</div> <div class="box5">five</div> </div> css .wrapper { display: grid; grid-template-columns: repeat(3, 1fr); grid-auto-
rows: 100px; } .box1 { grid-column-start: 1; grid-column-end: 4; grid-row-start: 1; grid-row-end: 3; } .box2 { grid-column-start: 1; grid-row-start: 3; grid-row-end: 5; } * {box-sizing: border-box;} .wrapper { border: 2px solid #f76707; border-radius: 5px; background-color: #fff4e6; } .wrapper > div { border: 2px solid #ffa94d; border-radius: 5px; background-color: #ff...
grid-row-start - CSS: Cascading Style Sheets
] | [ span && [ <integer> | <custom-ident> ] ] examples setting row start for a grid item html <div class="wrapper"> <div class="box1">one</div> <div class="box2">two</div> <div class="box3">three</div> <div class="box4">four</div> <div class="box5">five</div> </div> css .wrapper { display: grid; grid-template-columns: repeat(3, 1fr); grid-auto-
rows: 100px; } .box1 { grid-column-start: 1; grid-column-end: 4; grid-row-start: 1; grid-row-end: 3; } .box2 { grid-column-start: 1; grid-row-start: 3; grid-row-end: 5; } * {box-sizing: border-box;} .wrapper { border: 2px solid #f76707; border-radius: 5px; background-color: #fff4e6; } .wrapper > div { border: 2px solid #ffa94d; border-radius: 5px; background-color: #ff...
grid-row - CSS: Cascading Style Sheets
] | [ span && [ <integer> | <custom-ident> ] ] examples setting grid row size and location html <div id="grid"> <div id="item1"></div> <div id="item2"></div> <div id="item3"></div> </div> css #grid { display: grid; height: 200px; grid-template-columns: 200px; grid-template-
rows: repeat(6, 1fr); } #item1 { background-color: lime; } #item2 { background-color: yellow; grid-row: 2 / 4; } #item3 { background-color: blue; grid-row: span 2 / 7; } result specifications specification status comment css grid layoutthe definition of 'grid-row' in that specification.
ime-mode - CSS: Cascading Style Sheets
/* keyword values */ ime-mode: auto; ime-mode: normal; ime-mode: active; ime-mode: inactive; ime-mode: disabled; /* global values */ ime-mode: inherit; ime-mode: initial; ime-mode: unset; the ime-mode property is only partially and inconsistently implemented in b
rowsers.
justify-content - CSS: Cascading Style Sheets
the css justify-content property defines how the b
rowser distributes space between and around content items along the main-axis of a flex container, and the inline axis of a grid container.
justify-items - CSS: Cascading Style Sheets
html <article class="container" tabindex="0"> <span>first child</span> <span>second child</span> <span>third child</span> <span>fourth child</span> </article> css html { font-family: helvetica, arial, sans-serif; letter-spacing: 1px; } article { background-color: red; display: grid; grid-template-columns: 1fr 1fr; grid-auto-
rows: 40px; grid-gap: 10px; width: 300px; justify-items: stretch; } article:hover, article:focus { justify-items: center; } article span { background-color: black; color: white; margin: 1px; text-align: center; } article, span { padding: 10px; border-radius: 7px; } article { margin: 20px; } result specifications specification status comment cs...
justify-self - CSS: Cascading Style Sheets
html <article class="container"> <span>first child</span> <span>second child</span> <span>third child</span> <span>fourth child</span> </article> css html { font-family: helvetica, arial, sans-serif; letter-spacing: 1px; } article { background-color: red; display: grid; grid-template-columns: 1fr 1fr; grid-auto-
rows: 40px; grid-gap: 10px; width: 300px; justify-items: stretch; } span:nth-child(2) { justify-self: start; } span:nth-child(3) { justify-self: center; } span:nth-child(4) { justify-self: end; } article span { background-color: black; color: white; margin: 1px; text-align: center; } article, span { padding: 10px; border-radius: 7px; } article { margin: 20px; } result s...
<length> - CSS: Cascading Style Sheets
when used within the root element font-size, it represents its initial value (a common b
rowser default is 16px, but user-defined preferences may modify this).
place-self - CSS: Cascading Style Sheets
html <article class="container"> <span>first</span> <span>second</span> <span>third</span> <span>fourth</span> </article> css html { font-family: helvetica, arial, sans-serif; letter-spacing: 1px; } article { background-color: red; display: grid; grid-template-columns: 1fr 1fr; grid-auto-
rows: 80px; grid-gap: 10px; width: 300px; } span:nth-child(2) { place-self: start center; } span:nth-child(3) { place-self: center start; } span:nth-child(4) { place-self: end; } article span { background-color: black; color: white; margin: 1px; text-align: center; } article, span { padding: 10px; border-radius: 7px; } article { margin: 20px; } result specifications ...
resize - CSS: Cascading Style Sheets
r which the overflow property is set to visible formal definition initial valuenoneapplies toelements with overflow other than visible, and optionally replaced elements representing images or videos, and iframesinheritednocomputed valueas specifiedanimation typediscrete formal syntax none | both | horizontal | vertical | block | inline examples disabling resizability of textareas in many b
rowsers, <textarea> elements are resizable by default.
text-align - CSS: Cascading Style Sheets
mdn understanding wcag, guideline 1.4 explanations understanding success criterion 1.4.8 | understanding wcag 2.0 formal definition initial valuestart, or a nameless value that acts as left if direction is ltr, right if direction is rtl if start is not supported by the b
rowser.applies toblock containersinheritedyescomputed valueas specified, except for the match-parent value which is calculated against its parent's direction value and results in a computed value of either left or rightanimation typediscrete formal syntax start | end | left | right | center | justify | match-parent examples left alignment html <p class="example"> integer elementum massa at nul...
text-decoration - CSS: Cascading Style Sheets
be careful when removing the text decoration on anchors since users often depend on the underline to denote hyperlinks.</p> <p class="underover">this text has lines above <em>and</em> below it.</p> <p class="thick">this text has a really thick purple underline in supporting b
rowsers.</p> <p class="blink">this text might blink for you, depending on the b
rowser you use.</p> specifications specification status comment css text decoration module level 4 working draft adds text-decoration-thickness; note that this isn't yet officially part of the shorthand — this is as yet unspecified.
text-justify - CSS: Cascading Style Sheets
auto the b
rowser chooses the best type of justification for the current situation based on a balance between performance and quality, but also on what is most appropriate for the language of the text (e.g., english, cjk languages, etc.).
text-orientation - CSS: Cascading Style Sheets
formal definition initial valuemixedapplies toall elements, except table row groups,
rows, column groups, and columnsinheritedyescomputed valueas specifiedanimation typediscrete formal syntax mixed | upright | sideways examples html <p>lorem ipsum dolet semper quisquam.</p> css p { writing-mode: vertical-rl; text-orientation: upright; } result specifications specification status comment css writing modes module level 3the definition of 'text...
302 Found - HTTP
a b
rowser redirects to this page but search engines don't update their links to the resource (in 'seo-speak', it is said that the 'link-juice' is not sent to the new url).
304 Not Modified - HTTP
many developer tools' network panels of b
rowsers create extraneous requests leading to 304 responses, so that access to the local cache is visible to developers.
308 Permanent Redirect - HTTP
a b
rowser redirects to this page and search engines update their links to the resource (in 'seo-speak', it is said that the 'link-juice' is sent to the new url).
407 Proxy Authentication Required - HTTP
the http 407 proxy authentication required client error status response code indicates that the request has not been applied because it lacks valid authentication credentials for a proxy server that is between the b
rowser and the server that can access the requested resource.
408 Request Timeout - HTTP
this response is used much more since some b
rowsers, like chrome, firefox 27+, and ie9, use http pre-connection mechanisms to speed up surfing.
416 Range Not Satisfiable - HTTP
content-range: bytes */12777 faced with this error, b
rowsers usually either abort the operation (for example, a download will be considered as non-resumable) or ask for the whole document again.
Indexed collections - JavaScript
let a = new array(4) for (let i = 0; i < 4; i++) { a[i] = new array(4) for (let j = 0; j < 4; j++) { a[i][j] = '[' + i + ', ' + j + ']' } } this example creates an array with the following
rows: row 0: [0, 0] [0, 1] [0, 2] [0, 3] row 1: [1, 0] [1, 1] [1, 2] [1, 3] row 2: [2, 0] [2, 1] [2, 2] [2, 3] row 3: [3, 0] [3, 1] [3, 2] [3, 3] using arrays to store other properties arrays can also be used like objects, to store related information.
Meta programming - JavaScript
to understand: reflect.apply(math.floor, undefined, [1.75]) // 1 reflect.apply(string.fromcharcode, undefined, [104, 101, 108, 108, 111]) // "hello" reflect.apply(regexp.prototype.exec, /ab/, ['confabulation']).index // 4 reflect.apply(''.charat, 'ponies', [3]) // "i" checking if property definition has been successful with object.defineproperty, which returns an object if successful, or th
rows a typeerror otherwise, you would use a try...catch block to catch any error that occurred while defining a property.
Numbers and dates - JavaScript
octal syntax isn't part of ecmascript 5, but it's supported in all b
rowsers by prefixing the octal number with a zero: 0644 === 420 and "\045" === "%".
Groups and ranges - JavaScript
= null); using named groups let personlist = `first_name: john, last_name: doe first_name: jane, last_name: smith`; let regexpnames = /first_name: (?<firstname>\w+), last_name: (?<lastname>\w+)/mg; let match = regexpnames.exec(personlist); do { console.log(`hello ${match.groups.firstname} ${match.groups.lastname}`); } while((match = regexpnames.exec(personlist)) !== null); note: not all b
rowsers support this feature; refer to the compatibility table.
Unicode property escapes - JavaScript
note: some unicode properties encompasses much more characters than some character classes (such as \w which matches only latin letters, a to z) but the latter is better supported among b
rowsers (as of january 2020).
Classes - JavaScript
support in b
rowsers is limited, but the feature can be used through a build step with systems like babel.
Date.now() - JavaScript
engines which have not been updated to support this method can work around the absence of this method using the following shim: if (!date.now) { date.now = function now() { return new date().gettime(); }; } examples reduced time precision to offer protection against timing attacks and fingerprinting, the precision of date.now() might get rounded depending on b
rowser settings.
Date.prototype.toISOString() - JavaScript
his.getutcseconds()) + '.' + (this.getutcmilliseconds() / 1000).tofixed(3).slice(2, 5) + 'z'; }; })(); } examples using toisostring() let today = new date('05 october 2011 14:48 utc') console.log(today.toisostring()) // returns 2011-10-05t14:48:00.000z the above example uses parsing of a non–standard string value that may not be correctly parsed in non–mozilla b
rowsers.
Date.prototype.toLocaleDateString() - JavaScript
w date(date.utc(2012, 11, 12, 3, 0, 0)); // tolocaledatestring() without arguments depends on the implementation, // the default locale, and the default time zone console.log(date.tolocaledatestring()); // → "12/11/2012" if run in en-us locale with time zone america/los_angeles checking for support for locales and options arguments the locales and options arguments are not supported in all b
rowsers yet.
Date.prototype.toLocaleTimeString() - JavaScript
w date(date.utc(2012, 11, 12, 3, 0, 0)); // tolocaletimestring() without arguments depends on the implementation, // the default locale, and the default time zone console.log(date.tolocaletimestring()); // → "7:00:00 pm" if run in en-us locale with time zone america/los_angeles checking for support for locales and options arguments the locales and options arguments are not supported in all b
rowsers yet.
FinalizationRegistry - JavaScript
there are also situations where even implementations that normally call cleanup callbacks are unlikely to call them: when the javascript program shuts down entirely (for instance, closing a tab in a b
rowser).
Function - JavaScript
atefunction1() { var x = 20; return new function('return x;'); // this |x| refers global |x| } function createfunction2() { var x = 20; function f() { return x; // this |x| refers local |x| above } return f; } var f1 = createfunction1(); console.log(f1()); // 10 var f2 = createfunction2(); console.log(f2()); // 20 while this code works in web b
rowsers, f1() will produce a referenceerror in node.js, as x will not be found.
Generator - JavaScript
generator.prototype.throw() th
rows an error to a generator (also finishes the generator, unless caught from within that generator).
Intl.Collator() constructor - JavaScript
ple demonstrates the different potential results for a string occurring before, after, or at the same level as another: console.log(new intl.collator().compare('a', 'c')); // → a negative value console.log(new intl.collator().compare('c', 'a')); // → a positive value console.log(new intl.collator().compare('a', 'a')); // → 0 note that the results shown in the code above can vary between b
rowsers and b
rowser versions.
Intl.Collator - JavaScript
ple demonstrates the different potential results for a string occurring before, after, or at the same level as another: console.log(new intl.collator().compare('a', 'c')); // → a negative value console.log(new intl.collator().compare('c', 'a')); // → a positive value console.log(new intl.collator().compare('a', 'a')); // → 0 note that the results shown in the code above can vary between b
rowsers and b
rowser versions.
Intl.DateTimeFormat - JavaScript
rmat(date)); // → "2:00:00.200 pm aedt" // sometimes even the us needs 24-hour time options = { year: 'numeric', month: 'numeric', day: 'numeric', hour: 'numeric', minute: 'numeric', second: 'numeric', hour12: false, timezone: 'america/los_angeles' }; console.log(new intl.datetimeformat('en-us', options).format(date)); // → "12/19/2012, 19:00:00" // to specify options but use the b
rowser's default locale, use 'default' console.log(new intl.datetimeformat('default', options).format(date)); // → "12/19/2012, 19:00:00" // sometimes it's helpful to include the period of the day options = {hour: "numeric", dayperiod: "short"}; console.log(new intl.datetimeformat('en-us', options).format(date)); // → 10 at night the used calendar and numbering formats can also be set independe...
Intl.NumberFormat() constructor - JavaScript
possible values are: "symbol" to use a localized currency symbol such as €, this is the default value, "nar
rowsymbol" to use a narrow format symbol ("$100" rather than "us$100"), "code" to use the iso currency code, "name" to use a localized currency name such as "dollar", currencysign in many locales, accounting format means to wrap the number with parentheses instead of appending a minus sign.
String.fromCodePoint() - JavaScript
polyfill the string.fromcodepoint() method has been added to ecmascript 2015 and may not be supported in all web b
rowsers or environments yet.
String.prototype.match() - JavaScript
using named capturing groups in b
rowsers which support named capturing groups, the following code captures "fox" or "cat" into a group named "animal": const paragraph = 'the quick brown fox jumps over the lazy dog.
String.prototype.repeat() - JavaScript
but anyway, most current (august 2014) b
rowsers can't handle // strings 1 << 28 chars or longer, so: if (str.length * count >= 1 << 28) throw new rangeerror('repeat count must not overflow maximum string size'); var maxcount = str.length * count; count = math.floor(math.log(count) / math.log(2)); while (count) { str += str; count--; } str += str.substring(0, maxcount - str.length); return...
String.prototype.replaceAll() - JavaScript
(the exact number of arguments depends on whether the first argument is a regexp object—and, if so, how many parenthesized submatches it specifies.) examples using replaceall 'aabbcc'.replaceall('b', '.'); // 'aa..cc' non-global regex th
rows when using a regular expression search value, it must be global.
Symbol.match - JavaScript
property attributes of symbol.match writable no enumerable no configurable no examples disabling the isregexp check the following code will throw a typeerror: '/bar/'.startswith(/bar/); // th
rows typeerror, as /bar/ is a regular expression // and symbol.match is not modified.
Symbol.toStringTag - JavaScript
orclass()); // "[object object]" custom tag with tostringtag now, with the help of tostringtag, you are able to set your own custom tag: class validatorclass { get [symbol.tostringtag]() { return 'validator'; } } object.prototype.tostring.call(new validatorclass()); // "[object validator]" tostringtag available on all dom prototype objects due to a webidl spec change in mid-2020, b
rowsers are adding a symbol.tostringtag property to all dom prototype objects.
TypedArray.prototype[@@iterator]() - JavaScript
examples iteration using for...of loop var arr = new uint8array([10, 20, 30, 40, 50]); // your b
rowser must support for..of loop // and let-scoped variables in for loops for (let n of arr) { console.log(n); } alternative iteration var arr = new uint8array([10, 20, 30, 40, 50]); var earr = arr[symbol.iterator](); console.log(earr.next().value); // 10 console.log(earr.next().value); // 20 console.log(earr.next().value); // 30 console.log(earr.next().value); // 40 console.log(earr.next().value); // 50 specifications specification ecma...
TypedArray.prototype.entries() - JavaScript
examples iteration using for...of loop var arr = new uint8array([10, 20, 30, 40, 50]); var earray = arr.entries(); // your b
rowser must support for..of loop // and let-scoped variables in for loops for (let n of earray) { console.log(n); } alternative iteration var arr = new uint8array([10, 20, 30, 40, 50]); var earr = arr.entries(); console.log(earr.next().value); // [0, 10] console.log(earr.next().value); // [1, 20] console.log(earr.next().value); // [2, 30] console.log(earr.next().value); // [3, 40] console.log(ear...
TypedArray.prototype.keys() - JavaScript
examples iteration using for...of loop var arr = new uint8array([10, 20, 30, 40, 50]); var earray = arr.keys(); // your b
rowser must support for..of loop // and let-scoped variables in for loops for (let n of earray) { console.log(n); } alternative iteration var arr = new uint8array([10, 20, 30, 40, 50]); var earr = arr.keys(); console.log(earr.next().value); // 0 console.log(earr.next().value); // 1 console.log(earr.next().value); // 2 console.log(earr.next().value); // 3 console.log(earr.next().value); // 4 spe...
TypedArray.prototype.toString() - JavaScript
compatibility if a b
rowser doesn't support the typedarray.prototype.tostring() method yet, javascript will call the tostring method of object: var numbers = new uint8array([2, 5, 8, 1, 4]) numbers.tostring(); // "[object uint8array]" specifications specification ecmascript (ecma-262)the definition of 'array.prototype.tostring' in that specification.
TypedArray.prototype.values() - JavaScript
examples iteration using for...of loop var arr = new uint8array([10, 20, 30, 40, 50]); var earray = arr.values(); // your b
rowser must support for..of loop // and let-scoped variables in for loops for (let n of earray) { console.log(n); } alternative iteration var arr = new uint8array([10, 20, 30, 40, 50]); var earr = arr.values(); console.log(earr.next().value); // 10 console.log(earr.next().value); // 20 console.log(earr.next().value); // 30 console.log(earr.next().value); // 40 console.log(earr.next().value); // 5...
decodeURI() - JavaScript
exceptions th
rows an urierror ("malformed uri sequence") exception when encodeduri contains invalid character sequences.
encodeURI() - JavaScript
encoding a lone high surrogate th
rows an urierror will be thrown if one attempts to encode a surrogate which is not part of a high-low pair, e.g., // high-low pair ok console.log(encodeuri('\ud800\udfff')); // lone high surrogate th
rows "urierror: malformed uri sequence" console.log(encodeuri('\ud800')); // lone low surrogate th
rows "urierror: malformed uri sequence" console.log(encodeuri('\udfff')); encoding for ipv6 if one wi...
encodeURIComponent() - JavaScript
le.log(encodeuricomponent(set2)); // -_.!~*'() console.log(encodeuricomponent(set3)); // %23 console.log(encodeuricomponent(set4)); // abc%20abc%20123 (the space gets encoded as %20) note that a urierror will be thrown if one attempts to encode a surrogate which is not part of a high-low pair, e.g., // high-low pair ok console.log(encodeuricomponent('\ud800\udfff')); // lone high surrogate th
rows "urierror: malformed uri sequence" console.log(encodeuricomponent('\ud800')); // lone low surrogate th
rows "urierror: malformed uri sequence" console.log(encodeuricomponent('\udfff')); use encodeuricomponent() on user-entered fields from forms post'd to the server.
await - JavaScript
if the promise is rejected, the await expression th
rows the rejected value.
class expression - JavaScript
'use strict'; let foo = class {}; // constructor property is optional foo = class {}; // re-declaration is allowed typeof foo; // returns "function" typeof class {}; // returns "function" foo instanceof object; // true foo instanceof function; // true class foo {} // th
rows syntaxerror (class declarations do not allow re-declaration) examples a simple class expression this is just a simple anonymous class expression which you can refer to using the variable foo.
new.target - JavaScript
function foo() { if (!new.target) { throw 'foo() must be called with new' } console.log('foo instantiated with new') } new foo() // logs "foo instantiated with new" foo() // th
rows "foo() must be called with new" new.target in constructors in class constructors, new.target refers to the constructor that was directly invoked by new.
void operator - JavaScript
javascript uris when a b
rowser follows a javascript: uri, it evaluates the code in the uri and then replaces the contents of the page with the returned value, unless the returned value is undefined.
class - JavaScript
class polygon { constructor(height, width) { this.name = 'polygon'; this.height = height; this.width = width; } } class square extends polygon { constructor(length) { super(length, length); this.name = 'square'; } } attempting to declare a class twice re-declaring a class using the class declaration th
rows a syntaxerror.
for await...of - JavaScript
in such case for await...of th
rows when consuming rejected promise and doesn't call finally blocks within that generator.
for...in - JavaScript
deleted, added, or modified properties a for...in loop iterates over the properties of an object in an arbitrary order (see the delete operator for more on why one cannot depend on the seeming orderliness of iteration, at least in a cross-b
rowser setting).
function* - JavaScript
()); // { value: undefined, done: true } generator as a computed property class foo { *[symbol.iterator] () { yield 1; yield 2; } } const someobj = { *[symbol.iterator] () { yield 'a'; yield 'b'; } } console.log(array.from(new foo)); // [ 1, 2 ] console.log(array.from(someobj)); // [ 'a', 'b' ] generators are not constructable function* f() {} var obj = new f; // th
rows "typeerror: f is not a constructor generator defined in an expression const foo = function* () { yield 10; yield 20; }; const bar = foo(); console.log(bar.next()); // {value: 10, done: false} generator example function* powers(n){ //endless loop to generate for(let current =n;; current *= n){ yield current; } } for(let power of powers(2)){ //controlling gen...
switch - JavaScript
block-scope variables within switch statements with ecmascript 2015 (es6) support made available in most modern b
rowsers, there will be cases where you would want to use let and const statements to declare block-scoped variables.
Template literals (Template strings) - JavaScript
s indicated by "\u{}", for example \u{2f804} hexadecimal escapes started by "\x", for example \xa9 octal literal escapes started by "\0o" and followed by one or more digits, for example \0o251 this means that a tagged template like the following is problematic, because, per ecmascript grammar, a parser looks for valid unicode escape sequences, but finds malformed syntax: latex`\unicode` // th
rows in older ecmascript versions (es2016 and earlier) // syntaxerror: malformed unicode character escape sequence es2018 revision of illegal escape sequences tagged templates should allow the embedding of languages (for example dsls, or latex), where other escapes sequences are common.
viewBox - SVG: Scalable Vector Graphics
the numbers separated by whitespace and/or a comma, which specify a rectangle in user space which is mapped to the bounds of the viewport established for the associated svg element (not the b
rowser viewport).
<circle> - SVG: Scalable Vector Graphics
ia-errormessage, aria-expanded, aria-flowto, aria-grabbed, aria-haspopup, aria-hidden, aria-invalid, aria-keyshortcuts, aria-label, aria-labelledby, aria-level, aria-live, aria-modal, aria-multiline, aria-multiselectable, aria-orientation, aria-owns, aria-placeholder, aria-posinset, aria-pressed, aria-readonly, aria-relevant, aria-required, aria-roledescription, aria-rowcount, aria-rowindex, aria-
rowspan, aria-selected, aria-setsize, aria-sort, aria-valuemax, aria-valuemin, aria-valuenow, aria-valuetext, role usage notes categoriesbasic shape element, graphics element, shape elementpermitted contentany number of the following elements, in any order:animation elementsdescriptive elements specifications specification status comment scalable vector graphics (svg) ...
<ellipse> - SVG: Scalable Vector Graphics
ia-errormessage, aria-expanded, aria-flowto, aria-grabbed, aria-haspopup, aria-hidden, aria-invalid, aria-keyshortcuts, aria-label, aria-labelledby, aria-level, aria-live, aria-modal, aria-multiline, aria-multiselectable, aria-orientation, aria-owns, aria-placeholder, aria-posinset, aria-pressed, aria-readonly, aria-relevant, aria-required, aria-roledescription, aria-rowcount, aria-rowindex, aria-
rowspan, aria-selected, aria-setsize, aria-sort, aria-valuemax, aria-valuemin, aria-valuenow, aria-valuetext, role usage notes categoriesbasic shape element, graphics element, shape elementpermitted contentany number of the following elements, in any order:animation elementsdescriptive elements specifications specification status comment scalable vector graphics (svg) ...
<feComposite> - SVG: Scalable Vector Graphics
example svg <svg width="330" height="195" viewbox="0 0 1100 650" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"> <title>example fecomposite - examples of fecomposite operations</title> <desc>four
rows of six pairs of overlapping triangles depicting the six different fecomposite operators under different opacity values and different clearing of the background.</desc> <defs> <desc>define two sets of six filters for each of the six compositing operators.
<g> - SVG: Scalable Vector Graphics
ia-errormessage, aria-expanded, aria-flowto, aria-grabbed, aria-haspopup, aria-hidden, aria-invalid, aria-keyshortcuts, aria-label, aria-labelledby, aria-level, aria-live, aria-modal, aria-multiline, aria-multiselectable, aria-orientation, aria-owns, aria-placeholder, aria-posinset, aria-pressed, aria-readonly, aria-relevant, aria-required, aria-roledescription, aria-rowcount, aria-rowindex, aria-
rowspan, aria-selected, aria-setsize, aria-sort, aria-valuemax, aria-valuemin, aria-valuenow, aria-valuetext, role usage notes categoriescontainer element, structural elementpermitted contentany number of the following elements, in any order:animation elementsdescriptive elementsshape elementsstructural elementsgradient elements<a>, <altglyphdef>, <clippath>, <color-profile>, <cursor>, <filter>, <f...
<line> - SVG: Scalable Vector Graphics
ia-errormessage, aria-expanded, aria-flowto, aria-grabbed, aria-haspopup, aria-hidden, aria-invalid, aria-keyshortcuts, aria-label, aria-labelledby, aria-level, aria-live, aria-modal, aria-multiline, aria-multiselectable, aria-orientation, aria-owns, aria-placeholder, aria-posinset, aria-pressed, aria-readonly, aria-relevant, aria-required, aria-roledescription, aria-rowcount, aria-rowindex, aria-
rowspan, aria-selected, aria-setsize, aria-sort, aria-valuemax, aria-valuemin, aria-valuenow, aria-valuetext, role usage notes categoriesbasic shape element, graphics element, shape elementpermitted contentany number of the following elements, in any order:animation elementsdescriptive elements specifications specification status comment scalable vector graphics (svg) ...
<marker> - SVG: Scalable Vector Graphics
ia-errormessage, aria-expanded, aria-flowto, aria-grabbed, aria-haspopup, aria-hidden, aria-invalid, aria-keyshortcuts, aria-label, aria-labelledby, aria-level, aria-live, aria-modal, aria-multiline, aria-multiselectable, aria-orientation, aria-owns, aria-placeholder, aria-posinset, aria-pressed, aria-readonly, aria-relevant, aria-required, aria-roledescription, aria-rowcount, aria-rowindex, aria-
rowspan, aria-selected, aria-setsize, aria-sort, aria-valuemax, aria-valuemin, aria-valuenow, aria-valuetext, role usage notes categoriescontainer elementpermitted contentany number of the following elements, in any order:animation elementsdescriptive elementsshape elementsstructural elementsgradient elements<a>, <altglyphdef>, <clippath>, <color-profile>, <cursor>, <filter>, <font>, <font-face>, <...
<path> - SVG: Scalable Vector Graphics
ia-errormessage, aria-expanded, aria-flowto, aria-grabbed, aria-haspopup, aria-hidden, aria-invalid, aria-keyshortcuts, aria-label, aria-labelledby, aria-level, aria-live, aria-modal, aria-multiline, aria-multiselectable, aria-orientation, aria-owns, aria-placeholder, aria-posinset, aria-pressed, aria-readonly, aria-relevant, aria-required, aria-roledescription, aria-rowcount, aria-rowindex, aria-
rowspan, aria-selected, aria-setsize, aria-sort, aria-valuemax, aria-valuemin, aria-valuenow, aria-valuetext, role usage notes categoriesgraphics element, shape elementpermitted contentany number of the following elements, in any order:animation elementsdescriptive elements specifications specification status comment svg pathsthe definition of '<path>' in that specific...
<pattern> - SVG: Scalable Vector Graphics
value type: <url>; default value: none; animatable: yes note: for b
rowsers implementing href, if both href and xlink:href are set, xlink:href will be ignored and only href will be used.
<polygon> - SVG: Scalable Vector Graphics
ia-errormessage, aria-expanded, aria-flowto, aria-grabbed, aria-haspopup, aria-hidden, aria-invalid, aria-keyshortcuts, aria-label, aria-labelledby, aria-level, aria-live, aria-modal, aria-multiline, aria-multiselectable, aria-orientation, aria-owns, aria-placeholder, aria-posinset, aria-pressed, aria-readonly, aria-relevant, aria-required, aria-roledescription, aria-rowcount, aria-rowindex, aria-
rowspan, aria-selected, aria-setsize, aria-sort, aria-valuemax, aria-valuemin, aria-valuenow, aria-valuetext, role usage notes categoriesbasic shape element, graphics element, shape elementpermitted contentany number of the following elements, in any order:animation elementsdescriptive elements specifications specification status comment scalable vector graphics (svg) ...
<polyline> - SVG: Scalable Vector Graphics
ia-errormessage, aria-expanded, aria-flowto, aria-grabbed, aria-haspopup, aria-hidden, aria-invalid, aria-keyshortcuts, aria-label, aria-labelledby, aria-level, aria-live, aria-modal, aria-multiline, aria-multiselectable, aria-orientation, aria-owns, aria-placeholder, aria-posinset, aria-pressed, aria-readonly, aria-relevant, aria-required, aria-roledescription, aria-rowcount, aria-rowindex, aria-
rowspan, aria-selected, aria-setsize, aria-sort, aria-valuemax, aria-valuemin, aria-valuenow, aria-valuetext, role usage notes categoriesbasic shape element, graphics element, shape elementpermitted contentany number of the following elements, in any order:animation elementsdescriptive elements specifications specification status comment scalable vector graphics (svg) ...
<rect> - SVG: Scalable Vector Graphics
ia-errormessage, aria-expanded, aria-flowto, aria-grabbed, aria-haspopup, aria-hidden, aria-invalid, aria-keyshortcuts, aria-label, aria-labelledby, aria-level, aria-live, aria-modal, aria-multiline, aria-multiselectable, aria-orientation, aria-owns, aria-placeholder, aria-posinset, aria-pressed, aria-readonly, aria-relevant, aria-required, aria-roledescription, aria-rowcount, aria-rowindex, aria-
rowspan, aria-selected, aria-setsize, aria-sort, aria-valuemax, aria-valuemin, aria-valuenow, aria-valuetext, role usage notes categoriesbasic shape element, graphics element, shape elementpermitted contentany number of the following elements, in any order:animation elementsdescriptive elements specifications specification status comment scalable vector graphics (svg) ...
<script> - SVG: Scalable Vector Graphics
while svg's script element is equivalent to the html <script> element, it has some discrepancies, like it uses the href attribute instead of src and it doesn't support ecmascript modules so far (see b
rowser compatibility below for details) html,body,svg { height:100% } <svg viewbox="0 0 10 10" xmlns="http://www.w3.org/2000/svg"> <script> // <![cdata[ window.addeventlistener('domcontentloaded', () => { function getcolor () { const r = math.round(math.random() * 255).tostring(16).padstart(2,'0') const g = math.round(math.random() * 255).tostring(16).padstart(2,'0') const b = math.round(math.random() * 255).tostring(16).padstart(2,'0') return `#${r}${g}${b}` } document.queryse...
<svg> - SVG: Scalable Vector Graphics
ia-errormessage, aria-expanded, aria-flowto, aria-grabbed, aria-haspopup, aria-hidden, aria-invalid, aria-keyshortcuts, aria-label, aria-labelledby, aria-level, aria-live, aria-modal, aria-multiline, aria-multiselectable, aria-orientation, aria-owns, aria-placeholder, aria-posinset, aria-pressed, aria-readonly, aria-relevant, aria-required, aria-roledescription, aria-rowcount, aria-rowindex, aria-
rowspan, aria-selected, aria-setsize, aria-sort, aria-valuemax, aria-valuemin, aria-valuenow, aria-valuetext, role usage notes categoriescontainer element, structural elementpermitted contentany number of the following elements, in any order:animation elementsdescriptive elementsshape elementsstructural elementsgradient elements<a>, <altglyphdef>, <clippath>, <color-profile>, <cursor>, <filter>, <f...
<text> - SVG: Scalable Vector Graphics
ia-errormessage, aria-expanded, aria-flowto, aria-grabbed, aria-haspopup, aria-hidden, aria-invalid, aria-keyshortcuts, aria-label, aria-labelledby, aria-level, aria-live, aria-modal, aria-multiline, aria-multiselectable, aria-orientation, aria-owns, aria-placeholder, aria-posinset, aria-pressed, aria-readonly, aria-relevant, aria-required, aria-roledescription, aria-rowcount, aria-rowindex, aria-
rowspan, aria-selected, aria-setsize, aria-sort, aria-valuemax, aria-valuemin, aria-valuenow, aria-valuetext, role usage notes categoriesgraphics element, text content elementpermitted contentcharacter data and any number of the following elements, in any order:animation elementsdescriptive elementstext content elements<a> specifications specification status comment sc...
<textPath> - SVG: Scalable Vector Graphics
ia-errormessage, aria-expanded, aria-flowto, aria-grabbed, aria-haspopup, aria-hidden, aria-invalid, aria-keyshortcuts, aria-label, aria-labelledby, aria-level, aria-live, aria-modal, aria-multiline, aria-multiselectable, aria-orientation, aria-owns, aria-placeholder, aria-posinset, aria-pressed, aria-readonly, aria-relevant, aria-required, aria-roledescription, aria-rowcount, aria-rowindex, aria-
rowspan, aria-selected, aria-setsize, aria-sort, aria-valuemax, aria-valuemin, aria-valuenow, aria-valuetext, role xlink attributes xlink:title usage notes categoriestext content element, text content child elementpermitted contentcharacter data and any number of the following elements, in any order:descriptive elements<a>, <altglyph>, <animate>, <animatecolor>, <set>, <tref>, <tspan> specificat...
<tspan> - SVG: Scalable Vector Graphics
ia-errormessage, aria-expanded, aria-flowto, aria-grabbed, aria-haspopup, aria-hidden, aria-invalid, aria-keyshortcuts, aria-label, aria-labelledby, aria-level, aria-live, aria-modal, aria-multiline, aria-multiselectable, aria-orientation, aria-owns, aria-placeholder, aria-posinset, aria-pressed, aria-readonly, aria-relevant, aria-required, aria-roledescription, aria-rowcount, aria-rowindex, aria-
rowspan, aria-selected, aria-setsize, aria-sort, aria-valuemax, aria-valuemin, aria-valuenow, aria-valuetext, role usage notes categoriestext content element, text content child elementpermitted contentcharacter data and any number of the following elements, in any order:descriptive elements<a>, <altglyph>, <animate>, <animatecolor>, <set>, <tref>, <tspan> specifications specification ...
Linking - SVG: Scalable Vector Graphics
ml: <html> <body> <p>this is a svg button:</p> <object width="100" height="50" type="image/svg+xml" data="button.svg"/> </body> </html> button.svg: <?xml version="1.1" encoding="utf-8"?> <svg xmlns="http://www.w3.org/2000/svg"> <a xlink:href="page2.html" target="_top"> <g> <!-- button graphical elements here --> </g> </a> </svg> the specification says that the b
rowser should navigate to the html document page2.html when the button graphics are clicked.
Namespaces crash course - SVG: Scalable Vector Graphics
versions of svg viewers prior to the release of firefox 1.5 unfortunately paid scant attention to namespaces, but they are essential to multi-xml dialect supporting user agents such as gecko-based b
rowsers which must be very strict.
SVG as an Image - SVG: Scalable Vector Graphics
many b
rowsers support svg images in: html <img> or <svg> elements css background-image gecko-specific contexts additionally, gecko 2.0 (firefox 4 / thunderbird 3.3 / seamonkey 2.1) introduced support for using svg in these contexts: css list-style-image css content svg <image> element svg <feimage> element canvas drawimage function restrictions for security purposes, gecko places some restrictions on svg content when it's being used as an image: javascript is disabled.
Paths - SVG: Scalable Vector Graphics
this interactive demo might help understand the concepts behind svg arcs: http://codepen.io/lingtalfi/pen/yalwjg (tested in chrome and firefox only, might not work in your b
rowser) « previousnext » ...
Mixed content - Web security
malicious active content can steal the user's credentials, acquire sensitive data about the user, or attempt to install malware on the user's system (by leveraging vulnerabilities in the b
rowser or its plugins, for example).